def remainder_bit

bend-collections-laws-crypto@1.0.0.0 · proofs/lib/lemmas/proofs/word_value.bend:64

import bend-collections-laws-crypto@1.0.0.0/proofs/lib/lemmas/proofs/word_value.bend as WordValue
import Base
import bend-collections-laws-crypto@1.0.0.0/proofs/lib/lemmas/spec/numeric.bend as S
import bend-collections-laws-crypto@1.0.0.0/proofs/lib/lemmas/proofs/map_routing.bend as Routing

64def remainder_bit(r: Nat, le: {Nat.is_le(r, 1n) == True{} : Bool}) -> {S.bit_value(Nat.is_eq(r, 1n)) == r : Nat}:
65  match r:
66    case 0n: {==}
67    case 1n+x:
68      match x:
69        case 0n: {==}
70        case 1n+y: Empty.absurd({S.bit_value(Nat.is_eq(2n+y, 1n)) == 2n+y : Nat}, Routing.false_true(le))

Uses (7)

Used by (1)