Lean library · module TopologyByExample.Operators.Sum

Countability properties, metrizability, separation axioms and connectedness of a disjoint sum

Source file

For each of first countability, second countability, separability, the Lindelöf property, metrizability and the Hausdorff property, the binary disjoint sum X ⊕ Y has the property if and only if both X and Y have it. The same holds for the separation axioms T₀, R₀, T₁, T₂½ (Urysohn), regularity, complete regularity, normality, complete normality and perfect normality.

Mathlib already has the instances for second countability, separability, the Lindelöf property and the Hausdorff property of X ⊕ Y, and the full equivalence for separability (TopologicalSpace.separableSpace_sum_iff). This file adds the instances for first countability and metrizability, and the equivalences for the other five properties.

Main statements

Separation axioms

None of the separation axioms here assumes a weaker one, so the empty space has all of them, and an empty summand changes nothing. The direction from the sum to the summands holds because each summand is a closed and open embedded subspace, and every property here is hereditary or (for normality) passes to closed subspaces. For the converse, a point of X ⊕ Y is separated from everything in the other summand by the clopen sets Set.range Sum.inl and Set.range Sum.inr, and a closed set, a separated pair of sets or a zero set splits into its two traces.

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

instance

The disjoint sum of two first-countable spaces is first countable.

instance [FirstCountableTopology X] [FirstCountableTopology Y] :
    FirstCountableTopology (X ⊕ Y)
Proof
where
  nhds_generated_countable
    | .inl x => by rw [nhds_inl]; infer_instance
    | .inr y => by rw [nhds_inr]; infer_instance

instance

The disjoint sum of two metrizable spaces is metrizable.

instance [MetrizableSpace X] [MetrizableSpace Y] : MetrizableSpace (X ⊕ Y)
Proof
:=
  let := metrizableSpaceMetric X
  let := metrizableSpaceMetric Y
  let := Metric.metricSpaceSum (X := X) (Y := Y)
  inferInstance

theorem firstCountableTopology_sum_iff

TopologyByExample.firstCountableTopology_sum_iff

A disjoint sum is first countable if and only if both summands are.

theorem firstCountableTopology_sum_iff :
    FirstCountableTopology (X ⊕ Y) ↔ FirstCountableTopology X ∧ FirstCountableTopology Y
Proof
:=
  ⟨fun _ ↦ ⟨(IsEmbedding.inl (Y := Y)).firstCountableTopology,
    (IsEmbedding.inr (X := X)).firstCountableTopology⟩, fun ⟨_, _⟩ ↦ inferInstance⟩

On this site: Theorem: A disjoint sum is first countable iff both summands are

theorem secondCountableTopology_sum_iff

TopologyByExample.secondCountableTopology_sum_iff

A disjoint sum is second countable if and only if both summands are.

theorem secondCountableTopology_sum_iff :
    SecondCountableTopology (X ⊕ Y) ↔ SecondCountableTopology X ∧ SecondCountableTopology Y
Proof
:=
  ⟨fun _ ↦ ⟨(IsEmbedding.inl (Y := Y)).isInducing.secondCountableTopology,
    (IsEmbedding.inr (X := X)).isInducing.secondCountableTopology⟩,
    fun ⟨_, _⟩ ↦ inferInstance⟩

On this site: Theorem: A disjoint sum is second countable iff both summands are

theorem lindelofSpace_sum_iff

TopologyByExample.lindelofSpace_sum_iff

A disjoint sum is Lindelöf if and only if both summands are.

theorem lindelofSpace_sum_iff :
    LindelofSpace (X ⊕ Y) ↔ LindelofSpace X ∧ LindelofSpace Y
Proof
:=
  ⟨fun _ ↦ ⟨(IsClosedEmbedding.inl (Y := Y)).LindelofSpace,
    (IsClosedEmbedding.inr (X := X)).LindelofSpace⟩, fun ⟨_, _⟩ ↦ inferInstance⟩

On this site: Theorem: A disjoint sum is Lindelöf iff both summands are

theorem metrizableSpace_sum_iff

TopologyByExample.metrizableSpace_sum_iff

A disjoint sum is metrizable if and only if both summands are.

theorem metrizableSpace_sum_iff :
    MetrizableSpace (X ⊕ Y) ↔ MetrizableSpace X ∧ MetrizableSpace Y
Proof
:=
  ⟨fun _ ↦ ⟨(IsEmbedding.inl (Y := Y)).metrizableSpace,
    (IsEmbedding.inr (X := X)).metrizableSpace⟩, fun ⟨_, _⟩ ↦ inferInstance⟩

On this site: Theorem: A disjoint sum is metrizable iff both summands are

theorem t2Space_sum_iff

TopologyByExample.t2Space_sum_iff

A disjoint sum is Hausdorff if and only if both summands are.

theorem t2Space_sum_iff : T2Space (X ⊕ Y) ↔ T2Space X ∧ T2Space Y
Proof
:=
  ⟨fun _ ↦ ⟨(IsEmbedding.inl (Y := Y)).t2Space, (IsEmbedding.inr (X := X)).t2Space⟩,
    fun ⟨_, _⟩ ↦ inferInstance⟩

On this site: Theorem: A disjoint sum is Hausdorff iff both summands are

Separation axioms

Points of different summands

theorem not_specializes_inl_inr

TopologyByExample.not_specializes_inl_inr

A point of the left summand does not specialize to a point of the right summand.

theorem not_specializes_inl_inr (x : X) (y : Y) : ¬(inl x : X ⊕ Y) ⤳ inr y
Proof
:= fun h ↦ by
  simpa using h.mem_open (IsOpenEmbedding.inr (X := X)).isOpen_range (mem_range_self y)

theorem not_specializes_inr_inl

TopologyByExample.not_specializes_inr_inl

A point of the right summand does not specialize to a point of the left summand.

theorem not_specializes_inr_inl (x : X) (y : Y) : ¬(inr y : X ⊕ Y) ⤳ inl x
Proof
:= fun h ↦ by
  simpa using h.mem_open (IsOpenEmbedding.inl (Y := Y)).isOpen_range (mem_range_self x)

T₀, R₀ and T₁

instance

The disjoint sum of two T₀ spaces is T₀.

instance [T0Space X] [T0Space Y] : T0Space (X ⊕ Y)
Proof
:= by
  refine (t0Space_iff_inseparable _).2 fun a b h ↦ ?_
  cases a with
  | inl x =>
    cases b with
    | inl x' => exact congrArg inl ((IsEmbedding.inl.isInducing.inseparable_iff).1 h).eq
    | inr y => exact absurd h.specializes (not_specializes_inl_inr x y)
  | inr y =>
    cases b with
    | inl x => exact absurd h.specializes (not_specializes_inr_inl x y)
    | inr y' => exact congrArg inr ((IsEmbedding.inr.isInducing.inseparable_iff).1 h).eq

instance

The disjoint sum of two R₀ spaces is R₀.

instance [R0Space X] [R0Space Y] : R0Space (X ⊕ Y)
Proof
where
  specializes_symm := ⟨fun a b h ↦ by
    cases a with
    | inl x =>
      cases b with
      | inl x' => exact (IsEmbedding.inl.isInducing.specializes_iff.1 h).symm.map continuous_inl
      | inr y => exact absurd h (not_specializes_inl_inr x y)
    | inr y =>
      cases b with
      | inl x => exact absurd h (not_specializes_inr_inl x y)
      | inr y' => exact (IsEmbedding.inr.isInducing.specializes_iff.1 h).symm.map continuous_inr⟩

instance

The disjoint sum of two T₁ spaces is T₁.

instance [T1Space X] [T1Space Y] : T1Space (X ⊕ Y)
Proof
:=
  t1Space_iff_t0Space_and_r0Space.2 ⟨inferInstance, inferInstance⟩

theorem t0Space_sum_iff

TopologyByExample.t0Space_sum_iff

A disjoint sum is T₀ if and only if both summands are.

theorem t0Space_sum_iff : T0Space (X ⊕ Y) ↔ T0Space X ∧ T0Space Y
Proof
:=
  ⟨fun _ ↦ ⟨(IsEmbedding.inl (Y := Y)).t0Space, (IsEmbedding.inr (X := X)).t0Space⟩,
    fun ⟨_, _⟩ ↦ inferInstance⟩

On this site: Theorem: A disjoint sum is T₀ iff both summands are

theorem r0Space_sum_iff

TopologyByExample.r0Space_sum_iff

A disjoint sum is R₀ if and only if both summands are.

theorem r0Space_sum_iff : R0Space (X ⊕ Y) ↔ R0Space X ∧ R0Space Y
Proof
:=
  ⟨fun _ ↦ ⟨(IsEmbedding.inl (Y := Y)).isInducing.r0Space,
    (IsEmbedding.inr (X := X)).isInducing.r0Space⟩,
    fun ⟨_, _⟩ ↦ inferInstance⟩

On this site: Theorem: A disjoint sum is R₀ iff both summands are

theorem t1Space_sum_iff

TopologyByExample.t1Space_sum_iff

A disjoint sum is T₁ if and only if both summands are.

theorem t1Space_sum_iff : T1Space (X ⊕ Y) ↔ T1Space X ∧ T1Space Y
Proof
:=
  ⟨fun _ ↦ ⟨(IsEmbedding.inl (Y := Y)).t1Space, (IsEmbedding.inr (X := X)).t1Space⟩,
    fun ⟨_, _⟩ ↦ inferInstance⟩

On this site: Theorem: A disjoint sum is T₁ iff both summands are

T₂½

instance

The disjoint sum of two T₂½ spaces is T₂½.

