Connected subsets of topological spaces #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
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:
is_connected
: a nonempty set that has no non-trivial open partition. See also the section below in the module doc.connected_component
is the connected component of an element in the space.is_totally_disconnected
: all of its connected components are singletons.is_totally_separated
: 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:
connected_space
, totally_disconnected_space
, totally_separated_space
.
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 is_preconnected
.
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.
A connected set is one that is nonempty and where there is no non-trivial open partition.
Equations
- is_connected s = (s.nonempty ∧ is_preconnected s)
If any point of a set is joined to a fixed point by a preconnected subset, then the original set is preconnected as well.
If any two points of a set are contained in a preconnected subset, then the original set is preconnected as well.
A union of a family of preconnected sets with a common point is preconnected as well.
The directed sUnion of a set S of preconnected subsets is preconnected.
The bUnion of a family of preconnected sets is preconnected if the graph determined by whether two sets intersect is preconnected.
The bUnion of a family of preconnected sets is preconnected if the graph determined by whether two sets intersect is preconnected.
Preconnectedness of the Union of a family of preconnected sets indexed by the vertices of a preconnected graph, where two vertices are joined when the corresponding sets intersect.
The Union of connected sets indexed by a type with an archimedean successor (like ℕ
or ℤ
)
such that any two neighboring sets meet is preconnected.
The Union of connected sets indexed by a type with an archimedean successor (like ℕ
or ℤ
)
such that any two neighboring sets meet is connected.
The Union 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.
The Union 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 of bark and tree : if a set is within a (pre)connected set and its closure, then it is (pre)connected as well.
The closure of a (pre)connected set is (pre)connected as well.
The image of a (pre)connected set is (pre)connected as well.
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
.
The connected component of a point is the maximal connected set that contains this point.
Equations
- connected_component x = ⋃₀ {s : set α | is_preconnected s ∧ x ∈ s}
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.
- is_preconnected_univ : is_preconnected set.univ
A preconnected space is one where there is no non-trivial open partition.
- to_preconnected_space : preconnected_space α
- to_nonempty : nonempty α
A connected space is a nonempty one where there is no non-trivial open partition.
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.
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.
Preconnected sets are either contained in or disjoint to any given clopen set.
Preconnected sets are either contained in or disjoint to any given clopen set.
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.
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.
The connected component of a point is always a subset of the intersection of all its clopen neighbourhoods.
A clopen set is the union of its connected components.
The preimage of a connected component is preconnected if the function has connected fibers and a subset is closed iff the preimage is.
- open_connected_basis : ∀ (x : α), (nhds x).has_basis (λ (s : set α), is_open s ∧ x ∈ s ∧ is_connected s) id
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 locally_connected_space_iff_connected_basis
.
Instances of this typeclass
A space with discrete topology is a locally connected space.
A set s
is called totally disconnected if every subset t ⊆ s
which is preconnected is
a subsingleton, ie either empty or a singleton.
Equations
- is_totally_disconnected s = ∀ (t : set α), t ⊆ s → is_preconnected t → t.subsingleton
- is_totally_disconnected_univ : is_totally_disconnected set.univ
A space is totally disconnected if all of its connected components are singletons.
Instances of this typeclass
- totally_separated_space.totally_disconnected_space
- pi.totally_disconnected_space
- prod.totally_disconnected_space
- sum.totally_disconnected_space
- sigma.totally_disconnected_space
- subtype.totally_disconnected_space
- connected_components.totally_disconnected_space
- ultrafilter.totally_disconnected_space
- rat.totally_disconnected_space
- Profinite.totally_disconnected_space
- counterexample.sorgenfrey_line.totally_disconnected_space
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.
The image of a connected component in a totally disconnected space is a singleton.
A set s
is called totally separated if any two points of this set can be separated
by two disjoint open sets covering s
.
- is_totally_separated_univ : is_totally_separated set.univ
A space is totally separated if any two points can be separated by two disjoint open sets covering the whole space.
Instances of this typeclass
The setoid of connected components of a topological space
Equations
- connected_component_setoid α = {r := λ (x y : α), connected_component x = connected_component y, iseqv := _}
The quotient of a space by its connected components
Equations
Equations
Equations
The lift to connected_components α
of a continuous map from α
to a totally disconnected space
Equations
- h.connected_components_lift = λ (x : connected_components α), quotient.lift_on' x f _
The preimage of a singleton in connected_components
is the connected component
of an element in the equivalence class.
The preimage of the image of a set under the quotient map to connected_components α
is the union of the connected components of the elements in it.
Functoriality of connected_components
Equations
A preconnected set s
has the property that every map to a
discrete space that is continuous on s
is constant on s
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
A preconnected_space
version of is_preconnected.constant
A preconnected_space
version of is_preconnected_of_forall_constant
Refinement of is_preconnected.constant
only assuming the map factors through a
discrete subset of the target.