Lean library · module TopologyByExample.Theorems.PSpaces
P-spaces
A P-space is a space in which every countable intersection of open sets is open. The definition does not include a separation axiom. Countable subsets of a T₁ P-space are closed, and first-countable T₁ P-spaces are discrete. Continuous maps to first-countable T₁ spaces have open fibres; on a preconnected domain they are constant.
This file was written by Codex (OpenAI's AI model) working under the direction of David R. MacIver, who reviews it and is responsible for it.
Imports
class PSpace
TopologyByExample.PSpace
A P-space is a space in which every Gδ set is open.
@[mk_iff]
class PSpace (X : Type*) [TopologicalSpace X] : Prop where
/-- Countable intersections of open sets are open. -/
isOpen_of_isGδ : ∀ s : Set X, IsGδ s → IsOpen s
variable {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y]
theorem isOpen_of_isGδ
TopologyByExample.isOpen_of_isGδ
Every Gδ subset of a P-space is open.
theorem isOpen_of_isGδ [PSpace X] {s : Set X} (hs : IsGδ s) : IsOpen s
Proof
:=
PSpace.isOpen_of_isGδ s hs
theorem isOpen_iInter
TopologyByExample.PSpace.isOpen_iInter
Countable intersections of open subsets of a P-space are open.
theorem PSpace.isOpen_iInter [PSpace X] {ι : Type*} [Countable ι]
(s : ι → Set X) (hs : ∀ i, IsOpen (s i)) : IsOpen (⋂ i, s i)
Proof
:=
TopologyByExample.isOpen_of_isGδ (IsGδ.iInter_of_isOpen hs)
theorem of_isInducing
TopologyByExample.PSpace.of_isInducing
The P-space property is inherited along inducing maps.
theorem PSpace.of_isInducing [PSpace Y] {f : X → Y} (hf : Topology.IsInducing f) :
PSpace X
Proof
where
isOpen_of_isGδ s hs := by
obtain ⟨u, hu, rfl⟩ := hs.eq_iInter_nat
choose v hv heq using fun n => hf.isOpen_iff.mp (hu n)
have hopen : IsOpen (⋂ n, v n) := PSpace.isOpen_iInter v hv
have he : (⋂ n, u n) = f ⁻¹' (⋂ n, v n) := by
simp only [preimage_iInter, heq]
rw [he]
exact hopen.preimage hf.continuous
theorem of_isQuotientMap
TopologyByExample.PSpace.of_isQuotientMap
Quotient images of P-spaces are P-spaces.
theorem PSpace.of_isQuotientMap [PSpace X] {f : X → Y}
(hf : Topology.IsQuotientMap f) : PSpace Y
Proof
where
isOpen_of_isGδ s hs := by
apply hf.isCoinducing.isOpen_preimage.mp
exact TopologyByExample.isOpen_of_isGδ (hs.preimage hf.continuous)
On this site: Theorem: Quotient images of P-spaces are P-spaces
instance subtype
TopologyByExample.PSpace.subtype
Every subspace of a P-space is a P-space.
instance PSpace.subtype [PSpace X] (s : Set X) : PSpace s
Proof
:=
PSpace.of_isInducing Topology.IsEmbedding.subtypeVal.isInducing
On this site: Theorem: Subspaces of P-spaces are P-spaces
theorem pSpace_iff
TopologyByExample.Homeomorph.pSpace_iff
The P-space property is invariant under homeomorphism.
theorem Homeomorph.pSpace_iff (e : X ≃ₜ Y) : PSpace X ↔ PSpace Y
Proof
:= by
constructor
· intro h
let := h
exact PSpace.of_isInducing e.symm.isInducing
· intro h
let := h
exact PSpace.of_isInducing e.isInducing
instance pSpace
TopologyByExample.DiscreteTopology.pSpace
Every discrete space is a P-space.
instance (priority := 100) DiscreteTopology.pSpace [DiscreteTopology X] : PSpace X
Proof
where
isOpen_of_isGδ s _ := isOpen_discrete s
On this site: Theorem: Discrete spaces are P-spaces
theorem isClosed_of_countable
TopologyByExample.PSpace.isClosed_of_countable
Countable subsets of a T₁ P-space are closed.
theorem PSpace.isClosed_of_countable [PSpace X] [T1Space X] {s : Set X}
(hs : s.Countable) : IsClosed s
Proof
:=
isOpen_compl_iff.mp (TopologyByExample.isOpen_of_isGδ hs.isGδ_compl)
On this site: Theorem: Countable subsets of T1 P-spaces are closed
theorem discreteTopology_of_countable
TopologyByExample.PSpace.discreteTopology_of_countable
A countable T₁ P-space is discrete.
theorem PSpace.discreteTopology_of_countable [PSpace X] [T1Space X] [Countable X] :
DiscreteTopology X
Proof
:=
discreteTopology_iff_forall_isClosed.mpr fun s =>
PSpace.isClosed_of_countable (to_countable s)
On this site: Theorem: Countable T1 P-spaces are discrete
theorem discreteTopology_subtype
TopologyByExample.PSpace.discreteTopology_subtype
Countable subsets of a T₁ P-space carry the discrete subspace topology.
theorem PSpace.discreteTopology_subtype [PSpace X] [T1Space X] {s : Set X}
(hs : s.Countable) : DiscreteTopology s
Proof
:= by
let := hs.to_subtype
exact PSpace.discreteTopology_of_countable
theorem discreteTopology
TopologyByExample.PSpace.discreteTopology
A first-countable T₁ P-space is discrete.
theorem PSpace.discreteTopology [PSpace X] [T1Space X] [FirstCountableTopology X] :
DiscreteTopology X
Proof
:=
discreteTopology_iff_isOpen_singleton.mpr fun x =>
TopologyByExample.isOpen_of_isGδ (IsGδ.singleton x)
On this site: Theorem: First-countable T1 P-spaces are discrete
theorem sequentiallyDiscreteSpace
TopologyByExample.PSpace.sequentiallyDiscreteSpace
Convergent sequences in T₁ P-spaces are eventually equal to their limit.
theorem PSpace.sequentiallyDiscreteSpace [PSpace X] [T1Space X] :
SequentiallyDiscreteSpace X
Proof
where
eventually_eq_of_tendsto u x hu := by
have hc : IsClosed (range u \ {x}) :=
PSpace.isClosed_of_countable ((countable_range u).mono sdiff_subset)
have hx : x ∈ (range u \ {x})ᶜ := by simp
filter_upwards [hu.eventually (hc.isOpen_compl.mem_nhds hx)] with n hn
by_contra hne
exact hn ⟨mem_range_self n, hne⟩
On this site: Theorem: T1 P-spaces are sequentially discrete
theorem finite_of_seqCompactSpace
TopologyByExample.PSpace.finite_of_seqCompactSpace
Sequentially compact T₁ P-spaces are finite.
theorem PSpace.finite_of_seqCompactSpace [PSpace X] [T1Space X] [SeqCompactSpace X] :
Finite X
Proof
:= by
let := PSpace.sequentiallyDiscreteSpace (X := X)
exact SequentiallyDiscreteSpace.finite
On this site: Theorem: Sequentially compact T1 P-spaces are finite
theorem finite_of_countablyCompactSpace
TopologyByExample.PSpace.finite_of_countablyCompactSpace
Countably compact T₁ P-spaces are finite.
theorem PSpace.finite_of_countablyCompactSpace [PSpace X] [T1Space X]
[CountablyCompactSpace X] : Finite X
Proof
:= by
by_contra h
have : Infinite X := not_finite_iff_infinite.mp h
let f : ℕ ↪ X := Infinite.natEmbedding X
have hc : IsClosed (range f) := PSpace.isClosed_of_countable (countable_range f)
let : CountablyCompactSpace (range f) :=
isCountablyCompact_iff_countablyCompactSpace.mp hc.isCountablyCompact
let : DiscreteTopology (range f) := PSpace.discreteTopology_subtype (countable_range f)
let : Finite (range f) := PSpace.finite_of_seqCompactSpace
have hf : (range f).Finite := Set.toFinite _
exact Set.infinite_range_of_injective f.injective hf
On this site: Theorem: Countably compact T1 P-spaces are finite
theorem exists_isClopen_subset
TopologyByExample.PSpace.exists_isClopen_subset
Every neighbourhood in a regular P-space contains a clopen neighbourhood.
theorem PSpace.exists_isClopen_subset [PSpace X] [RegularSpace X]
{x : X} {U : Set X} (hU : U ∈ 𝓝 x) :
∃ V : Set X, IsClopen V ∧ x ∈ V ∧ V ⊆ U
Proof
:= by
classical
let N := {V : Set X // x ∈ V ∧ IsOpen V}
have shrink : ∀ V : N, ∃ W : N, closure (W : Set X) ⊆ V := by
intro V
obtain ⟨W, hW, hWV⟩ := (nhds_basis_opens x).nhds_closure.mem_iff.mp
(V.property.2.mem_nhds V.property.1)
exact ⟨⟨W, hW⟩, hWV⟩
choose next hn using shrink
obtain ⟨V₀, hV₀, hV₀U⟩ := (nhds_basis_opens x).mem_iff.mp hU
let v : ℕ → N := fun n => next^[n] ⟨V₀, hV₀⟩
have step (n : ℕ) : closure (v (n + 1) : Set X) ⊆ (v n : Set X) := by
simpa only [v, Function.iterate_succ_apply'] using hn (v n)
let V : Set X := ⋂ n, (v n : Set X)
have hVo : IsOpen V := PSpace.isOpen_iInter _ fun n => (v n).property.2
have hVc : IsClosed V := by
have he : V = ⋂ n, closure (v n : Set X) := by
apply Subset.antisymm
· exact iInter_mono fun _ => subset_closure
· intro y hy
exact mem_iInter.mpr fun n => step n (mem_iInter.mp hy (n + 1))
rw [he]
exact isClosed_iInter fun _ => isClosed_closure
refine ⟨V, ⟨hVc, hVo⟩, mem_iInter.mpr (fun n => (v n).property.1), ?_⟩
exact (iInter_subset (fun n => (v n : Set X)) 0).trans hV₀U
theorem zeroDimensionalSpace
TopologyByExample.PSpace.zeroDimensionalSpace
A regular P-space is zero-dimensional.
theorem PSpace.zeroDimensionalSpace [PSpace X] [RegularSpace X] :
ZeroDimensionalSpace X
Proof
:= by
rw [zeroDimensionalSpace_iff_nhds_hasBasis_isClopen]
intro x
refine ⟨fun U => ⟨fun hU => ?_, ?_⟩⟩
· obtain ⟨V, hV, hxV, hVU⟩ := PSpace.exists_isClopen_subset hU
exact ⟨V, ⟨hV, hxV⟩, hVU⟩
· rintro ⟨V, ⟨hV, hxV⟩, hVU⟩
exact mem_of_superset (hV.isOpen.mem_nhds hxV) hVU
On this site: Theorem: Regular P-spaces are zero-dimensional
theorem isOpen_fiber
TopologyByExample.PSpace.isOpen_fiber
Fibres of continuous maps from a P-space to a first-countable T₁ space are open.
theorem PSpace.isOpen_fiber [PSpace X] [FirstCountableTopology Y] [T1Space Y]
{f : X → Y} (hf : Continuous f) (y : Y) : IsOpen (f ⁻¹' {y})
Proof
:=
TopologyByExample.isOpen_of_isGδ ((IsGδ.singleton y).preimage hf)
On this site: Theorem: Continuous maps from P-spaces have open fibres in first-countable T1 targets
theorem apply_eq_apply
TopologyByExample.PSpace.apply_eq_apply
Maps from a preconnected P-space to a first-countable T₁ space are constant.
theorem PSpace.apply_eq_apply [PSpace X] [PreconnectedSpace X]
[FirstCountableTopology Y] [T1Space Y] {f : X → Y} (hf : Continuous f)
(x y : X) : f x = f y
Proof
:= by
have hcl : IsClopen (f ⁻¹' {f x}) :=
⟨isClosed_singleton.preimage hf, PSpace.isOpen_fiber hf (f x)⟩
have hsub := isPreconnected_univ.subset_isClopen hcl ⟨x, mem_univ x, rfl⟩
exact (hsub (mem_univ y)).symm
theorem totallySeparatedSpace
TopologyByExample.PSpace.totallySeparatedSpace
Functionally Hausdorff P-spaces are totally separated.
theorem PSpace.totallySeparatedSpace [PSpace X] [FunctionallyHausdorffSpace X] :
TotallySeparatedSpace X
Proof
:= by
rw [totallySeparatedSpace_iff_exists_isClopen]
intro x y hxy
obtain ⟨f, hf⟩ := functionallyHausdorffSpace_iff_real.mp ‹_› x y hxy
refine ⟨f ⁻¹' {f x}, ⟨isClosed_singleton.preimage f.continuous,
PSpace.isOpen_fiber f.continuous (f x)⟩, rfl, ?_⟩
exact fun hy => hf hy.symm
On this site: Theorem: Functionally Hausdorff P-spaces are totally separated
theorem stronglyConnectedSpace
TopologyByExample.PSpace.stronglyConnectedSpace
Every preconnected P-space is strongly connected.
theorem PSpace.stronglyConnectedSpace [PSpace X] [PreconnectedSpace X] :
StronglyConnectedSpace X
Proof
where
apply_eq_apply f x y := PSpace.apply_eq_apply f.continuous x y
On this site: Theorem: Connected P-spaces are strongly connected
theorem preconnectedSpace_iff_stronglyConnectedSpace
TopologyByExample.PSpace.preconnectedSpace_iff_stronglyConnectedSpace
On P-spaces preconnectedness is equivalent to constancy of continuous real functions.
theorem PSpace.preconnectedSpace_iff_stronglyConnectedSpace [PSpace X] :
PreconnectedSpace X ↔ StronglyConnectedSpace X
Proof
:= by
constructor
· intro h
let := h
exact PSpace.stronglyConnectedSpace
· intro h
let := h
infer_instance