We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5df3164 commit 96bb950Copy full SHA for 96bb950
1 file changed
Cslib/Languages/Boole/examples/circular_queue.lean
@@ -16,7 +16,13 @@ program Boole;
16
17
type Array := Map int int;
18
19
-// `NextIndex(i, n)` is `(i + 1) mod n`, axiomatized without using `mod`.
+// `NextIndex(i, n)` is the usual circular-buffer successor:
20
+// `if i + 1 == n then 0 else i + 1`.
21
+//
22
+// It is axiomatized here because both obvious executable encodings currently
23
+// get in the way of this small example: `mod` is not yet convenient in these
24
+// VCs, and the direct Boole if/else form triggers an integer-valued `ite`
25
+// elaboration issue in the generated VCs.
26
function NextIndex(i : int, n : int) : int;
27
28
axiom (∀ i : int, n : int ::
0 commit comments