law reduce_top

bend-collections-laws-crypto@1.0.0.0 · proofs/crypto/poly1305/step.bend:232

import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/poly1305/step.bend as Step
import Base
import bend-collections-laws-crypto@1.0.0.0/src/crypto/poly1305/limbs.bend as Li
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/poly1305/value.bend as V

232# the top limb after the reduction is at most 4 (its value is below 5 * 2^128)
233law reduce_top:
234  for +one: Nat
235  for +h1: {one == 1n : Nat}
236  for +d: List<&2, U32>
237  for +hd: {V.fit_all(d, 30n) == True{} : Bool}
238  {Nat.is_le(V.v(Li.hd0(Li.skip(16n, Li.reduce(d)))), 4n) == True{} : Bool}

Uses (50)

Used by (1)