instance [T25Space X] [T25Space Y] : T25Space (X ⊕ Y)
Proof
:= by
  have mixed : Disjoint (closure (range (inl : X → X ⊕ Y))) (closure (range inr)) := by
    rw [IsClosedEmbedding.inl.isClosed_range.closure_eq,
      IsClosedEmbedding.inr.isClosed_range.closure_eq]
    exact isCompl_range_inl_range_inr.disjoint
  refine t25Space_of_exists_nhds_disjoint_closure fun a b hab ↦ ?_
  cases a with
  | inl x =>
    cases b with
    | inl x' =>
      obtain ⟨s, hs, t, ht, hst⟩ := exists_nhds_disjoint_closure (ne_of_apply_ne inl hab)
      refine ⟨inl '' s, IsOpenEmbedding.inl.isOpenMap.image_mem_nhds hs, inl '' t,
        IsOpenEmbedding.inl.isOpenMap.image_mem_nhds ht, ?_⟩
      rw [IsClosedEmbedding.inl.closure_image_eq, IsClosedEmbedding.inl.closure_image_eq]
      exact (disjoint_image_iff inl_injective).2 hst
    | inr y =>
      exact ⟨_, (IsOpenEmbedding.inl (Y := Y)).isOpen_range.mem_nhds (mem_range_self x), _,
        (IsOpenEmbedding.inr (X := X)).isOpen_range.mem_nhds (mem_range_self y), mixed⟩
  | inr y =>
    cases b with
    | inl x =>
      exact ⟨_, (IsOpenEmbedding.inr (X := X)).isOpen_range.mem_nhds (mem_range_self y), _,
        (IsOpenEmbedding.inl (Y := Y)).isOpen_range.mem_nhds (mem_range_self x), mixed.symm⟩
    | inr y' =>
      obtain ⟨s, hs, t, ht, hst⟩ := exists_nhds_disjoint_closure (ne_of_apply_ne inr hab)
      refine ⟨inr '' s, IsOpenEmbedding.inr.isOpenMap.image_mem_nhds hs, inr '' t,
        IsOpenEmbedding.inr.isOpenMap.image_mem_nhds ht, ?_⟩
      rw [IsClosedEmbedding.inr.closure_image_eq, IsClosedEmbedding.inr.closure_image_eq]
      exact (disjoint_image_iff inr_injective).2 hst

theorem t25Space_sum_iff

TopologyByExample.t25Space_sum_iff

A disjoint sum is T₂½ if and only if both summands are.

theorem t25Space_sum_iff : T25Space (X ⊕ Y) ↔ T25Space X ∧ T25Space Y
Proof
:=
  ⟨fun _ ↦ ⟨(IsEmbedding.inl (Y := Y)).t25Space, (IsEmbedding.inr (X := X)).t25Space⟩,
    fun ⟨_, _⟩ ↦ inferInstance⟩

On this site: Theorem: A disjoint sum is Urysohn iff both summands are

Regularity and complete regularity

instance

The disjoint sum of two regular spaces is regular.

instance [RegularSpace X] [RegularSpace Y] : RegularSpace (X ⊕ Y)
Proof
:= by
  refine .of_exists_mem_nhds_isClosed_subset fun a s hs ↦ ?_
  cases a with
  | inl x =>
    rw [nhds_inl] at hs
    obtain ⟨t, ht, htc, hts⟩ := exists_mem_nhds_isClosed_subset hs
    exact ⟨inl '' t, IsOpenEmbedding.inl.isOpenMap.image_mem_nhds ht,
      IsClosedEmbedding.inl.isClosedMap t htc, image_subset_iff.2 hts⟩
  | inr y =>
    rw [nhds_inr] at hs
    obtain ⟨t, ht, htc, hts⟩ := exists_mem_nhds_isClosed_subset hs
    exact ⟨inr '' t, IsOpenEmbedding.inr.isOpenMap.image_mem_nhds ht,
      IsClosedEmbedding.inr.isClosedMap t htc, image_subset_iff.2 hts⟩

instance

The disjoint sum of two completely regular spaces is completely regular.

instance [CompletelyRegularSpace X] [CompletelyRegularSpace Y] :
    CompletelyRegularSpace (X ⊕ Y)
Proof
where
  completely_regular a K hK haK := by
    rw [isClosed_sum_iff] at hK
    cases a with
    | inl x =>
      obtain ⟨f, hf, hfx, hfK⟩ := CompletelyRegularSpace.completely_regular x _ hK.1 haK
      refine ⟨Sum.elim f 1, hf.sumElim continuous_const, hfx, ?_⟩
      rintro (x' | y') h
      · exact hfK h
      · rfl
    | inr y =>
      obtain ⟨f, hf, hfy, hfK⟩ := CompletelyRegularSpace.completely_regular y _ hK.2 haK
      refine ⟨Sum.elim 1 f, continuous_const.sumElim hf, hfy, ?_⟩
      rintro (x' | y') h
      · rfl
      · exact hfK h

theorem regularSpace_sum_iff

TopologyByExample.regularSpace_sum_iff

A disjoint sum is regular if and only if both summands are.

theorem regularSpace_sum_iff : RegularSpace (X ⊕ Y) ↔ RegularSpace X ∧ RegularSpace Y
Proof
:=
  ⟨fun _ ↦ ⟨(IsEmbedding.inl (Y := Y)).isInducing.regularSpace,
    (IsEmbedding.inr (X := X)).isInducing.regularSpace⟩,
    fun ⟨_, _⟩ ↦ inferInstance⟩

On this site: Theorem: A disjoint sum is regular iff both summands are

theorem completelyRegularSpace_sum_iff

TopologyByExample.completelyRegularSpace_sum_iff

A disjoint sum is completely regular if and only if both summands are.

theorem completelyRegularSpace_sum_iff :
    CompletelyRegularSpace (X ⊕ Y) ↔ CompletelyRegularSpace X ∧ CompletelyRegularSpace Y
Proof
:=
  ⟨fun _ ↦ ⟨(IsEmbedding.inl (Y := Y)).isInducing.completelyRegularSpace,
    (IsEmbedding.inr (X := X)).isInducing.completelyRegularSpace⟩, fun ⟨_, _⟩ ↦ inferInstance⟩

On this site: Theorem: A disjoint sum is completely regular iff both summands are

Normality, complete normality and perfect normality

theorem sum

TopologyByExample.SeparatedNhds.sum

Two sets of a disjoint sum have disjoint open neighbourhoods if their traces on each summand do.

theorem SeparatedNhds.sum {s t : Set (X ⊕ Y)} (h₁ : SeparatedNhds (inl ⁻¹' s) (inl ⁻¹' t))
    (h₂ : SeparatedNhds (inr ⁻¹' s) (inr ⁻¹' t)) : SeparatedNhds s t
Proof
:= by
  obtain ⟨U₁, V₁, hU₁, hV₁, hsU₁, htV₁, hUV₁⟩ := h₁
  obtain ⟨U₂, V₂, hU₂, hV₂, hsU₂, htV₂, hUV₂⟩ := h₂
  have hlr : ∀ (A : Set X) (B : Set Y), Disjoint (inl '' A) (inr '' B) := fun A B ↦
    isCompl_range_inl_range_inr.disjoint.mono (image_subset_range _ _) (image_subset_range _ _)
  refine ⟨inl '' U₁ ∪ inr '' U₂, inl '' V₁ ∪ inr '' V₂,
    (IsOpenEmbedding.inl.isOpenMap _ hU₁).union (IsOpenEmbedding.inr.isOpenMap _ hU₂),
    (IsOpenEmbedding.inl.isOpenMap _ hV₁).union (IsOpenEmbedding.inr.isOpenMap _ hV₂),
    ?_, ?_, ?_⟩
  · rintro (x | y) h
    exacts [.inl (mem_image_of_mem _ (hsU₁ h)), .inr (mem_image_of_mem _ (hsU₂ h))]
  · rintro (x | y) h
    exacts [.inl (mem_image_of_mem _ (htV₁ h)), .inr (mem_image_of_mem _ (htV₂ h))]
  · refine disjoint_union_left.2 ⟨disjoint_union_right.2 ⟨?_, hlr _ _⟩,
      disjoint_union_right.2 ⟨(hlr _ _).symm, ?_⟩⟩
    exacts [(disjoint_image_iff inl_injective).2 hUV₁, (disjoint_image_iff inr_injective).2 hUV₂]

instance

The disjoint sum of two normal spaces is normal.

instance [NormalSpace X] [NormalSpace Y] : NormalSpace (X ⊕ Y)
Proof
where
  normal s t hs ht hst := by
    rw [isClosed_sum_iff] at hs ht
    exact SeparatedNhds.sum (normal_separation hs.1 ht.1 (hst.preimage _))
      (normal_separation hs.2 ht.2 (hst.preimage _))

instance

The disjoint sum of two completely normal spaces is completely normal.

instance [CompletelyNormalSpace X] [CompletelyNormalSpace Y] :
    CompletelyNormalSpace (X ⊕ Y)
Proof
where
  completely_normal s t hst hts := by
    have hl := IsOpenEmbedding.inl (X := X) (Y := Y).isOpenMap.preimage_closure_eq_closure_preimage
      continuous_inl
    have hr := IsOpenEmbedding.inr (X := X) (Y := Y).isOpenMap.preimage_closure_eq_closure_preimage
      continuous_inr
    rw [← separatedNhds_iff_disjoint]
    refine SeparatedNhds.sum (separatedNhds_iff_disjoint.2 (completely_normal ?_ ?_))
      (separatedNhds_iff_disjoint.2 (completely_normal ?_ ?_))
    · rw [← hl]; exact hst.preimage _
    · rw [← hl]; exact hts.preimage _
    · rw [← hr]; exact hst.preimage _
    · rw [← hr]; exact hts.preimage _

instance

The disjoint sum of two perfectly normal spaces is perfectly normal: a closed set is the zero set of the function that is, on each summand, a function whose zero set is its trace there.

instance [PerfectlyNormalSpace X] [PerfectlyNormalSpace Y] :
    PerfectlyNormalSpace (X ⊕ Y)
