Fieldpow.exp_inv: def of bend-collections-laws-crypto@1.0.0.0 Import: import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/fieldpow.bend as Fieldpow Lines 193-199 of bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/fieldpow.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/fieldpow.bend&start_line=193&end_line=199 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/lib/nat.bend as N import bend-collections-laws-crypto@1.0.0.0/proofs/lib/lemmas/proofs/nat_algebra.bend as NA import bend-collections-laws-crypto@1.0.0.0/proofs/math/natural/arith.bend as NR 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/bitsv.bend as BV def exp_inv(+one: Nat, +h1: {one == 1n : Nat}) -> {BV.hv(F.inv_bits(), one, 0n) == Nat.sub(1n+K.pp(one), 2n) : Nat}: +h = BV.hv(F.inv_bits(), one, 0n) +e = NR.add_cancel(FS.cp(one), Nat.add(h, 2n), 1n+K.pp(one), inv_h2(one, h1)) %Equal.sym(Nat, 1n+K.pp(one), Nat.add(BV.hv(F.inv_bits(), one, 0n), 2n), Equal.sym(Nat, Nat.add(BV.hv(F.inv_bits(), one, 0n), 2n), 1n+K.pp(one), e)) : {BV.hv(F.inv_bits(), one, 0n) == Nat.sub(_, 2n) : Nat} %Equal.sym(Nat, Nat.add(BV.hv(F.inv_bits(), one, 0n), 2n), Nat.add(2n, BV.hv(F.inv_bits(), one, 0n)), NA.add_comm(BV.hv(F.inv_bits(), one, 0n), 2n)) : {BV.hv(F.inv_bits(), one, 0n) == Nat.sub(_, 2n) : Nat} %Equal.sym(Nat, Nat.sub(Nat.add(2n, BV.hv(F.inv_bits(), one, 0n)), 2n), BV.hv(F.inv_bits(), one, 0n), N.add_sub_cancel(2n, BV.hv(F.inv_bits(), one, 0n))) : {BV.hv(F.inv_bits(), one, 0n) == _ : Nat} {==} Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.sym https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/bitsv.bend&name=hv https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/consts.bend&name=pp https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/fieldpow.bend&name=inv_h2 https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/lib/lemmas/proofs/nat_algebra.bend&name=add_comm https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/lib/nat.bend&name=add_sub_cancel https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/math/natural/arith.bend&name=add_cancel https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/spec/crypto/secp256k1/field.bend&name=cp https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/src/crypto/secp256k1/field.bend&name=inv_bits