Skip to content

Commit 30d2c5f

Browse files
committed
feat: generalize IsSuccLimit.bot_lt to preorders (leanprover-community#38237)
1 parent 1eddfcd commit 30d2c5f

2 files changed

Lines changed: 15 additions & 7 deletions

File tree

Mathlib/Order/BoundedOrder/Basic.lean

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,15 @@ theorem ne_top_of_lt (h : a < b) : a ≠ ⊤ :=
122122

123123
@[to_dual bot_lt] alias LT.lt.lt_top := lt_top_of_lt
124124

125+
@[to_dual bot_lt_iff_not_le_bot]
126+
theorem lt_top_iff_not_top_le : a < ⊤ ↔ ¬ ⊤ ≤ a := by
127+
simp [lt_iff_le_not_ge]
128+
129+
@[to_dual not_isMin_iff_bot_lt]
130+
theorem not_isMax_iff_lt_top : ¬ IsMax a ↔ a < ⊤ := by
131+
rw [not_isMax_iff]
132+
exact ⟨fun ⟨b, hb⟩ ↦ hb.trans_le le_top, fun h ↦ ⟨⊤, h⟩⟩
133+
125134
attribute [aesop (rule_sets := [finiteness]) unsafe 20%] ne_top_of_lt
126135
-- would have been better to implement this as a "safe" "forward" rule, why doesn't this work?
127136
-- attribute [aesop (rule_sets := [finiteness]) safe forward] ne_top_of_lt

Mathlib/Order/SuccPred/Limit.lean

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,12 @@ theorem not_isSuccLimit_bot [OrderBot α] : ¬ IsSuccLimit (⊥ : α) :=
147147
isMin_bot.not_isSuccLimit
148148

149149
@[to_dual]
150-
theorem IsSuccLimit.ne_bot [OrderBot α] (h : IsSuccLimit a) : a ≠ ⊥ := by
151-
rintro rfl
152-
exact not_isSuccLimit_bot h
150+
theorem IsSuccLimit.bot_lt [OrderBot α] (h : IsSuccLimit a) : ⊥ < a :=
151+
not_isMin_iff_bot_lt.1 h.not_isMin
152+
153+
@[to_dual]
154+
theorem IsSuccLimit.ne_bot [OrderBot α] (h : IsSuccLimit a) : a ≠ ⊥ :=
155+
h.bot_lt.ne'
153156

154157
@[to_dual]
155158
theorem not_isSuccLimit_iff : ¬ IsSuccLimit a ↔ IsMin a ∨ ¬ IsSuccPrelimit a := by
@@ -268,10 +271,6 @@ theorem isSuccLimit_iff_of_orderBot [OrderBot α] : IsSuccLimit a ↔ a ≠ ⊥
268271
@[deprecated (since := "2026-03-31")] alias isSuccLimit_iff := isSuccLimit_iff_of_orderBot
269272
@[deprecated (since := "2026-03-31")] alias isPredLimit_iff := isPredLimit_iff_of_orderTop
270273

271-
@[to_dual lt_top]
272-
theorem IsSuccLimit.bot_lt [OrderBot α] (h : IsSuccLimit a) : ⊥ < a :=
273-
h.ne_bot.bot_lt
274-
275274
variable [SuccOrder α]
276275

277276
@[to_dual]

0 commit comments

Comments
 (0)