Proof
:= by
  refine perfectlyNormalSpace_iff_forall_isClosed_preimage_zero.2 fun s hs ↦ ?_
  rw [isClosed_sum_iff] at hs
  obtain ⟨f, hfs, hf⟩ := perfectlyNormalSpace_iff_forall_isClosed_preimage_zero.1 ‹_› _ hs.1
  obtain ⟨g, hgs, hg⟩ := perfectlyNormalSpace_iff_forall_isClosed_preimage_zero.1 ‹_› _ hs.2
  refine ⟨⟨Sum.elim f g, f.continuous.sumElim g.continuous⟩, ?_, ?_⟩
  · ext (x | y)
    · exact Set.ext_iff.1 hfs x
    · exact Set.ext_iff.1 hgs y
  · rintro (x | y)
    exacts [hf x, hg y]

theorem normalSpace_sum_iff

TopologyByExample.normalSpace_sum_iff

A disjoint sum is normal if and only if both summands are.

theorem normalSpace_sum_iff : NormalSpace (X ⊕ Y) ↔ NormalSpace X ∧ NormalSpace Y
Proof
:=
  ⟨fun _ ↦ ⟨(IsClosedEmbedding.inl (Y := Y)).normalSpace,
    (IsClosedEmbedding.inr (X := X)).normalSpace⟩, fun ⟨_, _⟩ ↦ inferInstance⟩

On this site: Theorem: A disjoint sum is normal iff both summands are

theorem completelyNormalSpace_sum_iff

TopologyByExample.completelyNormalSpace_sum_iff

A disjoint sum is completely normal if and only if both summands are.

theorem completelyNormalSpace_sum_iff :
    CompletelyNormalSpace (X ⊕ Y) ↔ CompletelyNormalSpace X ∧ CompletelyNormalSpace Y
Proof
:=
  ⟨fun _ ↦ ⟨(IsEmbedding.inl (Y := Y)).isInducing.completelyNormalSpace,
    (IsEmbedding.inr (X := X)).isInducing.completelyNormalSpace⟩, fun ⟨_, _⟩ ↦ inferInstance⟩

On this site: Theorem: A disjoint sum is completely normal iff both summands are

theorem perfectlyNormalSpace_sum_iff

TopologyByExample.perfectlyNormalSpace_sum_iff

A disjoint sum is perfectly normal if and only if both summands are.

theorem perfectlyNormalSpace_sum_iff :
    PerfectlyNormalSpace (X ⊕ Y) ↔ PerfectlyNormalSpace X ∧ PerfectlyNormalSpace Y
Proof
:=
  ⟨fun _ ↦ ⟨(IsEmbedding.inl (Y := Y)).isInducing.perfectlyNormalSpace,
    (IsEmbedding.inr (X := X)).isInducing.perfectlyNormalSpace⟩, fun ⟨_, _⟩ ↦ inferInstance⟩

On this site: Theorem: A disjoint sum is perfectly normal iff both summands are

Connectedness properties

theorem not_preconnectedSpace_sum

TopologyByExample.not_preconnectedSpace_sum

A sum of two nonempty spaces is not preconnected: a preconnected set lies in one summand.

theorem not_preconnectedSpace_sum [Nonempty X] [Nonempty Y] : ¬PreconnectedSpace (X ⊕ Y)
Proof
:=
  fun _ ↦ by
    rcases Sum.isPreconnected_iff.1 (isPreconnected_univ (α := X ⊕ Y)) with
      ⟨t, -, ht⟩ | ⟨t, -, ht⟩
    · obtain ⟨x, -, hx⟩ := ht.subset (mem_univ (Sum.inr (Classical.arbitrary Y)))
      exact Sum.inl_ne_inr hx
    · obtain ⟨x, -, hx⟩ := ht.subset (mem_univ (Sum.inl (Classical.arbitrary X)))
      exact Sum.inr_ne_inl hx

On this site: Theorem: A disjoint sum of two nonempty spaces is not connected

theorem not_pathPreconnectedSpace_sum

TopologyByExample.not_pathPreconnectedSpace_sum

A sum of two nonempty spaces is not path preconnected.

theorem not_pathPreconnectedSpace_sum [Nonempty X] [Nonempty Y] :
    ¬PathPreconnectedSpace (X ⊕ Y)
Proof
:=
  fun _ ↦ not_preconnectedSpace_sum (X := X) (Y := Y) inferInstance

On this site: Theorem: A disjoint sum of two nonempty spaces is not path connected

theorem isClopen_image_inl

TopologyByExample.isClopen_image_inl

The image of a clopen set of X in X ⊕ Y is clopen.

theorem isClopen_image_inl {s : Set X} (hs : IsClopen s) : IsClopen (Sum.inl '' s : Set (X ⊕ Y))
Proof
:=
  ⟨IsClosedEmbedding.inl.isClosedMap _ hs.isClosed, IsOpenEmbedding.inl.isOpenMap _ hs.isOpen⟩

theorem isClopen_image_inr

TopologyByExample.isClopen_image_inr

The image of a clopen set of Y in X ⊕ Y is clopen.

theorem isClopen_image_inr {s : Set Y} (hs : IsClopen s) : IsClopen (Sum.inr '' s : Set (X ⊕ Y))
Proof
:=
  ⟨IsClosedEmbedding.inr.isClosedMap _ hs.isClosed, IsOpenEmbedding.inr.isOpenMap _ hs.isOpen⟩

instance

The sum of two locally connected spaces is locally connected.

instance [LocallyConnectedSpace X] [LocallyConnectedSpace Y] : LocallyConnectedSpace (X ⊕ Y)
Proof
:=
  locallyConnectedSpace_iff_isTopologicalBasis_isOpen_isPreconnected.2 <| by
    refine (IsTopologicalBasis.isOpen_isPreconnected (α := X)).sum
      (IsTopologicalBasis.isOpen_isPreconnected (α := Y)) |>.of_isOpen_of_subset
      (fun _ hs ↦ hs.1) ?_
    rintro _ (⟨s, hs, rfl⟩ | ⟨s, hs, rfl⟩)
    · exact ⟨IsOpenEmbedding.inl.isOpenMap _ hs.1,
        hs.2.image _ continuous_inl.continuousOn⟩
    · exact ⟨IsOpenEmbedding.inr.isOpenMap _ hs.1,
        hs.2.image _ continuous_inr.continuousOn⟩

theorem locallyConnectedSpace_sum_iff

TopologyByExample.locallyConnectedSpace_sum_iff

A sum of spaces is locally connected if and only if both summands are.

theorem locallyConnectedSpace_sum_iff :
    LocallyConnectedSpace (X ⊕ Y) ↔ LocallyConnectedSpace X ∧ LocallyConnectedSpace Y
Proof
:=
  ⟨fun _ ↦ ⟨(IsOpenEmbedding.inl (X := X) (Y := Y)).locallyConnectedSpace,
      (IsOpenEmbedding.inr (X := X) (Y := Y)).locallyConnectedSpace⟩,
    fun ⟨_, _⟩ ↦ inferInstance⟩

On this site: Theorem: A disjoint sum is locally connected iff both summands are

theorem locallyPathConnectedSpace_sum_iff

TopologyByExample.locallyPathConnectedSpace_sum_iff

A sum of spaces is locally path connected if and only if both summands are.

theorem locallyPathConnectedSpace_sum_iff :
    LocallyPathConnectedSpace (X ⊕ Y) ↔
      LocallyPathConnectedSpace X ∧ LocallyPathConnectedSpace Y
Proof
:=
  ⟨fun _ ↦ ⟨(IsOpenEmbedding.inl (X := X) (Y := Y)).locallyPathConnectedSpace,
      (IsOpenEmbedding.inr (X := X) (Y := Y)).locallyPathConnectedSpace⟩,
    fun ⟨_, _⟩ ↦ inferInstance⟩

On this site: Theorem: A disjoint sum is locally path connected iff both summands are

theorem totallyDisconnectedSpace_sum_iff

TopologyByExample.totallyDisconnectedSpace_sum_iff

A sum of spaces is totally disconnected if and only if both summands are.

theorem totallyDisconnectedSpace_sum_iff :
    TotallyDisconnectedSpace (X ⊕ Y) ↔ TotallyDisconnectedSpace X ∧ TotallyDisconnectedSpace Y
Proof
:=
  ⟨fun _ ↦ ⟨totallyDisconnectedSpace_of_injective (f := (Sum.inl : X → X ⊕ Y)) continuous_inl
        Sum.inl_injective,
      totallyDisconnectedSpace_of_injective (f := (Sum.inr : Y → X ⊕ Y)) continuous_inr
        Sum.inr_injective⟩,
    fun ⟨_, _⟩ ↦ inferInstance⟩

On this site: Theorem: A disjoint sum is totally disconnected iff both summands are

instance

The sum of two totally separated spaces is totally separated.

instance [TotallySeparatedSpace X] [TotallySeparatedSpace Y] :
    TotallySeparatedSpace (X ⊕ Y)
Proof
:=
  totallySeparatedSpace_iff_exists_isClopen.2 fun a b hab ↦ by
    rcases a with x | y <;> rcases b with x' | y'
    · obtain ⟨U, hU, hx, hx'⟩ :=
        exists_isClopen_of_totally_separated fun h : x = x' ↦ hab (congrArg _ h)
      exact ⟨Sum.inl '' U, isClopen_image_inl hU, mem_image_of_mem _ hx,
        fun ⟨z, hz, e⟩ ↦ hx' (Sum.inl_injective e ▸ hz)⟩
    · exact ⟨range Sum.inl, isClopen_range_inl, mem_range_self x,
        fun ⟨_, e⟩ ↦ Sum.inl_ne_inr e⟩
    · exact ⟨range Sum.inr, isClopen_range_inr, mem_range_self y,
        fun ⟨_, e⟩ ↦ Sum.inr_ne_inl e⟩
    · obtain ⟨U, hU, hy, hy'⟩ :=
        exists_isClopen_of_totally_separated fun h : y = y' ↦ hab (congrArg _ h)
      exact ⟨Sum.inr '' U, isClopen_image_inr hU, mem_image_of_mem _ hy,
        fun ⟨z, hz, e⟩ ↦ hy' (Sum.inr_injective e ▸ hz)⟩

theorem totallySeparatedSpace_sum_iff

