def sub_big

bend-collections-laws-math@1.0.0.0 · proofs/math/number/prime.bend:20

import bend-collections-laws-math@1.0.0.0/proofs/math/number/prime.bend as Prime
import Base
import bend-collections-laws-math@1.0.0.0/proofs/lib/logic.bend as L
import bend-collections-laws-math@1.0.0.0/proofs/math/natural/arith.bend as R

20def sub_big(+n: Nat, +d: Nat, +h: {Nat.is_le(n, d) == True{} : Bool}) -> {Nat.sub(n, d) == 0n : Nat}:
21  match n d:
22    case 0n _:
23      R.zsub(d)
24    case 1n+np 0n:
25      Empty.absurd({Nat.sub(1n+np, 0n) == 0n : Nat}, L.false_true(h))
26    case 1n+ +np 1n+ +dp:
27      sub_big(np, dp, h)

Uses (7)

Used by (2)