doc-next-gen

Mathlib.Topology.Closure

Module docstring

{"# Interior, closure and frontier of a set

This file provides lemmas relating to the functions interior, closure and frontier of a set endowed with a topology.

Notation

  • 𝓝 x: the filter nhds x of neighborhoods of a point x;
  • 𝓟 s: the principal filter of a set s;
  • 𝓝[s] x: the filter nhdsWithin x s of neighborhoods of a point x within a set s;
  • 𝓝[≠] x: the filter nhdsWithin x {x}ᶜ of punctured neighborhoods of x.

Tags

interior, closure, frontier "}

isOpen_interior theorem
: IsOpen (interior s)
Full source
@[simp]
theorem isOpen_interior : IsOpen (interior s) :=
  isOpen_sUnion fun _ => And.left
Interior of a Set is Open
Informal description
For any subset $s$ of a topological space, the interior of $s$ is an open set.
interior_subset theorem
: interior s ⊆ s
Full source
theorem interior_subset : interiorinterior s ⊆ s :=
  sUnion_subset fun _ => And.right
Interior is Subset of Original Set
Informal description
For any subset $s$ of a topological space, the interior of $s$ is contained in $s$, i.e., $\text{interior}(s) \subseteq s$.
interior_maximal theorem
(h₁ : t ⊆ s) (h₂ : IsOpen t) : t ⊆ interior s
Full source
theorem interior_maximal (h₁ : t ⊆ s) (h₂ : IsOpen t) : t ⊆ interior s :=
  subset_sUnion_of_mem ⟨h₂, h₁⟩
Maximality of Interior: Open Subsets are Contained in Interior
Informal description
For any subset $t$ of a topological space, if $t$ is open and $t \subseteq s$, then $t$ is contained in the interior of $s$, i.e., $t \subseteq \text{interior}(s)$.
subset_interior_iff_isOpen theorem
: s ⊆ interior s ↔ IsOpen s
Full source
theorem subset_interior_iff_isOpen : s ⊆ interior ss ⊆ interior s ↔ IsOpen s := by
  simp only [interior_eq_iff_isOpen.symm, Subset.antisymm_iff, interior_subset, true_and]
Characterization of Open Sets via Interior Containment
Informal description
For any subset $s$ of a topological space, $s$ is contained in its interior if and only if $s$ is open, i.e., $s \subseteq \text{interior}(s) \leftrightarrow s$ is open.
IsOpen.subset_interior_iff theorem
(h₁ : IsOpen s) : s ⊆ interior t ↔ s ⊆ t
Full source
theorem IsOpen.subset_interior_iff (h₁ : IsOpen s) : s ⊆ interior ts ⊆ interior t ↔ s ⊆ t :=
  ⟨fun h => Subset.trans h interior_subset, fun h₂ => interior_maximal h₂ h₁⟩
Open Set Containment in Interior Characterization
Informal description
For any open subset $s$ of a topological space, $s$ is contained in the interior of a subset $t$ if and only if $s$ is contained in $t$. In other words, $s \subseteq \text{interior}(t) \leftrightarrow s \subseteq t$.
subset_interior_iff theorem
: t ⊆ interior s ↔ ∃ U, IsOpen U ∧ t ⊆ U ∧ U ⊆ s
Full source
theorem subset_interior_iff : t ⊆ interior st ⊆ interior s ↔ ∃ U, IsOpen U ∧ t ⊆ U ∧ U ⊆ s :=
  ⟨fun h => ⟨interior s, isOpen_interior, h, interior_subset⟩, fun ⟨_U, hU, htU, hUs⟩ =>
    htU.trans (interior_maximal hUs hU)⟩
Characterization of Subset Containment in Interior via Open Sets
Informal description
For any subsets $t$ and $s$ of a topological space, $t$ is contained in the interior of $s$ if and only if there exists an open set $U$ such that $t \subseteq U$ and $U \subseteq s$.
interior_subset_iff theorem
: interior s ⊆ t ↔ ∀ U, IsOpen U → U ⊆ s → U ⊆ t
Full source
lemma interior_subset_iff : interiorinterior s ⊆ tinterior s ⊆ t ↔ ∀ U, IsOpen U → U ⊆ s → U ⊆ t := by
  simp [interior]
Characterization of Interior Subset Relation via Open Sets
Informal description
For any subset $s$ of a topological space $X$, the interior of $s$ is contained in a subset $t$ if and only if every open set $U$ that is contained in $s$ is also contained in $t$. In other words, $\text{interior}(s) \subseteq t \leftrightarrow \forall U, \text{IsOpen}(U) \rightarrow U \subseteq s \rightarrow U \subseteq t$.
interior_empty theorem
: interior (∅ : Set X) = ∅
Full source
@[simp]
theorem interior_empty : interior ( : Set X) =  :=
  isOpen_empty.interior_eq
Interior of the Empty Set is Empty
Informal description
The interior of the empty set in any topological space $X$ is the empty set itself, i.e., $\text{interior}(\emptyset) = \emptyset$.
interior_univ theorem
: interior (univ : Set X) = univ
Full source
@[simp]
theorem interior_univ : interior (univ : Set X) = univ :=
  isOpen_univ.interior_eq
Interior of Universal Set Equals Itself
Informal description
The interior of the universal set in a topological space is the universal set itself, i.e., $\text{interior}(X) = X$.
interior_eq_univ theorem
: interior s = univ ↔ s = univ
Full source
@[simp]
theorem interior_eq_univ : interiorinterior s = univ ↔ s = univ :=
  ⟨fun h => univ_subset_iff.mp <| h.symm.trans_le interior_subset, fun h => h.symm ▸ interior_univ⟩
Characterization of Sets with Full Interior: $\text{interior}(s) = X \leftrightarrow s = X$
Informal description
For any subset $s$ of a topological space, the interior of $s$ equals the entire space if and only if $s$ itself equals the entire space, i.e., $\text{interior}(s) = X \leftrightarrow s = X$.
interior_interior theorem
: interior (interior s) = interior s
Full source
@[simp]
theorem interior_interior : interior (interior s) = interior s :=
  isOpen_interior.interior_eq
Idempotence of Interior Operation
Informal description
For any subset $s$ of a topological space, the interior of the interior of $s$ equals the interior of $s$, i.e., $\text{interior}(\text{interior}(s)) = \text{interior}(s)$.
interior_inter theorem
: interior (s ∩ t) = interior s ∩ interior t
Full source
@[simp]
theorem interior_inter : interior (s ∩ t) = interiorinterior s ∩ interior t :=
  (Monotone.map_inf_le (fun _ _ ↦ interior_mono) s t).antisymm <|
    interior_maximal (inter_subset_inter interior_subset interior_subset) <|
      isOpen_interior.inter isOpen_interior
Interior of Intersection Equals Intersection of Interiors
Informal description
For any subsets $s$ and $t$ of a topological space, the interior of their intersection equals the intersection of their interiors, i.e., $\text{interior}(s \cap t) = \text{interior}(s) \cap \text{interior}(t)$.
Set.Finite.interior_biInter theorem
{ι : Type*} {s : Set ι} (hs : s.Finite) (f : ι → Set X) : interior (⋂ i ∈ s, f i) = ⋂ i ∈ s, interior (f i)
Full source
theorem Set.Finite.interior_biInter {ι : Type*} {s : Set ι} (hs : s.Finite) (f : ι → Set X) :
    interior (⋂ i ∈ s, f i) = ⋂ i ∈ s, interior (f i) := by
  induction s, hs using Set.Finite.induction_on with
  | empty => simp
  | insert _ _ _ => simp [*]
Interior of Finite Intersection Equals Intersection of Interiors
Informal description
For any finite set $s$ of indices and any family of sets $(f_i)_{i \in s}$ in a topological space $X$, the interior of the intersection $\bigcap_{i \in s} f_i$ is equal to the intersection of the interiors $\bigcap_{i \in s} \text{interior}(f_i)$.
Set.Finite.interior_sInter theorem
{S : Set (Set X)} (hS : S.Finite) : interior (⋂₀ S) = ⋂ s ∈ S, interior s
Full source
theorem Set.Finite.interior_sInter {S : Set (Set X)} (hS : S.Finite) :
    interior (⋂₀ S) = ⋂ s ∈ S, interior s := by
  rw [sInter_eq_biInter, hS.interior_biInter]
Interior of Finite Intersection Equals Intersection of Interiors for Set Families
Informal description
For any finite family of sets $S$ in a topological space $X$, the interior of the intersection $\bigcap_{s \in S} s$ is equal to the intersection of the interiors $\bigcap_{s \in S} \text{interior}(s)$.
Finset.interior_iInter theorem
{ι : Type*} (s : Finset ι) (f : ι → Set X) : interior (⋂ i ∈ s, f i) = ⋂ i ∈ s, interior (f i)
Full source
@[simp]
theorem Finset.interior_iInter {ι : Type*} (s : Finset ι) (f : ι → Set X) :
    interior (⋂ i ∈ s, f i) = ⋂ i ∈ s, interior (f i) :=
  s.finite_toSet.interior_biInter f
Interior of Finite Intersection Equals Intersection of Interiors
Informal description
For any finite index set $s$ (represented as a finset) and any family of sets $(f_i)_{i \in s}$ in a topological space $X$, the interior of the intersection $\bigcap_{i \in s} f_i$ equals the intersection of the interiors $\bigcap_{i \in s} \text{interior}(f_i)$.
interior_iInter_of_finite theorem
[Finite ι] (f : ι → Set X) : interior (⋂ i, f i) = ⋂ i, interior (f i)
Full source
@[simp]
theorem interior_iInter_of_finite [Finite ι] (f : ι → Set X) :
    interior (⋂ i, f i) = ⋂ i, interior (f i) := by
  rw [← sInter_range, (finite_range f).interior_sInter, biInter_range]
Interior of Finite Intersection Equals Intersection of Interiors
Informal description
For any finite index type $\iota$ and any family of sets $(f_i)_{i \in \iota}$ in a topological space $X$, the interior of the intersection $\bigcap_{i \in \iota} f_i$ equals the intersection of the interiors $\bigcap_{i \in \iota} \text{interior}(f_i)$.
interior_iInter₂_lt_nat theorem
{n : ℕ} (f : ℕ → Set X) : interior (⋂ m < n, f m) = ⋂ m < n, interior (f m)
Full source
@[simp]
theorem interior_iInter₂_lt_nat {n : } (f : Set X) :
    interior (⋂ m < n, f m) = ⋂ m < n, interior (f m) :=
  (finite_lt_nat n).interior_biInter f
Interior of Finite Intersection of Sets Below $n$ Equals Intersection of Their Interiors
Informal description
For any natural number $n$ and any family of sets $(f_m)_{m \in \mathbb{N}}$ in a topological space $X$, the interior of the intersection $\bigcap_{m < n} f_m$ is equal to the intersection $\bigcap_{m < n} \text{interior}(f_m)$.
interior_iInter₂_le_nat theorem
{n : ℕ} (f : ℕ → Set X) : interior (⋂ m ≤ n, f m) = ⋂ m ≤ n, interior (f m)
Full source
@[simp]
theorem interior_iInter₂_le_nat {n : } (f : Set X) :
    interior (⋂ m ≤ n, f m) = ⋂ m ≤ n, interior (f m) :=
  (finite_le_nat n).interior_biInter f
Interior of Finite Intersection Equals Intersection of Interiors for Natural Numbers
Informal description
For any natural number $n$ and any family of sets $(f_m)_{m \in \mathbb{N}}$ in a topological space $X$, the interior of the intersection $\bigcap_{m \leq n} f_m$ is equal to the intersection $\bigcap_{m \leq n} \text{interior}(f_m)$.
interior_union_isClosed_of_interior_empty theorem
(h₁ : IsClosed s) (h₂ : interior t = ∅) : interior (s ∪ t) = interior s
Full source
theorem interior_union_isClosed_of_interior_empty (h₁ : IsClosed s)
    (h₂ : interior t = ) : interior (s ∪ t) = interior s :=
  have : interiorinterior (s ∪ t) ⊆ s := fun x ⟨u, ⟨(hu₁ : IsOpen u), (hu₂ : u ⊆ s ∪ t)⟩, (hx₁ : x ∈ u)⟩ =>
    by_contradiction fun hx₂ : x ∉ s =>
      have : u \ su \ s ⊆ t := fun _ ⟨h₁, h₂⟩ => Or.resolve_left (hu₂ h₁) h₂
      have : u \ su \ s ⊆ interior t := by rwa [(IsOpen.sdiff hu₁ h₁).subset_interior_iff]
      have : u \ su \ s ⊆ ∅ := by rwa [h₂] at this
      this ⟨hx₁, hx₂⟩
  Subset.antisymm (interior_maximal this isOpen_interior) (interior_mono subset_union_left)
Interior of Union with Closed Set and Empty Interior Set Equals Interior of Closed Set
Informal description
Let $X$ be a topological space. If $s$ is a closed subset of $X$ and the interior of $t$ is empty, then the interior of the union $s \cup t$ equals the interior of $s$, i.e., $\text{interior}(s \cup t) = \text{interior}(s)$.
isOpen_iff_forall_mem_open theorem
: IsOpen s ↔ ∀ x ∈ s, ∃ t, t ⊆ s ∧ IsOpen t ∧ x ∈ t
Full source
theorem isOpen_iff_forall_mem_open : IsOpenIsOpen s ↔ ∀ x ∈ s, ∃ t, t ⊆ s ∧ IsOpen t ∧ x ∈ t := by
  rw [← subset_interior_iff_isOpen]
  simp only [subset_def, mem_interior]
Characterization of Open Sets via Local Open Neighborhoods
Informal description
A subset $s$ of a topological space is open if and only if for every point $x \in s$, there exists an open subset $t$ such that $x \in t$, $t$ is open, and $t \subseteq s$.
interior_iInter_subset theorem
(s : ι → Set X) : interior (⋂ i, s i) ⊆ ⋂ i, interior (s i)
Full source
theorem interior_iInter_subset (s : ι → Set X) : interiorinterior (⋂ i, s i) ⊆ ⋂ i, interior (s i) :=
  subset_iInter fun _ => interior_mono <| iInter_subset _ _
Interior of Intersection is Subset of Intersection of Interiors
Informal description
For any indexed family of sets $\{s_i\}_{i \in \iota}$ in a topological space $X$, the interior of their intersection is contained in the intersection of their interiors, i.e., \[ \text{interior}\left(\bigcap_{i} s_i\right) \subseteq \bigcap_{i} \text{interior}(s_i). \]
interior_iInter₂_subset theorem
(p : ι → Sort*) (s : ∀ i, p i → Set X) : interior (⋂ (i) (j), s i j) ⊆ ⋂ (i) (j), interior (s i j)
Full source
theorem interior_iInter₂_subset (p : ι → Sort*) (s : ∀ i, p i → Set X) :
    interiorinterior (⋂ (i) (j), s i j) ⊆ ⋂ (i) (j), interior (s i j) :=
  (interior_iInter_subset _).trans <| iInter_mono fun _ => interior_iInter_subset _
Interior of Doubly Indexed Intersection is Subset of Intersection of Interiors
Informal description
For any doubly indexed family of sets $\{s_{i,j}\}_{i \in \iota, j \in p(i)}$ in a topological space $X$, the interior of their intersection is contained in the intersection of their interiors, i.e., \[ \text{interior}\left(\bigcap_{i,j} s_{i,j}\right) \subseteq \bigcap_{i,j} \text{interior}(s_{i,j}). \]
interior_sInter_subset theorem
(S : Set (Set X)) : interior (⋂₀ S) ⊆ ⋂ s ∈ S, interior s
Full source
theorem interior_sInter_subset (S : Set (Set X)) : interiorinterior (⋂₀ S) ⊆ ⋂ s ∈ S, interior s :=
  calc
    interior (⋂₀ S) = interior (⋂ s ∈ S, s) := by rw [sInter_eq_biInter]
    _ ⊆ ⋂ s ∈ S, interior s := interior_iInter₂_subset _ _
Interior of Intersection is Subset of Intersection of Interiors for a Family of Sets
Informal description
For any family of sets $S$ in a topological space $X$, the interior of the intersection $\bigcap_{s \in S} s$ is contained in the intersection of the interiors of the sets in $S$, i.e., \[ \text{interior}\left(\bigcap_{s \in S} s\right) \subseteq \bigcap_{s \in S} \text{interior}(s). \]
Filter.HasBasis.lift'_interior theorem
{l : Filter X} {p : ι → Prop} {s : ι → Set X} (h : l.HasBasis p s) : (l.lift' interior).HasBasis p fun i => interior (s i)
Full source
theorem Filter.HasBasis.lift'_interior {l : Filter X} {p : ι → Prop} {s : ι → Set X}
    (h : l.HasBasis p s) : (l.lift' interior).HasBasis p fun i => interior (s i) :=
  h.lift' fun _ _ ↦ interior_mono
Basis Preservation Under Filter Interior Lift
Informal description
Let $X$ be a topological space and $l$ a filter on $X$ with a basis $\{s_i\}_{i \in \iota}$ indexed by a predicate $p$. Then the filter obtained by applying the interior operation to $l$ has a basis consisting of the interiors of the sets $s_i$, i.e., $\{ \text{interior}(s_i) \}_{i \in \iota}$ with the same index predicate $p$.
Filter.lift'_interior_le theorem
(l : Filter X) : l.lift' interior ≤ l
Full source
theorem Filter.lift'_interior_le (l : Filter X) : l.lift' interior ≤ l := fun _s hs ↦
  mem_of_superset (mem_lift' hs) interior_subset
Filter Lift of Interior is Finer Than Original Filter
Informal description
For any filter $l$ on a topological space $X$, the filter obtained by lifting the interior operation to $l$ is finer than $l$ itself, i.e., $l.\text{lift}'(\text{interior}) \leq l$.
Filter.HasBasis.lift'_interior_eq_self theorem
{l : Filter X} {p : ι → Prop} {s : ι → Set X} (h : l.HasBasis p s) (ho : ∀ i, p i → IsOpen (s i)) : l.lift' interior = l
Full source
theorem Filter.HasBasis.lift'_interior_eq_self {l : Filter X} {p : ι → Prop} {s : ι → Set X}
    (h : l.HasBasis p s) (ho : ∀ i, p i → IsOpen (s i)) : l.lift' interior = l :=
  le_antisymm l.lift'_interior_le <| h.lift'_interior.ge_iff.2 fun i hi ↦ by
    simpa only [(ho i hi).interior_eq] using h.mem_of_mem hi
Filter Interior Lift Equals Original Filter for Open Basis
Informal description
Let $X$ be a topological space and $l$ a filter on $X$ with a basis $\{s_i\}_{i \in \iota}$ indexed by a predicate $p$, where each $s_i$ is open whenever $p(i)$ holds. Then the filter obtained by lifting the interior operation to $l$ equals $l$ itself, i.e., $l.\text{lift}'(\text{interior}) = l$.
isClosed_closure theorem
: IsClosed (closure s)
Full source
@[simp]
theorem isClosed_closure : IsClosed (closure s) :=
  isClosed_sInter fun _ => And.left
Closure is Closed
Informal description
For any subset $s$ of a topological space $X$, the closure $\overline{s}$ is a closed set.
subset_closure theorem
: s ⊆ closure s
Full source
theorem subset_closure : s ⊆ closure s :=
  subset_sInter fun _ => And.right
Subset of Closure
Informal description
For any subset $s$ of a topological space, $s$ is contained in its closure, i.e., $s \subseteq \overline{s}$.
not_mem_of_not_mem_closure theorem
{P : X} (hP : P ∉ closure s) : P ∉ s
Full source
theorem not_mem_of_not_mem_closure {P : X} (hP : P ∉ closure s) : P ∉ s := fun h =>
  hP (subset_closure h)
Non-membership in Set from Non-membership in Closure: $P \notin \overline{s} \implies P \notin s$
Informal description
For any point $P$ in a topological space, if $P$ does not belong to the closure of a set $s$, then $P$ does not belong to $s$.
closure_minimal theorem
(h₁ : s ⊆ t) (h₂ : IsClosed t) : closure s ⊆ t
Full source
theorem closure_minimal (h₁ : s ⊆ t) (h₂ : IsClosed t) : closureclosure s ⊆ t :=
  sInter_subset_of_mem ⟨h₂, h₁⟩
Minimality of Closure: $\overline{s} \subseteq t$ for $s \subseteq t$ and $t$ closed
Informal description
For any subset $s$ of a topological space, if $s$ is contained in a closed set $t$, then the closure of $s$ is also contained in $t$. In other words, if $s \subseteq t$ and $t$ is closed, then $\overline{s} \subseteq t$.
Disjoint.closure_left theorem
(hd : Disjoint s t) (ht : IsOpen t) : Disjoint (closure s) t
Full source
theorem Disjoint.closure_left (hd : Disjoint s t) (ht : IsOpen t) :
    Disjoint (closure s) t :=
  disjoint_compl_left.mono_left <| closure_minimal hd.subset_compl_right ht.isClosed_compl
Disjointness of Closure with Open Set: $\overline{s} \cap t = \varnothing$ for $s \cap t = \varnothing$ and $t$ open
Informal description
For any two disjoint subsets $s$ and $t$ of a topological space, if $t$ is open, then the closure of $s$ remains disjoint from $t$, i.e., $\overline{s} \cap t = \varnothing$.
Disjoint.closure_right theorem
(hd : Disjoint s t) (hs : IsOpen s) : Disjoint s (closure t)
Full source
theorem Disjoint.closure_right (hd : Disjoint s t) (hs : IsOpen s) :
    Disjoint s (closure t) :=
  (hd.symm.closure_left hs).symm
Disjointness of Open Set with Closure: $s \cap \overline{t} = \varnothing$ for $s \cap t = \varnothing$ and $s$ open
Informal description
For any two disjoint subsets $s$ and $t$ of a topological space, if $s$ is open, then $s$ remains disjoint from the closure of $t$, i.e., $s \cap \overline{t} = \varnothing$.
IsClosed.closure_subset_iff theorem
(h₁ : IsClosed t) : closure s ⊆ t ↔ s ⊆ t
Full source
theorem IsClosed.closure_subset_iff (h₁ : IsClosed t) : closureclosure s ⊆ tclosure s ⊆ t ↔ s ⊆ t :=
  ⟨Subset.trans subset_closure, fun h => closure_minimal h h₁⟩
Closure Subset Criterion for Closed Sets: $\overline{s} \subseteq t \leftrightarrow s \subseteq t$ when $t$ is closed
Informal description
For any closed set $t$ in a topological space, the closure of a set $s$ is contained in $t$ if and only if $s$ is contained in $t$. That is, $\overline{s} \subseteq t \leftrightarrow s \subseteq t$ when $t$ is closed.
IsClosed.mem_iff_closure_subset theorem
(hs : IsClosed s) : x ∈ s ↔ closure ({ x } : Set X) ⊆ s
Full source
theorem IsClosed.mem_iff_closure_subset (hs : IsClosed s) :
    x ∈ sx ∈ s ↔ closure ({x} : Set X) ⊆ s :=
  (hs.closure_subset_iff.trans Set.singleton_subset_iff).symm
Characterization of Membership in Closed Sets via Singleton Closure
Informal description
For any closed set $s$ in a topological space $X$ and any point $x \in X$, the point $x$ belongs to $s$ if and only if the closure of the singleton set $\{x\}$ is contained in $s$. That is, $x \in s \leftrightarrow \overline{\{x\}} \subseteq s$.
closure_mono theorem
(h : s ⊆ t) : closure s ⊆ closure t
Full source
@[mono, gcongr]
theorem closure_mono (h : s ⊆ t) : closureclosure s ⊆ closure t :=
  closure_minimal (Subset.trans h subset_closure) isClosed_closure
Monotonicity of Closure: $s \subseteq t$ implies $\overline{s} \subseteq \overline{t}$
Informal description
For any subsets $s$ and $t$ of a topological space, if $s \subseteq t$, then the closure of $s$ is contained in the closure of $t$, i.e., $\overline{s} \subseteq \overline{t}$.
monotone_closure theorem
(X : Type*) [TopologicalSpace X] : Monotone (@closure X _)
Full source
theorem monotone_closure (X : Type*) [TopologicalSpace X] : Monotone (@closure X _) := fun _ _ =>
  closure_mono
Monotonicity of the Closure Operator
Informal description
For any topological space $X$, the closure operator $\overline{\cdot}$ is monotone, meaning that for any subsets $s$ and $t$ of $X$, if $s \subseteq t$, then $\overline{s} \subseteq \overline{t}$.
diff_subset_closure_iff theorem
: s \ t ⊆ closure t ↔ s ⊆ closure t
Full source
theorem diff_subset_closure_iff : s \ ts \ t ⊆ closure ts \ t ⊆ closure t ↔ s ⊆ closure t := by
  rw [diff_subset_iff, union_eq_self_of_subset_left subset_closure]
Characterization of Set Difference via Closure: $s \setminus t \subseteq \overline{t} \leftrightarrow s \subseteq \overline{t}$
Informal description
For any subsets $s$ and $t$ of a topological space, the set difference $s \setminus t$ is contained in the closure of $t$ if and only if $s$ is contained in the closure of $t$. In symbols: $$ s \setminus t \subseteq \overline{t} \leftrightarrow s \subseteq \overline{t} $$
closure_inter_subset_inter_closure theorem
(s t : Set X) : closure (s ∩ t) ⊆ closure s ∩ closure t
Full source
theorem closure_inter_subset_inter_closure (s t : Set X) :
    closureclosure (s ∩ t) ⊆ closure s ∩ closure t :=
  (monotone_closure X).map_inf_le s t
Closure of Intersection is Subset of Intersection of Closures
Informal description
For any subsets $s$ and $t$ of a topological space $X$, the closure of their intersection is contained in the intersection of their closures, i.e., $$\overline{s \cap t} \subseteq \overline{s} \cap \overline{t}.$$
closure_empty theorem
: closure (∅ : Set X) = ∅
Full source
theorem closure_empty : closure ( : Set X) =  :=
  isClosed_empty.closure_eq
Closure of the Empty Set is Empty
Informal description
The closure of the empty set $\emptyset$ in a topological space $X$ is equal to the empty set itself, i.e., $\overline{\emptyset} = \emptyset$.
closure_univ theorem
: closure (univ : Set X) = univ
Full source
theorem closure_univ : closure (univ : Set X) = univ :=
  isClosed_univ.closure_eq
Closure of the Universal Set is Universal
Informal description
The closure of the universal set in a topological space $X$ is equal to the universal set itself, i.e., $\overline{X} = X$.
closure_closure theorem
: closure (closure s) = closure s
Full source
theorem closure_closure : closure (closure s) = closure s :=
  isClosed_closure.closure_eq
Idempotence of Closure Operation
Informal description
For any subset $s$ of a topological space, the closure of the closure of $s$ is equal to the closure of $s$, i.e., $\overline{\overline{s}} = \overline{s}$.
closure_eq_compl_interior_compl theorem
: closure s = (interior sᶜ)ᶜ
Full source
theorem closure_eq_compl_interior_compl : closure s = (interior sᶜ)ᶜ := by
  rw [interior, closure, compl_sUnion, compl_image_set_of]
  simp only [compl_subset_compl, isOpen_compl_iff]
Closure as Complement of Interior of Complement
Informal description
For any subset $s$ of a topological space, the closure of $s$ is equal to the complement of the interior of the complement of $s$, i.e., \[ \overline{s} = (\text{int}(s^c))^c. \]
Set.Finite.closure_biUnion theorem
{ι : Type*} {s : Set ι} (hs : s.Finite) (f : ι → Set X) : closure (⋃ i ∈ s, f i) = ⋃ i ∈ s, closure (f i)
Full source
theorem Set.Finite.closure_biUnion {ι : Type*} {s : Set ι} (hs : s.Finite) (f : ι → Set X) :
    closure (⋃ i ∈ s, f i) = ⋃ i ∈ s, closure (f i) := by
  simp [closure_eq_compl_interior_compl, hs.interior_biInter]
Closure of Finite Union Equals Union of Closures
Informal description
For any finite set $s$ of indices and any family of sets $(f_i)_{i \in s}$ in a topological space $X$, the closure of the union $\bigcup_{i \in s} f_i$ is equal to the union of the closures $\bigcup_{i \in s} \overline{f_i}$.
Set.Finite.closure_sUnion theorem
{S : Set (Set X)} (hS : S.Finite) : closure (⋃₀ S) = ⋃ s ∈ S, closure s
Full source
theorem Set.Finite.closure_sUnion {S : Set (Set X)} (hS : S.Finite) :
    closure (⋃₀ S) = ⋃ s ∈ S, closure s := by
  rw [sUnion_eq_biUnion, hS.closure_biUnion]
Closure of Finite Union of Sets Equals Union of Closures
Informal description
For any finite family of sets $S$ in a topological space $X$, the closure of the union of all sets in $S$ equals the union of the closures of each set in $S$. In symbols: \[ \overline{\bigcup₀ S} = \bigcup_{s \in S} \overline{s}. \]
Finset.closure_biUnion theorem
{ι : Type*} (s : Finset ι) (f : ι → Set X) : closure (⋃ i ∈ s, f i) = ⋃ i ∈ s, closure (f i)
Full source
@[simp]
theorem Finset.closure_biUnion {ι : Type*} (s : Finset ι) (f : ι → Set X) :
    closure (⋃ i ∈ s, f i) = ⋃ i ∈ s, closure (f i) :=
  s.finite_toSet.closure_biUnion f
Closure of Finite Union Equals Union of Closures for Finsets
Informal description
For any finite set $s$ of indices and any family of sets $(f_i)_{i \in s}$ in a topological space $X$, the closure of the union $\bigcup_{i \in s} f_i$ is equal to the union of the closures $\bigcup_{i \in s} \overline{f_i}$.
closure_iUnion_of_finite theorem
[Finite ι] (f : ι → Set X) : closure (⋃ i, f i) = ⋃ i, closure (f i)
Full source
@[simp]
theorem closure_iUnion_of_finite [Finite ι] (f : ι → Set X) :
    closure (⋃ i, f i) = ⋃ i, closure (f i) := by
  rw [← sUnion_range, (finite_range _).closure_sUnion, biUnion_range]
Closure of Finite Union Equals Union of Closures
Informal description
For any finite index set $\iota$ and any family of sets $(f_i)_{i \in \iota}$ in a topological space $X$, the closure of the union $\bigcup_{i \in \iota} f_i$ equals the union of the closures $\bigcup_{i \in \iota} \overline{f_i}$.
closure_iUnion₂_lt_nat theorem
{n : ℕ} (f : ℕ → Set X) : closure (⋃ m < n, f m) = ⋃ m < n, closure (f m)
Full source
@[simp]
theorem closure_iUnion₂_lt_nat {n : } (f : Set X) :
    closure (⋃ m < n, f m) = ⋃ m < n, closure (f m) :=
  (finite_lt_nat n).closure_biUnion f
Closure of Finite Union of Sets Indexed by Natural Numbers Below $n$
Informal description
For any natural number $n$ and any family of sets $(f_m)_{m \in \mathbb{N}}$ in a topological space $X$, the closure of the union $\bigcup_{m < n} f_m$ is equal to the union of the closures $\bigcup_{m < n} \overline{f_m}$.
closure_iUnion₂_le_nat theorem
{n : ℕ} (f : ℕ → Set X) : closure (⋃ m ≤ n, f m) = ⋃ m ≤ n, closure (f m)
Full source
@[simp]
theorem closure_iUnion₂_le_nat {n : } (f : Set X) :
    closure (⋃ m ≤ n, f m) = ⋃ m ≤ n, closure (f m) :=
  (finite_le_nat n).closure_biUnion f
Closure of Finite Union Indexed by Natural Numbers Up to $n$ Equals Union of Closures
Informal description
For any natural number $n$ and any family of sets $(f_m)_{m \in \mathbb{N}}$ in a topological space $X$, the closure of the union $\bigcup_{m \leq n} f_m$ is equal to the union $\bigcup_{m \leq n} \overline{f_m}$ of their closures.
interior_compl theorem
: interior sᶜ = (closure s)ᶜ
Full source
@[simp]
theorem interior_compl : interior sᶜ = (closure s)ᶜ := by
  simp [closure_eq_compl_interior_compl]
Interior of Complement Equals Complement of Closure
Informal description
For any subset $s$ of a topological space, the interior of the complement of $s$ is equal to the complement of the closure of $s$, i.e., \[ \text{int}(s^c) = (\overline{s})^c. \]
closure_compl theorem
: closure sᶜ = (interior s)ᶜ
Full source
@[simp]
theorem closure_compl : closure sᶜ = (interior s)ᶜ := by
  simp [closure_eq_compl_interior_compl]
Closure of Complement Equals Complement of Interior
Informal description
For any subset $s$ of a topological space, the closure of the complement of $s$ is equal to the complement of the interior of $s$, i.e., \[ \overline{s^c} = (\text{int}(s))^c. \]
mem_closure_iff theorem
: x ∈ closure s ↔ ∀ o, IsOpen o → x ∈ o → (o ∩ s).Nonempty
Full source
theorem mem_closure_iff :
    x ∈ closure sx ∈ closure s ↔ ∀ o, IsOpen o → x ∈ o → (o ∩ s).Nonempty :=
  ⟨fun h o oo ao =>
    by_contradiction fun os =>
      have : s ⊆ oᶜ := fun x xs xo => os ⟨x, xo, xs⟩
      closure_minimal this (isClosed_compl_iff.2 oo) h ao,
    fun H _ ⟨h₁, h₂⟩ =>
    by_contradiction fun nc =>
      let ⟨_, hc, hs⟩ := H _ h₁.isOpen_compl nc
      hc (h₂ hs)⟩
Characterization of Points in Closure via Open Neighborhoods
Informal description
A point $x$ belongs to the closure of a set $s$ in a topological space if and only if for every open set $o$ containing $x$, the intersection $o \cap s$ is nonempty.
closure_inter_open_nonempty_iff theorem
(h : IsOpen t) : (closure s ∩ t).Nonempty ↔ (s ∩ t).Nonempty
Full source
theorem closure_inter_open_nonempty_iff (h : IsOpen t) :
    (closure s ∩ t).Nonempty ↔ (s ∩ t).Nonempty :=
  ⟨fun ⟨_x, hxcs, hxt⟩ => inter_comm t s ▸ mem_closure_iff.1 hxcs t h hxt, fun h =>
    h.mono <| inf_le_inf_right t subset_closure⟩
Nonempty Intersection of Closure with Open Set Equals Nonempty Intersection with Original Set
Informal description
For any open set $t$ in a topological space, the intersection of the closure of a set $s$ with $t$ is nonempty if and only if the intersection of $s$ with $t$ is nonempty. In other words, $\overline{s} \cap t \neq \emptyset \leftrightarrow s \cap t \neq \emptyset$.
Filter.le_lift'_closure theorem
(l : Filter X) : l ≤ l.lift' closure
Full source
theorem Filter.le_lift'_closure (l : Filter X) : l ≤ l.lift' closure :=
  le_lift'.2 fun _ h => mem_of_superset h subset_closure
Filter Refinement via Closure Operation
Informal description
For any filter $l$ on a topological space $X$, the filter $l$ is finer than the filter generated by taking the closure of each set in $l$, i.e., $l \leq l.\text{lift}'(\text{closure})$.
Filter.HasBasis.lift'_closure theorem
{l : Filter X} {p : ι → Prop} {s : ι → Set X} (h : l.HasBasis p s) : (l.lift' closure).HasBasis p fun i => closure (s i)
Full source
theorem Filter.HasBasis.lift'_closure {l : Filter X} {p : ι → Prop} {s : ι → Set X}
    (h : l.HasBasis p s) : (l.lift' closure).HasBasis p fun i => closure (s i) :=
  h.lift' (monotone_closure X)
Basis Preservation under Filter Closure Operation
Informal description
Let $X$ be a topological space and $l$ a filter on $X$ with a basis consisting of sets $s_i$ (indexed by $i \in \iota$) satisfying property $p(i)$. Then the filter generated by taking closures of sets in $l$ has a basis consisting of the closures of the original basis sets, i.e., the filter $l.\text{lift}'(\text{closure})$ has basis $\{ \overline{s_i} \mid p(i) \}$.
Filter.HasBasis.lift'_closure_eq_self theorem
{l : Filter X} {p : ι → Prop} {s : ι → Set X} (h : l.HasBasis p s) (hc : ∀ i, p i → IsClosed (s i)) : l.lift' closure = l
Full source
theorem Filter.HasBasis.lift'_closure_eq_self {l : Filter X} {p : ι → Prop} {s : ι → Set X}
    (h : l.HasBasis p s) (hc : ∀ i, p i → IsClosed (s i)) : l.lift' closure = l :=
  le_antisymm (h.ge_iff.2 fun i hi => (hc i hi).closure_eqmem_lift' (h.mem_of_mem hi))
    l.le_lift'_closure
Filter Closure Equality for Closed Basis Sets
Informal description
Let $X$ be a topological space and $l$ a filter on $X$ with a basis consisting of sets $s_i$ (indexed by $i \in \iota$) satisfying property $p(i)$. If each basis set $s_i$ with $p(i)$ is closed, then the filter generated by taking closures of sets in $l$ equals $l$ itself, i.e., $l.\text{lift}'(\text{closure}) = l$.
Filter.lift'_closure_eq_bot theorem
{l : Filter X} : l.lift' closure = ⊥ ↔ l = ⊥
Full source
@[simp]
theorem Filter.lift'_closure_eq_bot {l : Filter X} : l.lift' closure = ⊥ ↔ l = ⊥ :=
  ⟨fun h => bot_unique <| h ▸ l.le_lift'_closure, fun h =>
    h.symm ▸ by rw [lift'_bot (monotone_closure _), closure_empty, principal_empty]⟩
Bottom Filter Characterization via Closure Operation: $l.\text{lift}'(\text{closure}) = \bot \leftrightarrow l = \bot$
Informal description
For any filter $l$ on a topological space $X$, the filter generated by taking closures of sets in $l$ is equal to the bottom filter $\bot$ if and only if $l$ itself is the bottom filter, i.e., $l.\text{lift}'(\text{closure}) = \bot \leftrightarrow l = \bot$.
dense_iff_closure_eq theorem
: Dense s ↔ closure s = univ
Full source
theorem dense_iff_closure_eq : DenseDense s ↔ closure s = univ :=
  eq_univ_iff_forall.symm
Density Criterion: $\overline{s} = \text{univ}$ iff $s$ is dense
Informal description
A subset $s$ of a topological space is dense if and only if its closure is equal to the entire space, i.e., $\overline{s} = \text{univ}$.
interior_eq_empty_iff_dense_compl theorem
: interior s = ∅ ↔ Dense sᶜ
Full source
theorem interior_eq_empty_iff_dense_compl : interiorinterior s = ∅ ↔ Dense sᶜ := by
  rw [dense_iff_closure_eq, closure_compl, compl_univ_iff]
Interior Empty iff Complement Dense
Informal description
For any subset $s$ of a topological space, the interior of $s$ is empty if and only if the complement of $s$ is dense in the space, i.e., \[ \text{int}(s) = \emptyset \leftrightarrow \overline{s^c} = \text{univ}. \]
dense_closure theorem
: Dense (closure s) ↔ Dense s
Full source
/-- The closure of a set `s` is dense if and only if `s` is dense. -/
@[simp]
theorem dense_closure : DenseDense (closure s) ↔ Dense s := by
  rw [Dense, Dense, closure_closure]
Density of a Set is Equivalent to Density of its Closure
Informal description
For any subset $s$ of a topological space, the closure of $s$ is dense if and only if $s$ itself is dense. In other words, $\overline{s}$ is dense in the space if and only if $s$ is dense.
dense_univ theorem
: Dense (univ : Set X)
Full source
@[simp]
theorem dense_univ : Dense (univ : Set X) := fun _ => subset_closure trivial
Universal Set is Dense in Topological Space
Informal description
The universal set in a topological space $X$ is dense, i.e., the closure of the universal set equals the entire space.
dense_iff_inter_open theorem
: Dense s ↔ ∀ U, IsOpen U → U.Nonempty → (U ∩ s).Nonempty
Full source
/-- A set is dense if and only if it has a nonempty intersection with each nonempty open set. -/
theorem dense_iff_inter_open :
    DenseDense s ↔ ∀ U, IsOpen U → U.Nonempty → (U ∩ s).Nonempty := by
  constructor <;> intro h
  · rintro U U_op ⟨x, x_in⟩
    exact mem_closure_iff.1 (h _) U U_op x_in
  · intro x
    rw [mem_closure_iff]
    intro U U_op x_in
    exact h U U_op ⟨_, x_in⟩
Characterization of Dense Sets via Nonempty Open Intersections
Informal description
A set $s$ in a topological space is dense if and only if for every nonempty open set $U$, the intersection $U \cap s$ is nonempty.
Dense.exists_mem_open theorem
(hs : Dense s) {U : Set X} (ho : IsOpen U) (hne : U.Nonempty) : ∃ x ∈ s, x ∈ U
Full source
theorem Dense.exists_mem_open (hs : Dense s) {U : Set X} (ho : IsOpen U)
    (hne : U.Nonempty) : ∃ x ∈ s, x ∈ U :=
  let ⟨x, hx⟩ := hs.inter_open_nonempty U ho hne
  ⟨x, hx.2, hx.1⟩
Existence of Points in Dense Sets Intersecting Nonempty Open Sets
Informal description
For a dense subset $s$ of a topological space $X$, and any nonempty open set $U \subseteq X$, there exists an element $x$ that belongs to both $s$ and $U$.
Dense.nonempty theorem
[h : Nonempty X] (hs : Dense s) : s.Nonempty
Full source
theorem Dense.nonempty [h : Nonempty X] (hs : Dense s) : s.Nonempty :=
  hs.nonempty_iff.2 h
Nonempty Dense Sets in Nonempty Spaces
Informal description
In a nonempty topological space $X$, if a subset $s$ is dense in $X$, then $s$ is nonempty.
Dense.mono theorem
(h : s₁ ⊆ s₂) (hd : Dense s₁) : Dense s₂
Full source
@[mono]
theorem Dense.mono (h : s₁ ⊆ s₂) (hd : Dense s₁) : Dense s₂ := fun x =>
  closure_mono h (hd x)
Density is Preserved by Superset Inclusion
Informal description
For any subsets $s_1$ and $s_2$ of a topological space $X$, if $s_1 \subseteq s_2$ and $s_1$ is dense in $X$, then $s_2$ is also dense in $X$.
dense_compl_singleton_iff_not_open theorem
: Dense ({ x }ᶜ : Set X) ↔ ¬IsOpen ({ x } : Set X)
Full source
/-- Complement to a singleton is dense if and only if the singleton is not an open set. -/
theorem dense_compl_singleton_iff_not_open :
    DenseDense ({x}ᶜ : Set X) ↔ ¬IsOpen ({x} : Set X) := by
  constructor
  · intro hd ho
    exact (hd.inter_open_nonempty _ ho (singleton_nonempty _)).ne_empty (inter_compl_self _)
  · refine fun ho => dense_iff_inter_open.2 fun U hU hne => inter_compl_nonempty_iff.2 fun hUx => ?_
    obtain rfl : U = {x} := eq_singleton_iff_nonempty_unique_mem.2 ⟨hne, hUx⟩
    exact ho hU
Density of Singleton Complement Characterizes Non-Open Singletons
Informal description
The complement of a singleton set $\{x\}^c$ is dense in a topological space $X$ if and only if the singleton $\{x\}$ is not an open set in $X$.
Dense.induction theorem
(hs : Dense s) {P : X → Prop} (mem : ∀ x ∈ s, P x) (isClosed : IsClosed {x | P x}) (x : X) : P x
Full source
/-- If a closed property holds for a dense subset, it holds for the whole space. -/
@[elab_as_elim]
lemma Dense.induction (hs : Dense s) {P : X → Prop}
    (mem : ∀ x ∈ s, P x) (isClosed : IsClosed { x | P x }) (x : X) : P x :=
  hs.closure_eq.symm.subset.trans (isClosed.closure_subset_iff.mpr mem) (Set.mem_univ _)
Dense Induction Principle: Closed properties holding on a dense set hold everywhere
Informal description
Let $X$ be a topological space and $s \subseteq X$ be a dense subset. Suppose $P : X \to \text{Prop}$ is a property such that: 1. $P(x)$ holds for every $x \in s$, and 2. The set $\{x \mid P(x)\}$ is closed in $X$. Then $P(x)$ holds for every $x \in X$.
closure_diff_interior theorem
(s : Set X) : closure s \ interior s = frontier s
Full source
@[simp]
theorem closure_diff_interior (s : Set X) : closureclosure s \ interior s = frontier s :=
  rfl
Closure Minus Interior Equals Frontier
Informal description
For any subset $s$ of a topological space $X$, the difference between the closure of $s$ and the interior of $s$ equals the frontier of $s$, i.e., \[ \overline{s} \setminus s^\circ = \partial s. \]
disjoint_interior_frontier theorem
: Disjoint (interior s) (frontier s)
Full source
/-- Interior and frontier are disjoint. -/
lemma disjoint_interior_frontier : Disjoint (interior s) (frontier s) := by
  rw [disjoint_iff_inter_eq_empty, ← closure_diff_interior, diff_eq,
    ← inter_assoc, inter_comm, ← inter_assoc, compl_inter_self, empty_inter]
Disjointness of Interior and Frontier: $\text{int}(s) \cap \partial s = \emptyset$
Informal description
For any subset $s$ of a topological space $X$, the interior of $s$ and the frontier of $s$ are disjoint, i.e., \[ \text{interior}(s) \cap \partial s = \emptyset. \]
closure_diff_frontier theorem
(s : Set X) : closure s \ frontier s = interior s
Full source
@[simp]
theorem closure_diff_frontier (s : Set X) : closureclosure s \ frontier s = interior s := by
  rw [frontier, diff_diff_right_self, inter_eq_self_of_subset_right interior_subset_closure]
Closure Minus Frontier Equals Interior
Informal description
For any subset $s$ of a topological space $X$, the difference between the closure of $s$ and its frontier equals the interior of $s$, i.e., \[ \overline{s} \setminus \partial s = s^\circ. \]
self_diff_frontier theorem
(s : Set X) : s \ frontier s = interior s
Full source
@[simp]
theorem self_diff_frontier (s : Set X) : s \ frontier s = interior s := by
  rw [frontier, diff_diff_right, diff_eq_empty.2 subset_closure,
    inter_eq_self_of_subset_right interior_subset, empty_union]
Set Minus Frontier Equals Interior: $s \setminus \partial s = \text{int}(s)$
Informal description
For any subset $s$ of a topological space $X$, the set difference $s \setminus \partial s$ equals the interior of $s$, i.e., $$ s \setminus \partial s = \text{int}(s). $$
frontier_eq_closure_inter_closure theorem
: frontier s = closure s ∩ closure sᶜ
Full source
theorem frontier_eq_closure_inter_closure : frontier s = closureclosure s ∩ closure sᶜ := by
  rw [closure_compl, frontier, diff_eq]
Frontier as Intersection of Closures: $\partial s = \overline{s} \cap \overline{s^c}$
Informal description
For any subset $s$ of a topological space, the frontier (or boundary) of $s$ is equal to the intersection of the closure of $s$ with the closure of its complement, i.e., \[ \partial s = \overline{s} \cap \overline{s^c}. \]
frontier_subset_closure theorem
: frontier s ⊆ closure s
Full source
theorem frontier_subset_closure : frontierfrontier s ⊆ closure s :=
  diff_subset
Frontier is Subset of Closure
Informal description
For any subset $s$ of a topological space, the frontier (or boundary) of $s$ is a subset of the closure of $s$, i.e., \[ \text{frontier}(s) \subseteq \text{closure}(s). \]
frontier_subset_iff_isClosed theorem
: frontier s ⊆ s ↔ IsClosed s
Full source
theorem frontier_subset_iff_isClosed : frontierfrontier s ⊆ sfrontier s ⊆ s ↔ IsClosed s := by
  rw [frontier, diff_subset_iff, union_eq_right.mpr interior_subset, closure_subset_iff_isClosed]
Frontier Subset Criterion for Closed Sets
Informal description
For any subset $s$ of a topological space, the frontier (boundary) of $s$ is contained in $s$ if and only if $s$ is closed. In symbols: \[ \text{frontier}(s) \subseteq s \leftrightarrow \text{IsClosed}(s). \]
frontier_compl theorem
(s : Set X) : frontier sᶜ = frontier s
Full source
/-- The complement of a set has the same frontier as the original set. -/
@[simp]
theorem frontier_compl (s : Set X) : frontier sᶜ = frontier s := by
  simp only [frontier_eq_closure_inter_closure, compl_compl, inter_comm]
Frontier of Complement Equals Frontier: $\partial(s^c) = \partial s$
Informal description
For any subset $s$ of a topological space $X$, the frontier of the complement $s^c$ is equal to the frontier of $s$, i.e., \[ \partial(s^c) = \partial s. \]
frontier_univ theorem
: frontier (univ : Set X) = ∅
Full source
@[simp]
theorem frontier_univ : frontier (univ : Set X) =  := by simp [frontier]
Frontier of Universal Set is Empty
Informal description
The frontier of the universal set in a topological space is the empty set, i.e., $\text{frontier}(X) = \emptyset$.
frontier_empty theorem
: frontier (∅ : Set X) = ∅
Full source
@[simp]
theorem frontier_empty : frontier ( : Set X) =  := by simp [frontier]
Frontier of the Empty Set is Empty
Informal description
The frontier of the empty set in any topological space $X$ is the empty set itself, i.e., $\text{frontier}(\emptyset) = \emptyset$.
frontier_inter_subset theorem
(s t : Set X) : frontier (s ∩ t) ⊆ frontier s ∩ closure t ∪ closure s ∩ frontier t
Full source
theorem frontier_inter_subset (s t : Set X) :
    frontierfrontier (s ∩ t) ⊆ frontier s ∩ closure t ∪ closure s ∩ frontier t := by
  simp only [frontier_eq_closure_inter_closure, compl_inter, closure_union]
  refine (inter_subset_inter_left _ (closure_inter_subset_inter_closure s t)).trans_eq ?_
  simp only [inter_union_distrib_left, union_inter_distrib_right, inter_assoc,
    inter_comm (closure t)]
Frontier of Intersection is Subset of Union of Frontier-Closure Intersections
Informal description
For any subsets $s$ and $t$ of a topological space $X$, the frontier of their intersection is contained in the union of two sets: (1) the intersection of the frontier of $s$ with the closure of $t$, and (2) the intersection of the closure of $s$ with the frontier of $t$, i.e., \[ \partial(s \cap t) \subseteq (\partial s \cap \overline{t}) \cup (\overline{s} \cap \partial t). \]
frontier_union_subset theorem
(s t : Set X) : frontier (s ∪ t) ⊆ frontier s ∩ closure tᶜ ∪ closure sᶜ ∩ frontier t
Full source
theorem frontier_union_subset (s t : Set X) :
    frontierfrontier (s ∪ t) ⊆ frontier s ∩ closure tᶜ ∪ closure sᶜ ∩ frontier t := by
  simpa only [frontier_compl, ← compl_union] using frontier_inter_subset sᶜ tᶜ
Frontier of Union is Subset of Union of Frontier-Closure Complement Intersections
Informal description
For any subsets $s$ and $t$ of a topological space $X$, the frontier of their union is contained in the union of two sets: (1) the intersection of the frontier of $s$ with the closure of the complement of $t$, and (2) the intersection of the closure of the complement of $s$ with the frontier of $t$, i.e., \[ \partial(s \cup t) \subseteq (\partial s \cap \overline{t^c}) \cup (\overline{s^c} \cap \partial t). \]
IsClosed.frontier_eq theorem
(hs : IsClosed s) : frontier s = s \ interior s
Full source
theorem IsClosed.frontier_eq (hs : IsClosed s) : frontier s = s \ interior s := by
  rw [frontier, hs.closure_eq]
Frontier of a Closed Set Equals Set Minus Interior
Informal description
For any closed subset $s$ of a topological space, the frontier (or boundary) of $s$ is equal to the set difference between $s$ and its interior, i.e., $\partial s = s \setminus \text{int}(s)$.
IsOpen.frontier_eq theorem
(hs : IsOpen s) : frontier s = closure s \ s
Full source
theorem IsOpen.frontier_eq (hs : IsOpen s) : frontier s = closureclosure s \ s := by
  rw [frontier, hs.interior_eq]
Frontier of Open Set Equals Closure Minus Set
Informal description
For any open subset $s$ of a topological space, the frontier (or boundary) of $s$ is equal to the set difference between the closure of $s$ and $s$ itself, i.e., $\partial s = \overline{s} \setminus s$.
IsOpen.inter_frontier_eq theorem
(hs : IsOpen s) : s ∩ frontier s = ∅
Full source
theorem IsOpen.inter_frontier_eq (hs : IsOpen s) : s ∩ frontier s =  := by
  rw [hs.frontier_eq, inter_diff_self]
Open Set Disjoint from its Frontier
Informal description
For any open subset $s$ of a topological space, the intersection of $s$ with its frontier (boundary) is empty, i.e., $s \cap \partial s = \emptyset$.
disjoint_frontier_iff_isOpen theorem
: Disjoint (frontier s) s ↔ IsOpen s
Full source
theorem disjoint_frontier_iff_isOpen : DisjointDisjoint (frontier s) s ↔ IsOpen s := by
  rw [← isClosed_compl_iff, ← frontier_subset_iff_isClosed,
    frontier_compl, subset_compl_iff_disjoint_right]
Disjoint Frontier Characterization of Open Sets: $\partial s \cap s = \emptyset \leftrightarrow \text{$s$ is open}$
Informal description
For any subset $s$ of a topological space, the frontier (boundary) $\partial s$ is disjoint from $s$ if and only if $s$ is open. In symbols: \[ \partial s \cap s = \emptyset \leftrightarrow \text{$s$ is open}. \]
interior_frontier theorem
(h : IsClosed s) : interior (frontier s) = ∅
Full source
/-- The frontier of a closed set has no interior point. -/
theorem interior_frontier (h : IsClosed s) : interior (frontier s) =  := by
  have A : frontier s = s \ interior s := h.frontier_eq
  have B : interiorinterior (frontier s) ⊆ interior s := by rw [A]; exact interior_mono diff_subset
  have C : interiorinterior (frontier s) ⊆ frontier s := interior_subset
  have : interiorinterior (frontier s) ⊆ interior s ∩ (s \ interior s) :=
    subset_inter B (by simpa [A] using C)
  rwa [inter_diff_self, subset_empty_iff] at this
Empty Interior of Frontier for Closed Sets
Informal description
For any closed subset $s$ of a topological space, the interior of the frontier (boundary) of $s$ is empty, i.e., $\text{int}(\partial s) = \emptyset$.
closure_eq_interior_union_frontier theorem
(s : Set X) : closure s = interior s ∪ frontier s
Full source
theorem closure_eq_interior_union_frontier (s : Set X) : closure s = interiorinterior s ∪ frontier s :=
  (union_diff_cancel interior_subset_closure).symm
Closure as Union of Interior and Frontier
Informal description
For any subset $s$ of a topological space $X$, the closure of $s$ is equal to the union of its interior and its frontier, i.e., $\overline{s} = \text{interior}(s) \cup \text{frontier}(s)$.
Disjoint.frontier_left theorem
(ht : IsOpen t) (hd : Disjoint s t) : Disjoint (frontier s) t
Full source
theorem Disjoint.frontier_left (ht : IsOpen t) (hd : Disjoint s t) : Disjoint (frontier s) t :=
  subset_compl_iff_disjoint_right.1 <|
    frontier_subset_closure.trans <| closure_minimal (disjoint_left.1 hd) <| isClosed_compl_iff.2 ht
Disjointness of Frontier with Open Set: $\text{frontier}(s) \cap t = \emptyset$ for $t$ open and $s \cap t = \emptyset$
Informal description
For any open set $t$ and any set $s$ disjoint from $t$ (i.e., $s \cap t = \emptyset$), the frontier of $s$ is also disjoint from $t$, i.e., $\text{frontier}(s) \cap t = \emptyset$.
Disjoint.frontier_right theorem
(hs : IsOpen s) (hd : Disjoint s t) : Disjoint s (frontier t)
Full source
theorem Disjoint.frontier_right (hs : IsOpen s) (hd : Disjoint s t) : Disjoint s (frontier t) :=
  (hd.symm.frontier_left hs).symm
Disjointness of Open Set with Frontier: $s \cap \text{frontier}(t) = \emptyset$ for $s$ open and $s \cap t = \emptyset$
Informal description
For any open set $s$ and any set $t$ disjoint from $s$ (i.e., $s \cap t = \emptyset$), the set $s$ is also disjoint from the frontier of $t$, i.e., $s \cap \text{frontier}(t) = \emptyset$.
frontier_eq_inter_compl_interior theorem
: frontier s = (interior s)ᶜ ∩ (interior sᶜ)ᶜ
Full source
theorem frontier_eq_inter_compl_interior : frontier s = (interior s)ᶜ(interior s)ᶜ ∩ (interior sᶜ)ᶜ := by
  rw [← frontier_compl, ← closure_compl, ← diff_eq, closure_diff_interior]
Frontier as Intersection of Complement Interiors: $\partial s = (\text{int}(s))^c \cap (\text{int}(s^c))^c$
Informal description
For any subset $s$ of a topological space, the frontier (or boundary) of $s$ is equal to the intersection of the complement of the interior of $s$ with the complement of the interior of the complement of $s$, i.e., \[ \partial s = (\text{int}(s))^c \cap (\text{int}(s^c))^c. \]
compl_frontier_eq_union_interior theorem
: (frontier s)ᶜ = interior s ∪ interior sᶜ
Full source
theorem compl_frontier_eq_union_interior : (frontier s)ᶜ = interiorinterior s ∪ interior sᶜ := by
  rw [frontier_eq_inter_compl_interior]
  simp only [compl_inter, compl_compl]
Complement of Frontier Equals Union of Interiors: $(\partial s)^c = \text{int}(s) \cup \text{int}(s^c)$
Informal description
For any subset $s$ of a topological space, the complement of the frontier of $s$ is equal to the union of the interior of $s$ and the interior of the complement of $s$, i.e., \[ (\partial s)^c = \text{int}(s) \cup \text{int}(s^c). \]