Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions Mathlib/Order/CountableSupClosed.lean
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,36 @@ protected lemma CountableSupClosed.prod [Preorder α] [Preorder β]
exact ⟨hs.isLUB_mem (Prod.fst '' A) (by grind) (by simpa) (hAc.image Prod.fst) _ hxy.1,
ht.isLUB_mem (Prod.snd '' A) (by grind) (by simpa) (hAc.image Prod.snd) _ hxy.2⟩

@[to_dual]
theorem IsUpperSet.countableSupClosed [LE α] (h : IsUpperSet s) : CountableSupClosed s where
isLUB_mem := fun _ hsubset ⟨_, hmem⟩ _ _ hlub ↦ h (hlub.left hmem) (hsubset hmem)

Comment on lines +141 to +144

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think all the theorems that you've added in this section are strange. I get that the point is they are just for convenience, but do you actually have a use case for them? If anything, this suggests to me that maybe we're missing a LUBClosed predicate, where LUBClosed s := ∀ t, t ⊆ s → t.Nonempty → ∀ u, IsLUB t u → u ∈ s.

And then LUBClosed implies CountableSupClosed. I realize this is almost, but not quite DirSupClosed.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DirSupClosed and LUBClosed are the same over linear orders. Is there ever a situation where we want to talk about LUBClosed in a partial order, rather than DirSupClosed?

I've mentioned this before, but DirSupClosed has nicer closure properties (they're closed under unions, while LUBClosed sets wouldn't be) so I suspect that it's not what we want in most scenarios.

@SnirBroshi SnirBroshi Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not currently using CountableSupClosed for anything, but I think it's valuable to complete the API for when the moment comes. I am constantly having to stop what I'm doing to prove trivialities in various APIs, so this is preemptive. I think set intervals are fundamental enough to get this treatment for any predicate about sets.

I agree these are lub/glb closed, and that's even true without Nonempty, but I imagine we're not going to add 4 new predicates (lub/glb, with/without nonempty) just because they hold on intervals.
Should I add LUBClosed & GLBClosed?
This is similar to how we have both ScottContinuous and LeftOrdContinuous, that differ by the DirectedOn requirement.

btw I think a dual to DirSupClosed (DirInfClosed) would be nice.

@vihdzp vihdzp Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw I think a dual to DirSupClosed (DirInfClosed) would be nice.

Do we have any use for the dual? Do we also want to dualize Scott continuity?

I think this is all nonsense busy work until someone comes up with a good use case.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, at least I think so. Of course the sup versions are more common, but the duals are useful.

See e.g. #42661 (comment)
(spelling it this way makes theorems easier and IMO helps thinking about this)

section Preorder

variable [Preorder α]

@[to_dual]
protected theorem CountableSupClosed.Ioi (a : α) : CountableSupClosed (Ioi a) :=
IsUpperSet.Ioi a |>.countableSupClosed

@[to_dual]
protected theorem CountableSupClosed.Ici (a : α) : CountableSupClosed (Ici a) :=
IsUpperSet.Ici a |>.countableSupClosed

@[to_dual]
protected theorem CountableSupClosed.Iic (a : α) : CountableSupClosed (Iic a) where
isLUB_mem := fun _ hsubset _ _ _ hlub ↦ hlub.right hsubset

@[to_dual]
protected theorem CountableSupClosed.Ioc (a b : α) : CountableSupClosed (Ioc a b) :=
.inter (.Ioi a) (.Iic b)

@[to_dual]
protected theorem CountableSupClosed.Icc (a b : α) : CountableSupClosed (Icc a b) :=
.inter (.Ici a) (.Iic b)

end Preorder

end Set

section Finset
Expand Down
50 changes: 40 additions & 10 deletions Mathlib/Order/DirSupClosed.lean
Original file line number Diff line number Diff line change
Expand Up @@ -258,16 +258,6 @@ protected theorem DirSupClosedOn.Iic (a : α) : DirSupClosedOn D (Iic a) :=

@[deprecated (since := "2026-10-16")] alias dirSupClosedOn_Iic := DirSupClosedOn.Iic

protected theorem DirSupInacc.Iic (a : α) : DirSupInacc (Iic a) :=
(IsLowerSet.Iic a).dirSupInacc

@[deprecated (since := "2026-10-16")] alias dirSupInacc_Iic := DirSupInacc.Iic

