Topological study of spaces Π (n : ℕ), E n
#
When E n
are topological spaces, the space Π (n : ℕ), E n
is naturally a topological space
(with the product topology). When E n
are uniform spaces, it also inherits a uniform structure.
However, it does not inherit a canonical metric space structure of the E n
. Nevertheless, one
can put a noncanonical metric space structure (or rather, several of them). This is done in this
file.
Main definitions and results #
One can define a combinatorial distance on Π (n : ℕ), E n
, as follows:
PiNat.cylinder x n
is the set of pointsy
withx i = y i
fori < n
.PiNat.firstDiff x y
is the first index at whichx i ≠ y i
.PiNat.dist x y
is equal to(1/2) ^ (firstDiff x y)
. It defines a distance onΠ (n : ℕ), E n
, compatible with the topology when theE n
have the discrete topology.PiNat.metricSpace
: the metric space structure, given by this distance. Not registered as an instance. This space is a complete metric space.PiNat.metricSpaceOfDiscreteUniformity
: the same metric space structure, but adjusting the uniformity defeqness when theE n
already have the discrete uniformity. Not registered as an instancePiNat.metricSpaceNatNat
: the particular case ofℕ → ℕ
, not registered as an instance.
These results are used to construct continuous functions on Π n, E n
:
PiNat.exists_retraction_of_isClosed
: given a nonempty closed subsets
ofΠ (n : ℕ), E n
, there exists a retraction ontos
, i.e., a continuous map from the whole space tos
restricting to the identity ons
.exists_nat_nat_continuous_surjective_of_completeSpace
: given any nonempty complete metric space with second-countable topology, there exists a continuous surjection fromℕ → ℕ
onto this space.
One can also put distances on Π (i : ι), E i
when the spaces E i
are metric spaces (not discrete
in general), and ι
is countable.
PiCountable.dist
is the distance onΠ i, E i
given bydist x y = ∑' i, min (1/2)^(encode i) (dist (x i) (y i))
.PiCountable.metricSpace
is the corresponding metric space structure, adjusted so that the uniformity is definitionally the product uniformity. Not registered as an instance.
The firstDiff function #
Cylinders #
In a product space Π n, E n
, the cylinder set of length n
around x
, denoted
cylinder x n
, is the set of sequences y
that coincide with x
on the first n
symbols, i.e.,
such that y i = x i
for all i < n
.
Equations
- PiNat.cylinder x n = {y : (n : ℕ) → E n | ∀ i < n, y i = x i}
Instances For
In the case where E
has constant value α
,
the cylinder cylinder x n
can be identified with the element of List α
consisting of the first n
entries of x
. See cylinder_eq_res
.
We call this list res x n
, the restriction of x
to n
.
Instances For
A distance function on Π n, E n
#
We define a distance function on Π n, E n
, given by dist x y = (1/2)^n
where n
is the first
index at which x
and y
differ. When each E n
has the discrete topology, this distance will
define the right topology on the product space. We do not record a global Dist
instance nor
a MetricSpace
instance, as other distances may be used on these spaces, but we register them as
local instances in this section.
A function to a pseudo-metric-space is 1
-Lipschitz if and only if points in the same cylinder
of length n
are sent to points within distance (1/2)^n
.
Not expressed using LipschitzWith
as we don't have a metric space structure
Metric space structure on Π (n : ℕ), E n
when the spaces E n
have the discrete topology,
where the distance is given by dist x y = (1/2)^n
, where n
is the smallest index where x
and
y
differ. Not registered as a global instance by default.
Warning: this definition makes sure that the topology is defeq to the original product topology,
but it does not take care of a possible uniformity. If the E n
have a uniform structure, then
there will be two non-defeq uniform structures on Π n, E n
, the product one and the one coming
from the metric structure. In this case, use metricSpaceOfDiscreteUniformity
instead.
Equations
- PiNat.metricSpace = MetricSpace.ofDistTopology dist ⋯ ⋯ ⋯ ⋯ ⋯
Instances For
Metric space structure on Π (n : ℕ), E n
when the spaces E n
have the discrete uniformity,
where the distance is given by dist x y = (1/2)^n
, where n
is the smallest index where x
and
y
differ. Not registered as a global instance by default.
Equations
Instances For
Metric space structure on ℕ → ℕ
where the distance is given by dist x y = (1/2)^n
,
where n
is the smallest index where x
and y
differ.
Not registered as a global instance by default.
Equations
Instances For
Retractions inside product spaces #
We show that, in a space Π (n : ℕ), E n
where each E n
is discrete, there is a retraction on
any closed nonempty subset s
, i.e., a continuous map f
from the whole space to s
restricting
to the identity on s
. The map f
is defined as follows. For x ∈ s
, let f x = x
. Otherwise,
consider the longest prefix w
that x
shares with an element of s
, and let f x = z_w
where z_w
is an element of s
starting with w
.
Given a point x
in a product space Π (n : ℕ), E n
, and s
a subset of this space, then
shortestPrefixDiff x s
if the smallest n
for which there is no element of s
having the same
prefix of length n
as x
. If there is no such n
, then use 0
by convention.
Equations
- PiNat.shortestPrefixDiff x s = if h : ∃ (n : ℕ), Disjoint s (PiNat.cylinder x n) then Nat.find h else 0
Instances For
Given a point x
in a product space Π (n : ℕ), E n
, and s
a subset of this space, then
longestPrefix x s
if the largest n
for which there is an element of s
having the same
prefix of length n
as x
. If there is no such n
, use 0
by convention.
Equations
- PiNat.longestPrefix x s = PiNat.shortestPrefixDiff x s - 1
Instances For
If two points x, y
coincide up to length n
, and the longest common prefix of x
with s
is strictly shorter than n
, then the longest common prefix of y
with s
is the same, and both
cylinders of this length based at x
and y
coincide.
Given a closed nonempty subset s
of Π (n : ℕ), E n
, there exists a Lipschitz retraction
onto this set, i.e., a Lipschitz map with range equal to s
, equal to the identity on s
.
Given a closed nonempty subset s
of Π (n : ℕ), E n
, there exists a retraction onto this
set, i.e., a continuous map with range equal to s
, equal to the identity on s
.
Any nonempty complete second countable metric space is the continuous image of the
fundamental space ℕ → ℕ
. For a version of this theorem in the context of Polish spaces, see
exists_nat_nat_continuous_surjective_of_polishSpace
.
Products of (possibly non-discrete) metric spaces #
Given a countable family of metric spaces, one may put a distance on their product Π i, E i
.
It is highly non-canonical, though, and therefore not registered as a global instance.
The distance we use here is dist x y = ∑' i, min (1/2)^(encode i) (dist (x i) (y i))
.
Equations
- PiCountable.dist = { dist := fun (x y : (i : ι) → F i) => ∑' (i : ι), min ((1 / 2) ^ Encodable.encode i) (dist (x i) (y i)) }
Instances For
Given a countable family of metric spaces, one may put a distance on their product Π i, E i
,
defining the right topology and uniform structure. It is highly non-canonical, though, and therefore
not registered as a global instance.
The distance we use here is dist x y = ∑' n, min (1/2)^(encode i) (dist (x n) (y n))
.
Equations
- PiCountable.metricSpace = MetricSpace.mk ⋯