# mathlib3documentation

topology.subset_properties

# Properties of 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 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:

• `is_compact`: each open cover has a finite subcover. This is defined in mathlib using filters. The main property of a compact set is `is_compact.elim_finite_subcover`.
• `is_clopen`: a set that is both open and closed.
• `is_irreducible`: 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 `is_clopen`), we also have a class stating that the whole space satisfies that property: `compact_space`, `irreducible_space`

Furthermore, we have three more classes:

• `locally_compact_space`: for every point `x`, every open neighborhood of `x` contains a compact neighborhood of `x`. The definition is formulated in terms of the neighborhood filter.
• `sigma_compact_space`: a space that is the union of a countably many compact subspaces;
• `noncompact_space`: 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 `is_preirreducible`. 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.

def is_compact {α : Type u} (s : set α) :
Prop

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
Instances for `is_compact`
theorem is_compact.compl_mem_sets {α : Type u} {s : set α} (hs : is_compact s) {f : filter α} (hf : (a : α), a s s nhds a f) :
s f

The complement to a compact set belongs to a filter `f` if it belongs to each filter `𝓝 a ⊓ f`, `a ∈ s`.

theorem is_compact.compl_mem_sets_of_nhds_within {α : Type u} {s : set α} (hs : is_compact s) {f : filter α} (hf : (a : α), a s ( (t : set α) (H : t s), t f)) :
s f

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`.

theorem is_compact.induction_on {α : Type u} {s : set α} (hs : is_compact s) {p : set α Prop} (he : p ) (hmono : ⦃s t : set α⦄, s t p t p s) (hunion : ⦃s t : set α⦄, p s p t p (s t)) (hnhds : (x : α), x s ( (t : set α) (H : t s), p t)) :
p s

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.

theorem is_compact.inter_right {α : Type u} {s t : set α} (hs : is_compact s) (ht : is_closed t) :

The intersection of a compact set and a closed set is a compact set.

theorem is_compact.inter_left {α : Type u} {s t : set α} (ht : is_compact t) (hs : is_closed s) :

The intersection of a closed set and a compact set is a compact set.

theorem is_compact.diff {α : Type u} {s t : set α} (hs : is_compact s) (ht : is_open t) :

The set difference of a compact set and an open set is a compact set.

theorem is_compact_of_is_closed_subset {α : Type u} {s t : set α} (hs : is_compact s) (ht : is_closed t) (h : t s) :

A closed subset of a compact set is a compact set.

theorem is_compact.image_of_continuous_on {α : Type u} {β : Type v} {s : set α} {f : α β} (hs : is_compact s) (hf : s) :
theorem is_compact.image {α : Type u} {β : Type v} {s : set α} {f : α β} (hs : is_compact s) (hf : continuous f) :
theorem is_compact.adherence_nhdset {α : Type u} {s t : set α} {f : filter α} (hs : is_compact s) (hf₂ : f ) (ht₁ : is_open t) (ht₂ : (a : α), a s f a t) :
t f
theorem is_compact_iff_ultrafilter_le_nhds {α : Type u} {s : set α} :
(f : , ( (a : α) (H : a s), f nhds a)
theorem is_compact.ultrafilter_le_nhds {α : Type u} {s : set α} :
(f : , ( (a : α) (H : a s), f nhds a)

Alias of the forward direction of `is_compact_iff_ultrafilter_le_nhds`.

theorem is_compact.elim_directed_cover {α : Type u} {s : set α} {ι : Type v} [hι : nonempty ι] (hs : is_compact s) (U : ι set α) (hUo : (i : ι), is_open (U i)) (hsU : s (i : ι), U i) (hdU : U) :
(i : ι), s U i

For every open directed cover of a compact set, there exists a single element of the cover which itself includes the set.

theorem is_compact.elim_finite_subcover {α : Type u} {s : set α} {ι : Type v} (hs : is_compact s) (U : ι set α) (hUo : (i : ι), is_open (U i)) (hsU : s (i : ι), U i) :
(t : finset ι), s (i : ι) (H : i t), U i

For every open cover of a compact set, there exists a finite subcover.

theorem is_compact.elim_nhds_subcover' {α : Type u} {s : set α} (hs : is_compact s) (U : Π (x : α), x s set α) (hU : (x : α) (H : x s), U x H nhds x) :
(t : finset s), s (x : s) (H : x t), U x _
theorem is_compact.elim_nhds_subcover {α : Type u} {s : set α} (hs : is_compact s) (U : α set α) (hU : (x : α), x s U x nhds x) :
(t : finset α), ( (x : α), x t x s) s (x : α) (H : x t), U x
theorem is_compact.disjoint_nhds_set_left {α : Type u} {s : set α} {l : filter α} (hs : is_compact s) :
disjoint (nhds_set s) l (x : α), x s disjoint (nhds x) l

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`.

theorem is_compact.disjoint_nhds_set_right {α : Type u} {s : set α} {l : filter α} (hs : is_compact s) :
(nhds_set s) (x : α), x s (nhds x)

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.

