Skip to content
This repository has been archived by the owner on Jun 9, 2021. It is now read-only.

Commit

Permalink
Add a test for the Field (Z p) instance.
Browse files Browse the repository at this point in the history
Tracks the changes in Cryptol from GaloisInc/cryptol#882
which adds primality testing to the Cryptol type system, and implements
field operations for `Z p`.  Currently, we don't represent the primality
test in SAWCore, but we might revisit this aspect in the future.
  • Loading branch information
robdockins committed Oct 8, 2020
1 parent 8f35e18 commit 4ef71a9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cryptol-saw-core/test/instance.cry
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ fieldRational = recip
fieldFloat : {e, p} (ValidFloat e p) => Float e p -> Float e p
fieldFloat = recip

/* instance (prime p) => Field (Z p) */
fieldZ : {p} prime p => Z p -> Z p
fieldZ = recip

////////////////////////////////////////////////////////////////////////////////
// Round

Expand Down

0 comments on commit 4ef71a9

Please sign in to comment.