mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-12-18 05:21:57 +03:00
16 lines
434 B
Plaintext
16 lines
434 B
Plaintext
shift : {d} (fin d, d >=1) => [d] -> Bit -> [d]
|
|
shift fill bit = fills
|
|
where
|
|
fills = [bit]#(take fill)
|
|
|
|
shift_alt : {d} (fin d, d >=1) => [d] -> Bit -> [d]
|
|
shift_alt fill bit = fills
|
|
where
|
|
fills = [bit]#(drop`{1} (fill >> 1))
|
|
|
|
infZero : [inf]Bit
|
|
infZero = [False] # infZero
|
|
|
|
property shift_eq a b c d e = shift (take`{10} ([a,b,c,d]#infZero)) e
|
|
== shift_alt (take`{10} ([a,b,c,d]#infZero)) e
|