Arith.add_cancel: def of bend-collections-laws-crypto@1.0.0.0 Import: import bend-collections-laws-crypto@1.0.0.0/proofs/math/natural/arith.bend as Arith Lines 40-46 of bend-collections-laws-crypto@1.0.0.0/proofs/math/natural/arith.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/math/natural/arith.bend&start_line=40&end_line=46 import Base import bend-collections-laws-crypto@1.0.0.0/proofs/lib/nat.bend as N # c + a == c + b gives a == b (Mathlib Nat.add_left_cancel) def add_cancel(+c: Nat, +a: Nat, +b: Nat, +e: {Nat.add(c, a) == Nat.add(c, b) : Nat}) -> {a == b : Nat}: match c: case 0n: e case 1n+ +cp: add_cancel(cp, a, b, N.succ_inj(Nat.add(cp, a), Nat.add(cp, b), e)) Uses (3): 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/lib/nat.bend&name=succ_inj