The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V13. General topology

Mathlib.Topology.UniformSpace.Defs

120 declarations and 16 deprecated aliases. Mathlib docs · Source

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 X is a metric space, V ∈ 𝓤 X ↔ ∃ ε > 0, { p | dist p.1 p.2 < ε } ⊆ V
  • If G is 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 y translates into (x, y) ∈ V for some V ∈ 𝓤 X
  • a ball ball x r roughly corresponds to SetRel.ball V x := {y | (y, x) ∈ V} for some V ∈ 𝓤 X, but the later is more general (it includes in particular both open and closed balls for suitable V). 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 ∈ 𝓤 X contains the diagonal idRel = { p | p.1 = p.2 }. This abstracts the fact that dist x x ≤ r for every non-negative radius r in the metric space case and also that x - x belongs to every neighborhood of zero in the topological group case.
  • V ∈ 𝓤 X → Prod.swap '' V ∈ 𝓤 X. This is tightly related the fact that dist x y = dist y x in 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 X is a uniform space structure on a type X
  • UniformContinuous f is a predicate saying a function f : α → β 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. This file also uses a lot the notation ○ for composition of relations, seen as terms with type SetRel X X. This notation (defined in the file Mathlib/Basic/Rel.lean) is localized in SetRel.

Implementation notes

We use the theory of relations as sets developed in Mathlib/Basic/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:

  • [N. Bourbaki, General Topology][bourbaki1966]
  • [I. M. James, Topologies and Uniformities][james1999]

But it makes a more systematic use of the filter library.

Relations, seen as SetRel α α

Balls in uniform spaces

Neighborhoods in uniform spaces

Uniform continuity

def UniformSpace.Core.ctorIdx E1 #

{α : Type u} → UniformSpace.Core α → ℕ

theorem UniformSpace.Core.mk.injEq E0 #

