def pow0

bend-collections-laws-crypto@1.0.0.0 · proofs/crypto/secp256k1/modexp.bend:25

import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/modexp.bend as Modexp
import Base
import bend-collections-laws-crypto@1.0.0.0/proofs/math/natural/arith.bend as NR

25# x^0 mod m = 1 for m > 1
26def pow0(+mp: Nat, +x: Nat, +h: {Nat.is_lt(1n, 1n+mp) == True{} : Bool}) -> {1n == Nat.mod(Nat.pow(x, 0n), 1n+mp) : Nat}:
27  Equal.sym(Nat, Nat.mod(1n, 1n+mp), 1n, NR.mod_of(0n, mp, 1n, h))

Uses (7)

Used by (2)