theorem is_compact.elim_directed_family_closed {α : Type u} {s : set α} {ι : Type v} [hι : nonempty ι] (hs : is_compact s) (Z : ι set α) (hZc : (i : ι), is_closed (Z i)) (hsZ : (s (i : ι), Z i) = ) (hdZ : Z) :
(i : ι), s Z i =

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.

theorem is_compact.elim_finite_subfamily_closed {α : Type u} {s : set α} {ι : Type v} (hs : is_compact s) (Z : ι set α) (hZc : (i : ι), is_closed (Z i)) (hsZ : (s (i : ι), Z i) = ) :
(t : finset ι), (s (i : ι) (H : i t), Z i) =

For every family of closed sets whose intersection avoids a compact set, there exists a finite subfamily whose intersection avoids this compact set.

theorem locally_finite.finite_nonempty_inter_compact {α : Type u} {ι : Type u_1} {f : ι set α} (hf : locally_finite f) {s : set α} (hs : is_compact s) :
{i : ι | (f i s).nonempty}.finite

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`.

theorem is_compact.inter_Inter_nonempty {α : Type u} {s : set α} {ι : Type v} (hs : is_compact s) (Z : ι set α) (hZc : (i : ι), is_closed (Z i)) (hsZ : (t : finset ι), (s (i : ι) (H : i t), Z i).nonempty) :
(s (i : ι), Z i).nonempty

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.

theorem is_compact.nonempty_Inter_of_directed_nonempty_compact_closed {α : Type u} {ι : Type v} [hι : nonempty ι] (Z : ι set α) (hZd : Z) (hZn : (i : ι), (Z i).nonempty) (hZc : (i : ι), is_compact (Z i)) (hZcl : (i : ι), is_closed (Z i)) :
( (i : ι), Z i).nonempty

Cantor's intersection theorem: the intersection of a directed family of nonempty compact closed sets is nonempty.

theorem is_compact.nonempty_Inter_of_sequence_nonempty_compact_closed {α : Type u} (Z : set α) (hZd : (i : ), Z (i + 1) Z i) (hZn : (i : ), (Z i).nonempty) (hZ0 : is_compact (Z 0)) (hZcl : (i : ), is_closed (Z i)) :
( (i : ), Z i).nonempty

Cantor's intersection theorem for sequences indexed by `ℕ`: the intersection of a decreasing sequence of nonempty compact closed sets is nonempty.

theorem is_compact.elim_finite_subcover_image {α : Type u} {ι : Type u_1} {s : set α} {b : set ι} {c : ι set α} (hs : is_compact s) (hc₁ : (i : ι), i b is_open (c i)) (hc₂ : s (i : ι) (H : i b), c i) :
(b' : set ι) (H : b' b), b'.finite s (i : ι) (H : i b'), c i

For every open cover of a compact set, there exists a finite subcover.

theorem is_compact_of_finite_subfamily_closed {α : Type u} {s : set α} (h : {ι : Type u} (Z : ι set α), ( (i : ι), is_closed (Z i)) (s (i : ι), Z i) = ( (t : finset ι), (s (i : ι) (H : i t), Z i) = )) :

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`.

theorem is_compact_of_finite_subcover {α : Type u} {s : set α} (h : {ι : Type u} (U : ι set α), ( (i : ι), is_open (U i)) (s (i : ι), U i) ( (t : finset ι), s (i : ι) (H : i t), U i)) :

A set `s` is compact if for every open cover of `s`, there exists a finite subcover.

theorem is_compact_iff_finite_subcover {α : Type u} {s : set α} :
{ι : Type u} (U : ι set α), ( (i : ι), is_open (U i)) (s (i : ι), U i) ( (t : finset ι), s (i : ι) (H : i t), U i)

A set `s` is compact if and only if for every open cover of `s`, there exists a finite subcover.

theorem is_compact_iff_finite_subfamily_closed {α : Type u} {s : set α} :
{ι : Type u} (Z : ι set α), ( (i : ι), is_closed (Z i)) (s (i : ι), Z i) = ( (t : finset ι), (s (i : ι) (H : i t), Z i) = )

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`.

theorem is_compact.eventually_forall_of_forall_eventually {α : Type u} {β : Type v} {x₀ : α} {K : set β} (hK : is_compact K) {P : α β Prop} (hP : (y : β), y K (∀ᶠ (z : α × β) in nhds (x₀, y), P z.fst z.snd)) :
∀ᶠ (x : α) in nhds x₀, (y : β), y K P x y

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₀)`.

