def gt.add_nat
import bend-osdev-gf@0.1.1.0/proof_tab.bend as ProofTabimport Base
113# the sum of two counts, as U32, is the U32 of their sum
114def gt.add_nat(+p: Nat, +q: Nat) -> {U32.add(U32.from_nat(p), U32.from_nat(q)) == U32.from_nat(Nat.add(q, p)) : U32}:
115 match q:
116 case 0n:
117 gt.add_zero(U32.from_nat(p))
118 case 1n+r:
119 %gt.add_nat(p, r) : {U32.add(U32.from_nat(p), U32.inc(U32.from_nat(r))) == U32.inc(_) : U32}
120 gt.add_inc(U32.from_nat(p), U32.from_nat(r))