Lean library · module TopologyByExample.Theorems.ConnectednessExtremes

Hyperconnected, ultraconnected and strongly connected spaces

Source file

This file proves the theory of three strong forms of connectedness:

None of them assumes the space nonempty, and none assumes a separation axiom.

Main statements

How the three properties behave under disjoint sums, products, countable powers and the closed extension is proved with the other transfers, in TopologyByExample.Operators.Sum, TopologyByExample.Operators.Product, TopologyByExample.Operators.CountablePower and TopologyByExample.Operators.ClosedExtension.

Tags

hyperconnected, irreducible, ultraconnected, strongly connected, pseudocompact

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
variable {X : Type*} {Y : Type*} [TopologicalSpace X] [TopologicalSpace Y]

Ultraconnectedness by specialisation

theorem exists_specializes

TopologyByExample.UltraconnectedSpace.exists_specializes

In an ultraconnected space any two points specialise to a common point.

theorem UltraconnectedSpace.exists_specializes [UltraconnectedSpace X] (x y : X) :
    ∃ z, x ⤳ z ∧ y ⤳ z
Proof
:= by
  obtain ⟨z, hx, hy⟩ := UltraconnectedSpace.closure_inter_closure_nonempty x y
  exact ⟨z, specializes_iff_mem_closure.2 hx, specializes_iff_mem_closure.2 hy⟩

theorem ultraconnectedSpace_iff_exists_specializes

TopologyByExample.ultraconnectedSpace_iff_exists_specializes

A space is ultraconnected if and only if any two points specialise to a common point.

theorem ultraconnectedSpace_iff_exists_specializes :
    UltraconnectedSpace X ↔ ∀ x y : X, ∃ z, x ⤳ z ∧ y ⤳ z
Proof
:=
  ⟨fun _ ↦ UltraconnectedSpace.exists_specializes, fun h ↦ ⟨fun x y ↦ by
    obtain ⟨z, hx, hy⟩ := h x y
    exact ⟨z, specializes_iff_mem_closure.1 hx, specializes_iff_mem_closure.1 hy⟩⟩⟩

theorem ultraconnectedSpace_of_surjective

TopologyByExample.ultraconnectedSpace_of_surjective

The image of an ultraconnected space under a continuous surjection is ultraconnected.

