Skip to content
Snippets Groups Projects
Commit 0f41c425 authored by Cécile Ruet-Cros's avatar Cécile Ruet-Cros
Browse files

[wp] vset: add new tests for iota

parent f304d041
No related branches found
No related tags found
No related merge requests found
...@@ -29,6 +29,19 @@ ...@@ -29,6 +29,19 @@
logic set<integer> iota(integer n) = logic set<integer> iota(integer n) =
(n <= 0) ? {0} : \union({n}, iota(n-1)) ; (n <= 0) ? {0} : \union({n}, iota(n-1)) ;
lemma iota_ind0:
\forall integer n;
n <= 0 ==> iota(n) == {0};
lemma rec_iota_le0:
\forall integer i, n;
i \in iota(n) ==>
n <= 0 ==>
i==0;
lemma rec_iota_gt0:
\forall integer i, n;
i \in iota(n) ==>
0 < n ==>
i==n || i \in iota(n-1);
lemma rec_iota: lemma rec_iota:
\forall integer i, n; \forall integer i, n;
i \in iota(n) ==> i==n || i \in iota(n-1); i \in iota(n) ==> i==n || i \in iota(n-1);
...@@ -37,5 +50,6 @@ ...@@ -37,5 +50,6 @@
lemma iota3_compute_0in_constants: 0 \in iota(3); lemma iota3_compute_0in_constants: 0 \in iota(3);
lemma iota3_compute_2in_constants: 2 \in iota(3); lemma iota3_compute_2in_constants: 2 \in iota(3);
lemma iota3_compute_equal_constants: iota(3) == { 0, 1, 2, 3 }; lemma iota3_compute_equal_constants: iota(3) == { 0, 1, 2, 3 };
lemma iota1_compute_equal_constants: iota(1) == { 0, 1 };
*/ */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment