def bit_length_lt

bend-collections-laws-crypto@1.0.0.0 · proofs/math/natural/bits.bend:85

import bend-collections-laws-crypto@1.0.0.0/proofs/math/natural/bits.bend as Bits
import Base
import bend-collections-laws-crypto@1.0.0.0/proofs/lib/nat.bend as N
import bend-collections-laws-crypto@1.0.0.0/spec/lib/common.bend as SC
import bend-collections-laws-crypto@1.0.0.0/src/math/natural.bend as M

85# n < 2^bit_length(n)   (Mathlib Nat.lt_size_self)
86def bit_length_lt(+n: Nat) -> {Nat.is_lt(n, SC.pow2(M.bit_length(n))) == True{} : Bool}:
87  lt_go(n, n, N.le_refl(n))

Uses (7)

Used by (4)