# mathlibdocumentation

topology.sequences

# Sequences in topological spaces #

In this file we define sequences in topological spaces and show how they are related to filters and the topology.

## Main definitions #

### Set operation #

• seq_closure s: sequential closure of a set, the set of limits of sequences of points of s;

### Predicates #

• is_seq_closed s: predicate saying that a set is sequentially closed, i.e., seq_closure s ⊆ s;
• seq_continuous f: predicate saying that a function is sequentially continuous, i.e., for any sequence u : ℕ → X that converges to a point x, the sequence f ∘ u converges to f x;
• is_seq_compact s: predicate saying that a set is sequentially compact, i.e., every sequence taking values in s has a converging subsequence.

### Type classes #

• frechet_urysohn_space X: a typeclass saying that a topological space is a Fréchet-Urysohn space, i.e., the sequential closure of any set is equal to its closure.
• sequential_space X: a typeclass saying that a topological space is a sequential space, i.e., any sequentially closed set in this space is closed. This condition is weaker than being a Fréchet-Urysohn space.
• seq_compact_space X: a typeclass saying that a topological space is sequentially compact, i.e., every sequence in X has a converging subsequence.

## Main results #

• seq_closure_subset_closure: closure of a set includes its sequential closure;
• is_closed.is_seq_closed: a closed set is sequentially closed;
• is_seq_closed.seq_closure_eq: sequential closure of a sequentially closed set s is equal to s;
• seq_closure_eq_closure: in a Fréchet-Urysohn space, the sequential closure of a set is equal to its closure;
• tendsto_nhds_iff_seq_tendsto, frechet_urysohn_space.of_seq_tendsto_imp_tendsto: a topological space is a Fréchet-Urysohn space if and only if sequential convergence implies convergence;
• topological_space.first_countable_topology.frechet_urysohn_space: every topological space with first countable topology is a Fréchet-Urysohn space;
• frechet_urysohn_space.to_sequential_space: every Fréchet-Urysohn space is a sequential space;
• is_seq_compact.is_compact: a sequentially compact set in a uniform space with countably generated uniformity is compact.

## Tags #

sequentially closed, sequentially compact, sequential space

### Sequential closures, sequential continuity, and sequential spaces. #

def seq_closure {X : Type u_1} (s : set X) :
set X

The sequential closure of a set s : set X in a topological space X is the set of all a : X which arise as limit of sequences in s. Note that the sequential closure of a set is not guaranteed to be sequentially closed.

Equations
theorem subset_seq_closure {X : Type u_1} {s : set X} :
s
theorem seq_closure_subset_closure {X : Type u_1} {s : set X} :

The sequential closure of a set is contained in the closure of that set. The converse is not true.

def is_seq_closed {X : Type u_1} (s : set X) :
Prop

A set s is sequentially closed if for any converging sequence x n of elements of s, the limit belongs to s as well. Note that the sequential closure of a set is not guaranteed to be sequentially closed.

Equations
• = ∀ ⦃x : → X⦄ ⦃p : X⦄, (∀ (n : ), x n s)p s
theorem is_seq_closed.seq_closure_eq {X : Type u_1} {s : set X} (hs : is_seq_closed s) :
= s

The sequential closure of a sequentially closed set is the set itself.

theorem is_seq_closed_of_seq_closure_eq {X : Type u_1} {s : set X} (hs : = s) :

If a set is equal to its sequential closure, then it is sequentially closed.

theorem is_seq_closed_iff {X : Type u_1} {s : set X} :
= s

A set is sequentially closed iff it is equal to its sequential closure.

@[protected]
theorem is_closed.is_seq_closed {X : Type u_1} {s : set X} (hc : is_closed s) :

A set is sequentially closed if it is closed.

@[class]
structure frechet_urysohn_space (X : Type u_3)  :
Prop
• closure_subset_seq_closure : ∀ (s : set X),

A topological space is called a Fréchet-Urysohn space, if the sequential closure of any set is equal to its closure. Since one of the inclusions is trivial, we require only the non-trivial one in the definition.

Instances of this typeclass
theorem seq_closure_eq_closure {X : Type u_1} (s : set X) :
theorem mem_closure_iff_seq_limit {X : Type u_1} {s : set X} {a : X} :
a ∃ (x : → X), (∀ (n : ), x n s)

In a Fréchet-Urysohn space, a point belongs to the closure of a set iff it is a limit of a sequence taking values in this set.

theorem tendsto_nhds_iff_seq_tendsto {X : Type u_1} {Y : Type u_2} {f : X → Y} {a : X} {b : Y} :
(nhds a) (nhds b) ∀ (u : → X), filter.tendsto (f u) filter.at_top (nhds b)

If the domain of a function f : α → β is a Fréchet-Urysohn space, then convergence is equivalent to sequential convergence. See also filter.tendsto_iff_seq_tendsto for a version that works for any pair of filters assuming that the filter in the domain is countably generated.

This property is equivalent to the definition of frechet_urysohn_space, see frechet_urysohn_space.of_seq_tendsto_imp_tendsto.

theorem frechet_urysohn_space.of_seq_tendsto_imp_tendsto {X : Type u_1} (h : ∀ (f : X → Prop) (a : X), (∀ (u : → X), filter.tendsto (f u) filter.at_top (nhds (f a)))) :

An alternative construction for frechet_urysohn_space: if sequential convergence implies convergence, then the space is a Fréchet-Urysohn space.

@[protected, instance]

Every first-countable space is a Fréchet-Urysohn space.

@[class]
structure sequential_space (X : Type u_3)  :
Prop
• is_closed_of_seq : ∀ (s : set X),

A topological space is said to be a sequential space if any sequentially closed set in this space is closed. This condition is weaker than being a Fréchet-Urysohn space.

