NatProofs.add_swap: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/shape/nat_proofs.bend as NatProofs Lines 44-50 of bendtorch-core@0.1.0.0/src/shape/nat_proofs.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/shape/nat_proofs.bend&start_line=44&end_line=50 import Base import bendtorch-core@0.1.0.0/src/shape/broadcast_proofs.bend as Broadcast def add_swap(+a: Nat, +b: Nat, -c: Nat) -> {Nat.add(a, Nat.add(b, c)) == Nat.add(b, Nat.add(a, c)) : Nat}: match a: case 0n: {==} case 1n+p: %Equal.sym(Nat, Nat.add(p, Nat.add(b, c)), Nat.add(b, Nat.add(p, c)), add_swap(p, b, c)) : {1n+_ == Nat.add(b, 1n+Nat.add(p, c)) : Nat} Broadcast.add_succ(b, Nat.add(p, c)) Uses (4): 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=bendtorch-core@0.1.0.0/src/shape/broadcast_proofs.bend&name=add_succ