Skip to content

Commit

Permalink
le_induction
Browse files Browse the repository at this point in the history
  • Loading branch information
sgouezel authored and johoelzl committed Jan 23, 2019
1 parent 60efaec commit 6da9b21
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/data/nat/basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -859,5 +859,10 @@ lemma with_bot.add_eq_one_iff : ∀ {n m : with_bot ℕ}, n + m = 1 ↔ (n = 0
| (some n) (some (m + 1)) := by erw [with_bot.coe_eq_coe, with_bot.coe_eq_coe, with_bot.coe_eq_coe,
with_bot.coe_eq_coe, with_bot.coe_eq_coe]; simp [nat.add_succ, nat.succ_inj', nat.succ_ne_zero]

-- induction

@[elab_as_eliminator] lemma le_induction {P : nat → Prop} {m} (h0 : P m) (h1 : ∀ n ≥ m, P n → P (n + 1)) :
∀ n ≥ m, P n :=
by apply nat.less_than_or_equal.rec h0; exact h1

end nat

0 comments on commit 6da9b21

Please sign in to comment.