law word_lt

lawful-bytes@0.1.1.0 · proof_core.bend:173

import lawful-bytes@0.1.1.0/proof_core.bend as ProofCore
import Base

173# A byte index below 4 * 2^d has its word index below 2^d.
174law word_lt:
175  for +i: U32
176  for +d: Nat
177  for +h: {Nat.is_lt(U32.to_nat(i), Nat.mul(4n, Nat.pow(2n, d))) == True{} : Bool}
178  {Nat.is_lt(U32.to_nat((i >> 2n : U32)), Nat.pow(2n, d)) == True{} : Bool}

Uses (12)

Used by (3)