@[simp]
theorem is_compact_empty {α : Type u}  :
@[simp]
theorem is_compact_singleton {α : Type u} {a : α} :
theorem set.subsingleton.is_compact {α : Type u} {s : set α} (hs : s.subsingleton) :
theorem set.finite.is_compact_bUnion {α : Type u} {ι : Type u_1} {s : set ι} {f : ι set α} (hs : s.finite) (hf : (i : ι), i s is_compact (f i)) :
is_compact ( (i : ι) (H : i s), f i)
theorem finset.is_compact_bUnion {α : Type u} {ι : Type u_1} (s : finset ι) {f : ι set α} (hf : (i : ι), i s is_compact (f i)) :
is_compact ( (i : ι) (H : i s), f i)
theorem is_compact_accumulate {α : Type u} {K : set α} (hK : (n : ), is_compact (K n)) (n : ) :
theorem is_compact_Union {α : Type u} {ι : Type u_1} {f : ι set α} [finite ι] (h : (i : ι), is_compact (f i)) :
is_compact ( (i : ι), f i)
theorem set.finite.is_compact {α : Type u} {s : set α} (hs : s.finite) :
theorem is_compact.finite_of_discrete {α : Type u} {s : set α} (hs : is_compact s) :
theorem is_compact_iff_finite {α : Type u} {s : set α} :
theorem is_compact.union {α : Type u} {s t : set α} (hs : is_compact s) (ht : is_compact t) :
theorem is_compact.insert {α : Type u} {s : set α} (hs : is_compact s) (a : α) :
theorem exists_subset_nhds_of_is_compact' {α : Type u} {ι : Type u_1} [nonempty ι] {V : ι set α} (hV : V) (hV_cpct : (i : ι), is_compact (V i)) (hV_closed : (i : ι), is_closed (V i)) {U : set α} (hU : (x : α), (x (i : ι), V i) U nhds x) :
(i : ι), V i U

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.

