# Documentation

Mathlib.Topology.Connected

# Connected subsets of topological spaces #

In this file we define connected subsets of a topological spaces and various other properties and classes related to connectivity.

## Main definitions #

We define the following properties for sets in a topological space:

• IsConnected: a nonempty set that has no non-trivial open partition. See also the section below in the module doc.
• connectedComponent is the connected component of an element in the space.
• IsTotallyDisconnected: all of its connected components are singletons.
• IsTotallySeparated: any two points can be separated by two disjoint opens that cover the set.

For each of these definitions, we also have a class stating that the whole space satisfies that property: ConnectedSpace, TotallyDisconnectedSpace, TotallySeparatedSpace.

## On the definition of connected sets/spaces #

In informal mathematics, connected spaces are assumed to be nonempty. We formalise the predicate without that assumption as IsPreconnected. In other words, the only difference is whether the empty space counts as connected. There are good reasons to consider the empty space to be “too simple to be simple” See also https://ncatlab.org/nlab/show/too+simple+to+be+simple, and in particular https://ncatlab.org/nlab/show/too+simple+to+be+simple#relationship_to_biased_definitions.

def IsPreconnected {α : Type u} [] (s : Set α) :

A preconnected set is one where there is no non-trivial open partition.

Instances For
def IsConnected {α : Type u} [] (s : Set α) :

A connected set is one that is nonempty and where there is no non-trivial open partition.

Instances For
theorem IsConnected.nonempty {α : Type u} [] {s : Set α} (h : ) :
theorem IsConnected.isPreconnected {α : Type u} [] {s : Set α} (h : ) :
theorem IsPreirreducible.isPreconnected {α : Type u} [] {s : Set α} (H : ) :
theorem IsIrreducible.isConnected {α : Type u} [] {s : Set α} (H : ) :
theorem isPreconnected_empty {α : Type u} [] :
theorem isConnected_singleton {α : Type u} [] {x : α} :
theorem isPreconnected_singleton {α : Type u} [] {x : α} :
theorem Set.Subsingleton.isPreconnected {α : Type u} [] {s : Set α} (hs : ) :
theorem isPreconnected_of_forall {α : Type u} [] {s : Set α} (x : α) (H : ∀ (y : α), y st, t s x t y t ) :

If any point of a set is joined to a fixed point by a preconnected subset, then the original set is preconnected as well.

theorem isPreconnected_of_forall_pair {α : Type u} [] {s : Set α} (H : ∀ (x : α), x s∀ (y : α), y st, t s x t y t ) :

If any two points of a set are contained in a preconnected subset, then the original set is preconnected as well.

theorem isPreconnected_sUnion {α : Type u} [] (x : α) (c : Set (Set α)) (H1 : ∀ (s : Set α), s cx s) (H2 : ∀ (s : Set α), s c) :

A union of a family of preconnected sets with a common point is preconnected as well.

theorem isPreconnected_iUnion {α : Type u} [] {ι : Sort u_3} {s : ιSet α} (h₁ : Set.Nonempty (⋂ (i : ι), s i)) (h₂ : ∀ (i : ι), IsPreconnected (s i)) :
IsPreconnected (⋃ (i : ι), s i)
theorem IsPreconnected.union {α : Type u} [] (x : α) {s : Set α} {t : Set α} (H1 : x s) (H2 : x t) (H3 : ) (H4 : ) :
theorem IsPreconnected.union' {α : Type u} [] {s : Set α} {t : Set α} (H : Set.Nonempty (s t)) (hs : ) (ht : ) :
theorem IsConnected.union {α : Type u} [] {s : Set α} {t : Set α} (H : Set.Nonempty (s t)) (Hs : ) (Ht : ) :
theorem IsPreconnected.sUnion_directed {α : Type u} [] {S : Set (Set α)} (K : DirectedOn (fun x x_1 => x x_1) S) (H : ∀ (s : Set α), s S) :

The directed sUnion of a set S of preconnected subsets is preconnected.

theorem IsPreconnected.biUnion_of_reflTransGen {α : Type u} [] {ι : Type u_3} {t : Set ι} {s : ιSet α} (H : ∀ (i : ι), i tIsPreconnected (s i)) (K : ∀ (i : ι), i t∀ (j : ι), j tRelation.ReflTransGen (fun i j => Set.Nonempty (s i s j) i t) i j) :
IsPreconnected (⋃ (n : ι) (_ : n t), s n)

The biUnion of a family of preconnected sets is preconnected if the graph determined by whether two sets intersect is preconnected.

