mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-11-24 06:52:44 +03:00
28fdd44100
The Smtlib solver was translating Fin constraints to True, as it didn't know how to handle them. They should have been skipped, and returned back as unsolved goals instead.
11 lines
238 B
Plaintext
11 lines
238 B
Plaintext
parity xs = ys!0
|
|
where ys = [False] # [y ^ x | x <- xs | y <- ys ]
|
|
|
|
foldl1 f xs = ys!0
|
|
where ys = [xs@0] # [ f y x | y <- ys | x <- tail xs ]
|
|
|
|
par = foldl1 (^)
|
|
|
|
parOK : {n} (fin n) => [n+1] -> Bit
|
|
property parOK x = par x == parity x
|