mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-12-15 18:52:13 +03:00
ae219c2e90
Also add regression tests for symbolic rotations. Fixes #160.
18 lines
443 B
Plaintext
18 lines
443 B
Plaintext
thm1 : [16] -> Bit
|
|
property thm1 x = (x <<< 16 == x) && (x >>> 16 == x)
|
|
|
|
thm2 : [16] -> [16] -> Bit
|
|
property thm2 x i = x >>> i == x >>> (i && 0x000f)
|
|
|
|
thm3 : [15] -> [8] -> Bit
|
|
property thm3 x i = x <<< i == x <<< (i % 15)
|
|
|
|
thm4 : [15] -> [15] -> Bit
|
|
property thm4 x i = x <<< i >>> i == x
|
|
|
|
thm5 : [15] -> [3] -> Bit
|
|
property thm5 x i = x <<< i >>> i == x
|
|
|
|
thm6 : [8] -> [4] -> [4] -> Bit
|
|
property thm6 x i j = x <<< i >>> j == x <<< (i - j)
|