Lean library · module TopologyByExample.Theorems.GridProperties
Foundations for further properties of spaces
This file defines the properties of topological spaces that Mathlib does not have and that the
project studies next, together with what every later argument about them needs: a small theory of
regular open sets, equivalent forms of some definitions, and the values of each property on spaces
with at most one point and on indiscrete spaces. Their invariance under homeomorphism is proved in
TopologyByExample.Theorems.HomeomorphInvariance.
None of the definitions assumes a separation axiom.
Main definitions
TopologyByExample.IsRegularOpen: a set is regular open if it is the interior of its closure.TopologyByExample.FunctionallyHausdorffSpace: distinct points are separated by a continuous map to the unit interval (the book's "Urysohn space").TopologyByExample.SemiregularSpace: the regular open sets form a base.TopologyByExample.PseudocompactSpace: every continuous real function is bounded.TopologyByExample.LocallyRelativelyCompactSpace: every point lies in an open set with compact closure (the book's "strongly locally compact").TopologyByExample.CountablyParacompactSpace: every countable open cover has a locally finite open refinement.TopologyByExample.UltraconnectedSpace: the closures of any two points meet.TopologyByExample.StronglyConnectedSpace: every continuous real function is constant.TopologyByExample.TotallyPathDisconnectedSpace: only equal points are joined by a path.TopologyByExample.ScatteredSpace: the only dense-in-itself subset is empty.TopologyByExample.HasIsolatedPoint: some point is isolated.TopologyByExample.SequentiallyDiscreteSpace: every convergent sequence is eventually equal to its limit.
Second category (¬ IsMeagre (Set.univ : Set X)), σ-local compactness
(SigmaCompactSpace X ∧ WeaklyLocallyCompactSpace X), limit point compactness and the countable
chain condition are stated by their formulas.
Main statements
TopologyByExample.functionallyHausdorffSpace_iff_real: separation by real functions.TopologyByExample.locallyRelativelyCompactSpace_iff_closed,TopologyByExample.locallyRelativelyCompactSpace_iff_basis: a closed compact neighbourhood at every point; a neighbourhood base of sets with compact closure.TopologyByExample.IsRegularOpen.preimage,TopologyByExample.isRegularOpen_sum_iffand their relatives: regular open sets under open maps, products, sums and the separation quotient.TopologyByExample.isMeagre_univ_of_isEmpty: the empty space is not of second category, while a one-point space is (TopologyByExample.not_isMeagre_univ_of_subsingleton).- the tactic
subsingleton_spaceproves that a space with at most one point has any of these properties (and every earlier one) that such spaces have.
Tags
regular open, semiregular, functionally Hausdorff, pseudocompact, countably paracompact, ultraconnected, scattered, second category
This file was written by Claude (Anthropic's AI model) working under the direction of David R. MacIver, who reviews it and is responsible for it.
Imports
- Mathlib.Topology.Baire.BaireMeasurable
- Mathlib.Topology.Baire.CompleteMetrizable
- Mathlib.Topology.Baire.Lemmas
- Mathlib.Topology.Compactness.CountablyCompact
- Mathlib.Topology.Compactness.Paracompact
- Mathlib.Topology.Compactness.SigmaCompact
- Mathlib.Topology.Connected.LocallyConnected
- Mathlib.Topology.Connected.PathConnected
- Mathlib.Topology.ContinuousMap.Basic
- Mathlib.Topology.ExtremallyDisconnected
- Mathlib.Topology.Irreducible
- Mathlib.Topology.Metrizable.Basic
- Mathlib.Topology.Metrizable.CompletelyMetrizable
- Mathlib.Topology.Perfect
- Mathlib.Topology.Separation.CompletelyRegular
- Mathlib.Topology.UnitInterval
- TopologyByExample.Theorems.Connectedness
variable {X : Type*} {Y : Type*} [TopologicalSpace X] [TopologicalSpace Y]
Regular open sets
definition IsRegularOpen
TopologyByExample.IsRegularOpen
A set is regular open if it is the interior of its closure.
def IsRegularOpen (s : Set X) : Prop
:=
interior (closure s) = s
theorem isRegularOpen_iff
TopologyByExample.isRegularOpen_iff
Unfolding the definition of a regular open set.
theorem isRegularOpen_iff {s : Set X} : IsRegularOpen s ↔ interior (closure s) = s
Proof
:=
Iff.rfl
theorem isOpen
TopologyByExample.IsRegularOpen.isOpen
A regular open set is open.
theorem IsRegularOpen.isOpen {s : Set X} (h : IsRegularOpen s) : IsOpen s
Proof
:= by
rw [← h]
exact isOpen_interior
theorem isRegularOpen_interior_closure
TopologyByExample.isRegularOpen_interior_closure
The interior of the closure of any set is regular open.
theorem isRegularOpen_interior_closure (s : Set X) : IsRegularOpen (interior (closure s))
Proof
:= by
refine (interior_mono ?_).antisymm (interior_maximal subset_closure isOpen_interior)
exact closure_minimal interior_subset isClosed_closure
theorem isRegularOpen_empty
TopologyByExample.isRegularOpen_empty
The empty set is regular open.
@[simp]
theorem isRegularOpen_empty : IsRegularOpen (∅ : Set X)
Proof
:= by
simp [IsRegularOpen]
theorem isRegularOpen_univ
TopologyByExample.isRegularOpen_univ
The whole space is regular open.
@[simp]
theorem isRegularOpen_univ : IsRegularOpen (univ : Set X)
Proof
:= by
simp [IsRegularOpen]
theorem isRegularOpen
TopologyByExample.IsClopen.isRegularOpen
A clopen set is regular open.
theorem IsClopen.isRegularOpen {s : Set X} (h : IsClopen s) : IsRegularOpen s
Proof
:= by
rw [IsRegularOpen, h.isClosed.closure_eq, h.isOpen.interior_eq]
theorem inter
TopologyByExample.IsRegularOpen.inter
The intersection of two regular open sets is regular open.
theorem IsRegularOpen.inter {s t : Set X} (hs : IsRegularOpen s) (ht : IsRegularOpen t) :
IsRegularOpen (s ∩ t)
Proof
:= by
refine (subset_inter ?_ ?_).antisymm
(interior_maximal subset_closure (hs.isOpen.inter ht.isOpen))
· conv_rhs => rw [← hs]
exact interior_mono (closure_mono inter_subset_left)
· conv_rhs => rw [← ht]
exact interior_mono (closure_mono inter_subset_right)
theorem isRegularOpen_preimage
TopologyByExample.Homeomorph.isRegularOpen_preimage
The preimage of a set under a homeomorphism is regular open if and only if the set is.
@[simp]
theorem isRegularOpen_preimage (e : X ≃ₜ Y) {s : Set Y} :
IsRegularOpen (e ⁻¹' s) ↔ IsRegularOpen s
Proof
:= by
rw [IsRegularOpen, IsRegularOpen, ← e.preimage_closure, ← e.preimage_interior,
e.surjective.preimage_injective.eq_iff]
theorem isRegularOpen_image
TopologyByExample.Homeomorph.isRegularOpen_image
The image of a set under a homeomorphism is regular open if and only if the set is.
@[simp]
theorem isRegularOpen_image (e : X ≃ₜ Y) {s : Set X} :
IsRegularOpen (e '' s) ↔ IsRegularOpen s
Proof
:= by
rw [← e.preimage_symm, isRegularOpen_preimage]
Regular open sets under maps
theorem preimage
TopologyByExample.IsRegularOpen.preimage
The preimage of a regular open set under a continuous open map is regular open.
theorem IsRegularOpen.preimage {f : X → Y} (hf : Continuous f) (hfo : IsOpenMap f) {s : Set Y}
(hs : IsRegularOpen s) : IsRegularOpen (f ⁻¹' s)
Proof
:= by
rw [IsRegularOpen, ← hfo.preimage_closure_eq_closure_preimage hf,
← hfo.preimage_interior_eq_interior_preimage hf, hs]
theorem prod
TopologyByExample.IsRegularOpen.prod
The product of two regular open sets is regular open.
theorem IsRegularOpen.prod {s : Set X} {t : Set Y} (hs : IsRegularOpen s)
(ht : IsRegularOpen t) : IsRegularOpen (s ×ˢ t)
Proof
:= by
rw [IsRegularOpen, closure_prod_eq, interior_prod_eq, hs, ht]
theorem pi
TopologyByExample.IsRegularOpen.pi
A product of regular open sets over finitely many coordinates is regular open.
theorem IsRegularOpen.pi {ι : Type*} {Z : ι → Type*} [∀ i, TopologicalSpace (Z i)] {I : Set ι}
(hI : I.Finite) {s : ∀ i, Set (Z i)} (hs : ∀ i ∈ I, IsRegularOpen (s i)) :
IsRegularOpen (I.pi s)
Proof
:= by
rw [IsRegularOpen, closure_pi_set, interior_pi_set hI]
exact Set.pi_congr rfl hs
theorem isRegularOpen_sum_iff
TopologyByExample.isRegularOpen_sum_iff
A set of a disjoint sum is regular open if and only if its traces on both summands are.
theorem isRegularOpen_sum_iff {s : Set (X ⊕ Y)} :
IsRegularOpen s ↔ IsRegularOpen (Sum.inl ⁻¹' s) ∧ IsRegularOpen (Sum.inr ⁻¹' s)
Proof
:= by
simp only [IsRegularOpen]
rw [← IsOpenEmbedding.inl.isOpenMap.preimage_closure_eq_closure_preimage continuous_inl,
← IsOpenEmbedding.inl.isOpenMap.preimage_interior_eq_interior_preimage continuous_inl,
← IsOpenEmbedding.inr.isOpenMap.preimage_closure_eq_closure_preimage continuous_inr,
← IsOpenEmbedding.inr.isOpenMap.preimage_interior_eq_interior_preimage continuous_inr]
refine ⟨fun h ↦ by rw [h]; exact ⟨rfl, rfl⟩, fun ⟨h₁, h₂⟩ ↦ ?_⟩
ext (x | y)
· exact Set.ext_iff.1 h₁ x
· exact Set.ext_iff.1 h₂ y
theorem isRegularOpen_preimage_mk_iff
TopologyByExample.isRegularOpen_preimage_mk_iff
A set of the separation quotient is regular open if and only if its preimage in the space is regular open.
theorem isRegularOpen_preimage_mk_iff {s : Set (SeparationQuotient X)} :
IsRegularOpen (SeparationQuotient.mk ⁻¹' s) ↔ IsRegularOpen s
Proof
:= by
rw [IsRegularOpen, IsRegularOpen,
← SeparationQuotient.isOpenMap_mk.preimage_closure_eq_closure_preimage
SeparationQuotient.continuous_mk,
← SeparationQuotient.isOpenMap_mk.preimage_interior_eq_interior_preimage
SeparationQuotient.continuous_mk,
SeparationQuotient.surjective_mk.preimage_injective.eq_iff]
theorem isClopen
TopologyByExample.IsRegularOpen.isClopen
In an extremally disconnected space every regular open set is clopen.
theorem IsRegularOpen.isClopen [ExtremallyDisconnected X] {s : Set X} (hs : IsRegularOpen s) :
IsClopen s
Proof
:= by
refine ⟨?_, hs.isOpen⟩
rw [← hs, (ExtremallyDisconnected.open_closure s hs.isOpen).interior_eq]
exact isClosed_closure
Separation
class FunctionallyHausdorffSpace
TopologyByExample.FunctionallyHausdorffSpace
A space is functionally Hausdorff if any two distinct points are separated by a continuous
map to the unit interval, taking the value 0 at the first and 1 at the second. Steen and
Seebach call these spaces Urysohn spaces; other authors (and Mathlib's T25Space) use that name
for spaces in which distinct points have disjoint closed neighbourhoods.
@[mk_iff]
class FunctionallyHausdorffSpace (X : Type*) [TopologicalSpace X] : Prop where
/-- Distinct points are separated by a continuous map to the unit interval. -/
exists_continuousMap : ∀ x y : X, x ≠ y → ∃ f : C(X, unitInterval), f x = 0 ∧ f y = 1
theorem functionallyHausdorffSpace_iff_real
TopologyByExample.functionallyHausdorffSpace_iff_real
A space is functionally Hausdorff if and only if any two distinct points are separated by a continuous real function.
theorem functionallyHausdorffSpace_iff_real :
FunctionallyHausdorffSpace X ↔ ∀ x y : X, x ≠ y → ∃ f : C(X, ℝ), f x ≠ f y
Proof
:= by
refine ⟨fun ⟨h⟩ x y hxy ↦ ?_, fun h ↦ ⟨fun x y hxy ↦ ?_⟩⟩
· obtain ⟨f, hx, hy⟩ := h x y hxy
refine ⟨⟨fun z ↦ (f z : ℝ), continuous_subtypeVal.comp f.continuous⟩, ?_⟩
simp [hx, hy]
· obtain ⟨f, hf⟩ := h x y hxy
have hne : f y - f x ≠ 0 := sub_ne_zero.2 (Ne.symm hf)
let g : C(X, ℝ) := ⟨fun z ↦ (f z - f x) / (f y - f x), by fun_prop⟩
refine ⟨⟨fun z ↦ projIcc 0 1 zero_le_one (g z), continuous_projIcc.comp g.continuous⟩, ?_, ?_⟩
· ext
simp [g]
· ext
simp [g, div_self hne]
class SemiregularSpace
TopologyByExample.SemiregularSpace
A space is semiregular if its regular open sets form a base. Steen and Seebach, and Engelking, also require semiregular spaces to be Hausdorff.
@[mk_iff]
class SemiregularSpace (X : Type*) [TopologicalSpace X] : Prop where
/-- The regular open sets form a base. -/
isTopologicalBasis : IsTopologicalBasis {s : Set X | interior (closure s) = s}
theorem semiregularSpace_iff_isRegularOpen
TopologyByExample.semiregularSpace_iff_isRegularOpen
A space is semiregular if and only if its regular open sets form a base.
theorem semiregularSpace_iff_isRegularOpen :
SemiregularSpace X ↔ IsTopologicalBasis {s : Set X | IsRegularOpen s}
Proof
:=
semiregularSpace_iff X
Compactness
class PseudocompactSpace
TopologyByExample.PseudocompactSpace
A space is pseudocompact if every continuous real function on it is bounded. Engelking also requires pseudocompact spaces to be Tychonoff.
@[mk_iff]
class PseudocompactSpace (X : Type*) [TopologicalSpace X] : Prop where
/-- Every continuous real function is bounded. -/
bddAbove_and_bddBelow_range : ∀ f : C(X, ℝ), BddAbove (range f) ∧ BddBelow (range f)
class LocallyRelativelyCompactSpace
TopologyByExample.LocallyRelativelyCompactSpace
A space is locally relatively compact if every point lies in an open set with compact closure. Steen and Seebach call such spaces strongly locally compact; Engelking and others call them locally compact and assume them Hausdorff.
@[mk_iff]
class LocallyRelativelyCompactSpace (X : Type*) [TopologicalSpace X] : Prop where
/-- Every point lies in an open set with compact closure. -/
exists_isOpen_isCompact_closure : ∀ x : X, ∃ U : Set X, IsOpen U ∧ x ∈ U ∧ IsCompact (closure U)
theorem locallyRelativelyCompactSpace_iff_closed
TopologyByExample.locallyRelativelyCompactSpace_iff_closed
A space is locally relatively compact if and only if every point has a closed compact neighbourhood.
theorem locallyRelativelyCompactSpace_iff_closed :
LocallyRelativelyCompactSpace X ↔ ∀ x : X, ∃ K ∈ 𝓝 x, IsClosed K ∧ IsCompact K
Proof
:= by
refine ⟨fun ⟨h⟩ x ↦ ?_, fun h ↦ ⟨fun x ↦ ?_⟩⟩
· obtain ⟨U, hU, hx, hc⟩ := h x
exact ⟨closure U, mem_of_superset (hU.mem_nhds hx) subset_closure, isClosed_closure, hc⟩
· obtain ⟨K, hK, hKc, hKk⟩ := h x
exact ⟨interior K, isOpen_interior, mem_interior_iff_mem_nhds.2 hK,
hKk.of_isClosed_subset isClosed_closure (closure_minimal interior_subset hKc)⟩
theorem locallyRelativelyCompactSpace_iff_basis
TopologyByExample.locallyRelativelyCompactSpace_iff_basis
A space is locally relatively compact if and only if every point has a neighbourhood base of sets with compact closure.
theorem locallyRelativelyCompactSpace_iff_basis :
LocallyRelativelyCompactSpace X ↔
∀ x : X, (𝓝 x).HasBasis (fun s ↦ s ∈ 𝓝 x ∧ IsCompact (closure s)) id
Proof
:= by
refine ⟨fun h x ↦ ⟨fun t ↦ ⟨fun ht ↦ ?_, fun ⟨s, hs, hst⟩ ↦ mem_of_superset hs.1 hst⟩⟩,
fun h ↦ ⟨fun x ↦ ?_⟩⟩
· obtain ⟨K, hK, hKc, hKk⟩ := locallyRelativelyCompactSpace_iff_closed.1 h x
exact ⟨t ∩ K, ⟨inter_mem ht hK, hKk.of_isClosed_subset isClosed_closure
(closure_minimal inter_subset_right hKc)⟩, inter_subset_left⟩
· obtain ⟨s, ⟨hs, hsk⟩, -⟩ := (h x).mem_iff.1 univ_mem
exact ⟨interior s, isOpen_interior, mem_interior_iff_mem_nhds.2 hs,
hsk.of_isClosed_subset isClosed_closure (closure_mono interior_subset)⟩
class CountablyParacompactSpace
TopologyByExample.CountablyParacompactSpace
A space is countably paracompact if every countable open cover has a locally finite open refinement. Engelking also requires countably paracompact spaces to be Hausdorff.
@[mk_iff]
class CountablyParacompactSpace (X : Type*) [TopologicalSpace X] : Prop where
/-- Every countable open cover has a locally finite open refinement. -/
locallyFinite_refinement : ∀ U : Set (Set X), U.Countable → (∀ u ∈ U, IsOpen u) →
⋃₀ U = Set.univ → ∃ V : Set (Set X), (∀ v ∈ V, IsOpen v) ∧ ⋃₀ V = Set.univ ∧
LocallyFinite (fun v : V => (v : Set X)) ∧ ∀ v ∈ V, ∃ u ∈ U, v ⊆ u
Connectedness and disconnectedness
class UltraconnectedSpace
TopologyByExample.UltraconnectedSpace
A space is ultraconnected if the closures of any two points meet; equivalently, no two nonempty closed sets are disjoint.
@[mk_iff]
class UltraconnectedSpace (X : Type*) [TopologicalSpace X] : Prop where
/-- The closures of any two points meet. -/
closure_inter_closure_nonempty : ∀ x y : X, (closure ({x} : Set X) ∩ closure {y}).Nonempty
class StronglyConnectedSpace
TopologyByExample.StronglyConnectedSpace
A space is strongly connected if every continuous real function on it is constant.
@[mk_iff]
class StronglyConnectedSpace (X : Type*) [TopologicalSpace X] : Prop where
/-- Every continuous real function takes the same value at any two points. -/
apply_eq_apply : ∀ f : C(X, ℝ), ∀ x y : X, f x = f y
class TotallyPathDisconnectedSpace
TopologyByExample.TotallyPathDisconnectedSpace
A space is totally path disconnected if only equal points are joined by a path, that is, every path is constant.
@[mk_iff]
class TotallyPathDisconnectedSpace (X : Type*) [TopologicalSpace X] : Prop where
/-- Points joined by a path are equal. -/
eq_of_joined : ∀ x y : X, Joined x y → x = y
class ScatteredSpace
TopologyByExample.ScatteredSpace
A space is scattered if every nonempty subset has a point isolated in it; equivalently, the only dense-in-itself (preperfect) subset is empty.
@[mk_iff]
class ScatteredSpace (X : Type*) [TopologicalSpace X] : Prop where
/-- The only preperfect subset is empty. -/
eq_empty_of_preperfect : ∀ s : Set X, Preperfect s → s = ∅
Secondary properties
class HasIsolatedPoint
TopologyByExample.HasIsolatedPoint
A space has an isolated point if some singleton is open.
@[mk_iff]
class HasIsolatedPoint (X : Type*) [TopologicalSpace X] : Prop where
/-- Some singleton is open. -/
exists_isOpen_singleton : ∃ x : X, IsOpen ({x} : Set X)
theorem hasIsolatedPoint_iff_not_perfectSpace
TopologyByExample.hasIsolatedPoint_iff_not_perfectSpace
A space has an isolated point if and only if it is not perfect.
theorem hasIsolatedPoint_iff_not_perfectSpace : HasIsolatedPoint X ↔ ¬PerfectSpace X
Proof
:= by
simp [hasIsolatedPoint_iff, perfectSpace_iff_forall_not_isolated,
isOpen_singleton_iff_punctured_nhds, Filter.not_neBot]
class SequentiallyDiscreteSpace
TopologyByExample.SequentiallyDiscreteSpace
A space is sequentially discrete if every convergent sequence is eventually equal to its limit.
@[mk_iff]
class SequentiallyDiscreteSpace (X : Type*) [TopologicalSpace X] : Prop where
/-- A sequence converging to a point is eventually equal to it. -/
eventually_eq_of_tendsto : ∀ (u : ℕ → X) (x : X), Tendsto u atTop (𝓝 x) →
∀ᶠ n in atTop, u n = x
Spaces with at most one point
instance of_subsingleton
TopologyByExample.FunctionallyHausdorffSpace.of_subsingleton
A space with at most one point is functionally Hausdorff.
instance (priority := 100) of_subsingleton [Subsingleton X] : FunctionallyHausdorffSpace X
Proof
:=
⟨fun x y hxy ↦ absurd (Subsingleton.elim x y) hxy⟩
instance of_subsingleton
TopologyByExample.PseudocompactSpace.of_subsingleton
A space with at most one point is pseudocompact.
instance (priority := 100) of_subsingleton [Subsingleton X] : PseudocompactSpace X
Proof
:=
⟨fun f ↦ ⟨(finite_range f).bddAbove, (finite_range f).bddBelow⟩⟩
instance of_subsingleton
TopologyByExample.LocallyRelativelyCompactSpace.of_subsingleton
A space with at most one point is locally relatively compact.
instance (priority := 100) of_subsingleton [Subsingleton X] : LocallyRelativelyCompactSpace X
Proof
:=
⟨fun _ ↦ ⟨univ, isOpen_univ, mem_univ _, by rw [closure_univ]; exact isCompact_univ⟩⟩
instance of_subsingleton
TopologyByExample.CountablyParacompactSpace.of_subsingleton
A space with at most one point is countably paracompact: a cover is its own refinement, and a family of subsets of a finite space is finite.
instance (priority := 100) of_subsingleton [Subsingleton X] : CountablyParacompactSpace X
Proof
:=
⟨fun U _ hUo hU ↦ ⟨U, hUo, hU, locallyFinite_of_finite _, fun u hu ↦ ⟨u, hu, subset_rfl⟩⟩⟩
instance of_subsingleton
TopologyByExample.UltraconnectedSpace.of_subsingleton
A space with at most one point is ultraconnected.
instance (priority := 100) of_subsingleton [Subsingleton X] : UltraconnectedSpace X
Proof
:=
⟨fun x y ↦ ⟨x, subset_closure rfl, Subsingleton.elim y x ▸ subset_closure rfl⟩⟩
instance of_subsingleton
TopologyByExample.StronglyConnectedSpace.of_subsingleton
A space with at most one point is strongly connected.
instance (priority := 100) of_subsingleton [Subsingleton X] : StronglyConnectedSpace X
Proof
:=
⟨fun f x y ↦ congrArg f (Subsingleton.elim x y)⟩
instance of_subsingleton
TopologyByExample.TotallyPathDisconnectedSpace.of_subsingleton
A space with at most one point is totally path disconnected.
instance (priority := 100) of_subsingleton [Subsingleton X] : TotallyPathDisconnectedSpace X
Proof
:=
⟨fun x y _ ↦ Subsingleton.elim x y⟩
instance of_subsingleton
TopologyByExample.ScatteredSpace.of_subsingleton
A space with at most one point is scattered: a point is never an accumulation point of a set when there is no other point.
instance (priority := 100) of_subsingleton [Subsingleton X] : ScatteredSpace X
Proof
:=
⟨fun s hs ↦ eq_empty_of_forall_notMem fun x hx ↦ by
obtain ⟨y, -, hy⟩ := (accPt_iff_nhds.1 (hs x hx)) univ univ_mem
exact hy (Subsingleton.elim y x)⟩
instance of_subsingleton
TopologyByExample.SequentiallyDiscreteSpace.of_subsingleton
A space with at most one point is sequentially discrete.
instance (priority := 100) of_subsingleton [Subsingleton X] : SequentiallyDiscreteSpace X
Proof
:=
⟨fun u x _ ↦ Eventually.of_forall fun n ↦ Subsingleton.elim (u n) x⟩
theorem limitPointCompact_of_subsingleton
TopologyByExample.limitPointCompact_of_subsingleton
A space with at most one point is limit point compact: it has no infinite subset.
theorem limitPointCompact_of_subsingleton [Subsingleton X] :
∀ s : Set X, s.Infinite → ∃ x, AccPt x (𝓟 s)
Proof
:=
fun s hs ↦ absurd s.toFinite hs
theorem countableChainCondition_of_subsingleton
TopologyByExample.countableChainCondition_of_subsingleton
A space with at most one point satisfies the countable chain condition: it has only finitely many families of subsets.
theorem countableChainCondition_of_subsingleton [Subsingleton X] :
∀ S : Set (Set X), (∀ s ∈ S, IsOpen s ∧ s.Nonempty) → S.PairwiseDisjoint id → S.Countable
Proof
:=
fun S _ _ ↦ S.toFinite.countable
theorem isMeagre_univ_of_isEmpty
TopologyByExample.isMeagre_univ_of_isEmpty
The empty space is meagre in itself, so it is not of second category.
theorem isMeagre_univ_of_isEmpty [IsEmpty X] : IsMeagre (univ : Set X)
Proof
:= by
rw [univ_eq_empty_iff.2 ‹_›]
exact IsMeagre.empty
theorem not_isMeagre_univ_of_subsingleton
TopologyByExample.not_isMeagre_univ_of_subsingleton
A one-point space is of second category: it is a Baire space (being completely metrizable), and a nonempty open set in a Baire space is not meagre.
theorem not_isMeagre_univ_of_subsingleton [Subsingleton X] [Nonempty X] :
¬IsMeagre (univ : Set X)
Proof
:=
not_isMeagre_of_isOpen isOpen_univ univ_nonempty
macro (name := subsingletonSpace) "subsingleton_space" : tactic =>
`(tactic| first
| infer_instance
| exact ⟨inferInstance, inferInstance⟩
| exact TopologyByExample.limitPointCompact_of_subsingleton
| exact TopologyByExample.countableChainCondition_of_subsingleton
| exact TopologyByExample.isMeagre_univ_of_isEmpty)
Indiscrete spaces
variable [IndiscreteTopology X]
instance semiregularSpace
TopologyByExample.IndiscreteTopology.semiregularSpace
An indiscrete space is semiregular: its only nonempty open set, the whole space, is regular open.
instance (priority := 100) semiregularSpace : SemiregularSpace X
Proof
:= by
refine ⟨isTopologicalBasis_of_isOpen_of_nhds (fun _ hs ↦ IsRegularOpen.isOpen hs) ?_⟩
intro x U hx hU
rcases (IndiscreteTopology.isOpen_iff U).1 hU with rfl | rfl
· exact absurd hx (notMem_empty x)
· exact ⟨univ, isRegularOpen_univ, mem_univ x, subset_rfl⟩
instance ultraconnectedSpace
TopologyByExample.IndiscreteTopology.ultraconnectedSpace
An indiscrete space is ultraconnected: the closure of each point is the whole space.
instance (priority := 100) ultraconnectedSpace : UltraconnectedSpace X
Proof
:=
⟨fun x y ↦ ⟨x, subset_closure rfl, by rw [closure_indiscrete (singleton_nonempty y)]; trivial⟩⟩
instance stronglyConnectedSpace
TopologyByExample.IndiscreteTopology.stronglyConnectedSpace
An indiscrete space is strongly connected: any two points are inseparable, so a continuous real function takes the same value at both.
instance (priority := 100) stronglyConnectedSpace : StronglyConnectedSpace X
Proof
:=
⟨fun f x y ↦ ((Inseparable.all x y).map f.continuous).eq⟩
instance secondCountableTopology
TopologyByExample.IndiscreteTopology.secondCountableTopology
An indiscrete space is second countable: the whole space alone is a base.
instance (priority := 100) secondCountableTopology : SecondCountableTopology X
Proof
:= by
refine IsTopologicalBasis.secondCountableTopology (b := {univ}) ?_ (countable_singleton _)
refine isTopologicalBasis_of_isOpen_of_nhds (fun _ hs ↦ hs ▸ isOpen_univ) ?_
intro x U hx hU
rcases (IndiscreteTopology.isOpen_iff U).1 hU with rfl | rfl
· exact absurd hx (notMem_empty x)
· exact ⟨univ, rfl, mem_univ x, subset_rfl⟩
instance seqCompactSpace
TopologyByExample.IndiscreteTopology.seqCompactSpace
An indiscrete space is sequentially compact: every sequence converges to every point.
instance (priority := 100) seqCompactSpace : SeqCompactSpace X
Proof
:= by
refine ⟨fun u _ ↦ ⟨u 0, mem_univ _, id, strictMono_id, ?_⟩⟩
rw [IndiscreteTopology.nhds_eq]
exact tendsto_top