theorem IsConnected.biUnion_of_reflTransGen {α : Type u} [] {ι : Type u_3} {t : Set ι} {s : ιSet α} (ht : ) (H : ∀ (i : ι), i tIsConnected (s i)) (K : ∀ (i : ι), i t∀ (j : ι), j tRelation.ReflTransGen (fun i j => Set.Nonempty (s i s j) i t) i j) :
IsConnected (⋃ (n : ι) (_ : n t), s n)

The biUnion of a family of preconnected sets is preconnected if the graph determined by whether two sets intersect is preconnected.

theorem IsPreconnected.iUnion_of_reflTransGen {α : Type u} [] {ι : Type u_3} {s : ιSet α} (H : ∀ (i : ι), IsPreconnected (s i)) (K : ∀ (i j : ι), Relation.ReflTransGen (fun i j => Set.Nonempty (s i s j)) i j) :
IsPreconnected (⋃ (n : ι), s n)

Preconnectedness of the iUnion of a family of preconnected sets indexed by the vertices of a preconnected graph, where two vertices are joined when the corresponding sets intersect.

theorem IsConnected.iUnion_of_reflTransGen {α : Type u} [] {ι : Type u_3} [] {s : ιSet α} (H : ∀ (i : ι), IsConnected (s i)) (K : ∀ (i j : ι), Relation.ReflTransGen (fun i j => Set.Nonempty (s i s j)) i j) :
IsConnected (⋃ (n : ι), s n)
theorem IsPreconnected.iUnion_of_chain {α : Type u} {β : Type v} [] [] [] {s : βSet α} (H : ∀ (n : β), IsPreconnected (s n)) (K : ∀ (n : β), Set.Nonempty (s n s ())) :
IsPreconnected (⋃ (n : β), s n)

The iUnion of connected sets indexed by a type with an archimedean successor (like ℕ or ℤ) such that any two neighboring sets meet is preconnected.

theorem IsConnected.iUnion_of_chain {α : Type u} {β : Type v} [] [] [] [] {s : βSet α} (H : ∀ (n : β), IsConnected (s n)) (K : ∀ (n : β), Set.Nonempty (s n s ())) :
IsConnected (⋃ (n : β), s n)

The iUnion of connected sets indexed by a type with an archimedean successor (like ℕ or ℤ) such that any two neighboring sets meet is connected.

theorem IsPreconnected.biUnion_of_chain {α : Type u} {β : Type v} [] [] [] {s : βSet α} {t : Set β} (ht : ) (H : ∀ (n : β), n tIsPreconnected (s n)) (K : ∀ (n : β), n t tSet.Nonempty (s n s ())) :
IsPreconnected (⋃ (n : β) (_ : n t), s n)

The iUnion of preconnected sets indexed by a subset of a type with an archimedean successor (like ℕ or ℤ) such that any two neighboring sets meet is preconnected.

theorem IsConnected.biUnion_of_chain {α : Type u} {β : Type v} [] [] [] {s : βSet α} {t : Set β} (hnt : ) (ht : ) (H : ∀ (n : β), n tIsConnected (s n)) (K : ∀ (n : β), n t tSet.Nonempty (s n s ())) :
IsConnected (⋃ (n : β) (_ : n t), s n)

The iUnion of connected sets indexed by a subset of a type with an archimedean successor (like ℕ or ℤ) such that any two neighboring sets meet is preconnected.

theorem IsPreconnected.subset_closure {α : Type u} [] {s : Set α} {t : Set α} (H : ) (Kst : s t) (Ktcs : t ) :

Theorem of bark and tree: if a set is within a preconnected set and its closure, then it is preconnected as well. See also IsConnected.subset_closure.

theorem IsConnected.subset_closure {α : Type u} [] {s : Set α} {t : Set α} (H : ) (Kst : s t) (Ktcs : t ) :

Theorem of bark and tree: if a set is within a connected set and its closure, then it is connected as well. See also IsPreconnected.subset_closure.

theorem IsPreconnected.closure {α : Type u} [] {s : Set α} (H : ) :

The closure of a preconnected set is preconnected as well.

theorem IsConnected.closure {α : Type u} [] {s : Set α} (H : ) :

The closure of a connected set is connected as well.

theorem IsPreconnected.image {α : Type u} {β : Type v} [] [] {s : Set α} (H : ) (f : αβ) (hf : ) :

The image of a preconnected set is preconnected as well.

theorem IsConnected.image {α : Type u} {β : Type v} [] [] {s : Set α} (H : ) (f : αβ) (hf : ) :

The image of a connected set is connected as well.