TopologyByExample.totallySeparatedSpace_sum_iff

A sum of spaces is totally separated if and only if both summands are.

theorem totallySeparatedSpace_sum_iff :
    TotallySeparatedSpace (X ⊕ Y) ↔ TotallySeparatedSpace X ∧ TotallySeparatedSpace Y
Proof
:=
  ⟨fun _ ↦ ⟨totallySeparatedSpace_of_injective (f := (Sum.inl : X → X ⊕ Y)) continuous_inl
        Sum.inl_injective,
      totallySeparatedSpace_of_injective (f := (Sum.inr : Y → X ⊕ Y)) continuous_inr
        Sum.inr_injective⟩,
    fun ⟨_, _⟩ ↦ inferInstance⟩

On this site: Theorem: A disjoint sum is totally separated iff both summands are

instance

The sum of two zero-dimensional spaces is zero-dimensional: the images of the clopen sets of the summands form a base.

instance [ZeroDimensionalSpace X] [ZeroDimensionalSpace Y] : ZeroDimensionalSpace (X ⊕ Y)
Proof
:=
  .of_isTopologicalBasis
    (by
      rintro _ (⟨s, hs, rfl⟩ | ⟨s, hs, rfl⟩)
      exacts [isClopen_image_inl hs, isClopen_image_inr hs])
    (isTopologicalBasis_isClopen.sum isTopologicalBasis_isClopen)

theorem zeroDimensionalSpace_sum_iff

TopologyByExample.zeroDimensionalSpace_sum_iff

A sum of spaces is zero-dimensional if and only if both summands are.

theorem zeroDimensionalSpace_sum_iff :
    ZeroDimensionalSpace (X ⊕ Y) ↔ ZeroDimensionalSpace X ∧ ZeroDimensionalSpace Y
Proof
:=
  ⟨fun _ ↦ ⟨zeroDimensionalSpace_of_isInducing (IsEmbedding.inl (X := X) (Y := Y)).isInducing,
      zeroDimensionalSpace_of_isInducing (IsEmbedding.inr (X := X) (Y := Y)).isInducing⟩,
    fun ⟨_, _⟩ ↦ inferInstance⟩

On this site: Theorem: A disjoint sum is zero-dimensional iff both summands are

Functional Hausdorffness and semiregularity

variable {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y]

instance

The disjoint sum of two functionally Hausdorff spaces is functionally Hausdorff.

instance [FunctionallyHausdorffSpace X] [FunctionallyHausdorffSpace Y] :
    FunctionallyHausdorffSpace (X ⊕ Y)
