Properties of subsets of topological spaces #
In this file we define various properties of subsets of a topological space, and some classes on topological spaces.
Main definitions #
We define the following properties for sets in a topological space:
IsCompact
: each open cover has a finite subcover. This is defined in mathlib using filters. The main property of a compact set isIsCompact.elim_finite_subcover
.IsClopen
: a set that is both open and closed.IsIrreducible
: a nonempty set that has contains no non-trivial pair of disjoint opens. See also the section below in the module doc.
For each of these definitions (except for IsClopen
), we also have a class stating that the whole
space satisfies that property:
CompactSpace
, PreirreducibleSpace
, IrreducibleSpace
.
Furthermore, we have four more classes:
WeaklyLocallyCompactSpace
: every pointx
has a compact neighborhood.LocallyCompactSpace
: for every pointx
, every open neighborhood ofx
contains a compact neighborhood ofx
. The definition is formulated in terms of the neighborhood filter.SigmaCompactSpace
: a space that is the union of a countably many compact subspaces;NoncompactSpace
: a space that is not a compact space.
On the definition of irreducible and connected sets/spaces #
In informal mathematics, irreducible spaces are assumed to be nonempty.
We formalise the predicate without that assumption as IsPreirreducible
.
In other words, the only difference is whether the empty space counts as irreducible.
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 set s
is compact if for every nontrivial filter f
that contains s
,
there exists a ∈ s
such that every set of f
meets every neighborhood of a
.
Equations
- IsCompact s = ∀ ⦃f : Filter α⦄ [inst : Filter.NeBot f], f ≤ Filter.principal s → ∃ a, a ∈ s ∧ ClusterPt a f
Instances For
The complement to a compact set belongs to a filter f
if each a ∈ s
has a neighborhood t
within s
such that tᶜ
belongs to f
.
If p : Set α → Prop
is stable under restriction and union, and each point x
of a compact set s
has a neighborhood t
within s
such that p t
, then p s
holds.
The intersection of a compact set and a closed set is a compact set.
The intersection of a closed set and a compact set is a compact set.
The set difference of a compact set and an open set is a compact set.
A closed subset of a compact set is a compact set.
Alias of the forward direction of isCompact_iff_ultrafilter_le_nhds
.
For every open directed cover of a compact set, there exists a single element of the cover which itself includes the set.
For every open cover of a compact set, there exists a finite subcover.
The neighborhood filter of a compact set is disjoint with a filter l
if and only if the
neighborhood filter of each point of this set is disjoint with l
.
A filter l
is disjoint with the neighborhood filter of a compact set if and only if it is
disjoint with the neighborhood filter of each point of this set.
For every directed family of closed sets whose intersection avoids a compact set, there exists a single element of the family which itself avoids this compact set.
For every family of closed sets whose intersection avoids a compact set, there exists a finite subfamily whose intersection avoids this compact set.
If s
is a compact set in a topological space α
and f : ι → Set α
is a locally finite
family of sets, then f i ∩ s
is nonempty only for a finitely many i
.
To show that a compact set intersects the intersection of a family of closed sets, it is sufficient to show that it intersects every finite subfamily.
Cantor's intersection theorem: the intersection of a directed family of nonempty compact closed sets is nonempty.
Cantor's intersection theorem for sequences indexed by ℕ
:
the intersection of a decreasing sequence of nonempty compact closed sets is nonempty.
For every open cover of a compact set, there exists a finite subcover.
A set s
is compact if for every open cover of s
, there exists a finite subcover.
A set s
is compact if for every family of closed sets whose intersection avoids s
,
there exists a finite subfamily whose intersection avoids s
.
A set s
is compact if and only if
for every open cover of s
, there exists a finite subcover.
A set s
is compact if and only if
for every family of closed sets whose intersection avoids s
,
there exists a finite subfamily whose intersection avoids s
.
If s : Set (α × β)
belongs to 𝓝 x ×ˢ l
for all x
from a compact set K
,
then it belongs to (𝓝ˢ K) ×ˢ l
,
i.e., there exist an open U ⊇ K
and t ∈ l
such that U ×ˢ t ⊆ s
.
If s : Set (α × β)
belongs to l ×ˢ 𝓝 y
for all y
from a compact set K
,
then it belongs to l ×ˢ (𝓝ˢ K)
,
i.e., there exist t ∈ l
and an open U ⊇ K
such that t ×ˢ U ⊆ s
.
To show that ∀ y ∈ K, P x y
holds for x
close enough to x₀
when K
is compact,
it is sufficient to show that for all y₀ ∈ K
there P x y
holds for (x, y)
close enough
to (x₀, y₀)
.
Provided for backwards compatibility,
see IsCompact.mem_prod_nhdsSet_of_forall
for a stronger statement.
If V : ι → Set α
is a decreasing family of closed compact sets then any neighborhood of
⋂ i, V i
contains some V i
. We assume each V i
is compact and closed because α
is
not assumed to be Hausdorff. See exists_subset_nhd_of_compact
for version assuming this.
If α
has a basis consisting of compact opens, then an open set in α
is compact open iff
it is a finite union of some elements in the basis
Filter.cocompact
is the filter generated by complements to compact sets.
Equations
- Filter.cocompact α = ⨅ (s : Set α) (_ : IsCompact s), Filter.principal sᶜ
Instances For
Filter.coclosedCompact
is the filter generated by complements to closed compact sets.
In a Hausdorff space, this is the same as Filter.cocompact
.
Equations
- Filter.coclosedCompact α = ⨅ (s : Set α) (_ : IsClosed s) (_ : IsCompact s), Filter.principal sᶜ
Instances For
Sets that are contained in a compact set form a bornology. Its cobounded
filter is
Filter.cocompact
. See also Bornology.relativelyCompact
the bornology of sets with compact
closure.
Equations
- Bornology.inCompact α = { cobounded' := Filter.cocompact α, le_cofinite' := (_ : Filter.cocompact α ≤ Filter.cofinite) }
Instances For
If s
and t
are compact sets, then the set neighborhoods filter of s ×ˢ t
is the product of set neighborhoods filters for s
and t
.
For general sets, only the ≤
inequality holds, see nhdsSet_prod_le
.
The product of a neighborhood of s
and a neighborhood of t
is a neighborhood of s ×ˢ t
,
formulated in terms of a filter inequality.
If s
and t
are compact sets and n
is an open neighborhood of s × t
, then there exist
open neighborhoods u ⊇ s
and v ⊇ t
such that u × v ⊆ n
.
See also IsCompact.nhdsSet_prod_eq
.
Type class for compact spaces. Separation is sometimes included in the definition, especially in the French literature, but we do not include it here.
Instances
In a noncompact space,
Set.univ
is not a compact set.
α
is a noncompact topological space if it is not a compact space.
Instances
A compact discrete space is finite.
If α
is a compact space, then a locally finite family of sets of α
can have only finitely
many nonempty elements.
If α
is a compact space, then a locally finite family of nonempty sets of α
can have only
finitely many elements, Set.Finite
version.
If α
is a compact space, then a locally finite family of nonempty sets of α
can have only
finitely many elements, Fintype
version.
Equations
- LocallyFinite.fintypeOfCompact hf hne = Set.fintypeOfFiniteUniv (_ : Set.Finite Set.univ)
Instances For
The comap of the cocompact filter on β
by a continuous function f : α → β
is less than or
equal to the cocompact filter on α
.
This is a reformulation of the fact that images of compact sets are compact.
If X
is a compact topological space, then Prod.snd : X × Y → Y
is a closed map.
If f : α → β
is an Inducing
map,
the image f '' s
of a set s
is compact if and only if s
is compact.
If f : α → β
is an Embedding
(or more generally, an Inducing
map, see
Inducing.isCompact_iff
), the image f '' s
of a set s
is compact if and only if the set
s
is compact.
The preimage of a compact set under an inducing map is a compact set.
The preimage of a compact set under a closed embedding is a compact set.
A closed embedding is proper, ie, inverse images of compact sets are contained in compacts.
Moreover, the preimage of a compact set is compact, see ClosedEmbedding.isCompact_preimage
.
Finite topological spaces are compact.
The product of two compact spaces is compact.
The disjoint union of two compact spaces is compact.
The coproduct of the cocompact filters on two topological spaces is the cocompact filter on their product.
Tychonoff's theorem: product of compact sets is compact.
Tychonoff's theorem formulated using Set.pi
: product of compact sets is compact.
Equations
Tychonoff's theorem formulated in terms of filters: Filter.cocompact
on an indexed product
type Π d, κ d
the Filter.coprodᵢ
of filters Filter.cocompact
on κ d
.
Every point of a weakly locally compact space admits a compact neighborhood.
We say that a topological space is a weakly locally compact space, if each point of this space admits a compact neighborhood.
Instances
In a weakly locally compact space, every compact set is contained in the interior of a compact set.
In a weakly locally compact space,
the filters 𝓝 x
and cocompact α
are disjoint for all α
.
In a locally compact space, every neighbourhood of every point contains a compact neighbourhood of that same point.
There are various definitions of "locally compact space" in the literature,
which agree for Hausdorff spaces but not in general.
This one is the precise condition on X needed
for the evaluation map C(X, Y) × X → Y
to be continuous for all Y
when C(X, Y)
is given the compact-open topology.
See also WeaklyLocallyCompactSpace
, a typeclass that only assumes
that each point has a compact neighborhood.
Instances
In general it suffices that all but finitely many of the spaces are compact, but that's not straightforward to state and use.
For spaces that are not Hausdorff.
A reformulation of the definition of locally compact space: In a locally compact space,
every open set containing x
has a compact subset containing x
in its interior.
In a locally compact space, for every containment K ⊆ U
of a compact set K
in an open
set U
, there is a compact neighborhood L
such that K ⊆ L ⊆ U
: equivalently, there is a
compact L
such that K ⊆ interior L
and L ⊆ U
.
In a σ-compact space, there exists (by definition) a countable collection of compact subspaces that cover the entire space.
A σ-compact space is a space that is the union of a countable collection of compact subspaces.
Note that a locally compact separable T₂ space need not be σ-compact.
The sequence can be extracted using compactCovering
.
Instances
A choice of compact covering for a σ
-compact space, chosen to be monotone.
Equations
- compactCovering α = Set.Accumulate (Exists.choose (_ : ∃ K, (∀ (n : ℕ), IsCompact (K n)) ∧ ⋃ (n : ℕ), K n = Set.univ))
Instances For
If α
is a σ
-compact space, then a locally finite family of nonempty sets of α
can have
only countably many elements, Set.Countable
version.
If f : ι → Set α
is a locally finite covering of a σ-compact topological space by nonempty
sets, then the index type ι
is encodable.
Equations
- LocallyFinite.encodable hf hne = Encodable.ofEquiv (↑Set.univ) (Equiv.Set.univ ι).symm
Instances For
In a topological space with sigma compact topology, if f
is a function that sends each point
x
of a closed set s
to a neighborhood of x
within s
, then for some countable set t ⊆ s
,
the neighborhoods f x
, x ∈ t
, cover the whole set s
.
In a topological space with sigma compact topology, if f
is a function that sends each
point x
to a neighborhood of x
, then for some countable set s
, the neighborhoods f x
,
x ∈ s
, cover the whole space.
The sequence of compact sets that form a compact exhaustion.
- isCompact' : ∀ (n : ℕ), IsCompact (CompactExhaustion.toFun s n)
The sets in the compact exhaustion are in fact compact.
- subset_interior_succ' : ∀ (n : ℕ), CompactExhaustion.toFun s n ⊆ interior (CompactExhaustion.toFun s (n + 1))
The sets in the compact exhaustion form a sequence: each set is contained in the interior of the next.
- iUnion_eq' : ⋃ (n : ℕ), CompactExhaustion.toFun s n = Set.univ
The union of all sets in a compact exhaustion equals the entire space.
An exhaustion by compact sets of a
topological space is a sequence of compact sets K n
such that K n ⊆ interior (K (n + 1))
and
⋃ n, K n = univ
.
If X
is a locally compact sigma compact space, then CompactExhaustion.choice X
provides
a choice of an exhaustion by compact sets. This choice is also available as
(default : CompactExhaustion X)
.
Instances For
Equations
- One or more equations did not get rendered due to their size.
The minimal n
such that x ∈ K n
.
Equations
- CompactExhaustion.find K x = Nat.find (_ : ∃ n, x ∈ ↑K n)
Instances For
Prepend the empty set to a compact exhaustion K n
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A choice of an exhaustion by compact sets of a weakly locally compact σ-compact space.
Equations
Instances For
Equations
- CompactExhaustion.instInhabitedCompactExhaustion = { default := CompactExhaustion.choice α }
Alias of the forward direction of isClopen_iff_frontier_eq_empty
.
A preirreducible set s
is one where there is no non-trivial pair of disjoint opens on s
.
Equations
- IsPreirreducible s = ∀ (u v : Set α), IsOpen u → IsOpen v → Set.Nonempty (s ∩ u) → Set.Nonempty (s ∩ v) → Set.Nonempty (s ∩ (u ∩ v))
Instances For
An irreducible set s
is one that is nonempty and
where there is no non-trivial pair of disjoint opens on s
.
Equations
- IsIrreducible s = (Set.Nonempty s ∧ IsPreirreducible s)
Instances For
Alias of the reverse direction of isPreirreducible_iff_closure
.
Alias of the reverse direction of isIrreducible_iff_closure
.
The set of irreducible components of a topological space.
Equations
- irreducibleComponents α = maximals (fun x x_1 => x ≤ x_1) {s | IsIrreducible s}
Instances For
A maximal irreducible set that contains a given point.
Equations
- irreducibleComponent x = Classical.choose (_ : ∃ t, IsPreirreducible t ∧ {x} ⊆ t ∧ ∀ (u : Set α), IsPreirreducible u → t ⊆ u → u = t)
Instances For
- isPreirreducible_univ : IsPreirreducible Set.univ
In a preirreducible space,
Set.univ
is a preirreducible set.
A preirreducible space is one where there is no non-trivial pair of disjoint opens.
Instances
- isPreirreducible_univ : IsPreirreducible Set.univ
- toNonempty : Nonempty α
An irreducible space is one that is nonempty and where there is no non-trivial pair of disjoint opens.
Instances
In a (pre)irreducible space, a nonempty open set is dense.
An infinite type with cofinite topology is an irreducible topological space.
A set s
is irreducible if and only if
for every finite collection of open sets all of whose members intersect s
,
s
also intersects the intersection of the entire collection
(i.e., there is an element of s
contained in every member of the collection).
A set is preirreducible if and only if for every cover by two closed sets, it is contained in one of the two covering sets.
A set is irreducible if and only if for every cover by a finite collection of closed sets, it is contained in one of the members of the collection.
A nonempty open subset of a preirreducible subspace is dense in the subspace.
If ∅ ≠ U ⊆ S ⊆ Z
such that U
is open and Z
is preirreducible, then S
is irreducible.