def inv

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

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

138# the limb invariant: 17 limbs, all of 8 bits, limb 16 at most 4
139def inv(+h: List<&2, U32>) -> Bool:
140  Bool.and(Nat.is_eq(V.len(h), 17n), Bool.and(V.fit_all(h, 8n), Nat.is_le(V.v(Li.hd0(Li.skip(16n, h))), 4n)))

Uses (11)

Used by (28)