Proof
:= by
  refine functionallyHausdorffSpace_iff_real.2 ?_
  rintro (x | y) (x' | y') h
  · obtain ⟨f, hf⟩ := functionallyHausdorffSpace_iff_real.1 ‹_› x x' (ne_of_apply_ne _ h)
    exact ⟨⟨Sum.elim f 0, f.continuous.sumElim continuous_const⟩,
      show Sum.elim (⇑f) (0 : Y → ℝ) (Sum.inl x) ≠ Sum.elim (⇑f) (0 : Y → ℝ) (Sum.inl x') by
        simpa using hf⟩
  · exact ⟨⟨Sum.elim 0 1, continuous_const.sumElim continuous_const⟩,
      show Sum.elim (0 : X → ℝ) (1 : Y → ℝ) (Sum.inl x) ≠
        Sum.elim (0 : X → ℝ) (1 : Y → ℝ) (Sum.inr y') by simp⟩
  · exact ⟨⟨Sum.elim 0 1, continuous_const.sumElim continuous_const⟩,
      show Sum.elim (0 : X → ℝ) (1 : Y → ℝ) (Sum.inr y) ≠
        Sum.elim (0 : X → ℝ) (1 : Y → ℝ) (Sum.inl x') by simp⟩
  · obtain ⟨f, hf⟩ := functionallyHausdorffSpace_iff_real.1 ‹_› y y' (ne_of_apply_ne _ h)
    exact ⟨⟨Sum.elim 0 f, continuous_const.sumElim f.continuous⟩,
      show Sum.elim (0 : X → ℝ) (⇑f) (Sum.inr y) ≠ Sum.elim (0 : X → ℝ) (⇑f) (Sum.inr y') by
        simpa using hf⟩

theorem functionallyHausdorffSpace_sum_iff

TopologyByExample.functionallyHausdorffSpace_sum_iff

A disjoint sum is functionally Hausdorff if and only if both summands are.

theorem functionallyHausdorffSpace_sum_iff :
    FunctionallyHausdorffSpace (X ⊕ Y) ↔
      FunctionallyHausdorffSpace X ∧ FunctionallyHausdorffSpace Y
Proof
:=
  ⟨fun _ ↦ ⟨.of_injective_continuous (f := (Sum.inl : X → X ⊕ Y)) Sum.inl_injective continuous_inl,
    .of_injective_continuous (f := (Sum.inr : Y → X ⊕ Y)) Sum.inr_injective continuous_inr⟩,
    fun ⟨_, _⟩ ↦ inferInstance⟩

On this site: Theorem: A disjoint sum is functionally Hausdorff iff both summands are

instance

The disjoint sum of two semiregular spaces is semiregular.

instance [SemiregularSpace X] [SemiregularSpace Y] : SemiregularSpace (X ⊕ Y)
Proof
:= by
  rw [semiregularSpace_iff_isRegularOpen]
  refine isTopologicalBasis_of_isOpen_of_nhds (fun _ hs ↦ IsRegularOpen.isOpen hs) ?_
  rintro (x | y) U hx hU
  · obtain ⟨V, hV, hxV, hVU⟩ :=
      (semiregularSpace_iff_isRegularOpen.1 ‹SemiregularSpace X›).exists_subset_of_mem_open
        (show x ∈ Sum.inl ⁻¹' U from hx) (hU.preimage continuous_inl)
    refine ⟨Sum.inl '' V, isRegularOpen_sum_iff.2 ⟨?_, ?_⟩, mem_image_of_mem _ hxV,
      image_subset_iff.2 hVU⟩
    · rwa [preimage_image_eq _ Sum.inl_injective]
    · rw [preimage_inr_image_inl]
      exact isRegularOpen_empty
  · obtain ⟨V, hV, hyV, hVU⟩ :=
      (semiregularSpace_iff_isRegularOpen.1 ‹SemiregularSpace Y›).exists_subset_of_mem_open
        (show y ∈ Sum.inr ⁻¹' U from hx) (hU.preimage continuous_inr)
    refine ⟨Sum.inr '' V, isRegularOpen_sum_iff.2 ⟨?_, ?_⟩, mem_image_of_mem _ hyV,
      image_subset_iff.2 hVU⟩
    · rw [preimage_inl_image_inr]
      exact isRegularOpen_empty
    · rwa [preimage_image_eq _ Sum.inr_injective]

theorem semiregularSpace_sum_iff

TopologyByExample.semiregularSpace_sum_iff

A disjoint sum is semiregular if and only if both summands are.

theorem semiregularSpace_sum_iff :
    SemiregularSpace (X ⊕ Y) ↔ SemiregularSpace X ∧ SemiregularSpace Y
Proof
:=
  ⟨fun _ ↦ ⟨.of_isOpenEmbedding (IsOpenEmbedding.inl (Y := Y)),
    .of_isOpenEmbedding (IsOpenEmbedding.inr (X := X))⟩,
    fun ⟨_, _⟩ ↦ inferInstance⟩

On this site: Theorem: A disjoint sum is semiregular iff both summands are

Limit point compactness, pseudocompactness and local relative compactness

variable {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y]

theorem mem_of_subset_of_isClosed

TopologyByExample.AccPt.mem_of_subset_of_isClosed

An accumulation point of a subset of a closed set lies in the closed set.

private theorem AccPt.mem_of_subset_of_isClosed {Z : Type*} [TopologicalSpace Z] {z : Z}
    {s t : Set Z} (h : AccPt z (𝓟 s)) (hst : s ⊆ t) (ht : IsClosed t) : z ∈ t
Proof
:=
  ht.closure_subset_iff.2 hst (mem_closure_iff_clusterPt.2 h.clusterPt)

theorem limitPointCompact_sum_iff

TopologyByExample.limitPointCompact_sum_iff

A disjoint sum is limit point compact if and only if both summands are.

theorem limitPointCompact_sum_iff :
    (∀ s : Set (X ⊕ Y), s.Infinite → ∃ x, AccPt x (𝓟 s)) ↔
      (∀ s : Set X, s.Infinite → ∃ x, AccPt x (𝓟 s)) ∧
        (∀ s : Set Y, s.Infinite → ∃ x, AccPt x (𝓟 s))
Proof
:= by
  refine ⟨fun h ↦ ⟨fun s hs ↦ ?_, fun s hs ↦ ?_⟩, fun ⟨hX, hY⟩ s hs ↦ ?_⟩
  · obtain ⟨z, hz⟩ := h _ (hs.image Sum.inl_injective.injOn)
    obtain ⟨x, rfl⟩ :=
      AccPt.mem_of_subset_of_isClosed hz (image_subset_range _ _) isClosed_range_inl
    exact ⟨x, IsOpenEmbedding.inl.accPt_image_iff.1 hz⟩
  · obtain ⟨z, hz⟩ := h _ (hs.image Sum.inr_injective.injOn)
    obtain ⟨y, rfl⟩ :=
      AccPt.mem_of_subset_of_isClosed hz (image_subset_range _ _) isClosed_range_inr
    exact ⟨y, IsOpenEmbedding.inr.accPt_image_iff.1 hz⟩
  · have hsub : s ⊆ Sum.inl '' (Sum.inl ⁻¹' s) ∪ Sum.inr '' (Sum.inr ⁻¹' s) := by
      rintro (x | y) h
      · exact .inl ⟨x, h, rfl⟩
      · exact .inr ⟨y, h, rfl⟩
    by_cases hl : (Sum.inl ⁻¹' s : Set X).Infinite
    · obtain ⟨x, hx⟩ := hX _ hl
      exact ⟨_, (IsOpenEmbedding.inl.accPt_image_iff.2 hx).mono
        (principal_mono.2 (image_preimage_subset _ _))⟩
    by_cases hr : (Sum.inr ⁻¹' s : Set Y).Infinite
    · obtain ⟨y, hy⟩ := hY _ hr
      exact ⟨_, (IsOpenEmbedding.inr.accPt_image_iff.2 hy).mono
        (principal_mono.2 (image_preimage_subset _ _))⟩
    exact absurd (((not_infinite.1 hl).image _).union ((not_infinite.1 hr).image _)
      |>.subset hsub) hs

On this site: Theorem: A disjoint sum is limit point compact iff both summands are

theorem pseudocompactSpace_sum_iff

TopologyByExample.pseudocompactSpace_sum_iff

A disjoint sum is pseudocompact if and only if both summands are.

theorem pseudocompactSpace_sum_iff :
    PseudocompactSpace (X ⊕ Y) ↔ PseudocompactSpace X ∧ PseudocompactSpace Y
Proof
:= by
  refine ⟨fun h ↦ ⟨⟨fun f ↦ ?_⟩, ⟨fun f ↦ ?_⟩⟩, fun ⟨hX, hY⟩ ↦ ⟨fun f ↦ ?_⟩⟩
  · have hsub : range f ⊆ range (Sum.elim f (0 : Y → ℝ)) :=
      range_subset_iff.2 fun x ↦ ⟨.inl x, rfl⟩
    have := h.bddAbove_and_bddBelow_range
      ⟨Sum.elim f (0 : Y → ℝ), f.continuous.sumElim continuous_const⟩
    exact ⟨this.1.mono hsub, this.2.mono hsub⟩
  · have hsub : range f ⊆ range (Sum.elim (0 : X → ℝ) f) :=
      range_subset_iff.2 fun y ↦ ⟨.inr y, rfl⟩
    have := h.bddAbove_and_bddBelow_range
      ⟨Sum.elim (0 : X → ℝ) f, continuous_const.sumElim f.continuous⟩
    exact ⟨this.1.mono hsub, this.2.mono hsub⟩
  · have hsub : range f ⊆ range (f ∘ Sum.inl) ∪ range (f ∘ Sum.inr) := by
      rintro _ ⟨x | y, rfl⟩
      · exact .inl ⟨x, rfl⟩
      · exact .inr ⟨y, rfl⟩
    have hl := hX.bddAbove_and_bddBelow_range (f.comp ⟨_, continuous_inl⟩)
    have hr := hY.bddAbove_and_bddBelow_range (f.comp ⟨_, continuous_inr⟩)
    exact ⟨(hl.1.union hr.1).mono hsub, (hl.2.union hr.2).mono hsub⟩

On this site: Theorem: A disjoint sum is pseudocompact iff both summands are

instance

A disjoint sum of locally relatively compact spaces is locally relatively compact.

instance [LocallyRelativelyCompactSpace X] [LocallyRelativelyCompactSpace Y] :
    LocallyRelativelyCompactSpace (X ⊕ Y)
Proof
:=
  locallyRelativelyCompactSpace_iff_closed.2 <| by
    rintro (x | y)
    · obtain ⟨K, hK, hKc, hKk⟩ := locallyRelativelyCompactSpace_iff_closed.1 ‹_› x
      exact ⟨Sum.inl '' K, IsOpenEmbedding.inl.image_mem_nhds.2 hK,
        IsClosedEmbedding.inl.isClosedMap K hKc, hKk.image continuous_inl⟩
    · obtain ⟨K, hK, hKc, hKk⟩ := locallyRelativelyCompactSpace_iff_closed.1 ‹_› y
      exact ⟨Sum.inr '' K, IsOpenEmbedding.inr.image_mem_nhds.2 hK,
        IsClosedEmbedding.inr.isClosedMap K hKc, hKk.image continuous_inr⟩

theorem locallyRelativelyCompactSpace_sum_iff

TopologyByExample.locallyRelativelyCompactSpace_sum_iff

A disjoint sum is locally relatively compact if and only if both summands are.

theorem locallyRelativelyCompactSpace_sum_iff :
    LocallyRelativelyCompactSpace (X ⊕ Y) ↔
      LocallyRelativelyCompactSpace X ∧ LocallyRelativelyCompactSpace Y
Proof
:=
  ⟨fun _ ↦ ⟨(IsClosedEmbedding.inl (Y := Y)).locallyRelativelyCompactSpace,
    (IsClosedEmbedding.inr (X := X)).locallyRelativelyCompactSpace⟩, fun ⟨_, _⟩ ↦ inferInstance⟩

On this site: Theorem: A disjoint sum is locally relatively compact iff both summands are

Complete metrizability and second category

variable {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y]

theorem isCompletelyMetrizableSpace_sum_iff

TopologyByExample.isCompletelyMetrizableSpace_sum_iff

A disjoint sum is completely metrizable if and only if both summands are.

theorem isCompletelyMetrizableSpace_sum_iff :
    IsCompletelyMetrizableSpace (X ⊕ Y) ↔
      IsCompletelyMetrizableSpace X ∧ IsCompletelyMetrizableSpace Y
Proof
:=
  ⟨fun _ ↦ ⟨(IsClosedEmbedding.inl (Y := Y)).IsCompletelyMetrizableSpace,
    (IsClosedEmbedding.inr (X := X)).IsCompletelyMetrizableSpace⟩, fun ⟨_, _⟩ ↦ inferInstance⟩

On this site: Theorem: A disjoint sum is completely metrizable iff both summands are

theorem isMeagre_univ_sum_iff

TopologyByExample.isMeagre_univ_sum_iff

A disjoint sum is meagre in itself if and only if both summands are.

theorem isMeagre_univ_sum_iff :
    IsMeagre (univ : Set (X ⊕ Y)) ↔ IsMeagre (univ : Set X) ∧ IsMeagre (univ : Set Y)
Proof
:= by
  refine ⟨fun h ↦ ⟨?_, ?_⟩, fun ⟨hX, hY⟩ ↦ ?_⟩
  · simpa using h.preimage_of_isOpenMap continuous_inl isOpenMap_inl
  · simpa using h.preimage_of_isOpenMap continuous_inr isOpenMap_inr
  · rw [← range_inl_union_range_inr, ← image_univ, ← image_univ]
    exact (IsEmbedding.inl.isInducing.isMeagre_image hX).union
      (IsEmbedding.inr.isInducing.isMeagre_image hY)

theorem not_isMeagre_univ_sum_iff

TopologyByExample.not_isMeagre_univ_sum_iff

A disjoint sum is of second category in itself if and only if one of the summands is.

theorem not_isMeagre_univ_sum_iff :
    ¬IsMeagre (univ : Set (X ⊕ Y)) ↔ ¬IsMeagre (univ : Set X) ∨ ¬IsMeagre (univ : Set Y)
Proof
:= by
  rw [isMeagre_univ_sum_iff, not_and_or]

On this site: Theorem: A disjoint sum is of second category iff some summand is

Hyperconnectedness, ultraconnectedness and strong connectedness

variable {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y]

Sums

theorem sum_retract_left

TopologyByExample.sum_retract_left

The retraction of X ⊕ Y onto X sending Y to a chosen point is a continuous surjection.

private theorem sum_retract_left (x₀ : X) :
    Function.Surjective (Sum.elim id fun _ : Y ↦ x₀) ∧
      Continuous (Sum.elim id fun _ : Y ↦ x₀)
Proof
:=
  ⟨fun x ↦ ⟨.inl x, rfl⟩, continuous_id.sumElim continuous_const⟩

theorem sum_retract_right

TopologyByExample.sum_retract_right

The retraction of X ⊕ Y onto Y sending X to a chosen point is a continuous surjection.

private theorem sum_retract_right (y₀ : Y) :
    Function.Surjective (Sum.elim (fun _ : X ↦ y₀) id) ∧
      Continuous (Sum.elim (fun _ : X ↦ y₀) id)
Proof
:=
  ⟨fun y ↦ ⟨.inr y, rfl⟩, continuous_const.sumElim continuous_id⟩

theorem preirreducibleSpace_of_sum_left

TopologyByExample.preirreducibleSpace_of_sum_left

If a sum is hyperconnected, so is its left summand.

theorem preirreducibleSpace_of_sum_left [PreirreducibleSpace (X ⊕ Y)] : PreirreducibleSpace X
Proof
:=
  Topology.IsOpenEmbedding.preirreducibleSpace (f := (Sum.inl : X → X ⊕ Y)) .inl

On this site: Theorem: If a disjoint sum is hyperconnected, so are both summands

theorem preirreducibleSpace_of_sum_right

TopologyByExample.preirreducibleSpace_of_sum_right

If a sum is hyperconnected, so is its right summand.

theorem preirreducibleSpace_of_sum_right [PreirreducibleSpace (X ⊕ Y)] : PreirreducibleSpace Y
Proof
:=
  Topology.IsOpenEmbedding.preirreducibleSpace (f := (Sum.inr : Y → X ⊕ Y)) .inr

theorem ultraconnectedSpace_of_sum_left

TopologyByExample.ultraconnectedSpace_of_sum_left

If a sum is ultraconnected, so is its left summand.

theorem ultraconnectedSpace_of_sum_left [UltraconnectedSpace (X ⊕ Y)] : UltraconnectedSpace X
Proof
:= by
  rcases isEmpty_or_nonempty X with _ | ⟨⟨x₀⟩⟩
  · infer_instance
  · exact ultraconnectedSpace_of_surjective (sum_retract_left (Y := Y) x₀).1
      (sum_retract_left x₀).2

On this site: Theorem: If a disjoint sum is ultraconnected, so are both summands

theorem ultraconnectedSpace_of_sum_right

TopologyByExample.ultraconnectedSpace_of_sum_right

If a sum is ultraconnected, so is its right summand.

theorem ultraconnectedSpace_of_sum_right [UltraconnectedSpace (X ⊕ Y)] :
    UltraconnectedSpace Y
Proof
:= by
  rcases isEmpty_or_nonempty Y with _ | ⟨⟨y₀⟩⟩
  · infer_instance
  · exact ultraconnectedSpace_of_surjective (sum_retract_right (X := X) y₀).1
      (sum_retract_right y₀).2

theorem stronglyConnectedSpace_of_sum_left

TopologyByExample.stronglyConnectedSpace_of_sum_left

If a sum is strongly connected, so is its left summand.

theorem stronglyConnectedSpace_of_sum_left [StronglyConnectedSpace (X ⊕ Y)] :
    StronglyConnectedSpace X
Proof
:= by
  rcases isEmpty_or_nonempty X with _ | ⟨⟨x₀⟩⟩
  · infer_instance
  · exact stronglyConnectedSpace_of_surjective (sum_retract_left (Y := Y) x₀).1
      (sum_retract_left x₀).2

On this site: Theorem: If a disjoint sum is strongly connected, so are both summands

theorem stronglyConnectedSpace_of_sum_right

TopologyByExample.stronglyConnectedSpace_of_sum_right

If a sum is strongly connected, so is its right summand.

theorem stronglyConnectedSpace_of_sum_right [StronglyConnectedSpace (X ⊕ Y)] :
    StronglyConnectedSpace Y
Proof
:= by
  rcases isEmpty_or_nonempty Y with _ | ⟨⟨y₀⟩⟩
  · infer_instance
  · exact stronglyConnectedSpace_of_surjective (sum_retract_right (X := X) y₀).1
      (sum_retract_right y₀).2

theorem not_stronglyConnectedSpace_sum

TopologyByExample.not_stronglyConnectedSpace_sum

A sum of two nonempty spaces is not strongly connected, since it is not preconnected.

theorem not_stronglyConnectedSpace_sum [Nonempty X] [Nonempty Y] :
    ¬StronglyConnectedSpace (X ⊕ Y)
Proof
:= fun _ ↦
  not_preconnectedSpace_sum (X := X) (Y := Y) inferInstance

On this site: Theorem: A disjoint sum of two nonempty spaces is not strongly connected

theorem not_preirreducibleSpace_sum

TopologyByExample.not_preirreducibleSpace_sum

A sum of two nonempty spaces is not hyperconnected.

theorem not_preirreducibleSpace_sum [Nonempty X] [Nonempty Y] :
    ¬PreirreducibleSpace (X ⊕ Y)
Proof
:= fun _ ↦
  not_stronglyConnectedSpace_sum (X := X) (Y := Y) inferInstance

On this site: Theorem: A disjoint sum of two nonempty spaces is not hyperconnected

theorem not_ultraconnectedSpace_sum

TopologyByExample.not_ultraconnectedSpace_sum

A sum of two nonempty spaces is not ultraconnected.

theorem not_ultraconnectedSpace_sum [Nonempty X] [Nonempty Y] :
    ¬UltraconnectedSpace (X ⊕ Y)
Proof
:= fun _ ↦
  not_stronglyConnectedSpace_sum (X := X) (Y := Y) inferInstance

On this site: Theorem: A disjoint sum of two nonempty spaces is not ultraconnected

Discreteness, scatteredness, extremal disconnectedness and total path disconnectedness

variable {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y]

Disjoint sums

theorem discreteTopology_sum_iff

TopologyByExample.discreteTopology_sum_iff

A disjoint sum is discrete if and only if both summands are.

theorem discreteTopology_sum_iff :
    DiscreteTopology (X ⊕ Y) ↔ DiscreteTopology X ∧ DiscreteTopology Y
Proof
:=
  ⟨fun _ ↦ ⟨(IsEmbedding.inl (Y := Y)).discreteTopology,
    (IsEmbedding.inr (X := X)).discreteTopology⟩, fun ⟨_, _⟩ ↦ inferInstance⟩

On this site: Theorem: A disjoint sum is discrete iff both summands are

instance

The disjoint sum of two scattered spaces is scattered.

instance [ScatteredSpace X] [ScatteredSpace Y] : ScatteredSpace (X ⊕ Y)
Proof
:= by
  refine scatteredSpace_iff_exists_isolated.2 fun s ⟨z, hz⟩ ↦ ?_
  cases z with
  | inl x => exact ScatteredSpace.exists_isolated_of_isOpenEmbedding .inl ⟨_, hz, x, rfl⟩
  | inr y => exact ScatteredSpace.exists_isolated_of_isOpenEmbedding .inr ⟨_, hz, y, rfl⟩

theorem scatteredSpace_sum_iff

TopologyByExample.scatteredSpace_sum_iff

A disjoint sum is scattered if and only if both summands are.

theorem scatteredSpace_sum_iff :
    ScatteredSpace (X ⊕ Y) ↔ ScatteredSpace X ∧ ScatteredSpace Y
Proof
:=
  ⟨fun _ ↦ ⟨ScatteredSpace.of_injective (f := (Sum.inl : X → X ⊕ Y)) Sum.inl_injective
      continuous_inl,
    ScatteredSpace.of_injective (f := (Sum.inr : Y → X ⊕ Y)) Sum.inr_injective continuous_inr⟩,
    fun ⟨_, _⟩ ↦ inferInstance⟩

On this site: Theorem: A disjoint sum is scattered iff both summands are

instance

The disjoint sum of two totally path disconnected spaces is totally path disconnected.

instance [TotallyPathDisconnectedSpace X] [TotallyPathDisconnectedSpace Y] :
    TotallyPathDisconnectedSpace (X ⊕ Y)
Proof
:= by
  refine ⟨fun a b h ↦ ?_⟩
  have side := TotallyPathDisconnectedSpace.eq_of_joined _ _
    (h.map (f := Sum.elim (fun _ ↦ true) (fun _ ↦ false))
      (continuous_const.sumElim continuous_const))
  cases a with
  | inl x =>
    cases b with
    | inl x' =>
      exact congrArg Sum.inl (TotallyPathDisconnectedSpace.eq_of_joined _ _
        (h.map (f := Sum.elim id fun _ ↦ x) (continuous_id.sumElim continuous_const)))
    | inr y => simp at side
  | inr y =>
    cases b with
    | inl x => simp at side
    | inr y' =>
      exact congrArg Sum.inr (TotallyPathDisconnectedSpace.eq_of_joined _ _
        (h.map (f := Sum.elim (fun _ ↦ y) id) (continuous_const.sumElim continuous_id)))

theorem totallyPathDisconnectedSpace_sum_iff

TopologyByExample.totallyPathDisconnectedSpace_sum_iff

A disjoint sum is totally path disconnected if and only if both summands are.

theorem totallyPathDisconnectedSpace_sum_iff :
    TotallyPathDisconnectedSpace (X ⊕ Y) ↔
      TotallyPathDisconnectedSpace X ∧ TotallyPathDisconnectedSpace Y
Proof
:=
  ⟨fun _ ↦ ⟨TotallyPathDisconnectedSpace.of_injective (f := (Sum.inl : X → X ⊕ Y))
      Sum.inl_injective continuous_inl,
    TotallyPathDisconnectedSpace.of_injective (f := (Sum.inr : Y → X ⊕ Y))
      Sum.inr_injective continuous_inr⟩,
    fun ⟨_, _⟩ ↦ inferInstance⟩

On this site: Theorem: A disjoint sum is totally path disconnected iff both summands are

instance instExtremallyDisconnectedSum

TopologyByExample.instExtremallyDisconnectedSum

The disjoint sum of two extremally disconnected spaces is extremally disconnected.

instance instExtremallyDisconnectedSum [ExtremallyDisconnected X] [ExtremallyDisconnected Y] :
    ExtremallyDisconnected (X ⊕ Y)
Proof
:= by
  refine ⟨fun U hU ↦ ?_⟩
  rw [isOpen_sum_iff] at hU ⊢
  rw [IsOpenEmbedding.inl.isOpenMap.preimage_closure_eq_closure_preimage continuous_inl,
    IsOpenEmbedding.inr.isOpenMap.preimage_closure_eq_closure_preimage continuous_inr]
  exact ⟨ExtremallyDisconnected.open_closure _ hU.1, ExtremallyDisconnected.open_closure _ hU.2⟩

theorem extremallyDisconnected_sum_iff

TopologyByExample.extremallyDisconnected_sum_iff

A disjoint sum is extremally disconnected if and only if both summands are.

theorem extremallyDisconnected_sum_iff :
    ExtremallyDisconnected (X ⊕ Y) ↔ ExtremallyDisconnected X ∧ ExtremallyDisconnected Y
Proof
:=
  ⟨fun _ ↦ ⟨ExtremallyDisconnected.of_isOpenEmbedding (IsOpenEmbedding.inl (Y := Y)),
    ExtremallyDisconnected.of_isOpenEmbedding (IsOpenEmbedding.inr (X := X))⟩,
    fun ⟨_, _⟩ ↦ inferInstance⟩

On this site: Theorem: A disjoint sum is extremally disconnected iff both summands are

Paracompactness, countable paracompactness and the countable chain condition

variable {X Y : Type*} [TopologicalSpace X] [TopologicalSpace Y]

theorem ccc_sum_iff

TopologyByExample.ccc_sum_iff

A disjoint sum satisfies the countable chain condition if and only if both summands do.

theorem ccc_sum_iff :
    (∀ S : Set (Set (X ⊕ Y)), (∀ s ∈ S, IsOpen s ∧ s.Nonempty) → S.PairwiseDisjoint id →
      S.Countable) ↔
    (∀ S : Set (Set X), (∀ s ∈ S, IsOpen s ∧ s.Nonempty) → S.PairwiseDisjoint id →
      S.Countable) ∧
    (∀ S : Set (Set Y), (∀ s ∈ S, IsOpen s ∧ s.Nonempty) → S.PairwiseDisjoint id →
      S.Countable)
Proof
:= by
  refine ⟨fun h ↦ ⟨ccc_of_isOpenEmbedding .inl h, ccc_of_isOpenEmbedding .inr h⟩,
    fun ⟨hX, hY⟩ S hS hd ↦ ?_⟩
  refine ((countable_setOf_preimage_nonempty_of_ccc continuous_inl hX (fun s hs ↦ (hS s hs).1)
    hd).union (countable_setOf_preimage_nonempty_of_ccc continuous_inr hY
      (fun s hs ↦ (hS s hs).1) hd)).mono fun s hs ↦ ?_
  obtain ⟨x | y, hz⟩ := (hS s hs).2
  · exact Or.inl ⟨hs, x, hz⟩
  · exact Or.inr ⟨hs, y, hz⟩

On this site: Theorem: A disjoint sum satisfies the countable chain condition iff both summands do

Disjoint sums

theorem exists_refinement_sum

TopologyByExample.exists_refinement_sum

Locally finite open refinements of the traces of a cover on the two summands give one of the cover of the disjoint sum.

private theorem exists_refinement_sum {U : Set (Set (X ⊕ Y))}
    {V₁ : Set (Set X)} (hV₁o : ∀ v ∈ V₁, IsOpen v) (hV₁ : ⋃₀ V₁ = univ)
    (hV₁f : LocallyFinite (fun v : V₁ ↦ (v : Set X)))
    (hV₁U : ∀ v ∈ V₁, ∃ u ∈ preimage Sum.inl '' U, v ⊆ u)
    {V₂ : Set (Set Y)} (hV₂o : ∀ v ∈ V₂, IsOpen v) (hV₂ : ⋃₀ V₂ = univ)
    (hV₂f : LocallyFinite (fun v : V₂ ↦ (v : Set Y)))
    (hV₂U : ∀ v ∈ V₂, ∃ u ∈ preimage Sum.inr '' U, v ⊆ u) :
    ∃ V : Set (Set (X ⊕ Y)), (∀ v ∈ V, IsOpen v) ∧ ⋃₀ V = univ ∧
      LocallyFinite (fun v : V ↦ (v : Set (X ⊕ Y))) ∧ ∀ v ∈ V, ∃ u ∈ U, v ⊆ u
Proof
:= by
  refine ⟨image Sum.inl '' V₁ ∪ image Sum.inr '' V₂, ?_, ?_, ?_, ?_⟩
  · rintro _ (⟨v, hv, rfl⟩ | ⟨v, hv, rfl⟩)
    · exact isOpenMap_inl v (hV₁o v hv)
    · exact isOpenMap_inr v (hV₂o v hv)
  · refine eq_univ_of_forall ?_
    rintro (x | y)
    · obtain ⟨v, hv, hxv⟩ := mem_sUnion.1 (hV₁.symm ▸ mem_univ x : x ∈ ⋃₀ V₁)
      exact mem_sUnion.2 ⟨Sum.inl '' v, Or.inl ⟨v, hv, rfl⟩, mem_image_of_mem _ hxv⟩
    · obtain ⟨v, hv, hyv⟩ := mem_sUnion.1 (hV₂.symm ▸ mem_univ y : y ∈ ⋃₀ V₂)
      exact mem_sUnion.2 ⟨Sum.inr '' v, Or.inr ⟨v, hv, rfl⟩, mem_image_of_mem _ hyv⟩
  · refine locallyFinite_subtype_iff.2 ?_
    rintro (x | y)
    · obtain ⟨t, ht, htf⟩ := locallyFinite_subtype_iff.1 hV₁f x
      refine ⟨Sum.inl '' t, isOpenMap_inl.image_mem_nhds ht,
        (htf.image (image Sum.inl)).subset ?_⟩
      rintro _ ⟨⟨v, hv, rfl⟩ | ⟨v, hv, rfl⟩, z, ⟨a, ha, rfl⟩, ⟨b, hb, hba⟩⟩
      · exact ⟨v, ⟨hv, a, ha, Sum.inl_injective hba ▸ hb⟩, rfl⟩
      · exact absurd hba Sum.inl_ne_inr
    · obtain ⟨t, ht, htf⟩ := locallyFinite_subtype_iff.1 hV₂f y
      refine ⟨Sum.inr '' t, isOpenMap_inr.image_mem_nhds ht,
        (htf.image (image Sum.inr)).subset ?_⟩
      rintro _ ⟨⟨v, hv, rfl⟩ | ⟨v, hv, rfl⟩, z, ⟨a, ha, rfl⟩, ⟨b, hb, hba⟩⟩
      · exact absurd hba Sum.inr_ne_inl
      · exact ⟨v, ⟨hv, a, ha, Sum.inr_injective hba ▸ hb⟩, rfl⟩
  · rintro _ (⟨v, hv, rfl⟩ | ⟨v, hv, rfl⟩)
    · obtain ⟨_, ⟨u, hu, rfl⟩, hvu⟩ := hV₁U v hv
      exact ⟨u, hu, image_subset_iff.2 hvu⟩
    · obtain ⟨_, ⟨u, hu, rfl⟩, hvu⟩ := hV₂U v hv
      exact ⟨u, hu, image_subset_iff.2 hvu⟩
omit [TopologicalSpace X] [TopologicalSpace Y] in

theorem sUnion_preimage_inl

TopologyByExample.sUnion_preimage_inl

The traces of an open cover of a disjoint sum on the first summand are an open cover of it.

private theorem sUnion_preimage_inl {U : Set (Set (X ⊕ Y))} (hU : ⋃₀ U = univ) :
    ⋃₀ (preimage (Sum.inl : X → X ⊕ Y) '' U) = univ
Proof
:= by
  rw [sUnion_image, ← preimage_iUnion₂, ← sUnion_eq_biUnion, hU, preimage_univ]
omit [TopologicalSpace X] [TopologicalSpace Y] in

theorem sUnion_preimage_inr

TopologyByExample.sUnion_preimage_inr

The traces of an open cover of a disjoint sum on the second summand are an open cover of it.

private theorem sUnion_preimage_inr {U : Set (Set (X ⊕ Y))} (hU : ⋃₀ U = univ) :
    ⋃₀ (preimage (Sum.inr : Y → X ⊕ Y) '' U) = univ
Proof
:= by
  rw [sUnion_image, ← preimage_iUnion₂, ← sUnion_eq_biUnion, hU, preimage_univ]

instance

A disjoint sum of paracompact spaces is paracompact.

instance [ParacompactSpace X] [ParacompactSpace Y] : ParacompactSpace (X ⊕ Y)
Proof
:= by
  refine paracompactSpace_iff_sets.2 fun U hUo hU ↦ ?_
  obtain ⟨V₁, hV₁o, hV₁, hV₁f, hV₁U⟩ := paracompactSpace_iff_sets.1 ‹ParacompactSpace X›
    (preimage Sum.inl '' U) (forall_mem_image.2 fun u hu ↦ (hUo u hu).preimage continuous_inl)
    (sUnion_preimage_inl hU)
  obtain ⟨V₂, hV₂o, hV₂, hV₂f, hV₂U⟩ := paracompactSpace_iff_sets.1 ‹ParacompactSpace Y›
    (preimage Sum.inr '' U) (forall_mem_image.2 fun u hu ↦ (hUo u hu).preimage continuous_inr)
    (sUnion_preimage_inr hU)
  exact exists_refinement_sum hV₁o hV₁ hV₁f hV₁U hV₂o hV₂ hV₂f hV₂U

instance

A disjoint sum of countably paracompact spaces is countably paracompact.

instance [CountablyParacompactSpace X] [CountablyParacompactSpace Y] :
    CountablyParacompactSpace (X ⊕ Y)
Proof
:= by
  refine ⟨fun U hUc hUo hU ↦ ?_⟩
  obtain ⟨V₁, hV₁o, hV₁, hV₁f, hV₁U⟩ := CountablyParacompactSpace.locallyFinite_refinement
    (preimage Sum.inl '' U) (hUc.image _)
    (forall_mem_image.2 fun u hu ↦ (hUo u hu).preimage continuous_inl) (sUnion_preimage_inl hU)
  obtain ⟨V₂, hV₂o, hV₂, hV₂f, hV₂U⟩ := CountablyParacompactSpace.locallyFinite_refinement
    (preimage Sum.inr '' U) (hUc.image _)
    (forall_mem_image.2 fun u hu ↦ (hUo u hu).preimage continuous_inr) (sUnion_preimage_inr hU)
  exact exists_refinement_sum hV₁o hV₁ hV₁f hV₁U hV₂o hV₂ hV₂f hV₂U

theorem paracompactSpace_sum_iff

TopologyByExample.paracompactSpace_sum_iff

A disjoint sum is paracompact if and only if both summands are.

theorem paracompactSpace_sum_iff :
    ParacompactSpace (X ⊕ Y) ↔ ParacompactSpace X ∧ ParacompactSpace Y
Proof
:=
  ⟨fun _ ↦ ⟨(IsClosedEmbedding.inl (Y := Y)).paracompactSpace,
    (IsClosedEmbedding.inr (X := X)).paracompactSpace⟩,
    fun ⟨_, _⟩ ↦ inferInstance⟩

On this site: Theorem: A disjoint sum is paracompact iff both summands are

theorem countablyParacompactSpace_sum_iff

TopologyByExample.countablyParacompactSpace_sum_iff

A disjoint sum is countably paracompact if and only if both summands are.

theorem countablyParacompactSpace_sum_iff :
    CountablyParacompactSpace (X ⊕ Y) ↔ CountablyParacompactSpace X ∧ CountablyParacompactSpace Y
Proof
:=
  ⟨fun _ ↦ ⟨(IsClosedEmbedding.inl (Y := Y)).countablyParacompactSpace,
    (IsClosedEmbedding.inr (X := X)).countablyParacompactSpace⟩, fun ⟨_, _⟩ ↦ inferInstance⟩

On this site: Theorem: A disjoint sum is countably paracompact iff both summands are

Disjoint sums of families

variable {ι : Type*} {X : ι → Type*} [∀ i, TopologicalSpace (X i)]

theorem sigma

TopologyByExample.SeparatedNhds.sigma

Two sets of a disjoint sum have disjoint open neighbourhoods if their traces on each summand do.

theorem SeparatedNhds.sigma {s t : Set (Σ i, X i)}
    (h : ∀ i, SeparatedNhds (Sigma.mk i ⁻¹' s) (Sigma.mk i ⁻¹' t)) : SeparatedNhds s t
Proof
:= by
  choose U V hU hV hsU htV hUV using h
  refine ⟨{p | p.2 ∈ U p.1}, {p | p.2 ∈ V p.1}, isOpen_sigma_iff.2 hU, isOpen_sigma_iff.2 hV,
    fun ⟨i, x⟩ hx ↦ hsU i hx, fun ⟨i, x⟩ hx ↦ htV i hx, ?_⟩
  exact Set.disjoint_left.2 fun ⟨i, x⟩ hU' hV' ↦ Set.disjoint_left.1 (hUV i) hU' hV'

instance

A disjoint sum of normal spaces is normal.

instance [∀ i, NormalSpace (X i)] : NormalSpace (Σ i, X i)
Proof
where
  normal s t hs ht hst := by
    rw [isClosed_sigma_iff] at hs ht
    exact SeparatedNhds.sigma fun i ↦ normal_separation (hs i) (ht i) (hst.preimage _)

instance

A disjoint sum of completely normal spaces is completely normal.

instance [∀ i, CompletelyNormalSpace (X i)] : CompletelyNormalSpace (Σ i, X i)
Proof
where
  completely_normal s t hst hts := by
    rw [← separatedNhds_iff_disjoint]
    refine SeparatedNhds.sigma fun i ↦ separatedNhds_iff_disjoint.2 (completely_normal ?_ ?_)
    · rw [← isOpenMap_sigmaMk.preimage_closure_eq_closure_preimage continuous_sigmaMk]
      exact hst.preimage _
    · rw [← isOpenMap_sigmaMk.preimage_closure_eq_closure_preimage continuous_sigmaMk]
      exact hts.preimage _

instance

A disjoint sum of perfectly normal spaces is perfectly normal: a closed set is the zero set of the function that is, on each summand, a function whose zero set is its trace there.

instance [∀ i, PerfectlyNormalSpace (X i)] : PerfectlyNormalSpace (Σ i, X i)
Proof
:= by
  refine perfectlyNormalSpace_iff_forall_isClosed_preimage_zero.2 fun s hs ↦ ?_
  rw [isClosed_sigma_iff] at hs
  choose f hfs hf using fun i ↦
    perfectlyNormalSpace_iff_forall_isClosed_preimage_zero.1 inferInstance _ (hs i)
  refine ⟨⟨fun p ↦ f p.1 p.2, continuous_sigma fun i ↦ (f i).continuous⟩, ?_, ?_⟩
  · ext ⟨i, x⟩
    exact Set.ext_iff.1 (hfs i) x
  · exact fun ⟨i, x⟩ ↦ hf i x

theorem isRegularOpen_sigma_iff

TopologyByExample.isRegularOpen_sigma_iff

A set of a disjoint sum is regular open if and only if its traces on all summands are.

theorem isRegularOpen_sigma_iff {s : Set (Σ i, X i)} :
    IsRegularOpen s ↔ ∀ i, IsRegularOpen (Sigma.mk i ⁻¹' s)
Proof
:= by
  simp only [IsRegularOpen, ← isOpenMap_sigmaMk.preimage_closure_eq_closure_preimage
    continuous_sigmaMk, ← isOpenMap_sigmaMk.preimage_interior_eq_interior_preimage
    continuous_sigmaMk]
  refine ⟨fun h i ↦ by rw [h], fun h ↦ ?_⟩
  ext ⟨i, x⟩
  exact Set.ext_iff.1 (h i) x

instance

A disjoint sum of semiregular spaces is semiregular.

instance [∀ i, SemiregularSpace (X i)] : SemiregularSpace (Σ i, X i)
Proof
:= by
  rw [semiregularSpace_iff_isRegularOpen]
  refine isTopologicalBasis_of_isOpen_of_nhds (fun _ hs ↦ IsRegularOpen.isOpen hs) ?_
  rintro ⟨i, x⟩ U hx hU
  obtain ⟨V, hV, hxV, hVU⟩ :=
    (semiregularSpace_iff_isRegularOpen.1 inferInstance).exists_subset_of_mem_open
      (show x ∈ Sigma.mk i ⁻¹' U from hx) (hU.preimage continuous_sigmaMk)
  refine ⟨Sigma.mk i '' V, isRegularOpen_sigma_iff.2 fun j ↦ ?_, mem_image_of_mem _ hxV,
    image_subset_iff.2 hVU⟩
  by_cases h : j = i
  · subst h
    rwa [preimage_image_eq _ sigma_mk_injective]
  · have h' : Sigma.mk j ⁻¹' (Sigma.mk i '' V) = ∅ := eq_empty_of_forall_notMem fun y hy ↦ by
      obtain ⟨z, -, hzy⟩ := hy
      exact h (congrArg Sigma.fst hzy).symm
    rw [h']
    exact isRegularOpen_empty

theorem exists_refinement_sigma

TopologyByExample.exists_refinement_sigma

Locally finite open refinements of the traces of a cover on each summand give one of the cover of the disjoint sum.

private theorem exists_refinement_sigma {U : Set (Set (Σ i, X i))} (V : ∀ i, Set (Set (X i)))
    (hVo : ∀ i, ∀ v ∈ V i, IsOpen v) (hV : ∀ i, ⋃₀ V i = univ)
    (hVf : ∀ i, LocallyFinite (fun v : V i ↦ (v : Set (X i))))
    (hVU : ∀ i, ∀ v ∈ V i, ∃ u ∈ preimage (Sigma.mk i) '' U, v ⊆ u) :
    ∃ W : Set (Set (Σ i, X i)), (∀ w ∈ W, IsOpen w) ∧ ⋃₀ W = univ ∧
      LocallyFinite (fun w : W ↦ (w : Set (Σ i, X i))) ∧ ∀ w ∈ W, ∃ u ∈ U, w ⊆ u
Proof
:= by
  refine ⟨⋃ i, image (Sigma.mk i) '' V i, ?_, ?_, ?_, ?_⟩
  · simp only [mem_iUnion, mem_image]
    rintro _ ⟨i, v, hv, rfl⟩
    exact isOpenMap_sigmaMk v (hVo i v hv)
  · refine eq_univ_of_forall fun ⟨i, x⟩ ↦ ?_
    obtain ⟨v, hv, hxv⟩ := mem_sUnion.1 ((hV i).symm ▸ mem_univ x : x ∈ ⋃₀ V i)
    exact mem_sUnion.2 ⟨Sigma.mk i '' v, mem_iUnion.2 ⟨i, v, hv, rfl⟩, mem_image_of_mem _ hxv⟩
  · refine locallyFinite_subtype_iff.2 fun ⟨i, x⟩ ↦ ?_
    obtain ⟨t, ht, htf⟩ := locallyFinite_subtype_iff.1 (hVf i) x
    refine ⟨Sigma.mk i '' t, isOpenMap_sigmaMk.image_mem_nhds ht,
      (htf.image (image (Sigma.mk i))).subset ?_⟩
    rintro w ⟨hw, z, hzw, hzt⟩
    obtain ⟨j, v, hv, rfl⟩ := mem_iUnion.1 hw
    obtain ⟨a, ha, rfl⟩ := hzw
    obtain ⟨b, hb, hba⟩ := hzt
    obtain ⟨rfl, hab⟩ := Sigma.mk.inj_iff.1 hba
    exact ⟨v, ⟨hv, a, ha, eq_of_heq hab ▸ hb⟩, rfl⟩
  · simp only [mem_iUnion, mem_image]
    rintro _ ⟨i, v, hv, rfl⟩
    obtain ⟨_, ⟨u, hu, rfl⟩, hvu⟩ := hVU i v hv
    exact ⟨u, hu, image_subset_iff.2 hvu⟩
omit [∀ i, TopologicalSpace (X i)] in

theorem sUnion_preimage_sigmaMk

TopologyByExample.sUnion_preimage_sigmaMk

The traces of a cover of a disjoint sum on a summand cover it.

private theorem sUnion_preimage_sigmaMk {U : Set (Set (Σ i, X i))} (hU : ⋃₀ U = univ) (i : ι) :
    ⋃₀ (preimage (Sigma.mk i) '' U) = univ
Proof
:= by
  rw [sUnion_image, ← preimage_iUnion₂, ← sUnion_eq_biUnion, hU, preimage_univ]

instance

A disjoint sum of paracompact spaces is paracompact.

instance [∀ i, ParacompactSpace (X i)] : ParacompactSpace (Σ i, X i)
Proof
:= by
  refine paracompactSpace_iff_sets.2 fun U hUo hU ↦ ?_
  choose V hVo hV hVf hVU using fun i ↦ paracompactSpace_iff_sets.1 (inferInstance :
    ParacompactSpace (X i)) (preimage (Sigma.mk i) '' U)
    (forall_mem_image.2 fun u hu ↦ (hUo u hu).preimage continuous_sigmaMk)
    (sUnion_preimage_sigmaMk hU i)
  exact exists_refinement_sigma V hVo hV hVf hVU

instance

A disjoint sum of countably paracompact spaces is countably paracompact.

instance [∀ i, CountablyParacompactSpace (X i)] : CountablyParacompactSpace (Σ i, X i)
Proof
:= by
  refine ⟨fun U hUc hUo hU ↦ ?_⟩
  choose V hVo hV hVf hVU using fun i ↦ CountablyParacompactSpace.locallyFinite_refinement
    (preimage (Sigma.mk i) '' U) (hUc.image _)
    (forall_mem_image.2 fun u hu ↦ (hUo u hu).preimage continuous_sigmaMk)
    (sUnion_preimage_sigmaMk hU i)
  exact exists_refinement_sigma V hVo hV hVf hVU

On this site: Space: Sum of a point and the Sierpiński space