def sub_le_self
bend-collections-laws-math@1.0.0.0 · proofs/math/typed/f64exp.bend:33
import bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64exp.bend as F64exp
import Base
import bend-collections-laws-math@1.0.0.0/proofs/lib/nat.bend as N
33def sub_le_self(+a: Nat, +b: Nat) -> {Nat.is_le(Nat.sub(a, b), a) == True{} : Bool}:
34 match a b:
35 case 0n 0n:
36 {==}
37 case 0n 1n+ +bp:
38 {==}
39 case 1n+ +ap 0n:
40 N.le_refl(1n+ap)
41 case 1n+ +ap 1n+ +bp:
42 N.le_trans(Nat.sub(ap, bp), ap, 1n+ap, sub_le_self(ap, bp), N.le_succ(ap))