def add_sub_cancel
import bend-collections-laws-math@1.0.0.0/proofs/lib/nat.bend as Natimport Base
263def add_sub_cancel(+a: Nat, +b: Nat) -> {Nat.sub(Nat.add(a, b), a) == b : Nat}:
264 match a b:
265 case 0n 0n:
266 {==}
267 case 0n 1n+q:
268 {==}
269 case 1n+p _:
270 add_sub_cancel(p, b)
Uses (3)
Used by (27)
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64round:sub_add_l
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64rtools:le_sub
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64round:sub_add_r
- bend-collections-laws-math@1.0.0.0/proofs/math/natural/fact:choose_succ_right
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64norm:clz_t
- …