∀ {α : Type u} (uniformity : Filter (α × α)) (refl : Filter.principal SetRel.id ≤ uniformity)
  (symm : Filter.Tendsto Prod.swap uniformity uniformity)
  (comp : (uniformity.lift' fun s ↦ SetRel.comp s s) ≤ uniformity) (uniformity_1 : Filter (α × α))
  (refl_1 : Filter.principal SetRel.id ≤ uniformity_1) (symm_1 : Filter.Tendsto Prod.swap uniformity_1 uniformity_1)
  (comp_1 : (uniformity_1.lift' fun s ↦ SetRel.comp s s) ≤ uniformity_1),
  ({ uniformity := uniformity, refl := refl, symm := symm, comp := comp } =
      { uniformity := uniformity_1, refl := refl_1, symm := symm_1, comp := comp_1 }) =
    (uniformity = uniformity_1)

def UniformSpace.ctorIdx E1 #

{α : Type u} → UniformSpace α → ℕ

theorem UniformSpace.Core.mk.inj E1 #

∀ {α : Type u} {uniformity : Filter (α × α)} {refl : Filter.principal SetRel.id ≤ uniformity}
  {symm : Filter.Tendsto Prod.swap uniformity uniformity}
  {comp : (uniformity.lift' fun s ↦ SetRel.comp s s) ≤ uniformity} {uniformity_1 : Filter (α × α)}
  {refl_1 : Filter.principal SetRel.id ≤ uniformity_1} {symm_1 : Filter.Tendsto Prod.swap uniformity_1 uniformity_1}
  {comp_1 : (uniformity_1.lift' fun s ↦ SetRel.comp s s) ≤ uniformity_1},
  { uniformity := uniformity, refl := refl, symm := symm, comp := comp } =
      { uniformity := uniformity_1, refl := refl_1, symm := symm_1, comp := comp_1 } →
    uniformity = uniformity_1

theorem SetRel.mem_filter_prod_comm E0 #

∀ {α : Type ua} (R : SetRel α α) {f g : Filter α} [R.IsSymm], R ∈ f ×ˢ g ↔ R ∈ g ×ˢ f

structure UniformSpace.Core E1 #

Type u → Type u

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.

ctor UniformSpace.Core.mk E0 #

{α : Type u} →
  (uniformity : Filter (α × α)) →
    Filter.principal SetRel.id ≤ uniformity →
      Filter.Tendsto Prod.swap uniformity uniformity →
        (uniformity.lift' fun s ↦ SetRel.comp s s) ≤ uniformity → UniformSpace.Core α

abbrev UniformSpace.Core.uniformity E1 #

{α : Type u} → UniformSpace.Core α → Filter (α × α)

The uniformity filter. Once UniformSpace is defined, 𝓤 α (_root_.uniformity) becomes the normal form.

theorem UniformSpace.Core.refl E1 #

∀ {α : Type u} (self : UniformSpace.Core α), Filter.principal SetRel.id ≤ self.uniformity

Every set in the uniformity filter includes the diagonal.

theorem UniformSpace.Core.symm E1 #

∀ {α : Type u} (self : UniformSpace.Core α), Filter.Tendsto Prod.swap self.uniformity self.uniformity

If s ∈ uniformity, then Prod.swap ⁻¹' s ∈ uniformity.

theorem UniformSpace.Core.comp E1 #

∀ {α : Type u} (self : UniformSpace.Core α), (self.uniformity.lift' fun s ↦ SetRel.comp s s) ≤ self.uniformity

For every set u ∈ uniformity, there exists v ∈ uniformity such that v ○ v ⊆ u.

theorem UniformSpace.Core.comp_mem_uniformity_sets E1 #

∀ {α : Type ua} {c : UniformSpace.Core α} {s : SetRel α α}, s ∈ c.uniformity → ∃ t ∈ c.uniformity, SetRel.comp t t ⊆ s

def UniformSpace.Core.mk' E1 #

{α : Type u} →
  (U : Filter (α × α)) →
    (∀ r ∈ U, ∀ (x : α), (x, x) ∈ r) →
      (∀ r ∈ U, Prod.swap ⁻¹' r ∈ U) → (∀ r ∈ U, ∃ t ∈ U, SetRel.comp t t ⊆ r) → UniformSpace.Core α

An alternative constructor for UniformSpace.Core. This version unfolds various Filter-related definitions.

def UniformSpace.Core.mkOfBasis E1 #

{α : Type u} →
  (B : FilterBasis (α × α)) →
    (∀ r ∈ B, ∀ (x : α), (x, x) ∈ r) →
      (∀ r ∈ B, ∃ t ∈ B, t ⊆ Prod.swap ⁻¹' r) → (∀ r ∈ B, ∃ t ∈ B, SetRel.comp t t ⊆ r) → UniformSpace.Core α

Defining a UniformSpace.Core from a filter basis satisfying some uniformity-like axioms.

def UniformSpace.Core.toTopologicalSpace E1 #

{α : Type u} → UniformSpace.Core α → TopologicalSpace α

A uniform space generates a topological space

theorem UniformSpace.Core.ext E1 #

∀ {α : Type ua} {u₁ u₂ : UniformSpace.Core α}, u₁.uniformity = u₂.uniformity → u₁ = u₂

theorem UniformSpace.Core.nhds_toTopologicalSpace E1 #

∀ {α : Type u} (u : UniformSpace.Core α) (x : α), nhds x = Filter.comap (Prod.mk x) u.uniformity

class UniformSpace E3 #

Type u → Type u

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.

ctor UniformSpace.mk E0 #

{α : Type u} →
  [toTopologicalSpace : TopologicalSpace α] →
    (uniformity : Filter (α × α)) →
      Filter.Tendsto Prod.swap uniformity uniformity →
        (uniformity.lift' fun s ↦ SetRel.comp s s) ≤ uniformity →
          (∀ (x : α), nhds x = Filter.comap (Prod.mk x) uniformity) → UniformSpace α

instance UniformSpace.toTopologicalSpace E0 #

{α : Type u} → [self : UniformSpace α] → TopologicalSpace α

abbrev UniformSpace.uniformity E1 #

{α : Type u} → [self : UniformSpace α] → Filter (α × α)

The uniformity filter.

theorem UniformSpace.symm E1 #

∀ {α : Type u} [self : UniformSpace α], Filter.Tendsto Prod.swap UniformSpace.uniformity UniformSpace.uniformity

If s ∈ uniformity, then Prod.swap ⁻¹' s ∈ uniformity.

theorem UniformSpace.comp E1 #

∀ {α : Type u} [self : UniformSpace α],
  (UniformSpace.uniformity.lift' fun s ↦ SetRel.comp s s) ≤ UniformSpace.uniformity

For every set u ∈ uniformity, there exists v ∈ uniformity such that v ○ v ⊆ u.

theorem UniformSpace.nhds_eq_comap_uniformity E1 #

∀ {α : Type u} [self : UniformSpace α] (x : α), nhds x = Filter.comap (Prod.mk x) UniformSpace.uniformity

The uniformity agrees with the topology: the neighborhoods filter of each point x is equal to Filter.comap (Prod.mk x) (𝓤 α).

def uniformity E1 #

(α : Type u) → [UniformSpace α] → Filter (α × α)

The uniformity is a filter on α × α (inferred from an ambient uniform space structure on α).

def Uniformity.«term𝓤[_]» E1 #

Lean.ParserDescr

Notation for the uniformity filter with respect to a non-standard UniformSpace instance.

def Uniformity.term𝓤 E1 #

Lean.ParserDescr

The uniformity is a filter on α × α (inferred from an ambient uniform space structure on α).

abbrev UniformSpace.ofCoreEq E1 #

{α : Type u} → (u : UniformSpace.Core α) → (t : TopologicalSpace α) → t = u.toTopologicalSpace → UniformSpace α

Construct a UniformSpace from a u : UniformSpace.Core and a TopologicalSpace structure that is equal to u.toTopologicalSpace.

abbrev UniformSpace.ofCore E1 #

{α : Type u} → UniformSpace.Core α → UniformSpace α

Construct a UniformSpace from a UniformSpace.Core.

abbrev UniformSpace.toCore E1 #

{α : Type ua} → UniformSpace α → UniformSpace.Core α

Construct a UniformSpace.Core from a UniformSpace.

theorem UniformSpace.toCore_toTopologicalSpace E1 #

∀ {α : Type ua} (u : UniformSpace α), u.toCore.toTopologicalSpace = u.toTopologicalSpace

theorem UniformSpace.mem_uniformity_ofCore_iff E0 #

∀ {α : Type ua} {u : UniformSpace.Core α} {s : SetRel α α}, s ∈ uniformity α ↔ s ∈ u.uniformity

theorem UniformSpace.ext E1 #

∀ {α : Type ua} {u₁ u₂ : UniformSpace α}, uniformity α = uniformity α → u₁ = u₂

theorem UniformSpace.ext_iff E0 #

∀ {α : Type ua} {u₁ u₂ : UniformSpace α}, u₁ = u₂ ↔ ∀ (s : Set (α × α)), s ∈ uniformity α ↔ s ∈ uniformity α

theorem UniformSpace.ofCoreEq_toCore E1 #

∀ {α : Type ua} (u : UniformSpace α) (t : TopologicalSpace α) (h : t = u.toCore.toTopologicalSpace),
  UniformSpace.ofCoreEq u.toCore t h = u

abbrev UniformSpace.replaceTopology E1 #

{α : Type u_2} → [i : TopologicalSpace α] → (u : UniformSpace α) → i = u.toTopologicalSpace → UniformSpace α

Replace topology in a UniformSpace instance with a propositionally (but possibly not definitionally) equal one.

theorem UniformSpace.replaceTopology_eq E0 #

∀ {α : Type u_2} [i : TopologicalSpace α] (u : UniformSpace α) (h : i = u.toTopologicalSpace), u.replaceTopology h = u

theorem nhds_eq_comap_uniformity E1 #

∀ {α : Type ua} [inst : UniformSpace α] {x : α}, nhds x = Filter.comap (Prod.mk x) (uniformity α)

theorem isOpen_uniformity E1 #

∀ {α : Type ua} [inst : UniformSpace α] {s : Set α}, IsOpen s ↔ ∀ x ∈ s, {p | p.1 = x → p.2 ∈ s} ∈ uniformity α

theorem refl_le_uniformity E1 #

∀ {α : Type ua} [inst : UniformSpace α], Filter.principal SetRel.id ≤ uniformity α

instance uniformity.neBot E0 #

∀ {α : Type ua} [inst : UniformSpace α] [Nonempty α], (uniformity α).NeBot

theorem refl_mem_uniformity E1 #

∀ {α : Type ua} [inst : UniformSpace α] {x : α} {s : SetRel α α}, s ∈ uniformity α → (x, x) ∈ s

theorem isRefl_of_mem_uniformity E1 #

∀ {α : Type ua} [inst : UniformSpace α] {s : SetRel α α}, s ∈ uniformity α → s.IsRefl

theorem mem_uniformity_of_eq E0 #

∀ {α : Type ua} [inst : UniformSpace α] {x y : α} {s : SetRel α α}, s ∈ uniformity α → x = y → (x, y) ∈ s

theorem symm_le_uniformity E1 #

∀ {α : Type ua} [inst : UniformSpace α], Filter.map Prod.swap (uniformity α) ≤ uniformity α

theorem comp_le_uniformity E1 #

∀ {α : Type ua} [inst : UniformSpace α], ((uniformity α).lift' fun s ↦ s.comp s) ≤ uniformity α

theorem lift'_comp_uniformity E1 #

∀ {α : Type ua} [inst : UniformSpace α], ((uniformity α).lift' fun s ↦ s.comp s) = uniformity α

theorem tendsto_swap_uniformity E1 #

∀ {α : Type ua} [inst : UniformSpace α], Filter.Tendsto Prod.swap (uniformity α) (uniformity α)

theorem comp_mem_uniformity_sets E1 #

∀ {α : Type ua} [inst : UniformSpace α] {s : SetRel α α}, s ∈ uniformity α → ∃ t ∈ uniformity α, SetRel.comp t t ⊆ s

theorem Filter.Tendsto.uniformity_trans E1 #

∀ {α : Type ua} {β : Type ub} [inst : UniformSpace α] {l : Filter β} {f₁ f₂ f₃ : β → α},
  Filter.Tendsto (fun x ↦ (f₁ x, f₂ x)) l (uniformity α) →
    Filter.Tendsto (fun x ↦ (f₂ x, f₃ x)) l (uniformity α) → Filter.Tendsto (fun x ↦ (f₁ x, f₃ x)) l (uniformity α)

Relation fun f g ↦ Tendsto (fun x ↦ (f x, g x)) l (𝓤 α) is transitive.

theorem Filter.Tendsto.uniformity_symm E1 #

∀ {α : Type ua} {β : Type ub} [inst : UniformSpace α] {l : Filter β} {f : β → α × α},
  Filter.Tendsto f l (uniformity α) → Filter.Tendsto (fun x ↦ ((f x).2, (f x).1)) l (uniformity α)

Relation fun f g ↦ Tendsto (fun x ↦ (f x, g x)) l (𝓤 α) is symmetric.

theorem tendsto_diag_uniformity E1 #

∀ {α : Type ua} {β : Type ub} [inst : UniformSpace α] (f : β → α) (l : Filter β),
  Filter.Tendsto (fun x ↦ (f x, f x)) l (uniformity α)

Relation fun f g ↦ Tendsto (fun x ↦ (f x, g x)) l (𝓤 α) is reflexive.

theorem tendsto_const_uniformity E1 #

∀ {α : Type ua} {β : Type ub} [inst : UniformSpace α] {a : α} {f : Filter β},
  Filter.Tendsto (fun x ↦ (a, a)) f (uniformity α)

theorem symm_of_uniformity E1 #

∀ {α : Type ua} [inst : UniformSpace α] {s : SetRel α α}, s ∈ uniformity α → ∃ t ∈ uniformity α, SetRel.IsSymm t ∧ t ⊆ s

theorem comp_symm_of_uniformity E1 #

∀ {α : Type ua} [inst : UniformSpace α] {s : SetRel α α},
  s ∈ uniformity α → ∃ t ∈ uniformity α, (∀ {a b : α}, (a, b) ∈ t → (b, a) ∈ t) ∧ SetRel.comp t t ⊆ s

theorem uniformity_le_symm E1 #

∀ {α : Type ua} [inst : UniformSpace α], uniformity α ≤ Filter.map Prod.swap (uniformity α)

theorem uniformity_eq_symm E1 #

∀ {α : Type ua} [inst : UniformSpace α], uniformity α = Filter.map Prod.swap (uniformity α)

theorem comap_swap_uniformity E0 #

∀ {α : Type ua} [inst : UniformSpace α], Filter.comap Prod.swap (uniformity α) = uniformity α

theorem symmetrize_mem_uniformity E1 #

∀ {α : Type ua} [inst : UniformSpace α] {V : SetRel α α}, V ∈ uniformity α → V.symmetrize ∈ uniformity α

theorem UniformSpace.hasBasis_symmetric E1 #

∀ {α : Type ua} [inst : UniformSpace α], (uniformity α).HasBasis (fun s ↦ s ∈ uniformity α ∧ s.IsSymm) id

Symmetric entourages form a basis of 𝓤 α

theorem uniformity_lift_le_swap E1 #

∀ {α : Type ua} {β : Type ub} [inst : UniformSpace α] {g : SetRel α α → Filter β} {f : Filter β},
  Monotone g → ((uniformity α).lift fun s ↦ g (Prod.swap ⁻¹' s)) ≤ f → (uniformity α).lift g ≤ f

theorem uniformity_lift_le_comp E1 #

∀ {α : Type ua} {β : Type ub} [inst : UniformSpace α] {f : SetRel α α → Filter β},
  Monotone f → ((uniformity α).lift fun s ↦ f (SetRel.comp s s)) ≤ (uniformity α).lift f

theorem comp3_mem_uniformity E1 #

∀ {α : Type ua} [inst : UniformSpace α] {s : SetRel α α},
  s ∈ uniformity α → ∃ t ∈ uniformity α, SetRel.comp t (SetRel.comp t t) ⊆ s

theorem comp_le_uniformity3 E1 #

∀ {α : Type ua} [inst : UniformSpace α], ((uniformity α).lift' fun s ↦ s.comp (s.comp s)) ≤ uniformity α

See also comp3_mem_uniformity.

theorem comp_symm_mem_uniformity_sets E1 #

∀ {α : Type ua} [inst : UniformSpace α] {s : SetRel α α},
  s ∈ uniformity α → ∃ t ∈ uniformity α, SetRel.IsSymm t ∧ SetRel.comp t t ⊆ s

See also comp_open_symm_mem_uniformity_sets.

theorem subset_comp_self_of_mem_uniformity E1 #

∀ {α : Type ua} [inst : UniformSpace α] {s : SetRel α α}, s ∈ uniformity α → s ⊆ s.comp s

theorem comp_comp_symm_mem_uniformity_sets E1 #

∀ {α : Type ua} [inst : UniformSpace α] {s : SetRel α α},
  s ∈ uniformity α → ∃ t ∈ uniformity α, SetRel.IsSymm t ∧ (SetRel.comp t t).comp t ⊆ s

theorem mem_nhds_uniformity_iff_right E0 #

∀ {α : Type ua} [inst : UniformSpace α] {x : α} {s : Set α}, s ∈ nhds x ↔ {p | p.1 = x → p.2 ∈ s} ∈ uniformity α

theorem mem_nhds_uniformity_iff_left E0 #

∀ {α : Type ua} [inst : UniformSpace α] {x : α} {s : Set α}, s ∈ nhds x ↔ {p | p.2 = x → p.1 ∈ s} ∈ uniformity α

theorem nhdsWithin_eq_comap_uniformity_of_mem E1 #

∀ {α : Type ua} [inst : UniformSpace α] {x : α} {T : Set α},
  x ∈ T → ∀ (S : Set α), nhdsWithin x S = Filter.comap (Prod.mk x) (uniformity α ⊓ Filter.principal (T ×ˢ S))

theorem nhdsWithin_eq_comap_uniformity E1 #

∀ {α : Type ua} [inst : UniformSpace α] {x : α} (S : Set α),
  nhdsWithin x S = Filter.comap (Prod.mk x) (uniformity α ⊓ Filter.principal (Set.univ ×ˢ S))

theorem nhds_basis_uniformity' E3 #

∀ {α : Type ua} {ι : Sort u_1} [inst : UniformSpace α] {p : ι → Prop} {s : ι → SetRel α α},
  (uniformity α).HasBasis p s → ∀ {x : α}, (nhds x).HasBasis p fun i ↦ (s i).inv.ball x

theorem nhds_basis_uniformity E1 #

∀ {α : Type ua} {ι : Sort u_1} [inst : UniformSpace α] {p : ι → Prop} {s : ι → SetRel α α},
  (uniformity α).HasBasis p s → ∀ {x : α}, (nhds x).HasBasis p fun i ↦ (s i).ball x

theorem nhds_eq_comap_uniformity' E1 #

∀ {α : Type ua} [inst : UniformSpace α] {x : α}, nhds x = Filter.comap (fun y ↦ (y, x)) (uniformity α)

theorem nhdsWithin_eq_comap_uniformity_of_mem' E1 #

∀ {α : Type ua} [inst : UniformSpace α] {x : α} {T : Set α},
  x ∈ T → ∀ (S : Set α), nhdsWithin x S = Filter.comap (fun y ↦ (y, x)) (uniformity α ⊓ Filter.principal (S ×ˢ T))

theorem UniformSpace.mem_nhds_iff E0 #

∀ {α : Type ua} [inst : UniformSpace α] {x : α} {s : Set α}, s ∈ nhds x ↔ ∃ V ∈ uniformity α, SetRel.ball V x ⊆ s

theorem isOpen_iff_ball_subset E1 #

∀ {α : Type ua} [inst : UniformSpace α] {s : Set α}, IsOpen s ↔ ∀ x ∈ s, ∃ V ∈ uniformity α, SetRel.ball V x ⊆ s

See also isOpen_iff_isOpen_ball_subset.

theorem SetRel.ball_mem_nhds E1 #

∀ {α : Type ua} [inst : UniformSpace α] (x : α) ⦃V : SetRel α α⦄, V ∈ uniformity α → V.ball x ∈ nhds x

theorem SetRel.ball_mem_nhdsWithin E1 #

∀ {α : Type ua} [inst : UniformSpace α] {x : α} {S : Set α} ⦃V : SetRel α α⦄,
  x ∈ S → V ∈ uniformity α ⊓ Filter.principal (S ×ˢ S) → V.ball x ∈ nhdsWithin x S

theorem SetRel.inv_ball_mem_nhdsWithin E1 #

∀ {α : Type ua} [inst : UniformSpace α] {x : α} {S : Set α} ⦃V : SetRel α α⦄,
  x ∈ S → V ∈ uniformity α ⊓ Filter.principal (S ×ˢ S) → V.inv.ball x ∈ nhdsWithin x S

theorem UniformSpace.mem_nhds_iff_symm E0 #

∀ {α : Type ua} [inst : UniformSpace α] {x : α} {s : Set α},
  s ∈ nhds x ↔ ∃ V ∈ uniformity α, SetRel.IsSymm V ∧ SetRel.ball V x ⊆ s

theorem UniformSpace.hasBasis_nhds E1 #

∀ {α : Type ua} [inst : UniformSpace α] (x : α),
  (nhds x).HasBasis (fun s ↦ s ∈ uniformity α ∧ s.IsSymm) fun s ↦ s.ball x

theorem UniformSpace.mem_closure_iff_symm_ball E0 #

∀ {α : Type ua} [inst : UniformSpace α] {s : Set α} {x : α},
  x ∈ closure s ↔ ∀ {V : SetRel α α}, V ∈ uniformity α → V.IsSymm → (s ∩ V.ball x).Nonempty

theorem UniformSpace.mem_closure_iff_ball E0 #

∀ {α : Type ua} [inst : UniformSpace α] {s : Set α} {x : α},
  x ∈ closure s ↔ ∀ {V : SetRel α α}, V ∈ uniformity α → (V.ball x ∩ s).Nonempty

theorem UniformSpace.closure_subset_image E1 #

∀ {α : Type ua} [inst : UniformSpace α] {U : SetRel α α}, U ∈ uniformity α → ∀ (s : Set α), closure s ⊆ U.image s

theorem UniformSpace.closure_subset_preimage E1 #

∀ {α : Type ua} [inst : UniformSpace α] {U : SetRel α α}, U ∈ uniformity α → ∀ (s : Set α), closure s ⊆ U.preimage s

theorem nhds_eq_uniformity E1 #

∀ {α : Type ua} [inst : UniformSpace α] {x : α}, nhds x = (uniformity α).lift' fun s ↦ s.inv.ball x

theorem nhds_eq_uniformity' E1 #

∀ {α : Type ua} [inst : UniformSpace α] {x : α}, nhds x = (uniformity α).lift' fun s ↦ s.ball x

theorem mem_nhds_right E0 #

∀ {α : Type ua} [inst : UniformSpace α] (y : α) {s : SetRel α α}, s ∈ uniformity α → {x | (x, y) ∈ s} ∈ nhds y

theorem mem_nhds_left E0 #

∀ {α : Type ua} [inst : UniformSpace α] (x : α) {s : SetRel α α}, s ∈ uniformity α → {y | (x, y) ∈ s} ∈ nhds x

theorem exists_mem_nhds_ball_subset_of_mem_nhds E1 #

∀ {α : Type ua} [inst : UniformSpace α] {a : α} {U : Set α},
  U ∈ nhds a → ∃ V ∈ nhds a, ∃ t ∈ uniformity α, ∀ a' ∈ V, SetRel.ball t a' ⊆ U

theorem tendsto_right_nhds_uniformity E1 #

∀ {α : Type ua} [inst : UniformSpace α] {a : α}, Filter.Tendsto (fun a' ↦ (a', a)) (nhds a) (uniformity α)

theorem tendsto_left_nhds_uniformity E1 #

∀ {α : Type ua} [inst : UniformSpace α] {a : α}, Filter.Tendsto (fun a' ↦ (a, a')) (nhds a) (uniformity α)

theorem lift_nhds_left E1 #

∀ {α : Type ua} {β : Type ub} [inst : UniformSpace α] {x : α} {g : Set α → Filter β},
  Monotone g → (nhds x).lift g = (uniformity α).lift fun s ↦ g (s.inv.ball x)

theorem lift_nhds_right E1 #

∀ {α : Type ua} {β : Type ub} [inst : UniformSpace α] {x : α} {g : Set α → Filter β},
  Monotone g → (nhds x).lift g = (uniformity α).lift fun s ↦ g (s.ball x)

theorem nhds_nhds_eq_uniformity_uniformity_prod E1 #

∀ {α : Type ua} [inst : UniformSpace α] {a b : α},
  nhds a ×ˢ nhds b = (uniformity α).lift fun s ↦ (uniformity α).lift' fun t ↦ s.ball a ×ˢ t.inv.ball b

theorem Filter.HasBasis.biInter_biUnion_ball E1 #

∀ {α : Type ua} {ι : Sort u_1} [inst : UniformSpace α] {p : ι → Prop} {U : ι → SetRel α α},
  (uniformity α).HasBasis p U → ∀ (s : Set α), ⋂ i, ⋂ (_ : p i), ⋃ x ∈ s, (U i).ball x = closure s

def UniformContinuous E1 #

{α : Type ua} → {β : Type ub} → [UniformSpace α] → [UniformSpace β] → (α → β) → Prop

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

def Uniformity.«termUniformContinuous[_,_]» E1 #

Lean.ParserDescr

Notation for uniform continuity with respect to non-standard UniformSpace instances.

def UniformContinuousOn E3 #

{α : Type ua} → {β : Type ub} → [UniformSpace α] → [UniformSpace β] → (α → β) → Set α → Prop

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.

theorem uniformContinuous_def E0 #

∀ {α : Type ua} {β : Type ub} [inst : UniformSpace α] [inst_1 : UniformSpace β] {f : α → β},
  UniformContinuous f ↔ ∀ r ∈ uniformity β, {x | (f x.1, f x.2) ∈ r} ∈ uniformity α

theorem uniformContinuous_iff_eventually E1 #

∀ {α : Type ua} {β : Type ub} [inst : UniformSpace α] [inst_1 : UniformSpace β] {f : α → β},
  UniformContinuous f ↔ ∀ r ∈ uniformity β, ∀ᶠ (x : α × α) in uniformity α, (f x.1, f x.2) ∈ r

theorem uniformContinuousOn_univ E1 #

∀ {α : Type ua} {β : Type ub} [inst : UniformSpace α] [inst_1 : UniformSpace β] {f : α → β},
  UniformContinuousOn f Set.univ ↔ UniformContinuous f

theorem uniformContinuous_of_const E1 #

∀ {α : Type ua} {β : Type ub} [inst : UniformSpace α] [inst_1 : UniformSpace β] {c : α → β},
  (∀ (a b : α), c a = c b) → UniformContinuous c

theorem uniformContinuous_id E1 #

∀ {α : Type ua} [inst : UniformSpace α], UniformContinuous id

theorem uniformContinuous_const E1 #

∀ {α : Type ua} {β : Type ub} [inst : UniformSpace α] [inst_1 : UniformSpace β] {b : β}, UniformContinuous fun x ↦ b

theorem UniformContinuous.comp E1 #

∀ {α : Type ua} {β : Type ub} {γ : Type uc} [inst : UniformSpace α] [inst_1 : UniformSpace β] [inst_2 : UniformSpace γ]
  {g : β → γ} {f : α → β}, UniformContinuous g → UniformContinuous f → UniformContinuous (g ∘ f)

theorem UniformContinuous.iterate E1 #

∀ {β : Type ub} [inst : UniformSpace β] (T : β → β) (n : ℕ), UniformContinuous T → UniformContinuous T^[n]

If a function T is uniformly continuous in a uniform space β, then its n-th iterate T^[n] is also uniformly continuous.

theorem Filter.HasBasis.uniformContinuous_iff E0 #

∀ {α : Type ua} {β : Type ub} {ι : Sort u_1} [inst : UniformSpace α] [inst_1 : UniformSpace β] {ι' : Sort u_2}
  {p : ι → Prop} {s : ι → SetRel α α},
  (uniformity α).HasBasis p s →
    ∀ {q : ι' → Prop} {t : ι' → Set (β × β)},
      (uniformity β).HasBasis q t →
        ∀ {f : α → β}, UniformContinuous f ↔ ∀ (i : ι'), q i → ∃ j, p j ∧ ∀ (x y : α), (x, y) ∈ s j → (f x, f y) ∈ t i

theorem Filter.HasBasis.uniformContinuousOn_iff E0 #

∀ {α : Type ua} {β : Type ub} {ι : Sort u_1} [inst : UniformSpace α] [inst_1 : UniformSpace β] {ι' : Sort u_2}
  {p : ι → Prop} {s : ι → SetRel α α},
  (uniformity α).HasBasis p s →
    ∀ {q : ι' → Prop} {t : ι' → Set (β × β)},
      (uniformity β).HasBasis q t →
        ∀ {f : α → β} {S : Set α},
          UniformContinuousOn f S ↔ ∀ (i : ι'), q i → ∃ j, p j ∧ ∀ x ∈ S, ∀ y ∈ S, (x, y) ∈ s j → (f x, f y) ∈ t i

structure IsUniformInducing E3 #

{α : Type ua} → {β : Type ub} → [UniformSpace α] → [UniformSpace β] → (α → β) → Prop

A map f : α → β between uniform spaces is called uniform inducing if the uniformity filter on α is the pullback of the uniformity filter on β under Prod.map f f. If α is a separated space, then this implies that f is injective, hence it is a IsUniformEmbedding.

theorem isUniformInducing_iff E0 #

∀ {α : Type ua} {β : Type ub} [inst : UniformSpace α] [inst_1 : UniformSpace β] (f : α → β),
  IsUniformInducing f ↔ Filter.comap (fun x ↦ (f x.1, f x.2)) (uniformity β) = uniformity α

ctor IsUniformInducing.mk E0 #

∀ {α : Type ua} {β : Type ub} [inst : UniformSpace α] [inst_1 : UniformSpace β] {f : α → β},
  Filter.comap (fun x ↦ (f x.1, f x.2)) (uniformity β) = uniformity α → IsUniformInducing f

theorem IsUniformInducing.comap_uniformity E1 #

∀ {α : Type ua} {β : Type ub} [inst : UniformSpace α] [inst_1 : UniformSpace β] {f : α → β},
  IsUniformInducing f → Filter.comap (fun x ↦ (f x.1, f x.2)) (uniformity β) = uniformity α

The uniformity filter on the domain is the pullback of the uniformity filter on the codomain under Prod.map f f.

structure IsUniformEmbedding E1 #

{α : Type ua} → {β : Type ub} → [UniformSpace α] → [UniformSpace β] → (α → β) → Prop

A map f : α → β between uniform spaces is a uniform embedding if it is uniform inducing and injective. If α is a separated space, then the latter assumption follows from the former.

theorem isUniformEmbedding_iff E0 #

∀ {α : Type ua} {β : Type ub} [inst : UniformSpace α] [inst_1 : UniformSpace β] (f : α → β),
  IsUniformEmbedding f ↔ IsUniformInducing f ∧ Function.Injective f

theorem IsUniformEmbedding.toIsUniformInducing E1 #

∀ {α : Type ua} {β : Type ub} [inst : UniformSpace α] [inst_1 : UniformSpace β] {f : α → β},
  IsUniformEmbedding f → IsUniformInducing f

ctor IsUniformEmbedding.mk E0 #

∀ {α : Type ua} {β : Type ub} [inst : UniformSpace α] [inst_1 : UniformSpace β] {f : α → β},
  IsUniformInducing f → Function.Injective f → IsUniformEmbedding f

theorem IsUniformEmbedding.injective E1 #

∀ {α : Type ua} {β : Type ub} [inst : UniformSpace α] [inst_1 : UniformSpace β] {f : α → β},
  IsUniformEmbedding f → Function.Injective f

A uniform embedding is injective.

theorem IsUniformEmbedding.isUniformInducing E1 #

∀ {α : Type ua} {β : Type ub} [inst : UniformSpace α] [inst_1 : UniformSpace β] {f : α → β},
  IsUniformEmbedding f → IsUniformInducing f

Deprecated aliases

NameNew nameSince
UniformSpace.ballSetRel.ball2026-09-01
UniformSpace.ball_eq_of_symmetrySetRel.inv_eq_self2026-09-01
UniformSpace.ball_iInterSetRel.ball_iInter2026-09-01
UniformSpace.ball_interSetRel.ball_inter2026-09-01
UniformSpace.ball_inter_leftSetRel.ball_mono2026-09-01
UniformSpace.ball_inter_rightSetRel.ball_mono2026-09-01
UniformSpace.ball_mem_nhdsSetRel.ball_mem_nhds2026-09-01
UniformSpace.ball_mem_nhdsWithinSetRel.inv_ball_mem_nhdsWithin2026-09-01
UniformSpace.ball_monoSetRel.ball_mono2026-09-01
UniformSpace.ball_subset_of_comp_subsetSetRel.ball_subset_ball_of_comp_subset2026-09-01
UniformSpace.isCover_iff_subset_iUnion_ballSetRel.isCover_iff_subset_iUnion_ball2026-09-01
UniformSpace.mem_ball_compSetRel.prodMk_mem_comp2026-09-01
UniformSpace.mem_ball_selfSetRel.refl2026-09-01
UniformSpace.mem_ball_symmetrySetRel.symm2026-09-01
UniformSpace.mem_comp_compSetRel.mem_comp_comp2026-09-01
UniformSpace.mem_comp_of_mem_ballSetRel.prodMk_mem_comp2026-09-01