Fwrap.dig1: def of bend-collections-laws-crypto@1.0.0.0 Import: import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/fwrap.bend as Fwrap Lines 66-77 of bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/fwrap.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/fwrap.bend&start_line=66&end_line=77 import Base 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/crypto/secp256k1/semiring.bend as SR # a leading digit one larger def dig1(+one: Nat, +h1: {one == 1n : Nat}, +d: Nat, +r: Nat) -> {Nat.add(Nat.mul(one, 1n+d), r) == 1n+Nat.add(Nat.mul(one, d), r) : Nat}: %Equal.sym(Nat, one, 1n, h1) : {Nat.add(Nat.mul(_, 1n+d), r) == 1n+Nat.add(Nat.mul(one, d), r) : Nat} %Equal.sym(Nat, one, 1n, h1) : {Nat.add(Nat.mul(1n, 1n+d), r) == 1n+Nat.add(Nat.mul(_, d), r) : Nat} %Equal.sym(Nat, 1n+d, Nat.add(d, 1n), SR.succ_add(1n, d)) : {Nat.add(Nat.mul(1n, _), r) == 1n+Nat.add(Nat.mul(1n, d), r) : Nat} %Equal.sym(Nat, Nat.mul(1n, Nat.add(d, 1n)), Nat.add(d, 1n), SR.one_mul(Nat.add(d, 1n))) : {Nat.add(_, r) == 1n+Nat.add(Nat.mul(1n, d), r) : Nat} %Equal.sym(Nat, Nat.add(Nat.add(d, 1n), r), Nat.add(d, Nat.add(1n, r)), NA.add_assoc(d, 1n, r)) : {_ == 1n+Nat.add(Nat.mul(1n, d), r) : Nat} %Equal.sym(Nat, Nat.add(1n, r), Nat.add(r, 1n), NA.add_comm(1n, r)) : {Nat.add(d, _) == 1n+Nat.add(Nat.mul(1n, d), r) : Nat} %Equal.sym(Nat, Nat.mul(1n, d), d, SR.one_mul(d)) : {Nat.add(d, Nat.add(r, 1n)) == 1n+Nat.add(_, r) : Nat} %Equal.sym(Nat, 1n+Nat.add(d, r), Nat.add(Nat.add(d, r), 1n), SR.succ_add(1n, Nat.add(d, r))) : {Nat.add(d, Nat.add(r, 1n)) == _ : Nat} %Equal.sym(Nat, Nat.add(Nat.add(d, r), 1n), Nat.add(d, Nat.add(r, 1n)), NA.add_assoc(d, r, 1n)) : {Nat.add(d, Nat.add(r, 1n)) == _ : Nat} {==} Uses (8): 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.mul https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/semiring.bend&name=one_mul https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/semiring.bend&name=succ_add https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/lib/lemmas/proofs/nat_algebra.bend&name=add_assoc 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