@@ -279,6 +279,11 @@ theorem succ_def (m : ℕ∞) : Order.succ m = m + 1 :=
279279theorem add_one_le_iff (hm : m ≠ ⊤) : m + 1 ≤ n ↔ m < n :=
280280 Order.add_one_le_iff_of_not_isMax (not_isMax_iff_ne_top.mpr hm)
281281
282+ theorem add_one_le_iff' (hn : n ≠ ⊤) : m + 1 ≤ n ↔ m < n := by
283+ rcases eq_or_ne m ⊤ with rfl | hm
284+ · simpa
285+ · exact add_one_le_iff hm
286+
282287theorem one_le_iff_ne_zero : 1 ≤ n ↔ n ≠ 0 :=
283288 Order.one_le_iff_pos.trans pos_iff_ne_zero
284289
@@ -607,6 +612,9 @@ end ENat
607612
608613namespace ENat.WithBot
609614
615+ @[simp]
616+ lemma coe_eq_natCast (n : ℕ) : (n : ℕ∞) = (n : WithBot ℕ∞) := rfl
617+
610618lemma lt_add_one_iff {n : WithBot ℕ∞} {m : ℕ} : n < m + 1 ↔ n ≤ m := by
611619 rw [← WithBot.coe_one, ← ENat.coe_one, WithBot.coe_natCast, ← Nat.cast_add, ← WithBot.coe_natCast]
612620 cases n
@@ -621,6 +629,17 @@ lemma add_one_le_iff {n : ℕ} {m : WithBot ℕ∞} : n + 1 ≤ m ↔ n < m := b
621629 · rw [WithBot.coe_le_coe, ENat.coe_add, ENat.coe_one, ENat.add_one_le_iff (ENat.coe_ne_top n),
622630 ← WithBot.coe_lt_coe, WithBot.coe_natCast]
623631
632+ lemma add_one_le_natCast_iff {n : WithBot ℕ∞} {m : ℕ} : n + 1 ≤ m ↔ n < m := by
633+ induction n with
634+ | bot => simp
635+ | coe n =>
636+ norm_cast
637+ simp [add_one_le_iff']
638+
639+ @[simp]
640+ lemma add_one_le_zero_iff (n : WithBot ℕ∞) : n + 1 ≤ 0 ↔ n = ⊥ :=
641+ add_one_le_natCast_iff.trans (WithBot.lt_zero_iff_eq_bot n)
642+
624643@[simp]
625644lemma add_natCast_cancel {a b : WithBot ℕ∞} {c : ℕ} : a + c = b + c ↔ a = b :=
626645 (IsAddRightRegular.all c).withTop.withBot.eq_iff
0 commit comments