-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a basic integration test that excercises the polynomial
arithmetic primitives and the `rme` proof method.
- Loading branch information
1 parent
da4dee8
commit 7f57175
Showing
2 changed files
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
let {{ | ||
|
||
thm : {n,m} (fin n, fin m, n > m, m >= 1) => [n] -> [m] -> Bit | ||
thm x y = y != 0 ==> | ||
pmult y (pdiv x y) ^ (zero # pmod x y) == zero`{[m-1]}#x | ||
|
||
}}; | ||
|
||
print_term (rewrite (cryptol_ss ()) | ||
(unfold_term ["thm"] {{ thm`{16,4} }})); | ||
|
||
prove_print rme {{ thm`{16,8} }}; | ||
prove_print rme {{ thm`{20,10} }}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
$SAW test.saw |