cryptol/tests/issues/issue130.cry

11 lines
238 B
Plaintext
Raw Normal View History

2014-10-24 02:00:18 +04:00
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
2014-10-24 02:00:18 +04:00
property parOK x = par x == parity x