theorem isPreconnected_closed_iff {α : Type u} [] {s : Set α} :
∀ (t t' : Set α), IsClosed t's t t'Set.Nonempty (s t)Set.Nonempty (s t')Set.Nonempty (s (t t'))
theorem Inducing.isPreconnected_image {α : Type u} {β : Type v} [] [] {s : Set α} {f : αβ} (hf : ) :
theorem IsPreconnected.preimage_of_open_map {α : Type u} {β : Type v} [] [] {s : Set β} (hs : ) {f : αβ} (hinj : ) (hf : ) (hsf : s ) :
theorem IsPreconnected.preimage_of_closed_map {α : Type u} {β : Type v} [] [] {s : Set β} (hs : ) {f : αβ} (hinj : ) (hf : ) (hsf : s ) :
theorem IsConnected.preimage_of_openMap {α : Type u} {β : Type v} [] [] {s : Set β} (hs : ) {f : αβ} (hinj : ) (hf : ) (hsf : s ) :
theorem IsConnected.preimage_of_closedMap {α : Type u} {β : Type v} [] [] {s : Set β} (hs : ) {f : αβ} (hinj : ) (hf : ) (hsf : s ) :
theorem IsPreconnected.subset_or_subset {α : Type u} [] {s : Set α} {u : Set α} {v : Set α} (hu : ) (hv : ) (huv : Disjoint u v) (hsuv : s u v) (hs : ) :
s u s v
theorem IsPreconnected.subset_left_of_subset_union {α : Type u} [] {s : Set α} {u : Set α} {v : Set α} (hu : ) (hv : ) (huv : Disjoint u v) (hsuv : s u v) (hsu : Set.Nonempty (s u)) (hs : ) :
s u
theorem IsPreconnected.subset_right_of_subset_union {α : Type u} [] {s : Set α} {u : Set α} {v : Set α} (hu : ) (hv : ) (huv : Disjoint u v) (hsuv : s u v) (hsv : Set.Nonempty (s v)) (hs : ) :
s v
theorem IsPreconnected.subset_clopen {α : Type u} [] {s : Set α} {t : Set α} (hs : ) (ht : ) (hne : Set.Nonempty (s t)) :
s t

Preconnected sets are either contained in or disjoint to any given clopen set.

theorem IsPreconnected.subset_of_closure_inter_subset {α : Type u} [] {s : Set α} {u : Set α} (hs : ) (hu : ) (h'u : Set.Nonempty (s u)) (h : s u) :
s u

If a preconnected set s intersects an open set u, and limit points of u inside s are contained in u, then the whole set s is contained in u.

theorem IsPreconnected.prod {α : Type u} {β : Type v} [] [] {s : Set α} {t : Set β} (hs : ) (ht : ) :
theorem IsConnected.prod {α : Type u} {β : Type v} [] [] {s : Set α} {t : Set β} (hs : ) (ht : ) :
theorem isPreconnected_univ_pi {ι : Type u_1} {π : ιType u_2} [(i : ι) → TopologicalSpace (π i)] {s : (i : ι) → Set (π i)} (hs : ∀ (i : ι), IsPreconnected (s i)) :
IsPreconnected (Set.pi Set.univ s)
@[simp]
theorem isConnected_univ_pi {ι : Type u_1} {π : ιType u_2} [(i : ι) → TopologicalSpace (π i)] {s : (i : ι) → Set (π i)} :
IsConnected (Set.pi Set.univ s) ∀ (i : ι), IsConnected (s i)
theorem Sigma.isConnected_iff {ι : Type u_1} {π : ιType u_2} [(i : ι) → TopologicalSpace (π i)] {s : Set ((i : ι) × π i)} :
i t, s = '' t
theorem Sigma.isPreconnected_iff {ι : Type u_1} {π : ιType u_2} [hι : ] [(i : ι) → TopologicalSpace (π i)] {s : Set ((i : ι) × π i)} :
i t, s = '' t
theorem Sum.isConnected_iff {α : Type u} {β : Type v} [] [] {s : Set (α β)} :
(t, s = Sum.inl '' t) t, s = Sum.inr '' t
theorem Sum.isPreconnected_iff {α : Type u} {β : Type v} [] [] {s : Set (α β)} :
(t, s = Sum.inl '' t) t, s = Sum.inr '' t
def connectedComponent {α : Type u} [] (x : α) :
Set α

The connected component of a point is the maximal connected set that contains this point.

Instances For
def connectedComponentIn {α : Type u} [] (F : Set α) (x : α) :
Set α

Given a set F in a topological space α and a point x : α, the connected component of x in F is the connected component of x in the subtype F seen as a set in α. This definition does not make sense if x is not in F so we return the empty set in this case.

Instances For
theorem connectedComponentIn_eq_image {α : Type u} [] {F : Set α} {x : α} (h : x F) :
= Subtype.val '' connectedComponent { val := x, property := h }
theorem connectedComponentIn_eq_empty {α : Type u} [] {F : Set α} {x : α} (h : ¬x F) :
theorem mem_connectedComponent {α : Type u} [] {x : α} :
theorem mem_connectedComponentIn {α : Type u} [] {x : α} {F : Set α} (hx : x F) :
theorem connectedComponent_nonempty {α : Type u} [] {x : α} :
theorem connectedComponentIn_nonempty_iff {α : Type u} [] {x : α} {F : Set α} :
x F
theorem connectedComponentIn_subset {α : Type u} [] (F : Set α) (x : α) :
theorem isPreconnected_connectedComponent {α : Type u} [] {x : α} :
theorem isPreconnected_connectedComponentIn {α : Type u} [] {x : α} {F : Set α} :
theorem isConnected_connectedComponent {α : Type u} [] {x : α} :
theorem isConnected_connectedComponentIn_iff {α : Type u} [] {x : α} {F : Set α} :
x F
theorem IsPreconnected.subset_connectedComponent {α : Type u} [] {x : α} {s : Set α} (H1 : ) (H2 : x s) :
theorem IsPreconnected.subset_connectedComponentIn {α : Type u} [] {s : Set α} {x : α} {F : Set α} (hs : ) (hxs : x s) (hsF : s F) :
theorem IsConnected.subset_connectedComponent {α : Type u} [] {x : α} {s : Set α} (H1 : ) (H2 : x s) :
theorem IsPreconnected.connectedComponentIn {α : Type u} [] {x : α} {F : Set α} (h : ) (hx : x F) :
theorem connectedComponent_eq {α : Type u} [] {x : α} {y : α} (h : ) :
theorem connectedComponent_eq_iff_mem {α : Type u} [] {x : α} {y : α} :
theorem connectedComponentIn_eq {α : Type u} [] {x : α} {y : α} {F : Set α} (h : ) :
theorem connectedComponentIn_univ {α : Type u} [] (x : α) :
theorem connectedComponent_disjoint {α : Type u} [] {x : α} {y : α} (h : ) :
theorem isClosed_connectedComponent {α : Type u} [] {x : α} :
theorem Continuous.image_connectedComponent_subset {α : Type u} {β : Type v} [] [] {f : αβ} (h : ) (a : α) :
theorem Continuous.mapsTo_connectedComponent {α : Type u} {β : Type v} [] [] {f : αβ} (h : ) (a : α) :
theorem connectedComponentIn_mono {α : Type u} [] (x : α) {F : Set α} {G : Set α} (h : F G) :
class PreconnectedSpace (α : Type u) [] :
• isPreconnected_univ : IsPreconnected Set.univ

The universal set Set.univ in a preconnected space is a preconnected set.

A preconnected space is one where there is no non-trivial open partition.

Instances
class ConnectedSpace (α : Type u) [] extends :
• isPreconnected_univ : IsPreconnected Set.univ
• toNonempty :

A connected space is nonempty.

A connected space is a nonempty one where there is no non-trivial open partition.

Instances
theorem isConnected_univ {α : Type u} [] [] :
IsConnected Set.univ
theorem connectedSpace_iff_univ {α : Type u} [] :
IsConnected Set.univ
theorem isPreconnected_range {α : Type u} {β : Type v} [] [] {f : αβ} (h : ) :
theorem isConnected_range {α : Type u} {β : Type v} [] [] [] {f : αβ} (h : ) :
theorem Function.Surjective.connectedSpace {α : Type u} {β : Type v} [] [] [] {f : αβ} (hf : ) (hf' : ) :
instance Quotient.instConnectedSpace {α : Type u} [] {s : } [] :
theorem DenseRange.preconnectedSpace {α : Type u} {β : Type v} [] [] {f : αβ} (hf : ) (hc : ) :
theorem connectedSpace_iff_connectedComponent {α : Type u} [] :
x, = Set.univ
theorem preconnectedSpace_iff_connectedComponent {α : Type u} [] :
∀ (x : α), = Set.univ
@[simp]
theorem PreconnectedSpace.connectedComponent_eq_univ {X : Type u_3} [] [h : ] (x : X) :
= Set.univ
instance instConnectedSpaceProdInstTopologicalSpaceProd {α : Type u} {β : Type v} [] [] [] [] :
instance instPreconnectedSpaceForAllTopologicalSpace {ι : Type u_1} {π : ιType u_2} [(i : ι) → TopologicalSpace (π i)] [∀ (i : ι), PreconnectedSpace (π i)] :
PreconnectedSpace ((i : ι) → π i)
instance instConnectedSpaceForAllTopologicalSpace {ι : Type u_1} {π : ιType u_2} [(i : ι) → TopologicalSpace (π i)] [∀ (i : ι), ConnectedSpace (π i)] :
ConnectedSpace ((i : ι) → π i)
theorem Continuous.exists_lift_sigma {α : Type u} {ι : Type u_1} {π : ιType u_2} [] [] [(i : ι) → TopologicalSpace (π i)] {f : α(i : ι) × π i} (hf : ) :
i g, f = g

A continuous map from a connected space to a disjoint union Σ i, π i can be lifted to one of the components π i. See also ContinuousMap.exists_lift_sigma for a version with bundled ContinuousMaps.

theorem nonempty_inter {α : Type u} [] {s : Set α} {t : Set α} :
s t = Set.univSet.Nonempty (s t)
theorem isClopen_iff {α : Type u} [] {s : Set α} :
s = s = Set.univ
theorem IsClopen.eq_univ {α : Type u} [] {s : Set α} (h' : ) (h : ) :
s = Set.univ
theorem subsingleton_of_disjoint_isClopen {α : Type u} {ι : Type u_1} [] {s : ιSet α} (h_nonempty : ∀ (i : ι), Set.Nonempty (s i)) (h_disj : Pairwise (Disjoint on s)) (h_clopen : ∀ (i : ι), IsClopen (s i)) :

In a preconnected space, any disjoint family of non-empty clopen subsets has at most one element.

theorem subsingleton_of_disjoint_isOpen_iUnion_eq_univ {α : Type u} {ι : Type u_1} [] {s : ιSet α} (h_nonempty : ∀ (i : ι), Set.Nonempty (s i)) (h_disj : Pairwise (Disjoint on s)) (h_open : ∀ (i : ι), IsOpen (s i)) (h_Union : ⋃ (i : ι), s i = Set.univ) :

In a preconnected space, any disjoint cover by non-empty open subsets has at most one element.

theorem subsingleton_of_disjoint_isClosed_iUnion_eq_univ {α : Type u} {ι : Type u_1} [] {s : ιSet α} (h_nonempty : ∀ (i : ι), Set.Nonempty (s i)) (h_disj : Pairwise (Disjoint on s)) [] (h_closed : ∀ (i : ι), IsClosed (s i)) (h_Union : ⋃ (i : ι), s i = Set.univ) :

In a preconnected space, any finite disjoint cover by non-empty closed subsets has at most one element.

theorem frontier_eq_empty_iff {α : Type u} [] {s : Set α} :
s = s = Set.univ
theorem nonempty_frontier_iff {α : Type u} [] {s : Set α} :
s Set.univ
theorem Subtype.preconnectedSpace {α : Type u} [] {s : Set α} (h : ) :
theorem Subtype.connectedSpace {α : Type u} [] {s : Set α} (h : ) :
theorem isPreconnected_iff_preconnectedSpace {α : Type u} [] {s : Set α} :
theorem isConnected_iff_connectedSpace {α : Type u} [] {s : Set α} :
theorem PreconnectedSpace.induction₂' {α : Type u} [] (P : ααProp) (h : ∀ (x : α), ∀ᶠ (y : α) in nhds x, P x y P y x) (h' : ) (x : α) (y : α) :
P x y

In a preconnected space, given a transitive relation P, if P x y and P y x are true for y close enough to x, then P x y holds for all x, y. This is a version of the fact that, if an equivalence relation has open classes, then it has a single equivalence class.

theorem PreconnectedSpace.induction₂ {α : Type u} [] (P : ααProp) (h : ∀ (x : α), ∀ᶠ (y : α) in nhds x, P x y) (h' : ) (h'' : ) (x : α) (y : α) :
P x y

In a preconnected space, if a symmetric transitive relation P x y is true for y close enough to x, then it holds for all x, y. This is a version of the fact that, if an equivalence relation has open classes, then it has a single equivalence class.

theorem IsPreconnected.induction₂' {α : Type u} [] {s : Set α} (hs : ) (P : ααProp) (h : ∀ (x : α), x s∀ᶠ (y : α) in , P x y P y x) (h' : (x y z : α) → x sy sz sP x yP y zP x z) {x : α} {y : α} (hx : x s) (hy : y s) :
P x y

In a preconnected set, given a transitive relation P, if P x y and P y x are true for y close enough to x, then P x y holds for all x, y. This is a version of the fact that, if an equivalence relation has open classes, then it has a single equivalence class.

theorem IsPreconnected.induction₂ {α : Type u} [] {s : Set α} (hs : ) (P : ααProp) (h : ∀ (x : α), x s∀ᶠ (y : α) in , P x y) (h' : (x y z : α) → x sy sz sP x yP y zP x z) (h'' : (x y : α) → x sy sP x yP y x) {x : α} {y : α} (hx : x s) (hy : y s) :
P x y

In a preconnected set, if a symmetric transitive relation P x y is true for y close enough to x, then it holds for all x, y. This is a version of the fact that, if an equivalence relation has open classes, then it has a single equivalence class.

theorem isPreconnected_iff_subset_of_disjoint {α : Type u} [] {s : Set α} :
∀ (u v : Set α), s u vs (u v) = s u s v

A set s is preconnected if and only if for every cover by two open sets that are disjoint on s, it is contained in one of the two covering sets.

theorem isConnected_iff_sUnion_disjoint_open {α : Type u} [] {s : Set α} :
∀ (U : Finset (Set α)), (∀ (u v : Set α), u Uv USet.Nonempty (s (u v))u = v) → (∀ (u : Set α), u U) → s ⋃₀ Uu, u U s u

A set s is connected if and only if for every cover by a finite collection of open sets that are pairwise disjoint on s, it is contained in one of the members of the collection.

theorem disjoint_or_subset_of_clopen {α : Type u} [] {s : Set α} {t : Set α} (hs : ) (ht : ) :
Disjoint s t s t

Preconnected sets are either contained in or disjoint to any given clopen set.

theorem isPreconnected_iff_subset_of_disjoint_closed {α : Type u} [] {s : Set α} :
∀ (u v : Set α), s u vs (u v) = s u s v

A set s is preconnected if and only if for every cover by two closed sets that are disjoint on s, it is contained in one of the two covering sets.

theorem isPreconnected_iff_subset_of_fully_disjoint_closed {α : Type u} [] {s : Set α} (hs : ) :
∀ (u v : Set α), s u vDisjoint u vs u s v

A closed set s is preconnected if and only if for every cover by two closed sets that are disjoint, it is contained in one of the two covering sets.

theorem IsClopen.connectedComponent_subset {α : Type u} [] {s : Set α} {x : α} (hs : ) (hx : x s) :
theorem connectedComponent_subset_iInter_clopen {α : Type u} [] {x : α} :
⋂ (Z : { Z // x Z }), Z

The connected component of a point is always a subset of the intersection of all its clopen neighbourhoods.

theorem IsClopen.biUnion_connectedComponent_eq {α : Type u} [] {Z : Set α} (h : ) :
⋃ (x : α) (_ : x Z), = Z

A clopen set is the union of its connected components.

theorem preimage_connectedComponent_connected {α : Type u} {β : Type v} [] [] {f : αβ} (connected_fibers : ∀ (t : β), IsConnected (f ⁻¹' {t})) (hcl : ∀ (T : Set β), IsClosed (f ⁻¹' T)) (t : β) :

The preimage of a connected component is preconnected if the function has connected fibers and a subset is closed iff the preimage is.

theorem QuotientMap.preimage_connectedComponent {α : Type u} {β : Type v} [] [] {f : αβ} (hf : ) (h_fibers : ∀ (y : β), IsConnected (f ⁻¹' {y})) (a : α) :
theorem QuotientMap.image_connectedComponent {α : Type u} {β : Type v} [] [] {f : αβ} (hf : ) (h_fibers : ∀ (y : β), IsConnected (f ⁻¹' {y})) (a : α) :
class LocallyConnectedSpace (α : Type u_3) [] :
• open_connected_basis : ∀ (x : α), Filter.HasBasis (nhds x) (fun s => x s ) id

Open connected neighborhoods form a basis of the neighborhoods filter.

A topological space is locally connected if each neighborhood filter admits a basis of connected open sets. Note that it is equivalent to each point having a basis of connected (non necessarily open) sets but in a non-trivial way, so we choose this definition and prove the equivalence later in locallyConnectedSpace_iff_connected_basis.

Instances
theorem locallyConnectedSpace_iff_open_connected_basis {α : Type u} [] :
∀ (x : α), Filter.HasBasis (nhds x) (fun s => x s ) id
theorem locallyConnectedSpace_iff_open_connected_subsets {α : Type u} [] :
∀ (x : α) (U : Set α), U nhds xV, V U x V

A space with discrete topology is a locally connected space.

theorem connectedComponentIn_mem_nhds {α : Type u} [] {F : Set α} {x : α} (h : F nhds x) :
theorem IsOpen.connectedComponentIn {α : Type u} [] {F : Set α} {x : α} (hF : ) :
theorem isOpen_connectedComponent {α : Type u} [] {x : α} :
theorem isClopen_connectedComponent {α : Type u} [] {x : α} :
theorem locallyConnectedSpace_iff_connectedComponentIn_open {α : Type u} [] :
∀ (F : Set α), ∀ (x : α), x F
theorem locallyConnectedSpace_iff_connected_subsets {α : Type u} [] :
∀ (x : α) (U : Set α), U nhds xV, V nhds x V U
theorem locallyConnectedSpace_iff_connected_basis {α : Type u} [] :
∀ (x : α), Filter.HasBasis (nhds x) (fun s => s nhds x ) id
theorem locallyConnectedSpace_of_connected_bases {α : Type u} [] {ι : Type u_3} (b : αιSet α) (p : αιProp) (hbasis : ∀ (x : α), Filter.HasBasis (nhds x) (p x) (b x)) (hconnected : ∀ (x : α) (i : ι), p x iIsPreconnected (b x i)) :
def IsTotallyDisconnected {α : Type u} [] (s : Set α) :

A set s is called totally disconnected if every subset t ⊆ s which is preconnected is a subsingleton, ie either empty or a singleton.

Instances For
theorem isTotallyDisconnected_singleton {α : Type u} [] {x : α} :
• isTotallyDisconnected_univ : IsTotallyDisconnected Set.univ

The universal set Set.univ in a totally disconnected space is totally disconnected.

A space is totally disconnected if all of its connected components are singletons.

Instances
theorem IsPreconnected.subsingleton {α : Type u} [] {s : Set α} (h : ) :
instance Pi.totallyDisconnectedSpace {α : Type u_3} {β : αType u_4} [(a : α) → TopologicalSpace (β a)] [∀ (a : α), ] :
TotallyDisconnectedSpace ((a : α) → β a)
instance Prod.totallyDisconnectedSpace {α : Type u} {β : Type v} [] [] :
instance instTotallyDisconnectedSpaceSigmaInstTopologicalSpaceSigma {ι : Type u_1} {π : ιType u_2} [(i : ι) → TopologicalSpace (π i)] [∀ (i : ι), ] :
TotallyDisconnectedSpace ((i : ι) × π i)
theorem isTotallyDisconnected_of_clopen_set {X : Type u_3} [] (hX : Pairwise fun x y => U, x U ¬y U) :

Let X be a topological space, and suppose that for all distinct x,y ∈ X, there is some clopen set U such that x ∈ U and y ∉ U. Then X is totally disconnected.

A space is totally disconnected iff its connected components are subsingletons.

A space is totally disconnected iff its connected components are singletons.

@[simp]
theorem connectedComponent_eq_singleton {α : Type u} [] (x : α) :
= {x}
@[simp]
theorem Continuous.image_connectedComponent_eq_singleton {α : Type u} [] {β : Type u_3} [] {f : αβ} (h : ) (a : α) :
= {f a}

The image of a connected component in a totally disconnected space is a singleton.

theorem isTotallyDisconnected_of_image {α : Type u} {β : Type v} [] {s : Set α} [] {f : αβ} (hf : ) (hf' : ) (h : IsTotallyDisconnected (f '' s)) :
theorem Embedding.isTotallyDisconnected {α : Type u} {β : Type v} [] [] {f : αβ} (hf : ) {s : Set α} (h : IsTotallyDisconnected (f '' s)) :
instance Subtype.totallyDisconnectedSpace {α : Type u_3} {p : αProp} [] :
def IsTotallySeparated {α : Type u} [] (s : Set α) :

A set s is called totally separated if any two points of this set can be separated by two disjoint open sets covering s.

Instances For
theorem isTotallySeparated_empty {α : Type u} [] :
theorem isTotallySeparated_singleton {α : Type u} [] {x : α} :
theorem isTotallyDisconnected_of_isTotallySeparated {α : Type u} [] {s : Set α} (H : ) :
theorem IsTotallySeparated.isTotallyDisconnected {α : Type u} [] {s : Set α} (H : ) :

Alias of isTotallyDisconnected_of_isTotallySeparated.

class TotallySeparatedSpace (α : Type u) [] :
• isTotallySeparated_univ : IsTotallySeparated Set.univ

The universal set Set.univ in a totally separated space is totally separated.

A space is totally separated if any two points can be separated by two disjoint open sets covering the whole space.

Instances
instance TotallySeparatedSpace.of_discrete (α : Type u_3) [] [] :
theorem exists_clopen_of_totally_separated {α : Type u_3} [] {x : α} {y : α} (hxy : x y) :
U, x U y U
def connectedComponentSetoid (α : Type u_3) [] :

The setoid of connected components of a topological space

Instances For
def ConnectedComponents (α : Type u) [] :

The quotient of a space by its connected components

Instances For
def ConnectedComponents.mk {α : Type u} [] :

Coercion from a topological space to the set of connected components of this space.

Instances For
@[simp]
theorem ConnectedComponents.coe_eq_coe {α : Type u} [] {x : α} {y : α} :
theorem ConnectedComponents.coe_ne_coe {α : Type u} [] {x : α} {y : α} :
theorem ConnectedComponents.coe_eq_coe' {α : Type u} [] {x : α} {y : α} :
theorem ConnectedComponents.surjective_coe {α : Type u} [] :
Function.Surjective ConnectedComponents.mk
theorem ConnectedComponents.quotientMap_coe {α : Type u} [] :
QuotientMap ConnectedComponents.mk
theorem ConnectedComponents.continuous_coe {α : Type u} [] :
Continuous ConnectedComponents.mk
@[simp]
theorem ConnectedComponents.range_coe {α : Type u} [] :
Set.range ConnectedComponents.mk = Set.univ
theorem Continuous.image_eq_of_connectedComponent_eq {α : Type u} {β : Type v} [] [] {f : αβ} (h : ) (a : α) (b : α) (hab : ) :
f a = f b
def Continuous.connectedComponentsLift {α : Type u} {β : Type v} [] [] {f : αβ} (h : ) :

The lift to connectedComponents α of a continuous map from α to a totally disconnected space

Instances For
theorem Continuous.connectedComponentsLift_continuous {α : Type u} {β : Type v} [] [] {f : αβ} (h : ) :
@[simp]
theorem Continuous.connectedComponentsLift_apply_coe {α : Type u} {β : Type v} [] [] {f : αβ} (h : ) (x : α) :
@[simp]
theorem Continuous.connectedComponentsLift_comp_coe {α : Type u} {β : Type v} [] [] {f : αβ} (h : ) :
ConnectedComponents.mk = f
theorem connectedComponents_lift_unique' {α : Type u} [] {β : Sort u_3} {g₁ : } {g₂ : } (hg : g₁ ConnectedComponents.mk = g₂ ConnectedComponents.mk) :
g₁ = g₂
theorem Continuous.connectedComponentsLift_unique {α : Type u} {β : Type v} [] [] {f : αβ} (h : ) (g : ) (hg : g ConnectedComponents.mk = f) :
theorem connectedComponents_preimage_singleton {α : Type u} [] {x : α} :
ConnectedComponents.mk ⁻¹' =

The preimage of a singleton in connectedComponents is the connected component of an element in the equivalence class.

theorem connectedComponents_preimage_image {α : Type u} [] (U : Set α) :
ConnectedComponents.mk ⁻¹' (ConnectedComponents.mk '' U) = ⋃ (x : α) (_ : x U),

The preimage of the image of a set under the quotient map to connectedComponents α is the union of the connected components of the elements in it.

def Continuous.connectedComponentsMap {α : Type u} [] {β : Type u_3} [] {f : αβ} (h : ) :

Functoriality of connectedComponents

Instances For
theorem Continuous.connectedComponentsMap_continuous {α : Type u} [] {β : Type u_3} [] {f : αβ} (h : ) :
theorem IsPreconnected.constant {α : Type u} [] {Y : Type u_3} [] [] {s : Set α} (hs : ) {f : αY} (hf : ) {x : α} {y : α} (hx : x s) (hy : y s) :
f x = f y

A preconnected set s has the property that every map to a discrete space that is continuous on s is constant on s

theorem isPreconnected_of_forall_constant {α : Type u} [] {s : Set α} (hs : ∀ (f : αBool), ∀ (x : α), x s∀ (y : α), y sf x = f y) :

If every map to Bool (a discrete two-element space), that is continuous on a set s, is constant on s, then s is preconnected

theorem PreconnectedSpace.constant {α : Type u} [] {Y : Type u_3} [] [] (hp : ) {f : αY} (hf : ) {x : α} {y : α} :
f x = f y

A PreconnectedSpace version of isPreconnected.constant

theorem preconnectedSpace_of_forall_constant {α : Type u} [] (hs : ∀ (f : αBool), ∀ (x y : α), f x = f y) :

A PreconnectedSpace version of isPreconnected_of_forall_constant

theorem IsPreconnected.constant_of_mapsTo {α : Type u} {β : Type v} [] [] {S : Set α} (hS : ) {T : Set β} [] {f : αβ} (hc : ) (hTm : Set.MapsTo f S T) {x : α} {y : α} (hx : x S) (hy : y S) :
f x = f y

Refinement of IsPreconnected.constant only assuming the map factors through a discrete subset of the target.

theorem IsPreconnected.eqOn_const_of_mapsTo {α : Type u} {β : Type v} [] [] {S : Set α} (hS : ) {T : Set β} [] {f : αβ} (hc : ) (hTm : Set.MapsTo f S T) (hne : ) :
y, y T Set.EqOn f () S

A version of IsPreconnected.constant_of_mapsTo that assumes that the codomain is nonempty and proves that f is equal to const α y on S for some y ∈ T.