Instances of this typeclass
@[protected, instance]

Every Fréchet-Urysohn space is a sequential space.

@[protected]
theorem is_seq_closed.is_closed {X : Type u_1} {s : set X} (hs : is_seq_closed s) :

In a sequential space, a sequentially closed set is closed.

theorem is_seq_closed_iff_is_closed {X : Type u_1} {M : set X} :

In a sequential space, a set is closed iff it's sequentially closed.

def seq_continuous {X : Type u_1} {Y : Type u_2} (f : X → Y) :
Prop

A function between topological spaces is sequentially continuous if it commutes with limit of convergent sequences.

Equations
theorem is_seq_closed.preimage {X : Type u_1} {Y : Type u_2} {f : X → Y} {s : set Y} (hs : is_seq_closed s) (hf : seq_continuous f) :

The preimage of a sequentially closed set under a sequentially continuous map is sequentially closed.

@[protected]
theorem continuous.seq_continuous {X : Type u_1} {Y : Type u_2} {f : X → Y} (hf : continuous f) :
@[protected]
theorem seq_continuous.continuous {X : Type u_1} {Y : Type u_2} {f : X → Y} (hf : seq_continuous f) :

A sequentially continuous function defined on a sequential space is continuous.

theorem continuous_iff_seq_continuous {X : Type u_1} {Y : Type u_2} {f : X → Y} :

If the domain of a function is a sequential space, then continuity of this function is equivalent to its sequential continuity.

theorem quotient_map.sequential_space {X : Type u_1} {Y : Type u_2} {f : X → Y} (hf : quotient_map f) :
@[protected, instance]
def quotient.sequential_space {X : Type u_1} {s : setoid X} :

The quotient of a sequential space is a sequential space.

def is_seq_compact {X : Type u_1} (s : set X) :
Prop

A set s is sequentially compact if every sequence taking values in s has a converging subsequence.

Equations
@[class]
structure seq_compact_space (X : Type u_3)  :
Prop
• seq_compact_univ :

A space X is sequentially compact if every sequence in X has a converging subsequence.

Instances of this typeclass
theorem is_seq_compact.subseq_of_frequently_in {X : Type u_1} {s : set X} (hs : is_seq_compact s) {x : → X} (hx : ∃ᶠ (n : ) in filter.at_top, x n s) :
∃ (a : X) (H : a s) (φ : ), filter.tendsto (x φ) filter.at_top (nhds a)
theorem seq_compact_space.tendsto_subseq {X : Type u_1} (x : → X) :
∃ (a : X) (φ : ), filter.tendsto (x φ) filter.at_top (nhds a)
theorem is_compact.is_seq_compact {X : Type u_1} {s : set X} (hs : is_compact s) :
theorem is_compact.tendsto_subseq' {X : Type u_1} {s : set X} {x : → X} (hs : is_compact s) (hx : ∃ᶠ (n : ) in filter.at_top, x n s) :
∃ (a : X) (H : a s) (φ : ), filter.tendsto (x φ) filter.at_top (nhds a)
theorem is_compact.tendsto_subseq {X : Type u_1} {s : set X} {x : → X} (hs : is_compact s) (hx : ∀ (n : ), x n s) :
∃ (a : X) (H : a s) (φ : ), filter.tendsto (x φ) filter.at_top (nhds a)
@[protected, instance]
theorem compact_space.tendsto_subseq {X : Type u_1} (x : → X) :
∃ (a : X) (φ : ), filter.tendsto (x φ) filter.at_top (nhds a)
theorem lebesgue_number_lemma_seq {X : Type u_1} {s : set X} {ι : Type u_2} {c : ι → set X} (hs : is_seq_compact s) (hc₁ : ∀ (i : ι), is_open (c i)) (hc₂ : s ⋃ (i : ι), c i) :
∃ (V : set (X × X)) (H : V , ∀ (x : X), x s(∃ (i : ι), c i)
theorem is_seq_compact.totally_bounded {X : Type u_1} {s : set X} (h : is_seq_compact s) :
@[protected]
theorem is_seq_compact.is_compact {X : Type u_1} {s : set X} (hs : is_seq_compact s) :
@[protected]
theorem uniform_space.compact_iff_seq_compact {X : Type u_1} {s : set X}  :

A version of Bolzano-Weistrass: in a uniform space with countably generated uniformity filter (e.g., in a metric space), a set is compact if and only if it is sequentially compact.

theorem seq_compact.lebesgue_number_lemma_of_metric {X : Type u_1} {ι : Sort u_2} {c : ι → set X} {s : set X} (hs : is_seq_compact s) (hc₁ : ∀ (i : ι), is_open (c i)) (hc₂ : s ⋃ (i : ι), c i) :
∃ (δ : ) (H : δ > 0), ∀ (a : X), a s(∃ (i : ι), δ c i)
theorem tendsto_subseq_of_frequently_bounded {X : Type u_1} [proper_space X] {s : set X} (hs : metric.bounded s) {x : → X} (hx : ∃ᶠ (n : ) in filter.at_top, x n s) :
∃ (a : X) (H : a closure s) (φ : ), filter.tendsto (x φ) filter.at_top (nhds a)

A version of Bolzano-Weistrass: in a proper metric space (eg. $ℝ^n$), every bounded sequence has a converging subsequence. This version assumes only that the sequence is frequently in some bounded set.

theorem tendsto_subseq_of_bounded {X : Type u_1} [proper_space X] {s : set X} (hs : metric.bounded s) {x : → X} (hx : ∀ (n : ), x n s) :
∃ (a : X) (H : a closure s) (φ : ), filter.tendsto (x φ) filter.at_top (nhds a)

A version of Bolzano-Weistrass: in a proper metric space (eg. $ℝ^n$), every bounded sequence has a converging subsequence.