2 from random
import randint
4 #@ lemma G: (1==1 so 2==2) and (2==2 by 1==1)
11 #@ requires 0 <= i < len(a) and 0 <= j < len(a)
18 for i
in range(0, 11):
19 #@ invariant 2 * s == i * (i-1)
24 #@ assert 0 <= i <= 10
29 #@ invariant b >= a >= 0
31 #@ variant 200 - b - a
39 #@ assert forall i. 0 <= i < 10 -> l[i] >= 0
45 #@ invariant forall j. 0 <= j < i -> l[j] == 0
62 #@ assert at(sum, L) == 0
70 #@ assert x == 1 and y == 2
72 #@ assert x == 2 and y == 1
75 # Python's division is neither Euclidean division, nor computer division
76 #@ assert 4 // 3 == 1 and 4 % 3 == 1
77 #@ assert -4 // 3 == -2 and -4 % 3 == 2
78 #@ assert 4 // -3 == -2 and 4 % -3 == -2
79 #@ assert -4 // -3 == 1 and -4 % -3 == -1
84 return 1 if n
<= 0 else n
*mfact(n
-1)
90 # compile-command: "make -C .. -j2 && why3 prove -P alt-ergo test.py"