- refl : ∀ {a : ℕ}, a.less_than_or_equal a
- step : ∀ {a b : ℕ}, a.less_than_or_equal b → a.less_than_or_equal b.succ
@[protected, instance]
Equations
@[protected, instance]
Equations
- nat.decidable_eq x.succ y.succ = nat.decidable_eq._match_1 x y (nat.decidable_eq x y)
- nat.decidable_eq x.succ 0 = decidable.is_false _
- nat.decidable_eq 0 y.succ = decidable.is_false _
- nat.decidable_eq 0 0 = decidable.is_true rfl
- nat.decidable_eq._match_1 x y (decidable.is_true xeqy) = decidable.is_true _
- nat.decidable_eq._match_1 x y (decidable.is_false xney) = decidable.is_false _
Equations
- nat.repeat f n.succ a = f n (nat.repeat f n a)
- nat.repeat f 0 a = a
@[protected, instance]
Equations
- nat.inhabited = {default := 0}
properties of inequality
@[protected, instance]
Equations
- (a + 1).decidable_le (b + 1) = nat.decidable_le._match_1 a b (a.decidable_le b)
- (a + 1).decidable_le 0 = decidable.is_false _
- 0.decidable_le b = decidable.is_true _
- nat.decidable_le._match_1 a b (decidable.is_true h) = decidable.is_true _
- nat.decidable_le._match_1 a b (decidable.is_false h) = decidable.is_false _
@[protected, instance]
Equations
- nat.decidable_lt = λ (a b : ℕ), a.succ.decidable_le b
Basic nat.add lemmas
Basic lemmas for comparing numerals