law modp_mod

bend-collections-laws-crypto@1.0.0.0 · proofs/crypto/poly1305/modp.bend:175

import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/poly1305/modp.bend as Modp
import Base
import bend-collections-laws-crypto@1.0.0.0/spec/lib/common.bend as C
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/poly1305.bend as R

175# modp(x) is x mod p, for every x
176law modp_mod:
177  for +one: Nat
178  for +h1: {one == 1n : Nat}
179  for +bp: Nat
180  for +h5: {Nat.add(1n+bp, 5n) == C.shift(130n, one) : Nat}
181  for +x: Nat
182  {R.modp(x) == Nat.mod(x, 1n+bp) : Nat}

Uses (16)

Used by (3)