Mulw.cbn_add: def of bend-collections-laws-crypto@1.0.0.0 Import: import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/curve25519/mulw.bend as Mulw Lines 29-34 of bend-collections-laws-crypto@1.0.0.0/proofs/crypto/curve25519/mulw.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/crypto/curve25519/mulw.bend&start_line=29&end_line=34 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/curve25519/num.bend as M import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/curve25519/poly.bend as PL def cbn_add(+a: Nat, +b: Nat, +k: Nat) -> {PL.cbn(Nat.add(a, b), k) == Nat.add(PL.cbn(a, k), PL.cbn(b, k)) : Nat}: match a: case 0n: {==} case 1n+ +q: Equal.trans(Nat, Nat.add(k, PL.cbn(Nat.add(q, b), k)), Nat.add(k, Nat.add(PL.cbn(q, k), PL.cbn(b, k))), Nat.add(Nat.add(k, PL.cbn(q, k)), PL.cbn(b, k)), M.cong_r(k, PL.cbn(Nat.add(q, b), k), Nat.add(PL.cbn(q, k), PL.cbn(b, k)), cbn_add(q, b, k)), Equal.sym(Nat, Nat.add(Nat.add(k, PL.cbn(q, k)), PL.cbn(b, k)), Nat.add(k, Nat.add(PL.cbn(q, k), PL.cbn(b, k))), NA.add_assoc(k, PL.cbn(q, k), PL.cbn(b, k)))) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.sym https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.trans 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=bend-collections-laws-crypto@1.0.0.0/proofs/crypto/curve25519/num.bend&name=cong_r https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/crypto/curve25519/poly.bend&name=cbn 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