Divisibility of natural numbers. a ∣ b
(typed as \|
) says that
there is some c
such that b = a * c
.
@[irreducible]
def
Nat.div.inductionOn
{motive : Nat → Nat → Sort u}
(x y : Nat)
(ind : (x y : Nat) → 0 < y ∧ y ≤ x → motive (x - y) y → motive x y)
(base : (x y : Nat) → ¬(0 < y ∧ y ≤ x) → motive x y)
:
motive x y
Equations
- Nat.div.inductionOn x y ind base = if h : 0 < y ∧ y ≤ x then ind x y h (Nat.div.inductionOn (x - y) y ind base) else base x y h