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} [n+1] -> Bit property parOK x = par x == parity x