protected theorem DirSupInaccOn.Iic (a : α) : DirSupInaccOn D (Iic a) :=
(IsLowerSet.Iic a).dirSupInaccOn

@[deprecated (since := "2026-10-16")] alias dirSupInaccOn_Iic := DirSupInaccOn.Iic

protected lemma DirSupClosed.Ioi (a : α) : DirSupClosed (Ioi a) :=
IsUpperSet.Ioi a |>.dirSupClosed

Expand All @@ -280,6 +270,34 @@ protected lemma DirSupClosed.Ici (a : α) : DirSupClosed (Ici a) :=
protected lemma DirSupClosedOn.Ici (a : α) : DirSupClosedOn D (Ici a) :=
(DirSupClosed.Ici a).dirSupClosedOn

protected theorem DirSupClosed.Ioc (a b : α) : DirSupClosed (Ioc a b) :=
.inter (.Ioi a) (.Iic b)

protected theorem DirSupClosedOn.Ioc (a b : α) : DirSupClosedOn D (Ioc a b) :=
DirSupClosed.Ioc a b |>.dirSupClosedOn

protected theorem DirSupClosed.Icc (a b : α) : DirSupClosed (Icc a b) :=
.inter (.Ici a) (.Iic b)

protected theorem DirSupClosedOn.Icc (a b : α) : DirSupClosedOn D (Icc a b) :=
DirSupClosed.Icc a b |>.dirSupClosedOn

protected theorem DirSupInacc.Iio (a : α) : DirSupInacc (Iio a) :=
fun _ ⟨b, hb⟩ _ _ hlub hlt ↦ ⟨b, hb, hlub.left hb |>.trans_lt hlt⟩

protected theorem DirSupInaccOn.Iio (a : α) : DirSupInaccOn D (Iio a) :=
DirSupInacc.Iio a |>.dirSupInaccOn

protected theorem DirSupInacc.Iic (a : α) : DirSupInacc (Iic a) :=
(IsLowerSet.Iic a).dirSupInacc

@[deprecated (since := "2026-10-16")] alias dirSupInacc_Iic := DirSupInacc.Iic

protected theorem DirSupInaccOn.Iic (a : α) : DirSupInaccOn D (Iic a) :=
(IsLowerSet.Iic a).dirSupInaccOn

@[deprecated (since := "2026-10-16")] alias dirSupInaccOn_Iic := DirSupInaccOn.Iic

end Preorder

section PartialOrder
Expand Down Expand Up @@ -322,6 +340,18 @@ protected lemma DirSupInacc.Ioi (a : α) : DirSupInacc (Ioi a) := by
protected lemma DirSupInaccOn.Ioi (a : α) : DirSupInaccOn D (Ioi a) :=
DirSupInacc.Ioi a |>.dirSupInaccOn

protected theorem DirSupInacc.Ioo (a b : α) : DirSupInacc (Ioo a b) :=
.inter (.Ioi a) (.Iio b)

protected theorem DirSupInaccOn.Ioo (a b : α) : DirSupInaccOn D (Ioo a b) :=
DirSupInacc.Ioo a b |>.dirSupInaccOn

protected theorem DirSupInacc.Ioc (a b : α) : DirSupInacc (Ioc a b) :=
.inter (.Ioi a) (.Iic b)

protected theorem DirSupInaccOn.Ioc (a b : α) : DirSupInaccOn D (Ioc a b) :=
DirSupInacc.Ioc a b |>.dirSupInaccOn

end LinearOrder

section CompleteLattice
Expand Down
29 changes: 23 additions & 6 deletions Mathlib/Order/Interval/Set/Image.lean
Original file line number Diff line number Diff line change
Expand Up @@ -393,16 +393,33 @@ end Set
section Preorder
variable [Preorder α]

@[to_dual directedOn_ge_Ici]
lemma directedOn_le_Iic (a : α) : DirectedOn (· ≤ ·) (Iic a) :=
@[to_dual ge_Ici]
Comment thread
SnirBroshi marked this conversation as resolved.
Resolved
lemma DirectedOn.le_Iic (a : α) : DirectedOn (· ≤ ·) (Iic a) :=
fun _x hx _y hy ↦ ⟨a, le_rfl, hx, hy⟩