theorem ultraconnectedSpace_of_surjective [UltraconnectedSpace X] {f : X → Y}
    (hf : Function.Surjective f) (hf' : Continuous f) : UltraconnectedSpace Y
Proof
:=
  ultraconnectedSpace_iff_exists_specializes.2 fun y y' ↦ by
    obtain ⟨x, rfl⟩ := hf y
    obtain ⟨x', rfl⟩ := hf y'
    obtain ⟨z, hx, hx'⟩ := UltraconnectedSpace.exists_specializes x x'
    exact ⟨f z, hx.map hf', hx'.map hf'⟩

theorem stronglyConnectedSpace_of_surjective

TopologyByExample.stronglyConnectedSpace_of_surjective

The image of a strongly connected space under a continuous surjection is strongly connected.

theorem stronglyConnectedSpace_of_surjective [StronglyConnectedSpace X] {f : X → Y}
    (hf : Function.Surjective f) (hf' : Continuous f) : StronglyConnectedSpace Y
Proof
:=
  ⟨fun g y y' ↦ by
    obtain ⟨x, rfl⟩ := hf y
    obtain ⟨x', rfl⟩ := hf y'
    exact StronglyConnectedSpace.apply_eq_apply (g.comp ⟨f, hf'⟩) x x'⟩

Implications

theorem preirreducibleSpace_of_indiscreteTopology

TopologyByExample.preirreducibleSpace_of_indiscreteTopology

An indiscrete space is hyperconnected (Mathlib's instance).

theorem preirreducibleSpace_of_indiscreteTopology [IndiscreteTopology X] :
    PreirreducibleSpace X
Proof
:=
  inferInstance

On this site: Theorem: Indiscrete spaces are hyperconnected

theorem extremallyDisconnected_of_preirreducibleSpace

TopologyByExample.extremallyDisconnected_of_preirreducibleSpace

A hyperconnected space is extremally disconnected (Mathlib's instance): the closure of a nonempty open set is the whole space.

theorem extremallyDisconnected_of_preirreducibleSpace [PreirreducibleSpace X] :
    ExtremallyDisconnected X
Proof
:=
  inferInstance

On this site: Theorem: Hyperconnected spaces are extremally disconnected

theorem preirreducibleSpace_of_extremallyDisconnected_of_preconnectedSpace

TopologyByExample.preirreducibleSpace_of_extremallyDisconnected_of_preconnectedSpace

A preconnected, extremally disconnected space is hyperconnected (Mathlib's ExtremallyDisconnected.toPreirreducibleSpace).

theorem preirreducibleSpace_of_extremallyDisconnected_of_preconnectedSpace
    [ExtremallyDisconnected X] [PreconnectedSpace X] : PreirreducibleSpace X
Proof
:=
  ExtremallyDisconnected.toPreirreducibleSpace

On this site: Theorem: Connected extremally disconnected spaces are hyperconnected

instance stronglyConnectedSpace

TopologyByExample.PreirreducibleSpace.stronglyConnectedSpace

A hyperconnected space is strongly connected: the image of a continuous real function is a preirreducible subset of the real line, hence has at most one point.

instance (priority := 100) PreirreducibleSpace.stronglyConnectedSpace [PreirreducibleSpace X] :
    StronglyConnectedSpace X
Proof
:=
  ⟨fun f x y ↦
    (PreirreducibleSpace.isPreirreducible_univ.image f f.continuous.continuousOn).subsingleton
      (mem_image_of_mem f (mem_univ x)) (mem_image_of_mem f (mem_univ y))⟩

instance stronglyConnectedSpace

TopologyByExample.UltraconnectedSpace.stronglyConnectedSpace

An ultraconnected space is strongly connected: if x and y both specialise to z, a continuous real function takes the same value at all three.

instance (priority := 100) UltraconnectedSpace.stronglyConnectedSpace [UltraconnectedSpace X] :
    StronglyConnectedSpace X
Proof
:=
  ⟨fun f x y ↦ by
    obtain ⟨z, hx, hy⟩ := UltraconnectedSpace.exists_specializes x y
    exact (hx.map f.continuous).eq.trans (hy.map f.continuous).eq.symm⟩

instance preconnectedSpace

TopologyByExample.StronglyConnectedSpace.preconnectedSpace

A strongly connected space is preconnected: a continuous map to Bool, followed by the map Bool → ℝ sending true to 1 and false to 0, is a continuous real function.

instance (priority := 100) StronglyConnectedSpace.preconnectedSpace [StronglyConnectedSpace X] :
    PreconnectedSpace X
Proof
:=
  preconnectedSpace_of_forall_constant fun f hf x y ↦ by
    have := StronglyConnectedSpace.apply_eq_apply
      ⟨fun z ↦ if f z then (1 : ℝ) else 0,
        (continuous_of_discreteTopology (f := fun b : Bool ↦ if b then (1 : ℝ) else 0)).comp hf⟩
      x y
    simp only [ContinuousMap.coe_mk] at this
    cases hx : f x <;> cases hy : f y <;> simp_all

instance pseudocompactSpace

TopologyByExample.StronglyConnectedSpace.pseudocompactSpace

A strongly connected space is pseudocompact: a constant function is bounded.

instance (priority := 100) StronglyConnectedSpace.pseudocompactSpace [StronglyConnectedSpace X] :
    PseudocompactSpace X
Proof
:=
  ⟨fun f ↦ by
    have h : (range f).Subsingleton := by
      rintro _ ⟨x, rfl⟩ _ ⟨y, rfl⟩
      exact StronglyConnectedSpace.apply_eq_apply f x y
    exact ⟨h.finite.bddAbove, h.finite.bddBelow⟩⟩

theorem countableChainCondition_of_preirreducibleSpace

TopologyByExample.countableChainCondition_of_preirreducibleSpace

A hyperconnected space satisfies the countable chain condition: two nonempty open sets always meet, so a family of pairwise disjoint nonempty open sets has at most one member.

theorem countableChainCondition_of_preirreducibleSpace [PreirreducibleSpace X] :
    ∀ S : Set (Set X), (∀ s ∈ S, IsOpen s ∧ s.Nonempty) → S.PairwiseDisjoint id → S.Countable
Proof
:= by
  intro S hS hd
  refine Set.Subsingleton.countable fun s hs t ht ↦ ?_
  by_contra hne
  obtain ⟨x, hxs, hxt⟩ :=
    nonempty_preirreducible_inter (hS s hs).1 (hS t ht).1 (hS s hs).2 (hS t ht).2
  exact Set.disjoint_left.1 (hd hs ht hne) hxs hxt

On this site: Theorem: Hyperconnected spaces satisfy the countable chain condition

theorem specializes_of_preirreducibleSpace_of_isOpen_singleton

TopologyByExample.specializes_of_preirreducibleSpace_of_isOpen_singleton

In a hyperconnected space an isolated point is dense, so every point lies in its closure.

theorem specializes_of_preirreducibleSpace_of_isOpen_singleton [PreirreducibleSpace X] {x : X}
    (hx : IsOpen ({x} : Set X)) (y : X) : x ⤳ y
Proof
:=
  specializes_iff_mem_closure.2 ((hx.dense (singleton_nonempty x)).closure_eq ▸ mem_univ y)

theorem separableSpace_of_preirreducibleSpace_of_hasIsolatedPoint

TopologyByExample.separableSpace_of_preirreducibleSpace_of_hasIsolatedPoint

A hyperconnected space with an isolated point is separable: the isolated point is dense.

theorem separableSpace_of_preirreducibleSpace_of_hasIsolatedPoint [PreirreducibleSpace X]
    [HasIsolatedPoint X] : SeparableSpace X
Proof
:= by
  obtain ⟨x, hx⟩ := HasIsolatedPoint.exists_isOpen_singleton (X := X)
  exact ⟨⟨{x}, countable_singleton x, hx.dense (singleton_nonempty x)⟩⟩

On this site: Theorem: A hyperconnected space with an isolated point is separable

theorem pathPreconnectedSpace_of_preirreducibleSpace_of_hasIsolatedPoint

TopologyByExample.pathPreconnectedSpace_of_preirreducibleSpace_of_hasIsolatedPoint

A hyperconnected space with an isolated point is path connected: every point lies in the closure of the isolated point, so is joined to it by a path.

theorem pathPreconnectedSpace_of_preirreducibleSpace_of_hasIsolatedPoint [PreirreducibleSpace X]
    [HasIsolatedPoint X] : PathPreconnectedSpace X
Proof
:= by
  obtain ⟨x, hx⟩ := HasIsolatedPoint.exists_isOpen_singleton (X := X)
  exact pathPreconnectedSpace_of_forall_specializes x
    (specializes_of_preirreducibleSpace_of_isOpen_singleton hx)

On this site: Theorem: A hyperconnected space with an isolated point is path connected

theorem locallyPathConnectedSpace_of_preirreducibleSpace_of_hasIsolatedPoint

TopologyByExample.locallyPathConnectedSpace_of_preirreducibleSpace_of_hasIsolatedPoint

A hyperconnected space with an isolated point is locally path connected: every neighbourhood of a point contains the isolated point.

theorem locallyPathConnectedSpace_of_preirreducibleSpace_of_hasIsolatedPoint
    [PreirreducibleSpace X] [HasIsolatedPoint X] : LocallyPathConnectedSpace X
Proof
:= by
  obtain ⟨x, hx⟩ := HasIsolatedPoint.exists_isOpen_singleton (X := X)
  exact locallyPathConnectedSpace_of_forall_specializes x
    (specializes_of_preirreducibleSpace_of_isOpen_singleton hx)

On this site: Theorem: A hyperconnected space with an isolated point is locally path connected

theorem indiscreteTopology_of_preirreducibleSpace_of_regularSpace

TopologyByExample.indiscreteTopology_of_preirreducibleSpace_of_regularSpace

A regular hyperconnected space is indiscrete: an open set U around a point contains a closed neighbourhood of it, whose interior is a nonempty open set, hence dense, so U is everything.

theorem indiscreteTopology_of_preirreducibleSpace_of_regularSpace [PreirreducibleSpace X]
    [RegularSpace X] : IndiscreteTopology X
Proof
:= by
  have key : ∀ x y : X, x ⤳ y := fun x y ↦ specializes_iff_forall_open.2 fun s hs hy ↦ by
    obtain ⟨t, ht, htc, hts⟩ := exists_mem_nhds_isClosed_subset (hs.mem_nhds hy)
    have hd : Dense (interior t) :=
      isOpen_interior.dense ⟨y, mem_interior_iff_mem_nhds.2 ht⟩
    exact hts (closure_minimal interior_subset htc (hd.closure_eq ▸ mem_univ x))
  exact IndiscreteTopology.of_forall_inseparable fun x y ↦
    inseparable_iff_specializes_and.2 ⟨key x y, key y x⟩

On this site: Theorem: Hyperconnected regular spaces are indiscrete

theorem subsingleton_of_preirreducibleSpace_of_t2Space

TopologyByExample.subsingleton_of_preirreducibleSpace_of_t2Space

A Hausdorff hyperconnected space has at most one point.

theorem subsingleton_of_preirreducibleSpace_of_t2Space [PreirreducibleSpace X] [T2Space X] :
    Subsingleton X
Proof
:=
  subsingleton_univ_iff.1 PreirreducibleSpace.isPreirreducible_univ.subsingleton

On this site: Theorem: A hyperconnected Hausdorff space has at most one point

instance pathPreconnectedSpace

TopologyByExample.UltraconnectedSpace.pathPreconnectedSpace

An ultraconnected space is path connected: two points are joined through a common point to which both specialise.

instance (priority := 100) UltraconnectedSpace.pathPreconnectedSpace [UltraconnectedSpace X] :
    PathPreconnectedSpace X
Proof
:=
  ⟨fun x y ↦ by
    obtain ⟨z, hx, hy⟩ := UltraconnectedSpace.exists_specializes x y
    exact (hx.joinedIn (F := univ) (mem_univ _) (mem_univ _)).joined.trans
      (hy.joinedIn (F := univ) (mem_univ _) (mem_univ _)).joined.symm⟩

instance normalSpace

TopologyByExample.UltraconnectedSpace.normalSpace

An ultraconnected space is normal, vacuously: of two disjoint closed sets one is empty.

instance (priority := 100) UltraconnectedSpace.normalSpace [UltraconnectedSpace X] :
    NormalSpace X
Proof
:=
  ⟨fun s t hs ht hd ↦ by
    rcases s.eq_empty_or_nonempty with rfl | ⟨x, hx⟩
    · exact SeparatedNhds.empty_left t
    rcases t.eq_empty_or_nonempty with rfl | ⟨y, hy⟩
    · exact SeparatedNhds.empty_right s
    obtain ⟨z, hxz, hyz⟩ := UltraconnectedSpace.exists_specializes x y
    exact (hd.ne_of_mem (hxz.mem_closed hs hx) (hyz.mem_closed ht hy) rfl).elim⟩

theorem limitPointCompact_of_ultraconnectedSpace

TopologyByExample.limitPointCompact_of_ultraconnectedSpace

An ultraconnected space is limit point compact: if a ≠ b lie in a set, a point to which both specialise has both in each of its neighbourhoods, so it is an accumulation point of the set.

theorem limitPointCompact_of_ultraconnectedSpace [UltraconnectedSpace X] :
    ∀ s : Set X, s.Infinite → ∃ x, AccPt x (𝓟 s)
Proof
:= by
  intro s hs
  obtain ⟨a, ha, b, hb, hab⟩ := hs.nontrivial
  obtain ⟨z, haz, hbz⟩ := UltraconnectedSpace.exists_specializes a b
  refine ⟨z, accPt_iff_nhds.2 fun U hU ↦ ?_⟩
  by_cases h : a = z
  · exact ⟨b, ⟨mem_of_mem_nhds (hbz.nhds_le_nhds hU), hb⟩, fun hb' ↦ hab (h.trans hb'.symm)⟩
  · exact ⟨a, ⟨mem_of_mem_nhds (haz.nhds_le_nhds hU), ha⟩, h⟩

On this site: Theorem: Ultraconnected spaces are limit point compact

theorem indiscreteTopology_of_ultraconnectedSpace_of_r0Space

TopologyByExample.indiscreteTopology_of_ultraconnectedSpace_of_r0Space

An ultraconnected R₀ space is indiscrete: if x and y both specialise to z, then in an R₀ space all three are inseparable.

theorem indiscreteTopology_of_ultraconnectedSpace_of_r0Space [UltraconnectedSpace X]
    [R0Space X] : IndiscreteTopology X
Proof
:=
  IndiscreteTopology.of_forall_inseparable fun x y ↦ by
    obtain ⟨z, hx, hy⟩ := UltraconnectedSpace.exists_specializes x y
    exact (inseparable_iff_specializes_and.2 ⟨hx, hx.symm⟩).trans
      (inseparable_iff_specializes_and.2 ⟨hy, hy.symm⟩).symm

On this site: Theorem: Ultraconnected R₀ spaces are indiscrete

theorem ultraconnectedSpace_of_normalSpace_of_stronglyConnectedSpace

TopologyByExample.ultraconnectedSpace_of_normalSpace_of_stronglyConnectedSpace

A normal, strongly connected space is ultraconnected: if the closures of two points were disjoint, Urysohn's lemma (which needs no T₁ axiom) would give a continuous real function taking the value 0 at one and 1 at the other.

theorem ultraconnectedSpace_of_normalSpace_of_stronglyConnectedSpace [NormalSpace X]
    [StronglyConnectedSpace X] : UltraconnectedSpace X
Proof
:= by
  refine ⟨fun x y ↦ ?_⟩
  by_contra h
  rw [not_nonempty_iff_eq_empty, ← disjoint_iff_inter_eq_empty] at h
  obtain ⟨f, hf0, hf1, -⟩ :=
    exists_continuous_zero_one_of_isClosed isClosed_closure isClosed_closure h
  have := StronglyConnectedSpace.apply_eq_apply f x y
  rw [hf0 (subset_closure rfl), hf1 (subset_closure rfl)] at this
  norm_num at this

On this site: Theorem: Normal strongly connected spaces are ultraconnected

theorem subsingleton_of_stronglyConnectedSpace_of_functionallyHausdorffSpace

TopologyByExample.subsingleton_of_stronglyConnectedSpace_of_functionallyHausdorffSpace

A strongly connected, functionally Hausdorff space has at most one point.

theorem subsingleton_of_stronglyConnectedSpace_of_functionallyHausdorffSpace
    [StronglyConnectedSpace X] [FunctionallyHausdorffSpace X] : Subsingleton X
Proof
:=
  ⟨fun x y ↦ by
    by_contra h
    obtain ⟨f, hf⟩ := functionallyHausdorffSpace_iff_real.1 ‹_› x y h
    exact hf (StronglyConnectedSpace.apply_eq_apply f x y)⟩

On this site: Theorem: A strongly connected, functionally Hausdorff space has at most one point

theorem indiscreteTopology_of_stronglyConnectedSpace_of_completelyRegularSpace

TopologyByExample.indiscreteTopology_of_stronglyConnectedSpace_of_completelyRegularSpace

A strongly connected, completely regular space is indiscrete: if x were not in the closure of y, a continuous function to the unit interval would separate x from that closure.

theorem indiscreteTopology_of_stronglyConnectedSpace_of_completelyRegularSpace
    [StronglyConnectedSpace X] [CompletelyRegularSpace X] : IndiscreteTopology X
Proof
:= by
  have key : ∀ x y : X, y ⤳ x := fun x y ↦ by
    rw [specializes_iff_mem_closure]
    by_contra h
    obtain ⟨f, hf, hx, hy⟩ :=
      CompletelyRegularSpace.completely_regular x _ isClosed_closure h
    have := StronglyConnectedSpace.apply_eq_apply
      ⟨fun z ↦ (f z : ℝ), continuous_subtypeVal.comp hf⟩ x y
    simp only [ContinuousMap.coe_mk, hx, hy (subset_closure rfl)] at this
    norm_num at this
  exact IndiscreteTopology.of_forall_inseparable fun x y ↦
    inseparable_iff_specializes_and.2 ⟨key y x, key x y⟩

On this site: Theorem: Strongly connected completely regular spaces are indiscrete

theorem stronglyConnectedSpace_of_preconnectedSpace_of_countable

TopologyByExample.stronglyConnectedSpace_of_preconnectedSpace_of_countable

A countable preconnected space is strongly connected: the image of a continuous real function is a countable preconnected subset of the real line, so it has at most one point.

theorem stronglyConnectedSpace_of_preconnectedSpace_of_countable [PreconnectedSpace X]
    [Countable X] : StronglyConnectedSpace X
Proof
:=
  ⟨fun f x y ↦ (countable_range f).isTotallyDisconnected (range f) subset_rfl
    (isPreconnected_range f.continuous) (mem_range_self x) (mem_range_self y)⟩

On this site: Theorem: Countable connected spaces are strongly connected

theorem exists_forall_specializes_of_compactSpace_of_ultraconnectedSpace

TopologyByExample.exists_forall_specializes_of_compactSpace_of_ultraconnectedSpace

In a nonempty compact ultraconnected space some point lies in the closure of every point, so every neighbourhood of it is the whole space. It is any point of a minimal nonempty closed set V: the closure of any point meets V, so contains it by minimality.

theorem exists_forall_specializes_of_compactSpace_of_ultraconnectedSpace [CompactSpace X]
    [UltraconnectedSpace X] [Nonempty X] : ∃ m : X, ∀ x : X, x ⤳ m
Proof
:= by
  obtain ⟨V, -, ⟨m, hm⟩, hVc, hmin⟩ :=
    isClosed_univ.exists_minimal_nonempty_closed_subset (univ_nonempty (α := X))
  refine ⟨m, fun x ↦ ?_⟩
  obtain ⟨z, hxz, hmz⟩ := UltraconnectedSpace.exists_specializes x m
  have hzV : z ∈ V := hmz.mem_closed hVc hm
  have := hmin (closure {x} ∩ V) inter_subset_right
    ⟨z, specializes_iff_mem_closure.1 hxz, hzV⟩ (isClosed_closure.inter hVc)
  rw [specializes_iff_mem_closure]
  exact (this.symm ▸ hm : m ∈ closure {x} ∩ V).1

theorem seqCompactSpace_of_compactSpace_of_ultraconnectedSpace

TopologyByExample.seqCompactSpace_of_compactSpace_of_ultraconnectedSpace

A compact ultraconnected space is sequentially compact: every sequence converges to a point lying in the closure of every point.

theorem seqCompactSpace_of_compactSpace_of_ultraconnectedSpace [CompactSpace X]
    [UltraconnectedSpace X] : SeqCompactSpace X
Proof
:= by
  refine ⟨fun u _ ↦ ?_⟩
  have : Nonempty X := ⟨u 0⟩
  obtain ⟨m, hm⟩ := exists_forall_specializes_of_compactSpace_of_ultraconnectedSpace (X := X)
  exact ⟨m, mem_univ m, id, strictMono_id, tendsto_def.2 fun U hU ↦
    univ_mem' fun n ↦ show u n ∈ U from mem_of_mem_nhds ((hm (u n)).nhds_le_nhds hU)⟩

On this site: Theorem: Compact ultraconnected spaces are sequentially compact

theorem preirreducibleSpace_of_forall_specializes

TopologyByExample.preirreducibleSpace_of_forall_specializes

A space with a point x that specializes to every point (so that the closure of x is the whole space) is hyperconnected.

theorem preirreducibleSpace_of_forall_specializes (x : X) (h : ∀ y, x ⤳ y) :
    PreirreducibleSpace X
Proof
:= by
  have hx : closure ({x} : Set X) = univ :=
    eq_univ_of_forall fun y ↦ specializes_iff_mem_closure.1 (h y)
  exact ⟨hx ▸ isIrreducible_singleton.closure.isPreirreducible⟩

On this site: Theorem: A space with a point whose closure is the whole space is hyperconnected