theorem is_compact_open_iff_eq_finite_Union_of_is_topological_basis {α : Type u} {ι : Type u_1} (b : ι set α) (hb' : (i : ι), is_compact (b i)) (U : set α) :
(s : set ι), s.finite U = (i : ι) (H : i s), b i

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

def filter.cocompact (α : Type u_1)  :

`filter.cocompact` is the filter generated by complements to compact sets.

Equations
Instances for `filter.cocompact`
theorem filter.has_basis_cocompact {α : Type u}  :
theorem filter.mem_cocompact {α : Type u} {s : set α} :
(t : set α), t s
theorem filter.mem_cocompact' {α : Type u} {s : set α} :
(t : set α), s t
theorem is_compact.compl_mem_cocompact {α : Type u} {s : set α} (hs : is_compact s) :
theorem filter.cocompact_eq_cofinite (α : Type u_1)  :
@[simp]
theorem filter.tendsto.is_compact_insert_range_of_cocompact {α : Type u} {β : Type v} {f : α β} {b : β} (hf : (nhds b)) (hfc : continuous f) :
theorem filter.tendsto.is_compact_insert_range_of_cofinite {α : Type u} {ι : Type u_1} {f : ι α} {a : α} (hf : (nhds a)) :
theorem filter.tendsto.is_compact_insert_range {α : Type u} {f : α} {a : α} (hf : (nhds a)) :
def filter.coclosed_compact (α : Type u_1)  :

`filter.coclosed_compact` is the filter generated by complements to closed compact sets. In a Hausdorff space, this is the same as `filter.cocompact`.

Equations
Instances for `filter.coclosed_compact`
theorem filter.mem_coclosed_compact {α : Type u} {s : set α} :
(t : set α), t s
theorem filter.mem_coclosed_compact' {α : Type u} {s : set α} :
(t : set α), s t
theorem is_compact.compl_mem_coclosed_compact_of_is_closed {α : Type u} {s : set α} (hs : is_compact s) (hs' : is_closed s) :
def bornology.in_compact (α : Type u)  :

Sets that are contained in a compact set form a bornology. Its `cobounded` filter is `filter.cocompact`. See also `bornology.relatively_compact` the bornology of sets with compact closure.

Equations
theorem bornology.in_compact.is_bounded_iff {α : Type u} {s : set α} :
(t : set α), s t
def nhds_contain_boxes {α : Type u} {β : Type v} (s : set α) (t : set β) :
Prop

`nhds_contain_boxes s t` means that any open neighborhood of `s × t` in `α × β` includes a product of an open neighborhood of `s` by an open neighborhood of `t`.

Equations
theorem nhds_contain_boxes.symm {α : Type u} {β : Type v} {s : set α} {t : set β} :
theorem nhds_contain_boxes.comm {α : Type u} {β : Type v} {s : set α} {t : set β} :
theorem nhds_contain_boxes_of_singleton {α : Type u} {β : Type v} {x : α} {y : β} :
{y}
theorem nhds_contain_boxes_of_compact {α : Type u} {β : Type v} {s : set α} (hs : is_compact s) (t : set β) (H : (x : α), x s t) :
theorem generalized_tube_lemma {α : Type u} {β : Type v} {s : set α} (hs : is_compact s) {t : set β} (ht : is_compact t) {n : set × β)} (hn : is_open n) (hp : s ×ˢ t n) :
(u : set α) (v : set β), s u t v u ×ˢ v n

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`.

@[class]
structure compact_space (α : Type u_3)  :
Prop
• is_compact_univ :

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 of this typeclass
@[protected, instance]
theorem is_compact_univ_iff {α : Type u}  :
theorem is_compact_univ {α : Type u} [h : compact_space α] :
theorem cluster_point_of_compact {α : Type u} (f : filter α) [f.ne_bot] :
(x : α), f
theorem compact_space.elim_nhds_subcover {α : Type u} (U : α set α) (hU : (x : α), U x nhds x) :
(t : finset α), ( (x : α) (H : x t), U x) =
theorem compact_space_of_finite_subfamily_closed {α : Type u} (h : {ι : Type u} (Z : ι set α), ( (i : ι), is_closed (Z i)) ( (i : ι), Z i) = ( (t : finset ι), ( (i : ι) (H : i t), Z i) = )) :
theorem is_closed.is_compact {α : Type u} {s : set α} (h : is_closed s) :
@[class]
structure noncompact_space (α : Type u_3)  :
Prop
• noncompact_univ :

`α` is a noncompact topological space if it not a compact space.

Instances of this typeclass
theorem is_compact.ne_univ {α : Type u} {s : set α} (hs : is_compact s) :
@[protected, instance]
@[simp]
theorem filter.cocompact_eq_bot {α : Type u}  :
@[protected, instance]
theorem noncompact_space_of_ne_bot {α : Type u} (h : .ne_bot) :
theorem filter.cocompact_ne_bot_iff {α : Type u}  :
theorem not_compact_space_iff {α : Type u}  :
@[protected, instance]
theorem finite_of_compact_of_discrete {α : Type u}  :

A compact discrete space is finite.

theorem exists_nhds_ne_ne_bot (α : Type u_1) [infinite α] :
(z : α), {z}).ne_bot
theorem finite_cover_nhds_interior {α : Type u} {U : α set α} (hU : (x : α), U x nhds x) :
(t : finset α), ( (x : α) (H : x t), interior (U x)) = set.univ
theorem finite_cover_nhds {α : Type u} {U : α set α} (hU : (x : α), U x nhds x) :
(t : finset α), ( (x : α) (H : x t), U x) = set.univ
theorem locally_finite.finite_nonempty_of_compact {α : Type u} {ι : Type u_1} {f : ι set α} (hf : locally_finite f) :
{i : ι | (f i).nonempty}.finite

If `α` is a compact space, then a locally finite family of sets of `α` can have only finitely many nonempty elements.

theorem locally_finite.finite_of_compact {α : Type u} {ι : Type u_1} {f : ι set α} (hf : locally_finite f) (hne : (i : ι), (f i).nonempty) :

If `α` is a compact space, then a locally finite family of nonempty sets of `α` can have only finitely many elements, `set.finite` version.

noncomputable def locally_finite.fintype_of_compact {α : Type u} {ι : Type u_1} {f : ι set α} (hf : locally_finite f) (hne : (i : ι), (f i).nonempty) :

If `α` is a compact space, then a locally finite family of nonempty sets of `α` can have only finitely many elements, `fintype` version.

Equations
theorem filter.comap_cocompact_le {α : Type u} {β : Type v} {f : α β} (hf : continuous f) :

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.

theorem is_compact_range {α : Type u} {β : Type v} {f : α β} (hf : continuous f) :
theorem is_compact_diagonal {α : Type u}  :
theorem is_closed_proj_of_is_compact {X : Type u_1} {Y : Type u_2}  :

If X is is_compact then pr₂ : X × Y → Y is a closed map

theorem exists_subset_nhds_of_compact_space {α : Type u} {ι : Type u_1} [nonempty ι] {V : ι set α} (hV : V) (hV_closed : (i : ι), is_closed (V i)) {U : set α} (hU : (x : α), (x (i : ι), V i) U nhds x) :
(i : ι), V i U
theorem inducing.is_compact_iff {α : Type u} {β : Type v} {f : α β} (hf : inducing f) {s : set α} :

If `f : α → β` is an `inducing` map, then the image `f '' s` of a set `s` is compact if and only if the set `s` is closed.

theorem embedding.is_compact_iff_is_compact_image {α : Type u} {β : Type v} {s : set α} {f : α β} (hf : embedding f) :

If `f : α → β` is an `embedding` (or more generally, an `inducing` map, see `inducing.is_compact_iff`), then the image `f '' s` of a set `s` is compact if and only if the set `s` is closed.

theorem closed_embedding.is_compact_preimage {α : Type u} {β : Type v} {f : α β} (hf : closed_embedding f) {K : set β} (hK : is_compact K) :

The preimage of a compact set under a closed embedding is a compact set.

theorem closed_embedding.tendsto_cocompact {α : Type u} {β : Type v} {f : α β} (hf : closed_embedding f) :

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 `closed_embedding.is_compact_preimage`.

theorem is_compact_iff_is_compact_in_subtype {α : Type u} {p : α Prop} {s : set {a // p a}} :
theorem is_compact_iff_is_compact_univ {α : Type u} {s : set α} :
theorem is_compact_iff_compact_space {α : Type u} {s : set α} :
theorem is_compact.finite {α : Type u} {s : set α} (hs : is_compact s) (hs' : discrete_topology s) :
theorem exists_nhds_ne_inf_principal_ne_bot {α : Type u} {s : set α} (hs : is_compact s) (hs' : s.infinite) :
(z : α) (H : z s), {z} .ne_bot
@[protected]
theorem closed_embedding.noncompact_space {α : Type u} {β : Type v} {f : α β} (hf : closed_embedding f) :
@[protected]
theorem closed_embedding.compact_space {α : Type u} {β : Type v} [h : compact_space β] {f : α β} (hf : closed_embedding f) :
theorem is_compact.prod {α : Type u} {β : Type v} {s : set α} {t : set β} (hs : is_compact s) (ht : is_compact t) :
@[protected, instance]
def finite.compact_space {α : Type u} [finite α] :

Finite topological spaces are compact.

@[protected, instance]
def prod.compact_space {α : Type u} {β : Type v}  :

The product of two compact spaces is compact.

@[protected, instance]
def sum.compact_space {α : Type u} {β : Type v}  :

The disjoint union of two compact spaces is compact.

@[protected, instance]
def sigma.compact_space {ι : Type u_1} {π : ι Type u_2} [finite ι] [Π (i : ι), topological_space (π i)] [ (i : ι), compact_space (π i)] :
compact_space (Σ (i : ι), π i)
theorem filter.coprod_cocompact {α : Type u} {β : Type v}  :

The coproduct of the cocompact filters on two topological spaces is the cocompact filter on their product.

theorem prod.noncompact_space_iff {α : Type u} {β : Type v}  :
@[protected, instance]
def prod.noncompact_space_left {α : Type u} {β : Type v} [nonempty β] :
@[protected, instance]
def prod.noncompact_space_right {α : Type u} {β : Type v} [nonempty α]  :
theorem is_compact_pi_infinite {ι : Type u_1} {π : ι Type u_2} [Π (i : ι), topological_space (π i)] {s : Π (i : ι), set (π i)} :
( (i : ι), is_compact (s i)) is_compact {x : Π (i : ι), π i | (i : ι), x i s i}

Tychonoff's theorem: product of compact sets is compact.

theorem is_compact_univ_pi {ι : Type u_1} {π : ι Type u_2} [Π (i : ι), topological_space (π i)] {s : Π (i : ι), set (π i)} (h : (i : ι), is_compact (s i)) :

Tychonoff's theorem formulated using `set.pi`: product of compact sets is compact.

@[protected, instance]
def pi.compact_space {ι : Type u_1} {π : ι Type u_2} [Π (i : ι), topological_space (π i)] [ (i : ι), compact_space (π i)] :
compact_space (Π (i : ι), π i)
@[protected, instance]
def function.compact_space {β : Type v} {ι : Type u_1}  :
theorem filter.Coprod_cocompact {δ : Type u_1} {κ : δ Type u_2} [Π (d : δ), topological_space (κ d)] :
filter.Coprod (λ (d : δ), filter.cocompact (κ d)) = filter.cocompact (Π (d : δ), κ d)

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`.

@[protected, instance]
def quot.compact_space {α : Type u} {r : α α Prop}  :
compact_space (quot r)
@[protected, instance]
def quotient.compact_space {α : Type u} {s : setoid α}  :
@[class]
structure locally_compact_space (α : Type u_3)  :
Prop

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.

Instances of this typeclass
theorem compact_basis_nhds {α : Type u} (x : α) :
(nhds x).has_basis (λ (s : set α), s nhds x (λ (s : set α), s)
theorem local_compact_nhds {α : Type u} {x : α} {n : set α} (h : n nhds x) :
(s : set α) (H : s nhds x), s n
theorem locally_compact_space_of_has_basis {α : Type u} {ι : α Type u_1} {p : Π (x : α), ι x Prop} {s : Π (x : α), ι x set α} (h : (x : α), (nhds x).has_basis (p x) (s x)) (hc : (x : α) (i : ι x), p x i is_compact (s x i)) :
@[protected, instance]
def prod.locally_compact_space (α : Type u_1) (β : Type u_2)  :
@[protected, instance]
def pi.locally_compact_space_of_finite {ι : Type u_1} {π : ι Type u_2} [Π (i : ι), topological_space (π i)] [ (i : ι), ] [finite ι] :
locally_compact_space (Π (i : ι), π i)

In general it suffices that all but finitely many of the spaces are compact, but that's not straightforward to state and use.

@[protected, instance]
def pi.locally_compact_space {ι : Type u_1} {π : ι Type u_2} [Π (i : ι), topological_space (π i)] [ (i : ι), ] [ (i : ι), compact_space (π i)] :
locally_compact_space (Π (i : ι), π i)

For spaces that are not Hausdorff.

@[protected, instance]
@[protected, instance]
def function.locally_compact_space {β : Type v} {ι : Type u_1}  :
theorem exists_compact_subset {α : Type u} {x : α} {U : set α} (hU : is_open U) (hx : x U) :
(K : set α), x K U

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.

theorem exists_compact_mem_nhds {α : Type u} (x : α) :
(K : set α), K nhds x

In a locally compact space every point has a compact neighborhood.

theorem exists_compact_between {α : Type u} [hα : locally_compact_space α] {K U : set α} (hK : is_compact K) (hU : is_open U) (h_KU : K U) :
(L : set α), K L U

In a locally compact space, for every containement `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`.

theorem exists_compact_superset {α : Type u} {K : set α} (hK : is_compact K) :
(K' : set α), K interior K'

In a locally compact space, every compact set is contained in the interior of a compact set.

@[protected]
theorem closed_embedding.locally_compact_space {α : Type u} {β : Type v} {f : α β} (hf : closed_embedding f) :
@[protected]
theorem is_closed.locally_compact_space {α : Type u} {s : set α} (hs : is_closed s) :
@[protected]
theorem open_embedding.locally_compact_space {α : Type u} {β : Type v} {f : α β} (hf : open_embedding f) :
@[protected]
theorem is_open.locally_compact_space {α : Type u} {s : set α} (hs : is_open s) :
theorem ultrafilter.le_nhds_Lim {α : Type u} (F : ultrafilter α) :
theorem is_closed.exists_minimal_nonempty_closed_subset {α : Type u} {S : set α} (hS : is_closed S) (hne : S.nonempty) :
(V : set α), V S V.nonempty (V' : set α), V' V V'.nonempty V' = V
@[class]
structure sigma_compact_space (α : Type u_3)  :
Prop

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 `topological_space.compact_covering`.

Instances of this typeclass
@[protected, instance]
theorem sigma_compact_space.of_countable {α : Type u} (S : set (set α)) (Hc : S.countable) (Hcomp : (s : set α), s S ) (HU : ⋃₀ S = set.univ) :
@[protected, instance]
def compact_covering (α : Type u)  :

A choice of compact covering for a `σ`-compact space, chosen to be monotone.

Equations
theorem is_compact_compact_covering (α : Type u) (n : ) :
theorem Union_compact_covering (α : Type u)  :
( (n : ), n) = set.univ
theorem compact_covering_subset (α : Type u) ⦃m n : (h : m n) :
theorem exists_mem_compact_covering {α : Type u} (x : α) :
(n : ), x
@[protected, instance]
def prod.sigma_compact_space {α : Type u} {β : Type v}  :
@[protected, instance]
def pi.sigma_compact_space {ι : Type u_1} {π : ι Type u_2} [finite ι] [Π (i : ι), topological_space (π i)] [ (i : ι), sigma_compact_space (π i)] :
sigma_compact_space (Π (i : ι), π i)
@[protected, instance]
def sum.sigma_compact_space {α : Type u} {β : Type v}  :
@[protected, instance]
def sigma.sigma_compact_space {ι : Type u_1} {π : ι Type u_2} [countable ι] [Π (i : ι), topological_space (π i)] [ (i : ι), sigma_compact_space (π i)] :
sigma_compact_space (Σ (i : ι), π i)
@[protected]
theorem closed_embedding.sigma_compact_space {α : Type u} {β : Type v} {e : β α} (he : closed_embedding e) :
@[protected, instance]
def ulift.sigma_compact_space {β : Type v}  :
@[protected]
theorem locally_finite.countable_univ {α : Type u} {ι : Type u_1} {f : ι set α} (hf : locally_finite f) (hne : (i : ι), (f i).nonempty) :

If `α` is a `σ`-compact space, then a locally finite family of nonempty sets of `α` can have only countably many elements, `set.countable` version.

@[protected]
noncomputable def locally_finite.encodable {α : Type u} {ι : Type u_1} {f : ι set α} (hf : locally_finite f) (hne : (i : ι), (f i).nonempty) :

If `f : ι → set α` is a locally finite covering of a σ-compact topological space by nonempty sets, then the index type `ι` is encodable.

Equations
theorem countable_cover_nhds_within_of_sigma_compact {α : Type u} {f : α set α} {s : set α} (hs : is_closed s) (hf : (x : α), x s f x s) :
(t : set α) (H : t s), t.countable s (x : α) (H : x t), f x

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`.

theorem countable_cover_nhds_of_sigma_compact {α : Type u} {f : α set α} (hf : (x : α), f x nhds x) :
(s : set α), s.countable ( (x : α) (H : x s), f x) = set.univ

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.

structure compact_exhaustion (X : Type u_3)  :
Type u_3

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 `compact_exhaustion.choice X` provides a choice of an exhaustion by compact sets. This choice is also available as `(default : compact_exhaustion X)`.

Instances for `compact_exhaustion`
@[protected, instance]
def compact_exhaustion.has_coe_to_fun {α : Type u}  :
(λ (_x : , set α)
Equations
@[protected]
theorem compact_exhaustion.is_compact {α : Type u} (K : compact_exhaustion α) (n : ) :
theorem compact_exhaustion.subset_succ {α : Type u} (K : compact_exhaustion α) (n : ) :
K n K (n + 1)
@[protected]
theorem compact_exhaustion.subset {α : Type u} (K : compact_exhaustion α) ⦃m n : (h : m n) :
K m K n
theorem compact_exhaustion.subset_interior {α : Type u} (K : compact_exhaustion α) ⦃m n : (h : m < n) :
theorem compact_exhaustion.Union_eq {α : Type u} (K : compact_exhaustion α) :
( (n : ), K n) = set.univ
theorem compact_exhaustion.exists_mem {α : Type u} (K : compact_exhaustion α) (x : α) :
(n : ), x K n
@[protected]
noncomputable def compact_exhaustion.find {α : Type u} (K : compact_exhaustion α) (x : α) :

The minimal `n` such that `x ∈ K n`.

Equations
theorem compact_exhaustion.mem_find {α : Type u} (K : compact_exhaustion α) (x : α) :
x K (K.find x)
theorem compact_exhaustion.mem_iff_find_le {α : Type u} (K : compact_exhaustion α) {x : α} {n : } :
x K n K.find x n

Prepend the empty set to a compact exhaustion `K n`.

Equations
@[simp]
theorem compact_exhaustion.find_shiftr {α : Type u} (K : compact_exhaustion α) (x : α) :
K.shiftr.find x = K.find x + 1
theorem compact_exhaustion.mem_diff_shiftr_find {α : Type u} (K : compact_exhaustion α) (x : α) :
x (K.shiftr) (K.find x + 1) \ (K.shiftr) (K.find x)
noncomputable def compact_exhaustion.choice (X : Type u_1)  :

A choice of an exhaustion by compact sets of a locally compact sigma compact space.

Equations
@[protected, instance]
noncomputable def compact_exhaustion.inhabited {α : Type u}  :
Equations
def is_clopen {α : Type u} (s : set α) :
Prop

A set is clopen if it is both open and closed.

Equations
@[protected]
theorem is_clopen.is_open {α : Type u} {s : set α} (hs : is_clopen s) :
@[protected]
theorem is_clopen.is_closed {α : Type u} {s : set α} (hs : is_clopen s) :
theorem is_clopen_iff_frontier_eq_empty {α : Type u} {s : set α} :
theorem is_clopen.frontier_eq {α : Type u} {s : set α} :

Alias of the forward direction of `is_clopen_iff_frontier_eq_empty`.

theorem is_clopen.union {α : Type u} {s t : set α} (hs : is_clopen s) (ht : is_clopen t) :
theorem is_clopen.inter {α : Type u} {s t : set α} (hs : is_clopen s) (ht : is_clopen t) :
@[simp]
theorem is_clopen_empty {α : Type u}  :
@[simp]
theorem is_clopen_univ {α : Type u}  :
theorem is_clopen.compl {α : Type u} {s : set α} (hs : is_clopen s) :
@[simp]
theorem is_clopen_compl_iff {α : Type u} {s : set α} :
theorem is_clopen.diff {α : Type u} {s t : set α} (hs : is_clopen s) (ht : is_clopen t) :
is_clopen (s \ t)
theorem is_clopen.prod {α : Type u} {β : Type v} {s : set α} {t : set β} (hs : is_clopen s) (ht : is_clopen t) :
theorem is_clopen_Union {α : Type u} {β : Type u_1} [finite β] {s : β set α} (h : (i : β), is_clopen (s i)) :
is_clopen ( (i : β), s i)
theorem is_clopen_bUnion {α : Type u} {β : Type u_1} {s : set β} {f : β set α} (hs : s.finite) (h : (i : β), i s is_clopen (f i)) :
is_clopen ( (i : β) (H : i s), f i)
theorem is_clopen_bUnion_finset {α : Type u} {β : Type u_1} {s : finset β} {f : β set α} (h : (i : β), i s is_clopen (f i)) :
is_clopen ( (i : β) (H : i s), f i)
theorem is_clopen_Inter {α : Type u} {β : Type u_1} [finite β] {s : β set α} (h : (i : β), is_clopen (s i)) :
is_clopen ( (i : β), s i)
theorem is_clopen_bInter {α : Type u} {β : Type u_1} {s : set β} (hs : s.finite) {f : β set α} (h : (i : β), i s is_clopen (f i)) :
is_clopen ( (i : β) (H : i s), f i)
theorem is_clopen_bInter_finset {α : Type u} {β : Type u_1} {s : finset β} {f : β set α} (h : (i : β), i s is_clopen (f i)) :
is_clopen ( (i : β) (H : i s), f i)
theorem is_clopen.preimage {α : Type u} {β : Type v} {s : set β} (h : is_clopen s) {f : α β} (hf : continuous f) :
theorem continuous_on.preimage_clopen_of_clopen {α : Type u} {β : Type v} {f : α β} {s : set α} {t : set β} (hf : s) (hs : is_clopen s) (ht : is_clopen t) :
theorem is_clopen_inter_of_disjoint_cover_clopen {α : Type u} {Z a b : set α} (h : is_clopen Z) (cover : Z a b) (ha : is_open a) (hb : is_open b) (hab : b) :

The intersection of a disjoint covering by two open sets of a clopen set will be clopen.

@[simp]
theorem is_clopen_discrete {α : Type u} (x : set α) :
theorem clopen_range_sigma_mk {ι : Type u_1} {σ : ι Type u_2} [Π (i : ι), topological_space (σ i)] {i : ι} :
@[protected]
theorem quotient_map.is_clopen_preimage {α : Type u} {β : Type v} {f : α β} (hf : quotient_map f) {s : set β} :
theorem continuous_bool_indicator_iff_clopen {X : Type u_3} (U : set X) :
def is_preirreducible {α : Type u} (s : set α) :
Prop

A preirreducible set `s` is one where there is no non-trivial pair of disjoint opens on `s`.

Equations
def is_irreducible {α : Type u} (s : set α) :
Prop

An irreducible set `s` is one that is nonempty and where there is no non-trivial pair of disjoint opens on `s`.

Equations
theorem is_irreducible.nonempty {α : Type u} {s : set α} (h : is_irreducible s) :
theorem is_irreducible.is_preirreducible {α : Type u} {s : set α} (h : is_irreducible s) :
theorem is_preirreducible_empty {α : Type u}  :
theorem set.subsingleton.is_preirreducible {α : Type u} {s : set α} (hs : s.subsingleton) :
theorem is_irreducible_singleton {α : Type u} {x : α} :
theorem is_preirreducible_iff_closure {α : Type u} {s : set α} :
theorem is_irreducible_iff_closure {α : Type u} {s : set α} :
theorem is_preirreducible.closure {α : Type u} {s : set α} :

Alias of the reverse direction of `is_preirreducible_iff_closure`.

theorem is_irreducible.closure {α : Type u} {s : set α} :

Alias of the reverse direction of `is_irreducible_iff_closure`.

theorem exists_preirreducible {α : Type u} (s : set α) (H : is_preirreducible s) :
(t : set α), s t (u : set α), t u u = t
def irreducible_components (α : Type u_1)  :
set (set α)

The set of irreducible components of a topological space.

Equations
theorem is_closed_of_mem_irreducible_components {α : Type u} (s : set α) (H : s ) :
theorem irreducible_components_eq_maximals_closed (α : Type u_1)  :
= {s : set α |
def irreducible_component {α : Type u} (x : α) :
set α

A maximal irreducible set that contains a given point.

Equations
theorem irreducible_component_property {α : Type u} (x : α) :
(u : set α),
theorem mem_irreducible_component {α : Type u} {x : α} :
theorem is_irreducible_irreducible_component {α : Type u} {x : α} :
theorem eq_irreducible_component {α : Type u} {x : α} {s : set α} :
theorem is_closed_irreducible_component {α : Type u} {x : α} :
@[class]
structure preirreducible_space (α : Type u)  :
Prop
• is_preirreducible_univ :

A preirreducible space is one where there is no non-trivial pair of disjoint opens.

Instances of this typeclass
@[class]
structure irreducible_space (α : Type u)  :
Prop
• to_preirreducible_space :
• to_nonempty :

An irreducible space is one that is nonempty and where there is no non-trivial pair of disjoint opens.

Instances of this typeclass
theorem irreducible_space_def (α : Type u)  :
theorem nonempty_preirreducible_inter {α : Type u} {s t : set α} :
@[protected]
theorem is_open.dense {α : Type u} {s : set α} (ho : is_open s) (hne : s.nonempty) :

In a (pre)irreducible space, a nonempty open set is dense.

theorem is_preirreducible.image {α : Type u} {β : Type v} {s : set α} (H : is_preirreducible s) (f : α β) (hf : s) :
theorem is_irreducible.image {α : Type u} {β : Type v} {s : set α} (H : is_irreducible s) (f : α β) (hf : s) :
theorem subtype.preirreducible_space {α : Type u} {s : set α} (h : is_preirreducible s) :
theorem subtype.irreducible_space {α : Type u} {s : set α} (h : is_irreducible s) :
@[protected, instance]

An infinite type with cofinite topology is an irreducible topological space.

theorem is_irreducible_iff_sInter {α : Type u} {s : set α} :
(U : finset (set α)), ( (u : set α), u U is_open u) ( (u : set α), u U (s u).nonempty) (s ⋂₀ U).nonempty

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).

theorem is_preirreducible_iff_closed_union_closed {α : Type u} {s : set α} :
(z₁ z₂ : set α), s z₁ z₂ s z₁ s z₂

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.

theorem is_irreducible_iff_sUnion_closed {α : Type u} {s : set α} :
(Z : finset (set α)), ( (z : set α), z Z s ⋃₀ Z ( (z : set α) (H : z Z), s z)

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.

theorem subset_closure_inter_of_is_preirreducible_of_is_open {α : Type u} {S U : set α} (hS : is_preirreducible S) (hU : is_open U) (h : (S U).nonempty) :
S closure (S U)

A nonemtpy open subset of a preirreducible subspace is dense in the subspace.

theorem is_preirreducible.subset_irreducible {α : Type u} {S U Z : set α} (hZ : is_preirreducible Z) (hU : U.nonempty) (hU' : is_open U) (h₁ : U S) (h₂ : S Z) :

If `∅ ≠ U ⊆ S ⊆ Z` such that `U` is open and `Z` is preirreducible, then `S` is irreducible.

theorem is_preirreducible.open_subset {α : Type u} {Z U : set α} (hZ : is_preirreducible Z) (hU : is_open U) (hU' : U Z) :
theorem is_preirreducible.interior {α : Type u} {Z : set α} (hZ : is_preirreducible Z) :
theorem is_preirreducible.preimage {α : Type u} {β : Type v} {Z : set α} (hZ : is_preirreducible Z) {f : β α} (hf : open_embedding f) :