@[to_dual (reorder := a b) (rename := a ↔ b) directedOn_ge_Icc]
lemma directedOn_le_Icc (a b : α) : DirectedOn (· ≤ ·) (Icc a b) :=
@[to_dual (attr := deprecated (since := "2026-10-17")) directedOn_ge_Ici]
alias directedOn_le_Iic := DirectedOn.le_Iic

@[to_dual (reorder := a b) (rename := a ↔ b) ge_Icc]
lemma DirectedOn.le_Icc (a b : α) : DirectedOn (· ≤ ·) (Icc a b) :=
fun _x hx _y hy ↦ ⟨b, right_mem_Icc.2 <| hx.1.trans hx.2, hx.2, hy.2⟩

@[to_dual (reorder := a b) (rename := a ↔ b) directedOn_ge_Ico]
lemma directedOn_le_Ioc (a b : α) : DirectedOn (· ≤ ·) (Ioc a b) :=
@[to_dual (reorder := a b) (attr := deprecated (since := "2026-10-17")) directedOn_ge_Icc]
alias directedOn_le_Icc := DirectedOn.le_Icc

@[to_dual (reorder := a b) (rename := a ↔ b) ge_Ico]
lemma DirectedOn.le_Ioc (a b : α) : DirectedOn (· ≤ ·) (Ioc a b) :=
fun _x hx _y hy ↦ ⟨b, right_mem_Ioc.2 <| hx.1.trans_le hx.2, hx.2, hy.2⟩

@[to_dual (reorder := a b) (attr := deprecated (since := "2026-10-17")) directedOn_ge_Ico]
alias directedOn_le_Ioc := DirectedOn.le_Ioc

@[to_dual ge_Iio]
theorem DirectedOn.le_Ioi [IsDirectedOrder α] (a : α) : DirectedOn (· ≤ ·) (Ioi a) :=
fun b hb c _ ↦ exists_ge_ge b c |>.imp fun _ ⟨hb', hc'⟩ ↦ ⟨hb.trans_le hb', hb', hc'⟩

@[to_dual ge_Iic]
theorem DirectedOn.le_Ici [IsDirectedOrder α] (a : α) : DirectedOn (· ≤ ·) (Ici a) :=
fun b hb c _ ↦ exists_ge_ge b c |>.imp fun _ ⟨hb', hc'⟩ ↦ ⟨hb.trans hb', hb', hc'⟩

end Preorder
21 changes: 21 additions & 0 deletions Mathlib/Order/SupClosed.lean
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module

public import Mathlib.Order.Closure
public import Mathlib.Order.ConditionallyCompleteLattice.Finset
public import Mathlib.Order.UpperLower.Basic

import Mathlib.Data.Finset.Lattice.Prod

