def sub_big

bend-collections-laws-math@1.0.0.0 · proofs/math/typed/fix64.bend:112

import bend-collections-laws-math@1.0.0.0/proofs/math/typed/fix64.bend as Fix64
import Base
import bend-collections-laws-math@1.0.0.0/proofs/math/natural/arith.bend as R
import bend-collections-laws-math@1.0.0.0/proofs/lib/logic.bend as L

112def sub_big(+n: Nat, +d: Nat, +h: {Nat.is_le(n, d) == True{} : Bool}) -> {Nat.sub(n, d) == 0n : Nat}:
113  match n d:
114    case 0n _:
115      R.zsub(d)
116    case 1n+np 0n:
117      Empty.absurd({Nat.sub(1n+np, 0n) == 0n : Nat}, L.false_true(h))
118    case 1n+ +np 1n+ +dp:
119      sub_big(np, dp, h)

Uses (7)

Used by (1)