Lean library · module TopologyByExample.Theorems.CompactnessVariants
Variants of compactness
This file relates limit point compactness, pseudocompactness, local relative compactness and
σ-local compactness to each other and to the compactness properties of Mathlib. How they behave
under disjoint sums, products and countable powers is proved with the other transfers, in
TopologyByExample.Operators.Sum, TopologyByExample.Operators.Product and
TopologyByExample.Operators.CountablePower.
None of the properties assumes a separation axiom, and each implication states the separation
axiom it needs. In particular a normal pseudocompact space need not be countably compact without
the T₁ axiom (the topology on ℕ whose open sets are the initial segments is a counterexample),
so the statement proved here concludes limit point compactness instead.
Main statements
TopologyByExample.PseudocompactSpace.of_countablyCompactSpace: a countably compact space is pseudocompact.TopologyByExample.countablyCompactSpace_of_limitPointCompact: a T₁ limit point compact space is countably compact.TopologyByExample.limitPointCompact_of_normalSpace_of_pseudocompactSpace: a normal pseudocompact space is limit point compact.TopologyByExample.not_pseudocompactSpace_of_isClosed_of_isOpen_singleton: a space with an infinite closed set of isolated points is not pseudocompact.TopologyByExample.LocallyRelativelyCompactSpace.of_compactSpace,TopologyByExample.LocallyRelativelyCompactSpace.weaklyLocallyCompactSpace,TopologyByExample.LocallyRelativelyCompactSpace.of_weaklyLocallyCompactSpace_of_r1Space: compact ⇒ locally relatively compact ⇒ weakly locally compact, and back under R₁ (so under regularity).TopologyByExample.compactSpace_of_preirreducibleSpace_of_locallyRelativelyCompactSpace: a hyperconnected locally relatively compact space is compact.- σ-local compactness (
SigmaCompactSpace X ∧ WeaklyLocallyCompactSpace X) and its two components. Topology.IsClosedEmbedding.locallyRelativelyCompactSpace: a closed subspace of a locally relatively compact space is locally relatively compact.
Tags
pseudocompact, limit point compact, weakly countably compact, locally relatively compact, strongly locally compact, σ-locally compact
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
theorem Topology.IsOpenEmbedding.accPt_image_iff
An open embedding preserves and reflects accumulation points of sets.
theorem Topology.IsOpenEmbedding.accPt_image_iff {X Y : Type*} [TopologicalSpace X]
[TopologicalSpace Y] {f : X → Y} (hf : IsOpenEmbedding f) {x : X} {s : Set X} :
AccPt (f x) (𝓟 (f '' s)) ↔ AccPt x (𝓟 s)
Proof
:= by
rw [← hf.accPt_comap_iff, comap_principal, hf.injective.preimage_image]
variable {X : Type u} {Y : Type v} [TopologicalSpace X] [TopologicalSpace Y]
theorem not_bddAbove_range_of_forall_exists_eq_natCast
TopologyByExample.not_bddAbove_range_of_forall_exists_eq_natCast
A real function that takes every natural number as a value is not bounded above.
theorem not_bddAbove_range_of_forall_exists_eq_natCast {α : Type*} {f : α → ℝ}
(h : ∀ n : ℕ, ∃ a, f a = n) : ¬BddAbove (range f)
Proof
:= by
rintro ⟨M, hM⟩
obtain ⟨n, hn⟩ := exists_nat_gt M
obtain ⟨a, ha⟩ := h n
have := hM ⟨a, ha⟩
linarith
Pseudocompactness
theorem bddAbove_range
TopologyByExample.PseudocompactSpace.bddAbove_range
In a pseudocompact space every continuous real function is bounded above.
theorem bddAbove_range [PseudocompactSpace X] (f : C(X, ℝ)) : BddAbove (range f)
Proof
:=
(bddAbove_and_bddBelow_range f).1
theorem bddBelow_range
TopologyByExample.PseudocompactSpace.bddBelow_range
In a pseudocompact space every continuous real function is bounded below.
theorem bddBelow_range [PseudocompactSpace X] (f : C(X, ℝ)) : BddBelow (range f)
Proof
:=
(bddAbove_and_bddBelow_range f).2
instance of_countablyCompactSpace
TopologyByExample.PseudocompactSpace.of_countablyCompactSpace
A countably compact space is pseudocompact: the image of a continuous real function is a countably compact subset of the real line, hence compact, hence bounded.
instance (priority := 100) of_countablyCompactSpace [CountablyCompactSpace X] :
PseudocompactSpace X
Proof
:= by
refine ⟨fun f ↦ ?_⟩
have hc : IsCompact (range f) := by
rw [← image_univ]
exact ((isCountablyCompact_univ_iff.2 ‹_›).image f.continuous).isCompact
exact ⟨hc.bddAbove, hc.bddBelow⟩
theorem of_surjective
TopologyByExample.PseudocompactSpace.of_surjective
The image of a pseudocompact space under a continuous surjection is pseudocompact.
theorem of_surjective [PseudocompactSpace X] {f : X → Y} (hf : Continuous f)
(hs : Surjective f) : PseudocompactSpace Y
Proof
:= by
refine ⟨fun g ↦ ?_⟩
have h := bddAbove_and_bddBelow_range (g.comp ⟨f, hf⟩)
have : range (g.comp ⟨f, hf⟩) = range g := hs.range_comp g
rwa [this] at h
theorem not_pseudocompactSpace_of_isClosed_of_isOpen_singleton
TopologyByExample.not_pseudocompactSpace_of_isClosed_of_isOpen_singleton
A space with an infinite closed set of isolated points is not pseudocompact: numbering
countably many of those points, the function that is n at the n-th point and 0 elsewhere is
continuous and unbounded. No separation axiom is needed.
theorem not_pseudocompactSpace_of_isClosed_of_isOpen_singleton {s : Set X} (hs : s.Infinite)
(hc : IsClosed s) (hiso : ∀ x ∈ s, IsOpen ({x} : Set X)) : ¬PseudocompactSpace X
Proof
:= by
intro hX
classical
let e := Set.Infinite.natEmbedding s hs
let u : ℕ → X := (↑) ∘ e
have hu : Injective u := Subtype.val_injective.comp e.injective
have hus : range u ⊆ s := range_subset_iff.2 fun n ↦ (e n).property
have hclosed : IsClosed (range u) := isOpen_compl_iff.1 <| isOpen_iff_mem_nhds.2 fun x hx ↦ by
by_cases hxs : x ∈ s
· exact mem_of_superset ((hiso x hxs).mem_nhds rfl) (singleton_subset_iff.2 hx)
· exact mem_of_superset (hc.isOpen_compl.mem_nhds hxs) (compl_subset_compl.2 hus)
let f : X → ℝ := fun x ↦ if x ∈ range u then ((invFun u x : ℕ) : ℝ) else 0
have hf : Continuous f := continuous_iff_continuousAt.2 fun x ↦ by
have : ∃ t ∈ 𝓝 x, ∀ y ∈ t, f y = f x := by
by_cases hx : x ∈ range u
· exact ⟨{x}, (hiso x (hus hx)).mem_nhds rfl, fun y hy ↦ by rw [mem_singleton_iff.1 hy]⟩
· exact ⟨(range u)ᶜ, hclosed.isOpen_compl.mem_nhds hx, fun y hy ↦ by
simp only [f, hx, show y ∉ range u from hy, ite_false]⟩
obtain ⟨t, ht, hft⟩ := this
exact continuousAt_const.congr (eventuallyEq_of_mem ht fun y hy ↦ (hft y hy).symm)
refine not_bddAbove_range_of_forall_exists_eq_natCast (f := (⟨f, hf⟩ : C(X, ℝ)))
(fun n ↦ ⟨u n, ?_⟩) (PseudocompactSpace.bddAbove_range _)
simp [f, leftInverse_invFun hu n]
On this site: Theorem: A space with an infinite closed set of isolated points is not pseudocompact
theorem limitPointCompact_of_normalSpace_of_pseudocompactSpace
TopologyByExample.limitPointCompact_of_normalSpace_of_pseudocompactSpace
A normal pseudocompact space is limit point compact: otherwise an infinite set without accumulation points contains a countably infinite closed discrete set, on which the function numbering its points is continuous and, by the Tietze extension theorem, extends to an unbounded continuous function on the whole space. No T₁ axiom is needed (and without it the conclusion cannot be strengthened to countable compactness).
theorem limitPointCompact_of_normalSpace_of_pseudocompactSpace [NormalSpace X]
[PseudocompactSpace X] : ∀ s : Set X, s.Infinite → ∃ x, AccPt x (𝓟 s)
Proof
:= by
intro s hs
by_contra! h
let e := Set.Infinite.natEmbedding s hs
let u : ℕ → X := (↑) ∘ e
have hu : Injective u := Subtype.val_injective.comp e.injective
have hus : range u ⊆ s := range_subset_iff.2 fun n ↦ (e n).property
have hacc : ∀ x, ¬AccPt x (𝓟 (range u)) := fun x hx ↦ h x (hx.mono (principal_mono.2 hus))
have hclosed : IsClosed (range u) := isClosed_iff_accPt.2 fun a ha ↦ (hacc a ha).elim
have : DiscreteTopology (range u) := discreteTopology_of_noAccPts fun x _ ↦ hacc x
let g : C(range u, ℝ) := ⟨fun p ↦ ((invFun u p : ℕ) : ℝ), continuous_of_discreteTopology⟩
obtain ⟨G, hG⟩ := g.exists_restrict_eq hclosed
refine not_bddAbove_range_of_forall_exists_eq_natCast (f := G) (fun n ↦ ⟨u n, ?_⟩)
(PseudocompactSpace.bddAbove_range G)
have := congr($hG ⟨u n, mem_range_self n⟩)
simpa [g, leftInverse_invFun hu n] using this
On this site: Theorem: Normal pseudocompact spaces are limit point compact
Limit point compactness
theorem countablyCompactSpace_of_limitPointCompact
TopologyByExample.countablyCompactSpace_of_limitPointCompact
A T₁ limit point compact space is countably compact.
theorem countablyCompactSpace_of_limitPointCompact [T1Space X]
(h : ∀ s : Set X, s.Infinite → ∃ x, AccPt x (𝓟 s)) : CountablyCompactSpace X
Proof
:=
isCountablyCompact_univ_iff.1 <| isCountablyCompact_iff_infinite_subset_has_accPt.2
fun B _ hB ↦ let ⟨x, hx⟩ := h B hB; ⟨x, mem_univ x, hx⟩
On this site: Theorem: Limit point compact T₁ spaces are countably compact
Local relative compactness
instance of_compactSpace
TopologyByExample.LocallyRelativelyCompactSpace.of_compactSpace
A compact space is locally relatively compact: the whole space is an open set with compact closure.
instance (priority := 100) of_compactSpace [CompactSpace X] : LocallyRelativelyCompactSpace X
Proof
:=
⟨fun x ↦ ⟨univ, isOpen_univ, mem_univ x, by rw [closure_univ]; exact isCompact_univ⟩⟩
instance weaklyLocallyCompactSpace
TopologyByExample.LocallyRelativelyCompactSpace.weaklyLocallyCompactSpace
A locally relatively compact space is weakly locally compact: the closure of an open set around a point is a compact neighbourhood of it.
instance (priority := 100) weaklyLocallyCompactSpace [LocallyRelativelyCompactSpace X] :
WeaklyLocallyCompactSpace X
Proof
:=
⟨fun x ↦
let ⟨U, hU, hx, hc⟩ := exists_isOpen_isCompact_closure x
⟨closure U, hc, mem_of_superset (hU.mem_nhds hx) subset_closure⟩⟩
instance of_weaklyLocallyCompactSpace_of_r1Space
TopologyByExample.LocallyRelativelyCompactSpace.of_weaklyLocallyCompactSpace_of_r1Space
A weakly locally compact R₁ space is locally relatively compact: there, every point has a closed compact neighbourhood.
instance (priority := 100) of_weaklyLocallyCompactSpace_of_r1Space [WeaklyLocallyCompactSpace X]
[R1Space X] : LocallyRelativelyCompactSpace X
Proof
:=
locallyRelativelyCompactSpace_iff_closed.2 fun x ↦
let ⟨K, hK, hKc, hKcl⟩ := exists_mem_nhds_isCompact_isClosed x
⟨K, hK, hKcl, hKc⟩
theorem of_weaklyLocallyCompactSpace_of_regularSpace
TopologyByExample.LocallyRelativelyCompactSpace.of_weaklyLocallyCompactSpace_of_regularSpace
A weakly locally compact regular space is locally relatively compact.
theorem of_weaklyLocallyCompactSpace_of_regularSpace [WeaklyLocallyCompactSpace X]
[RegularSpace X] : LocallyRelativelyCompactSpace X
Proof
:=
inferInstance
On this site: Theorem: Weakly locally compact regular spaces are locally relatively compact
theorem compactSpace_of_preirreducibleSpace_of_locallyRelativelyCompactSpace
TopologyByExample.compactSpace_of_preirreducibleSpace_of_locallyRelativelyCompactSpace
A hyperconnected locally relatively compact space is compact: an open set with compact closure around any point is dense.
theorem compactSpace_of_preirreducibleSpace_of_locallyRelativelyCompactSpace
[PreirreducibleSpace X] [LocallyRelativelyCompactSpace X] : CompactSpace X
Proof
:= by
rcases isEmpty_or_nonempty X with hX | ⟨⟨x⟩⟩
· infer_instance
obtain ⟨U, hU, hx, hc⟩ := LocallyRelativelyCompactSpace.exists_isOpen_isCompact_closure x
exact ⟨(hU.dense ⟨x, hx⟩).closure_eq ▸ hc⟩
On this site: Theorem: Hyperconnected locally relatively compact spaces are compact
theorem locallyRelativelyCompactSpace
Topology.IsClosedEmbedding.locallyRelativelyCompactSpace
A closed subspace of a locally relatively compact space is locally relatively compact.
theorem _root_.Topology.IsClosedEmbedding.locallyRelativelyCompactSpace {f : X → Y}
(hf : IsClosedEmbedding f) [LocallyRelativelyCompactSpace Y] :
LocallyRelativelyCompactSpace X
Proof
:=
locallyRelativelyCompactSpace_iff_closed.2 fun x ↦
let ⟨K, hK, hKc, hKk⟩ := locallyRelativelyCompactSpace_iff_closed.1 ‹_› (f x)
⟨f ⁻¹' K, hf.continuous.continuousAt.preimage_mem_nhds hK, hKc.preimage hf.continuous,
hf.isCompact_preimage hKk⟩
σ-local compactness
theorem sigmaCompactSpace_of_sigmaLocallyCompact
TopologyByExample.sigmaCompactSpace_of_sigmaLocallyCompact
A σ-locally compact space is σ-compact.
theorem sigmaCompactSpace_of_sigmaLocallyCompact
(h : SigmaCompactSpace X ∧ WeaklyLocallyCompactSpace X) : SigmaCompactSpace X
Proof
:=
h.1
On this site: Theorem: σ-locally compact spaces are σ-compact
theorem weaklyLocallyCompactSpace_of_sigmaLocallyCompact
TopologyByExample.weaklyLocallyCompactSpace_of_sigmaLocallyCompact
A σ-locally compact space is weakly locally compact.
theorem weaklyLocallyCompactSpace_of_sigmaLocallyCompact
(h : SigmaCompactSpace X ∧ WeaklyLocallyCompactSpace X) : WeaklyLocallyCompactSpace X
Proof
:=
h.2
On this site: Theorem: σ-locally compact spaces are weakly locally compact
theorem sigmaLocallyCompact_of_sigmaCompactSpace_of_weaklyLocallyCompactSpace
TopologyByExample.sigmaLocallyCompact_of_sigmaCompactSpace_of_weaklyLocallyCompactSpace
A σ-compact weakly locally compact space is σ-locally compact.
theorem sigmaLocallyCompact_of_sigmaCompactSpace_of_weaklyLocallyCompactSpace
[SigmaCompactSpace X] [WeaklyLocallyCompactSpace X] :
SigmaCompactSpace X ∧ WeaklyLocallyCompactSpace X
Proof
:=
⟨‹_›, ‹_›⟩
On this site: Theorem: σ-compact weakly locally compact spaces are σ-locally compact
Mathlib's local compactness
theorem weaklyLocallyCompactSpace_of_locallyCompactSpace
TopologyByExample.weaklyLocallyCompactSpace_of_locallyCompactSpace
A locally compact space (every point has a neighbourhood base of compact sets) is weakly locally compact.
theorem weaklyLocallyCompactSpace_of_locallyCompactSpace [LocallyCompactSpace X] :
WeaklyLocallyCompactSpace X
Proof
:=
inferInstance
On this site: Theorem: Locally compact spaces are weakly locally compact
theorem locallyCompactSpace_of_regularSpace_of_weaklyLocallyCompactSpace
TopologyByExample.locallyCompactSpace_of_regularSpace_of_weaklyLocallyCompactSpace
A weakly locally compact regular space is locally compact.
theorem locallyCompactSpace_of_regularSpace_of_weaklyLocallyCompactSpace [RegularSpace X]
[WeaklyLocallyCompactSpace X] : LocallyCompactSpace X
Proof
:=
inferInstance
On this site: Theorem: Weakly locally compact regular spaces are locally compact