def div_small

bend-collections-laws-math@1.0.0.0 · proofs/math/typed/f64fmod.bend:327

import bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64fmod.bend as F64fmod
import Base
import bend-collections-laws-math@1.0.0.0/proofs/lib/nat.bend as N
import bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/proofs/natural_division.bend as ND

327def div_small(+a: Nat, +n: Nat, +h: {Nat.is_lt(a, n) == True{} : Bool}) -> {Nat.div(a, n) == 0n : Nat}:
328  match n:
329    case 0n:
330      Empty.absurd({Nat.div(a, 0n) == 0n : Nat}, N.lt_zero_absurd(a, h))
331    case 1n+ +np:
332      ND.quotient(0n, np, a, N.lt_succ_le(a, np, h))

Uses (8)

Used by (2)