Expand Down Expand Up @@ -118,6 +119,26 @@ lemma SupClosed.insert_lowerBounds {s : Set α} {a : α} (h : SupClosed s) (ha :
have ha' : ∀ b ∈ s, a ≤ b := fun _ a ↦ ha a
aesop

@[to_dual]
protected theorem SupClosed.Ioi (a : α) : SupClosed (Ioi a) :=
IsUpperSet.Ioi a |>.supClosed

@[to_dual]
protected theorem SupClosed.Ici (a : α) : SupClosed (Ici a) :=
IsUpperSet.Ici a |>.supClosed

@[to_dual]
protected theorem SupClosed.Iic (a : α) : SupClosed (Iic a) :=
DirectedOn.supClosed_of_isLowerSet (.Iic a) (.le_Iic a)

@[to_dual]
protected theorem SupClosed.Ioc (a b : α) : SupClosed (Ioc a b) :=
.inter (.Ioi a) (.Iic b)

@[to_dual]
protected theorem SupClosed.Icc (a b : α) : SupClosed (Icc a b) :=
.inter (.Ici a) (.Iic b)

end Set

section Finset
Expand Down
100 changes: 100 additions & 0 deletions Mathlib/Topology/Order/ScottTopology.lean
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,56 @@ theorem isOpen_of_isLowerSet (hDL : IsLowerSet D) (h : IsLowerSet s) : IsOpen s
theorem isClosed_of_isUpperSet (hDL : IsLowerSet D) (h : IsUpperSet s) : IsClosed s :=
(isClosed_iff_dirSupClosedOn hDL).2 h.dirSupClosedOn

theorem IsOpen.Iio_of_isLowerSet (h : IsLowerSet D) (a : α) : IsOpen (Iio a) :=
Comment thread
SnirBroshi marked this conversation as resolved.
Resolved
isOpen_iff_dirSupInaccOn h |>.mpr <| .Iio a

theorem IsOpen.Iic_of_isLowerSet (h : IsLowerSet D) (a : α) : IsOpen (Iic a) :=
isOpen_iff_dirSupInaccOn h |>.mpr <| .Iic a

theorem IsOpen.Ioi_of_isLowerSet {α : Type*} [LinearOrder α] [TopologicalSpace α] {D : Set (Set α)}
[IsScottHausdorff α D] (h : IsLowerSet D) (a : α) : IsOpen (Ioi a) :=
isOpen_iff_dirSupInaccOn h |>.mpr <| .Ioi a

theorem IsOpen.Ioo_of_isLowerSet {α : Type*} [LinearOrder α] [TopologicalSpace α] {D : Set (Set α)}
[IsScottHausdorff α D] (h : IsLowerSet D) (a b : α) : IsOpen (Ioo a b) :=
isOpen_iff_dirSupInaccOn h |>.mpr <| .Ioo a b

theorem IsOpen.Ioc_of_isLowerSet {α : Type*} [LinearOrder α] [TopologicalSpace α] {D : Set (Set α)}
[IsScottHausdorff α D] (h : IsLowerSet D) (a b : α) : IsOpen (Ioc a b) :=
isOpen_iff_dirSupInaccOn h |>.mpr <| .Ioc a b

theorem IsClosed.Iic_of_isLowerSet (h : IsLowerSet D) (a : α) : IsClosed (Iic a) :=
isClosed_iff_dirSupClosedOn h |>.mpr <| .Iic a

theorem IsClosed.Ici_of_isLowerSet (h : IsLowerSet D) (a : α) : IsClosed (Ici a) :=
isClosed_iff_dirSupClosedOn h |>.mpr <| .Ici a

theorem IsClosed.Ioi_of_isLowerSet (h : IsLowerSet D) (a : α) : IsClosed (Ioi a) :=
isClosed_iff_dirSupClosedOn h |>.mpr <| .Ioi a

theorem IsClosed.Ioc_of_isLowerSet (h : IsLowerSet D) (a b : α) : IsClosed (Ioc a b) :=
isClosed_iff_dirSupClosedOn h |>.mpr <| .Ioc a b

theorem IsClosed.Icc_of_isLowerSet (h : IsLowerSet D) (a b : α) : IsClosed (Icc a b) :=
isClosed_iff_dirSupClosedOn h |>.mpr <| .Icc a b

theorem ClosedIicTopology.of_isLowerSet (h : IsLowerSet D) : ClosedIicTopology α where
isClosed_Iic := IsClosed.Iic_of_isLowerSet h

theorem ClosedIciTopology.of_isLowerSet (h : IsLowerSet D) : ClosedIciTopology α where
isClosed_Ici := IsClosed.Ici_of_isLowerSet h

theorem IsClopen.Iic_of_isLowerSet (h : IsLowerSet D) (a : α) : IsClopen (Iic a) :=
⟨IsClosed.Iic_of_isLowerSet h a, IsOpen.Iic_of_isLowerSet h a⟩

theorem IsClopen.Ioi_of_isLowerSet {α : Type*} [LinearOrder α] [TopologicalSpace α]
{D : Set (Set α)} [IsScottHausdorff α D] (h : IsLowerSet D) (a : α) : IsClopen (Ioi a) :=
⟨IsClosed.Ioi_of_isLowerSet h a, IsOpen.Ioi_of_isLowerSet h a⟩

theorem IsClopen.Ioc_of_isLowerSet {α : Type*} [LinearOrder α] [TopologicalSpace α]
{D : Set (Set α)} [IsScottHausdorff α D] (h : IsLowerSet D) (a b : α) : IsClopen (Ioc a b) :=
⟨IsClosed.Ioc_of_isLowerSet h a b, IsOpen.Ioc_of_isLowerSet h a b⟩

end General

section univ
Expand All @@ -169,6 +219,56 @@ theorem dirSupClosed_closure : DirSupClosed (closure s) := by
rw [← isClosed_iff_dirSupClosed]
exact isClosed_closure

protected theorem IsOpen.Iio (a : α) : IsOpen (Iio a) :=
isOpen_iff_dirSupInacc.mpr <| .Iio a

protected theorem IsOpen.Iic (a : α) : IsOpen (Iic a) :=
isOpen_iff_dirSupInacc.mpr <| .Iic a

protected theorem IsOpen.Ioi {α : Type*} [LinearOrder α] [TopologicalSpace α]
[IsScottHausdorff α univ] (a : α) : IsOpen (Ioi a) :=
isOpen_iff_dirSupInacc.mpr <| .Ioi a

protected theorem IsOpen.Ioo {α : Type*} [LinearOrder α] [TopologicalSpace α]
[IsScottHausdorff α univ] (a b : α) : IsOpen (Ioo a b) :=
isOpen_iff_dirSupInacc.mpr <| .Ioo a b

protected theorem IsOpen.Ioc {α : Type*} [LinearOrder α] [TopologicalSpace α]
[IsScottHausdorff α univ] (a b : α) : IsOpen (Ioc a b) :=
isOpen_iff_dirSupInacc.mpr <| .Ioc a b

protected theorem IsClosed.Iic (a : α) : IsClosed (Iic a) :=
Comment thread
SnirBroshi marked this conversation as resolved.
Resolved
isClosed_iff_dirSupClosed.mpr <| .Iic a

protected theorem IsClosed.Ici (a : α) : IsClosed (Ici a) :=
isClosed_iff_dirSupClosed.mpr <| .Ici a

protected theorem IsClosed.Ioi (a : α) : IsClosed (Ioi a) :=
isClosed_iff_dirSupClosed.mpr <| .Ioi a

protected theorem IsClosed.Ioc (a b : α) : IsClosed (Ioc a b) :=
isClosed_iff_dirSupClosed.mpr <| .Ioc a b

protected theorem IsClosed.Icc (a b : α) : IsClosed (Icc a b) :=
isClosed_iff_dirSupClosed.mpr <| .Icc a b

instance : ClosedIicTopology α where
isClosed_Iic := IsClosed.Iic

instance : ClosedIciTopology α where
isClosed_Ici := IsClosed.Ici

protected theorem IsClopen.Iic (a : α) : IsClopen (Iic a) :=
⟨IsClosed.Iic a, IsOpen.Iic a⟩

protected theorem IsClopen.Ioi {α : Type*} [LinearOrder α] [TopologicalSpace α]
[IsScottHausdorff α univ] (a : α) : IsClopen (Ioi a) :=
⟨IsClosed.Ioi a, IsOpen.Ioi a⟩

protected theorem IsClopen.Ioc {α : Type*} [LinearOrder α] [TopologicalSpace α]
[IsScottHausdorff α univ] (a b : α) : IsClopen (Ioc a b) :=
⟨IsClosed.Ioc a b, IsOpen.Ioc a b⟩

/-- This theorem can fail in partial orders if the assumption that `d` is directed is added. -/
theorem closure_subset_setOfPred_isLUB (s : Set α) :
closure s ⊆ {x | ∃ d ⊆ s, d.Nonempty ∧ IsLUB d x} := by
Expand Down
43 changes: 36 additions & 7 deletions Mathlib/Topology/Order/UpperLowerSetTopology.lean
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ topology does not coincide with the lower topology.
## Main statements

- `Topology.IsUpperSet.toAlexandrovDiscrete`: The upper set topology is Alexandrov-discrete.
- `Topology.IsUpperSet.isClosed_iff_isLower` - a set is closed if and only if it is a Lower set
- `Topology.IsUpperSet.isClosed_iff_isLowerSet` - a set is closed if and only if it is a Lower set
- `Topology.IsUpperSet.closure_eq_lowerClosure` - topological closure coincides with lower closure
- `Topology.IsUpperSet.monotone_iff_continuous` - the continuous functions are the monotone
functions
Expand Down Expand Up @@ -244,15 +244,17 @@ instance toAlexandrovDiscrete : AlexandrovDiscrete α where
isOpen_sInter S := by simpa only [isOpen_iff_isUpperSet] using isUpperSet_sInter (α := α)

-- c.f. isClosed_iff_lower_and_subset_implies_LUB_mem
lemma isClosed_iff_isLower : IsClosed s ↔ IsLowerSet s := by
rw [← isOpen_compl_iff, isOpen_iff_isUpperSet,
isLowerSet_compl.symm, compl_compl]
lemma isClosed_iff_isLowerSet : IsClosed s ↔ IsLowerSet s := by
rw [← isOpen_compl_iff, isOpen_iff_isUpperSet, isLowerSet_compl.symm, compl_compl]

@[deprecated (since := "2026-10-17")]
alias isClosed_iff_isLower := isClosed_iff_isLowerSet

lemma closure_eq_lowerClosure {s : Set α} : closure s = lowerClosure s := by
rw [subset_antisymm_iff]
refine ⟨?_, lowerClosure_min subset_closure (isClosed_iff_isLower.1 isClosed_closure)⟩
refine ⟨?_, lowerClosure_min subset_closure (isClosed_iff_isLowerSet.1 isClosed_closure)⟩
apply closure_minimal subset_lowerClosure _
rw [isClosed_iff_isLower]
rw [isClosed_iff_isLowerSet]
exact LowerSet.lower (lowerClosure s)

/--
Expand All @@ -278,6 +280,18 @@ lemma nhds_eq_principal_Ici (a : α) : 𝓝 a = 𝓟 (Ici a) := by
lemma nhdsSet_eq_principal_upperClosure (s : Set α) : 𝓝ˢ s = 𝓟 ↑(upperClosure s) := by
rw [← principal_nhdsKer, nhdsKer_eq_upperClosure]

protected theorem IsOpen.Ioi (a : α) : IsOpen (Ioi a) :=
isOpen_iff_isUpperSet.mpr <| .Ioi a

protected theorem IsOpen.Ici (a : α) : IsOpen (Ici a) :=
isOpen_iff_isUpperSet.mpr <| .Ici a

protected theorem IsClosed.Iio (a : α) : IsClosed (Iio a) :=
isClosed_iff_isLowerSet.mpr <| .Iio a

protected theorem IsClosed.Iic (a : α) : IsClosed (Iic a) :=
isClosed_iff_isLowerSet.mpr <| .Iic a

end Preorder

protected lemma _root_.Topology.isUpperSet_iff_nhds {α : Type*} [TopologicalSpace α] [Preorder α] :
Expand Down Expand Up @@ -345,9 +359,12 @@ lemma isOpen_iff_isLowerSet : IsOpen s ↔ IsLowerSet s := by rw [topology_eq α

instance toAlexandrovDiscrete : AlexandrovDiscrete α := IsUpperSet.toAlexandrovDiscrete (α := αᵒᵈ)

lemma isClosed_iff_isUpper : IsClosed s ↔ IsUpperSet s := by
lemma isClosed_iff_isUpperSet : IsClosed s ↔ IsUpperSet s := by
rw [← isOpen_compl_iff, isOpen_iff_isLowerSet, isUpperSet_compl.symm, compl_compl]

@[deprecated (since := "2026-10-17")]
alias isClosed_iff_isUpper := isClosed_iff_isUpperSet

lemma closure_eq_upperClosure {s : Set α} : closure s = upperClosure s :=
IsUpperSet.closure_eq_lowerClosure (α := αᵒᵈ)

Expand All @@ -374,6 +391,18 @@ lemma nhds_eq_principal_Iic (a : α) : 𝓝 a = 𝓟 (Iic a) := by
lemma nhdsSet_eq_principal_lowerClosure (s : Set α) : 𝓝ˢ s = 𝓟 ↑(lowerClosure s) := by
rw [← principal_nhdsKer, nhdsKer_eq_lowerClosure]

protected theorem IsOpen.Iio (a : α) : IsOpen (Iio a) :=
isOpen_iff_isLowerSet.mpr <| .Iio a

protected theorem IsOpen.Iic (a : α) : IsOpen (Iic a) :=
isOpen_iff_isLowerSet.mpr <| .Iic a

protected theorem IsClosed.Ioi (a : α) : IsClosed (Ioi a) :=
isClosed_iff_isUpperSet.mpr <| .Ioi a

protected theorem IsClosed.Ici (a : α) : IsClosed (Ici a) :=
isClosed_iff_isUpperSet.mpr <| .Ici a

end Preorder

protected lemma _root_.Topology.isLowerSet_iff_nhds {α : Type*} [TopologicalSpace α] [Preorder α] :
Expand Down