@@ -151,8 +151,10 @@ lemma map₂_coe_coe (f : α → β → γ) (a : α) (b : β) : map₂ f a b = f
151151
152152lemma ne_bot_iff_exists {x : WithBot α} : x ≠ ⊥ ↔ ∃ a : α, ↑a = x := Option.ne_none_iff_exists
153153
154- lemma forall_ne_iff_eq_bot {x : WithBot α} : (∀ a : α, ↑a ≠ x) ↔ x = ⊥ :=
155- Option.forall_some_ne_iff_eq_none
154+ lemma eq_bot_iff_forall_ne {x : WithBot α} : x = ⊥ ↔ ∀ a : α, ↑a ≠ x :=
155+ Option.eq_none_iff_forall_some_ne
156+
157+ @ [deprecated (since := "2025-03-19" )] alias forall_ne_iff_eq_bot := eq_bot_iff_forall_ne
156158
157159/-- Deconstruct a `x : WithBot α` to the underlying value in `α`, given a proof that `x ≠ ⊥`. -/
158160def unbot : ∀ x : WithBot α, x ≠ ⊥ → α | (x : α), _ => x
@@ -325,14 +327,17 @@ alias le_coe_unbot' := le_coe_unbotD
325327@[simp]
326328theorem lt_coe_bot [OrderBot α] : x < (⊥ : α) ↔ x = ⊥ := by cases x <;> simp
327329
328- lemma forall_lt_iff_eq_bot : ( ∀ b : α, x < b) ↔ x = ⊥ := by
330+ lemma eq_bot_iff_forall_lt : x = ⊥ ↔ ∀ b : α, x < b := by
329331 cases x <;> simp; simpa using ⟨_, lt_irrefl _⟩
330332
331- lemma forall_le_iff_eq_bot [NoMinOrder α] : ( ∀ b : α, x ≤ b) ↔ x = ⊥ := by
332- refine ⟨fun h ↦ forall_lt_iff_eq_bot. 1 fun y ↦ ?_, by simp +contextual ⟩
333+ lemma eq_bot_iff_forall_le [NoMinOrder α] : x = ⊥ ↔ ∀ b : α, x ≤ b := by
334+ refine ⟨by simp +contextual, fun h ↦ eq_bot_iff_forall_lt. 2 fun y ↦ ?_⟩
333335 obtain ⟨w, hw⟩ := exists_lt y
334336 exact (h w).trans_lt (coe_lt_coe.2 hw)
335337
338+ @ [deprecated (since := "2025-03-19" )] alias forall_lt_iff_eq_bot := eq_bot_iff_forall_lt
339+ @ [deprecated (since := "2025-03-19" )] alias forall_le_iff_eq_bot := eq_bot_iff_forall_le
340+
336341end Preorder
337342
338343instance semilatticeSup [SemilatticeSup α] : SemilatticeSup (WithBot α) where
@@ -638,8 +643,10 @@ theorem ofDual_map (f : αᵒᵈ → βᵒᵈ) (a : WithTop αᵒᵈ) :
638643
639644lemma ne_top_iff_exists {x : WithTop α} : x ≠ ⊤ ↔ ∃ a : α, ↑a = x := Option.ne_none_iff_exists
640645
641- lemma forall_ne_iff_eq_top {x : WithTop α} : (∀ a : α, ↑a ≠ x) ↔ x = ⊤ :=
642- Option.forall_some_ne_iff_eq_none
646+ lemma eq_top_iff_forall_ne {x : WithTop α} : x = ⊤ ↔ ∀ a : α, ↑a ≠ x :=
647+ Option.eq_none_iff_forall_some_ne
648+
649+ @ [deprecated (since := "2025-03-19" )] alias forall_ne_iff_eq_top := eq_top_iff_forall_ne
643650
644651/-- Deconstruct a `x : WithTop α` to the underlying value in `α`, given a proof that `x ≠ ⊤`. -/
645652def untop : ∀ x : WithTop α, x ≠ ⊤ → α | (x : α), _ => x
@@ -806,11 +813,19 @@ alias coe_untop'_le := coe_untopD_le
806813@[simp]
807814theorem coe_top_lt [OrderTop α] : (⊤ : α) < x ↔ x = ⊤ := by cases x <;> simp
808815
809- lemma forall_gt_iff_eq_top : ( ∀ a : α, a < y) ↔ y = ⊤ := by
816+ lemma eq_top_iff_forall_gt : y = ⊤ ↔ ∀ a : α, a < y := by
810817 cases y <;> simp; simpa using ⟨_, lt_irrefl _⟩
811818
812- lemma forall_ge_iff_eq_top [NoMaxOrder α] : (∀ a : α, a ≤ y) ↔ y = ⊤ :=
813- WithBot.forall_le_iff_eq_bot (α := αᵒᵈ)
819+ lemma eq_top_iff_forall_ge [NoMaxOrder α] : y = ⊤ ↔ ∀ a : α, a ≤ y :=
820+ WithBot.eq_bot_iff_forall_le (α := αᵒᵈ)
821+
822+ @ [deprecated (since := "2025-03-19" )] alias forall_lt_iff_eq_top := eq_top_iff_forall_gt
823+ @ [deprecated (since := "2025-03-19" )] alias forall_le_iff_eq_top := eq_top_iff_forall_ge
824+
825+ lemma forall_coe_le_iff_le [NoMaxOrder α] {x y : WithTop α} : (∀ a : α, a ≤ x → a ≤ y) ↔ x ≤ y := by
826+ obtain _ | x := x
827+ · simp [WithTop.none_eq_top, eq_top_iff_forall_ge]
828+ · exact ⟨fun h ↦ h _ le_rfl, fun hmn a ham ↦ ham.trans hmn⟩
814829
815830end Preorder
816831
0 commit comments