Uniform spaces #
Uniform spaces are a generalization of metric spaces and topological groups. Many concepts directly generalize to uniform spaces, e.g.
- uniform continuity (in this file)
- completeness (in
Cauchy.lean) - extension of uniform continuous functions to complete spaces (in
IsUniformEmbedding.lean) - totally bounded sets (in
Cauchy.lean) - totally bounded complete sets are compact (in
Cauchy.lean)
A uniform structure on a type X is a filter 𝓤 X on X × X satisfying some conditions which makes it reasonable to say that ∀ᶠ (p : X × X) in 𝓤 X, ... means "for all p.1 and p.2 in X close enough, ...". Elements of this filter are called entourages of X. The two main examples are:
- If
Xis a metric space,V ∈ 𝓤 X ↔ ∃ ε > 0, { p | dist p.1 p.2 < ε } ⊆ V - If
Gis an additive topological group,V ∈ 𝓤 G ↔ ∃ U ∈ 𝓝 (0 : G), {p | p.2 - p.1 ∈ U} ⊆ V
Those examples are generalizations in two different directions of the elementary example where X = ℝ and V ∈ 𝓤 ℝ ↔ ∃ ε > 0, { p | |p.2 - p.1| < ε } ⊆ V which features both the topological group structure on ℝ and its metric space structure.
Each uniform structure on X induces a topology on X characterized by
nhds_eq_comap_uniformity : ∀ {x : X}, 𝓝 x = comap (Prod.mk x) (𝓤 X)
where Prod.mk x : X → X × X := (fun y ↦ (x, y)) is the partial evaluation of the product constructor.
The dictionary with metric spaces includes:
- an upper bound for
dist x ytranslates into(x, y) ∈ Vfor someV ∈ 𝓤 X - a ball
ball x rroughly corresponds toUniformSpace.ball x V := {y | (x, y) ∈ V}for someV ∈ 𝓤 X, but the later is more general (it includes in particular both open and closed balls for suitableV). In particular we have:isOpen_iff_ball_subset {s : Set X} : IsOpen s ↔ ∀ x ∈ s, ∃ V ∈ 𝓤 X, ball x V ⊆ s
The triangle inequality is abstracted to a statement involving the composition of relations in X. First note that the triangle inequality in a metric space is equivalent to ∀ (x y z : X) (r r' : ℝ), dist x y ≤ r → dist y z ≤ r' → dist x z ≤ r + r'. Then, for any V and W with type Set (X × X), the composition V ○ W : Set (X × X) is defined as { p : X × X | ∃ z, (p.1, z) ∈ V ∧ (z, p.2) ∈ W }. In the metric space case, if V = { p | dist p.1 p.2 ≤ r } and W = { p | dist p.1 p.2 ≤ r' } then the triangle inequality, as reformulated above, says V ○ W is contained in {p | dist p.1 p.2 ≤ r + r'} which is the entourage associated to the radius r + r'. In general we have mem_ball_comp (h : y ∈ ball x V) (h' : z ∈ ball y W) : z ∈ ball x (V ○ W). Note that this discussion does not depend on any axiom imposed on the uniformity filter, it is simply captured by the definition of composition.
The uniform space axioms ask the filter 𝓤 X to satisfy the following:
- every
V ∈ 𝓤 Xcontains the diagonalidRel = { p | p.1 = p.2 }. This abstracts the fact thatdist x x ≤ rfor every non-negative radiusrin the metric space case and also thatx - xbelongs to every neighborhood of zero in the topological group case. V ∈ 𝓤 X → Prod.swap '' V ∈ 𝓤 X. This is tightly related the fact thatdist x y = dist y xin a metric space, and to continuity of negation in the topological group case.∀ V ∈ 𝓤 X, ∃ W ∈ 𝓤 X, W ○ W ⊆ V. In the metric space case, it corresponds to cutting the radius of a ball in half and applying the triangle inequality. In the topological group case, it comes from continuity of addition at(0, 0).
These three axioms are stated more abstractly in the definition below, in terms of operations on filters, without directly manipulating entourages.
Main definitions #
UniformSpace Xis a uniform space structure on a typeXUniformContinuous fis a predicate saying a functionf : α → βbetween uniform spaces is uniformly continuous :∀ r ∈ 𝓤 β, ∀ᶠ (x : α × α) in 𝓤 α, (f x.1, f x.2) ∈ r
Notation #
Localized in Uniformity, we have the notation 𝓤 X for the uniformity on a uniform space X, and ○ for composition of relations, seen as terms with type Set (X × X).
Implementation notes #
We use the theory of relations as sets developed in Mathlib/Data/Rel.lean. The relevant definition is SetRel X X := Set (X × X), which is the type of elements of the uniformity filter 𝓤 X : Filter (X × X).
The structure UniformSpace X bundles a uniform structure on X, a topology on X and an assumption saying those are compatible. This may not seem mathematically reasonable at first, but is in fact an instance of the forgetful inheritance pattern. See Note [forgetful inheritance] below.
References #
The formalization uses the books:
But it makes a more systematic use of the filter library.
The relation is invariant under swapping factors.
Equations
- IsSymmetricRel V = (Prod.swap ⁻¹' V = V)
Instances For
Alias of IsSymmetricRel.
The relation is invariant under swapping factors.
Equations
Instances For
The maximal symmetric relation contained in a given relation.
Equations
- symmetrizeRel V = V ∩ Prod.swap ⁻¹' V
Instances For
Alias of IsSymmetricRel.mk_mem_comm.
Alias of IsSymmetricRel.eq.
Alias of IsSymmetricRel.inter.
This core description of a uniform space is outside of the type class hierarchy. It is useful for constructions of uniform spaces, when the topology is derived from the uniform space.
The uniformity filter. Once
UniformSpaceis defined,𝓤 α(_root_.uniformity) becomes the normal form.Every set in the uniformity filter includes the diagonal.
- symm : Filter.Tendsto Prod.swap self.uniformity self.uniformity
If
s ∈ uniformity, thenProd.swap ⁻¹' s ∈ uniformity. For every set
u ∈ uniformity, there existsv ∈ uniformitysuch thatv ○ v ⊆ u.
Instances For
An alternative constructor for UniformSpace.Core. This version unfolds various Filter-related definitions.
Equations
- UniformSpace.Core.mk' U refl symm comp = { uniformity := U, refl := ⋯, symm := symm, comp := ⋯ }
Instances For
Defining a UniformSpace.Core from a filter basis satisfying some uniformity-like axioms.
Equations
- UniformSpace.Core.mkOfBasis B refl symm comp = { uniformity := B.filter, refl := ⋯, symm := ⋯, comp := ⋯ }
Instances For
A uniform space generates a topological space
Equations
- u.toTopologicalSpace = TopologicalSpace.mkOfNhds fun (x : α) => Filter.comap (Prod.mk x) u.uniformity
Instances For
A uniform space is a generalization of the "uniform" topological aspects of a metric space. It consists of a filter on α × α called the "uniformity", which satisfies properties analogous to the reflexivity, symmetry, and triangle properties of a metric.
A metric space has a natural uniformity, and a uniform space has a natural topology. A topological group also has a natural uniformity, even when it is not metrizable.
- isOpen_inter (s t : Set α) : TopologicalSpace.IsOpen s → TopologicalSpace.IsOpen t → TopologicalSpace.IsOpen (s ∩ t)
- isOpen_sUnion (s : Set (Set α)) : (∀ t ∈ s, TopologicalSpace.IsOpen t) → TopologicalSpace.IsOpen (⋃₀ s)
The uniformity filter.
If
s ∈ uniformity, thenProd.swap ⁻¹' s ∈ uniformity.- comp : (UniformSpace.uniformity.lift' fun (s : Set (α × α)) => SetRel.comp s s) ≤ UniformSpace.uniformity
For every set
u ∈ uniformity, there existsv ∈ uniformitysuch thatv ○ v ⊆ u. The uniformity agrees with the topology: the neighborhoods filter of each point
xis equal toFilter.comap (Prod.mk x) (𝓤 α).
Instances
The uniformity is a filter on α × α (inferred from an ambient uniform space structure on α).
Equations
Instances For
Notation for the uniformity filter with respect to a non-standard UniformSpace instance.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The uniformity is a filter on α × α (inferred from an ambient uniform space structure on α).
Equations
- Uniformity.term𝓤 = Lean.ParserDescr.node `Uniformity.term𝓤 1024 (Lean.ParserDescr.symbol "𝓤")
Instances For
Construct a UniformSpace from a u : UniformSpace.Core and a TopologicalSpace structure that is equal to u.toTopologicalSpace.
Equations
- UniformSpace.ofCoreEq u t h = { toTopologicalSpace := t, uniformity := u.uniformity, symm := ⋯, comp := ⋯, nhds_eq_comap_uniformity := ⋯ }
Instances For
Construct a UniformSpace.Core from a UniformSpace.
Equations
- u.toCore = { uniformity := UniformSpace.uniformity, refl := ⋯, symm := ⋯, comp := ⋯ }
Instances For
Replace topology in a UniformSpace instance with a propositionally (but possibly not definitionally) equal one.
Equations
- u.replaceTopology h = { toTopologicalSpace := i, uniformity := UniformSpace.uniformity, symm := ⋯, comp := ⋯, nhds_eq_comap_uniformity := ⋯ }
Instances For
Relation fun f g ↦ Tendsto (fun x ↦ (f x, g x)) l (𝓤 α) is transitive.
Relation fun f g ↦ Tendsto (fun x ↦ (f x, g x)) l (𝓤 α) is symmetric.
Relation fun f g ↦ Tendsto (fun x ↦ (f x, g x)) l (𝓤 α) is reflexive.
Symmetric entourages form a basis of 𝓤 α
See also comp3_mem_uniformity.
See also comp_open_symm_mem_uniformity_sets.
Balls in uniform spaces #
The ball around (x : β) with respect to (V : Set (β × β)). Intended to be used for V ∈ 𝓤 β, but this is not needed for the definition. Recovers the notions of metric space ball when V = {p | dist p.1 p.2 < r }.
Equations
- UniformSpace.ball x V = Prod.mk x ⁻¹' V
Instances For
The triangle inequality for UniformSpace.ball
Neighborhoods in uniform spaces #
See also isOpen_iff_isOpen_ball_subset.
Uniform continuity #
A function f : α → β is uniformly continuous if (f x, f y) tends to the diagonal as (x, y) tends to the diagonal. In other words, if x is sufficiently close to y, then f x is close to f y no matter where x and y are located in α.
Equations
- UniformContinuous f = Filter.Tendsto (fun (x : α × α) => (f x.1, f x.2)) (uniformity α) (uniformity β)
Instances For
Notation for uniform continuity with respect to non-standard UniformSpace instances.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A function f : α → β is uniformly continuous on s : Set α if (f x, f y) tends to the diagonal as (x, y) tends to the diagonal while remaining in s ×ˢ s. In other words, if x is sufficiently close to y, then f x is close to f y no matter where x and y are located in s.
Equations
- UniformContinuousOn f s = Filter.Tendsto (fun (x : α × α) => (f x.1, f x.2)) (uniformity α ⊓ Filter.principal (s ×ˢ s)) (uniformity β)
Instances For
If a function T is uniformly continuous in a uniform space β, then its n-th iterate T^[n] is also uniformly continuous.