def one_e
bend-collections-laws-crypto@1.0.0.0 · proofs/crypto/secp256k1/fieldpow.bend:95
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/fieldpow.bend as Fieldpow
import Base
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/secp256k1/field.bend as FS
import bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/field.bend as F
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/limbs.bend as LV
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/ineq.bend as I
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/consts.bend as K
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/modexp.bend as ME
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/fieldops.bend as FO
95def one_e(+one: Nat, +h1: {one == 1n : Nat}, +x: Nat) -> {LV.ev(F.one()) == Nat.mod(Nat.pow(x, 0n), 1n+K.pp(one)) : Nat}:
96 +ev = Equal.trans(Nat, LV.ev(F.one()), FS.value(one, F.one()), 1n, Equal.sym(Nat, FS.value(one, F.one()), LV.ev(F.one()), LV.ev_value(one, h1, F.one())), FO.small_val(one, h1, 1n, one_lt(one, h1)))
97 Equal.trans(Nat, LV.ev(F.one()), 1n, Nat.mod(Nat.pow(x, 0n), 1n+K.pp(one)), ev, ME.pow0(K.pp(one), x, I.lt_subst_r(1n, FS.prime(one), 1n+K.pp(one), K.prime_eq(one, h1), one_lt(one, h1))))