Documentation

Mathlib.Topology.UniformSpace.Defs

Uniform spaces #

Uniform spaces are a generalization of metric spaces and topological groups. Many concepts directly generalize to uniform spaces, e.g.

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:

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:

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:

These three axioms are stated more abstractly in the definition below, in terms of operations on filters, without directly manipulating entourages.

Main definitions #

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.

Relations, seen as SetRel α α #

@[deprecated SetRel.id (since := "2025-10-17")]
def idRel {α : Type u_2} :
Set (α × α)

The identity relation, or the graph of the identity function

Equations
Instances For
    @[deprecated SetRel.mem_id (since := "2025-10-17")]
    theorem mem_idRel {α : Type ua} {a b : α} :
    (a, b) idRel a = b
    @[deprecated SetRel.id_subset_iff (since := "2025-10-17")]
    theorem idRel_subset {α : Type ua} {s : SetRel α α} :
    idRel s ∀ (a : α), (a, a) s
    @[deprecated SetRel.exists_eq_singleton_of_prod_subset_id (since := "2025-10-17")]
    theorem eq_singleton_left_of_prod_subset_idRel {X : Type u_2} {S T : Set X} (hS : S.Nonempty) (hT : T.Nonempty) (h_diag : S ×ˢ T SetRel.id) :
    ∃ (x : X), S = {x}
    @[deprecated SetRel.exists_eq_singleton_of_prod_subset_id (since := "2025-10-17")]
    theorem eq_singleton_right_prod_subset_idRel {X : Type u_2} {S T : Set X} (hS : S.Nonempty) (hT : T.Nonempty) (h_diag : S ×ˢ T SetRel.id) :
    ∃ (x : X), T = {x}
    @[deprecated SetRel.exists_eq_singleton_of_prod_subset_id (since := "2025-10-17")]
    theorem eq_singleton_prod_subset_idRel {α : Type u_1} {s t : Set α} (hs : s.Nonempty) (ht : t.Nonempty) (hst : s ×ˢ t SetRel.id) :
    ∃ (x : α), s = {x} t = {x}

    Alias of SetRel.exists_eq_singleton_of_prod_subset_id.

    @[deprecated SetRel.comp (since := "2025-10-17")]
    def compRel {α : Type ua} (r₁ r₂ : SetRel α α) :
    Set (α × α)

    The composition of relations

    Equations
    Instances For
      @[deprecated SetRel.mem_comp (since := "2025-10-17")]
      theorem mem_compRel {α : Type u} {r₁ r₂ : SetRel α α} {x y : α} :
      (x, y) r₁.comp r₂ ∃ (z : α), (x, z) r₁ (z, y) r₂
      @[deprecated SetRel.inv_id (since := "2025-10-17")]
      theorem swap_idRel {α : Type ua} :
      @[deprecated Monotone.relComp (since := "2025-10-17")]
      theorem Monotone.compRel {α : Type ua} {β : Type ub} [Preorder β] {f g : βSetRel α α} (hf : Monotone f) (hg : Monotone g) :
      Monotone fun (x : β) => (f x).comp (g x)
      @[deprecated SetRel.comp_subset_comp (since := "2025-10-17")]
      theorem compRel_mono {α : Type u_1} {β : Type u_2} {γ : Type u_3} {R₁ R₂ : SetRel α β} {S₁ S₂ : SetRel β γ} (hR : R₁ R₂) (hS : S₁ S₂) :
      R₁.comp S₁ R₂.comp S₂

      Alias of SetRel.comp_subset_comp.

      @[deprecated SetRel.comp_subset_comp_left (since := "2025-10-17")]
      theorem compRel_left_mono {α : Type u_1} {β : Type u_2} {γ : Type u_3} {R₁ R₂ : SetRel α β} {S : SetRel β γ} (hR : R₁ R₂) :
      R₁.comp S R₂.comp S

      Alias of SetRel.comp_subset_comp_left.

      @[deprecated SetRel.comp_subset_comp_right (since := "2025-10-17")]
      theorem compRel_right_mono {α : Type u_1} {β : Type u_2} {γ : Type u_3} {R : SetRel α β} {S₁ S₂ : SetRel β γ} (hS : S₁ S₂) :
      R.comp S₁ R.comp S₂

      Alias of SetRel.comp_subset_comp_right.

      @[deprecated SetRel.prodMk_mem_comp (since := "2025-10-17")]
      theorem prodMk_mem_compRel {α : Type u_1} {β : Type u_2} {γ : Type u_3} {R : SetRel α β} {S : SetRel β γ} {a : α} {b : β} {c : γ} (hab : (a, b) R) (hbc : (b, c) S) :
      (a, c) R.comp S

      Alias of SetRel.prodMk_mem_comp.

      @[deprecated SetRel.prodMk_mem_comp (since := "2025-03-10")]
      theorem prod_mk_mem_compRel {α : Type u_1} {β : Type u_2} {γ : Type u_3} {R : SetRel α β} {S : SetRel β γ} {a : α} {b : β} {c : γ} (hab : (a, b) R) (hbc : (b, c) S) :
      (a, c) R.comp S

      Alias of SetRel.prodMk_mem_comp.

      @[deprecated SetRel.id_comp (since := "2025-10-17")]
      theorem id_compRel {α : Type ua} {r : SetRel α α} :
      @[deprecated SetRel.comp_assoc (since := "2025-10-17")]
      theorem compRel_assoc {α : Type ua} {r s t : SetRel α α} :
      (r.comp s).comp t = r.comp (s.comp t)
      @[deprecated SetRel.left_subset_comp (since := "2025-10-17")]
      theorem left_subset_compRel {α : Type ua} {s t : SetRel α α} (h : idRel t) :
      s s.comp t
      @[deprecated SetRel.right_subset_comp (since := "2025-10-17")]
      theorem right_subset_compRel {α : Type ua} {s t : SetRel α α} (h : idRel s) :
      t s.comp t
      @[deprecated SetRel.left_subset_comp (since := "2025-10-17")]
      theorem subset_comp_self {α : Type ua} {s : SetRel α α} (h : idRel s) :
      s s.comp s
      @[deprecated SetRel.subset_iterate_comp (since := "2025-10-17")]
      theorem subset_iterate_compRel {α : Type ua} {s t : SetRel α α} (h : idRel s) (n : ) :
      t (fun (x : SetRel α α) => s.comp x)^[n] t
      @[deprecated SetRel.IsSymm (since := "2025-10-17")]
      def IsSymmetricRel {α : Type ua} (V : SetRel α α) :

      The relation is invariant under swapping factors.

      Equations
      Instances For
        @[deprecated IsSymmetricRel (since := "2025-03-05")]
        def SymmetricRel {α : Type ua} (V : SetRel α α) :

        Alias of IsSymmetricRel.


        The relation is invariant under swapping factors.

        Equations
        Instances For
          @[deprecated SetRel.symmetrize (since := "2025-03-05")]
          def symmetrizeRel {α : Type ua} (V : SetRel α α) :
          SetRel α α

          The maximal symmetric relation contained in a given relation.

          Equations
          Instances For
            @[deprecated SetRel.isSymm_symmetrize (since := "2025-03-05")]
            @[deprecated SetRel.symmetrize_subset_self (since := "2025-03-05")]
            theorem symmetrizeRel_subset_self {α : Type ua} (V : SetRel α α) :
            @[deprecated SetRel.symmetrize_mono (since := "2025-03-05")]
            theorem symmetrize_mono {α : Type ua} {V W : SetRel α α} (h : V W) :
            @[deprecated SetRel.comm (since := "2025-03-05")]
            theorem IsSymmetricRel.mk_mem_comm {α : Type ua} {V : SetRel α α} (hV : IsSymmetricRel V) {x y : α} :
            (x, y) V (y, x) V
            @[deprecated IsSymmetricRel.mk_mem_comm (since := "2025-03-05")]
            theorem SymmetricRel.mk_mem_comm {α : Type ua} {V : SetRel α α} (hV : IsSymmetricRel V) {x y : α} :
            (x, y) V (y, x) V

            Alias of IsSymmetricRel.mk_mem_comm.

            @[deprecated SetRel.inv_eq_self (since := "2025-03-05")]
            theorem IsSymmetricRel.eq {α : Type ua} {U : SetRel α α} (hU : IsSymmetricRel U) :
            @[deprecated IsSymmetricRel.eq (since := "2025-03-05")]
            theorem SymmetricRel.eq {α : Type ua} {U : SetRel α α} (hU : IsSymmetricRel U) :

            Alias of IsSymmetricRel.eq.

            @[deprecated SetRel.isSymm_inter (since := "2025-03-05")]
            theorem IsSymmetricRel.inter {α : Type ua} {U V : SetRel α α} (hU : IsSymmetricRel U) (hV : IsSymmetricRel V) :
            @[deprecated IsSymmetricRel.inter (since := "2025-03-05")]
            theorem SymmetricRel.inter {α : Type ua} {U V : SetRel α α} (hU : IsSymmetricRel U) (hV : IsSymmetricRel V) :

            Alias of IsSymmetricRel.inter.

            @[deprecated SetRel.isSymm_iInter (since := "2025-03-05")]
            theorem IsSymmetricRel.iInter {α : Type ua} {ι : Sort u_1} {U : ιSetRel α α} (hU : ∀ (i : ι), IsSymmetricRel (U i)) :
            IsSymmetricRel (⋂ (i : ι), U i)
            @[deprecated SetRel.IsSymm.sInter (since := "2025-03-05")]
            theorem IsSymmetricRel.sInter {α : Type ua} {s : Set (SetRel α α)} (h : is, IsSymmetricRel i) :
            @[deprecated SetRel.isSymm_preimage (since := "2025-03-05")]
            theorem IsSymmetricRel.preimage_prodMap {α : Type ua} {β : Type ub} {U : Set (β × β)} (ht : IsSymmetricRel U) (f : αβ) :
            @[deprecated SetRel.isSymm_image (since := "2025-03-05")]
            theorem IsSymmetricRel.image_prodMap {α : Type ua} {β : Type ub} {U : Set (α × α)} (ht : IsSymmetricRel U) (f : αβ) :
            @[deprecated SetRel.prod_subset_comm (since := "2025-03-05")]
            theorem IsSymmetricRel.prod_subset_comm {α : Type ua} {s : Set (α × α)} {t u : Set α} (hs : IsSymmetricRel s) :
            t ×ˢ u s u ×ˢ t s
            theorem SetRel.mem_filter_prod_comm {α : Type ua} (R : SetRel α α) {f g : Filter α} [R.IsSymm] :
            R f ×ˢ g R g ×ˢ f
            @[deprecated SetRel.mem_filter_prod_comm (since := "2025-03-05")]
            theorem IsSymmetricRel.mem_filter_prod_comm {α : Type ua} {s : Set (α × α)} {f g : Filter α} (hs : IsSymmetricRel s) :
            s f ×ˢ g s g ×ˢ f
            structure UniformSpace.Core (α : 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.

            Instances For
              theorem UniformSpace.Core.comp_mem_uniformity_sets {α : Type ua} {c : Core α} {s : SetRel α α} (hs : s c.uniformity) :
              tc.uniformity, SetRel.comp t t s
              def UniformSpace.Core.mk' {α : Type u} (U : Filter (α × α)) (refl : rU, ∀ (x : α), (x, x) r) (symm : rU, Prod.swap ⁻¹' r U) (comp : rU, tU, SetRel.comp t t r) :
              Core α

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

              Equations
              Instances For
                def UniformSpace.Core.mkOfBasis {α : Type u} (B : FilterBasis (α × α)) (refl : rB, ∀ (x : α), (x, x) r) (symm : rB, tB, t Prod.swap ⁻¹' r) (comp : rB, tB, SetRel.comp t t r) :
                Core α

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

                Equations
                Instances For

                  A uniform space generates a topological space

                  Equations
                  Instances For
                    theorem UniformSpace.Core.ext {α : Type ua} {u₁ u₂ : Core α} :
                    u₁.uniformity = u₂.uniformityu₁ = u₂
                    class UniformSpace (α : Type u) extends TopologicalSpace α :

                    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.

                    Instances
                      def uniformity (α : Type u) [UniformSpace α] :
                      Filter (α × α)

                      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
                          Instances For
                            @[reducible, inline]
                            abbrev UniformSpace.ofCoreEq {α : Type u} (u : Core α) (t : TopologicalSpace α) (h : t = u.toTopologicalSpace) :

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

                            Equations
                            Instances For
                              @[reducible, inline]
                              abbrev UniformSpace.ofCore {α : Type u} (u : Core α) :

                              Construct a UniformSpace from a UniformSpace.Core.

                              Equations
                              Instances For
                                @[reducible, inline]
                                abbrev UniformSpace.toCore {α : Type ua} (u : UniformSpace α) :
                                Core α

                                Construct a UniformSpace.Core from a UniformSpace.

                                Equations
                                Instances For
                                  theorem UniformSpace.ext {α : Type ua} {u₁ u₂ : UniformSpace α} (h : uniformity α = uniformity α) :
                                  u₁ = u₂
                                  theorem UniformSpace.ext_iff {α : Type ua} {u₁ u₂ : UniformSpace α} :
                                  u₁ = u₂ ∀ (s : Set (α × α)), s uniformity α s uniformity α
                                  @[reducible, inline]

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

                                  Equations
                                  Instances For
                                    theorem isOpen_uniformity {α : Type ua} [UniformSpace α] {s : Set α} :
                                    IsOpen s xs, {p : α × α | p.1 = xp.2 s} uniformity α
                                    theorem refl_mem_uniformity {α : Type ua} [UniformSpace α] {x : α} {s : SetRel α α} (h : s uniformity α) :
                                    (x, x) s
                                    theorem mem_uniformity_of_eq {α : Type ua} [UniformSpace α] {x y : α} {s : SetRel α α} (h : s uniformity α) (hx : x = y) :
                                    (x, y) s
                                    theorem comp_le_uniformity {α : Type ua} [UniformSpace α] :
                                    ((uniformity α).lift' fun (s : SetRel α α) => s.comp s) uniformity α
                                    theorem lift'_comp_uniformity {α : Type ua} [UniformSpace α] :
                                    ((uniformity α).lift' fun (s : SetRel α α) => s.comp s) = uniformity α
                                    theorem comp_mem_uniformity_sets {α : Type ua} [UniformSpace α] {s : SetRel α α} (hs : s uniformity α) :
                                    tuniformity α, SetRel.comp t t s
                                    theorem Filter.Tendsto.uniformity_trans {α : Type ua} {β : Type ub} [UniformSpace α] {l : Filter β} {f₁ f₂ f₃ : βα} (h₁₂ : Tendsto (fun (x : β) => (f₁ x, f₂ x)) l (uniformity α)) (h₂₃ : Tendsto (fun (x : β) => (f₂ x, f₃ x)) l (uniformity α)) :
                                    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 {α : Type ua} {β : Type ub} [UniformSpace α] {l : Filter β} {f : βα × α} (h : Tendsto f l (uniformity α)) :
                                    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 {α : Type ua} {β : Type ub} [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 {α : Type ua} {β : Type ub} [UniformSpace α] {a : α} {f : Filter β} :
                                    Filter.Tendsto (fun (x : β) => (a, a)) f (uniformity α)
                                    theorem symm_of_uniformity {α : Type ua} [UniformSpace α] {s : SetRel α α} (hs : s uniformity α) :
                                    tuniformity α, (∀ (a b : α), (a, b) t(b, a) t) t s
                                    theorem comp_symm_of_uniformity {α : Type ua} [UniformSpace α] {s : SetRel α α} (hs : s uniformity α) :
                                    tuniformity α, (∀ {a b : α}, (a, b) t(b, a) t) SetRel.comp t t s
                                    theorem symmetrize_mem_uniformity {α : Type ua} [UniformSpace α] {V : SetRel α α} (h : V uniformity α) :
                                    theorem UniformSpace.hasBasis_symmetric {α : Type ua} [UniformSpace α] :
                                    (uniformity α).HasBasis (fun (s : SetRel α α) => s uniformity α s.IsSymm) id

                                    Symmetric entourages form a basis of 𝓤 α

                                    theorem uniformity_lift_le_swap {α : Type ua} {β : Type ub} [UniformSpace α] {g : SetRel α αFilter β} {f : Filter β} (hg : Monotone g) (h : ((uniformity α).lift fun (s : Set (α × α)) => g (Prod.swap ⁻¹' s)) f) :
                                    theorem uniformity_lift_le_comp {α : Type ua} {β : Type ub} [UniformSpace α] {f : SetRel α αFilter β} (h : Monotone f) :
                                    ((uniformity α).lift fun (s : Set (α × α)) => f (SetRel.comp s s)) (uniformity α).lift f
                                    theorem comp3_mem_uniformity {α : Type ua} [UniformSpace α] {s : SetRel α α} (hs : s uniformity α) :
                                    tuniformity α, SetRel.comp t (SetRel.comp t t) s
                                    theorem comp_le_uniformity3 {α : Type ua} [UniformSpace α] :
                                    ((uniformity α).lift' fun (s : SetRel α α) => s.comp (s.comp s)) uniformity α

                                    See also comp3_mem_uniformity.

                                    theorem comp_symm_mem_uniformity_sets {α : Type ua} [UniformSpace α] {s : SetRel α α} (hs : s uniformity α) :

                                    See also comp_open_symm_mem_uniformity_sets.

                                    theorem subset_comp_self_of_mem_uniformity {α : Type ua} [UniformSpace α] {s : SetRel α α} (h : s uniformity α) :
                                    s s.comp s
                                    theorem comp_comp_symm_mem_uniformity_sets {α : Type ua} [UniformSpace α] {s : SetRel α α} (hs : s uniformity α) :
                                    tuniformity α, SetRel.IsSymm t (SetRel.comp t t).comp t s

                                    Balls in uniform spaces #

                                    def UniformSpace.ball {β : Type ub} (x : β) (V : Set (β × β)) :
                                    Set β

                                    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
                                    Instances For
                                      theorem UniformSpace.mem_ball_self {α : Type ua} [UniformSpace α] (x : α) {V : SetRel α α} :
                                      V uniformity αx ball x V
                                      theorem UniformSpace.mem_ball_comp {β : Type ub} {V W : Set (β × β)} {x y z : β} (h : y ball x V) (h' : z ball y W) :
                                      z ball x (SetRel.comp V W)

                                      The triangle inequality for UniformSpace.ball

                                      theorem UniformSpace.ball_subset_of_comp_subset {β : Type ub} {V W : Set (β × β)} {x y : β} (h : x ball y W) (h' : SetRel.comp W W V) :
                                      ball x W ball y V
                                      theorem UniformSpace.ball_mono {β : Type ub} {V W : Set (β × β)} (h : V W) (x : β) :
                                      ball x V ball x W
                                      theorem UniformSpace.ball_inter {β : Type ub} (x : β) (V W : Set (β × β)) :
                                      ball x (V W) = ball x V ball x W
                                      theorem UniformSpace.ball_inter_left {β : Type ub} (x : β) (V W : Set (β × β)) :
                                      ball x (V W) ball x V
                                      theorem UniformSpace.ball_inter_right {β : Type ub} (x : β) (V W : Set (β × β)) :
                                      ball x (V W) ball x W
                                      theorem UniformSpace.ball_iInter {β : Type ub} {ι : Sort u_1} {x : β} {V : ιSet (β × β)} :
                                      ball x (⋂ (i : ι), V i) = ⋂ (i : ι), ball x (V i)
                                      theorem UniformSpace.mem_ball_symmetry {β : Type ub} {V : SetRel β β} [V.IsSymm] {x y : β} :
                                      x ball y V y ball x V
                                      theorem UniformSpace.ball_eq_of_symmetry {β : Type ub} {V : SetRel β β} [V.IsSymm] {x : β} :
                                      ball x V = {y : β | (y, x) V}
                                      theorem UniformSpace.mem_comp_of_mem_ball {β : Type ub} {V W : SetRel β β} {x y z : β} [V.IsSymm] (hx : x ball z V) (hy : y ball z W) :
                                      (x, y) V.comp W
                                      theorem UniformSpace.mem_comp_comp {β : Type ub} {V W M : SetRel β β} [W.IsSymm] {p : β × β} :
                                      p (V.comp M).comp W (ball p.1 V ×ˢ ball p.2 W M).Nonempty

                                      Neighborhoods in uniform spaces #

                                      theorem mem_nhds_uniformity_iff_right {α : Type ua} [UniformSpace α] {x : α} {s : Set α} :
                                      s nhds x {p : α × α | p.1 = xp.2 s} uniformity α
                                      theorem mem_nhds_uniformity_iff_left {α : Type ua} [UniformSpace α] {x : α} {s : Set α} :
                                      s nhds x {p : α × α | p.2 = xp.1 s} uniformity α
                                      theorem nhdsWithin_eq_comap_uniformity_of_mem {α : Type ua} [UniformSpace α] {x : α} {T : Set α} (hx : x T) (S : Set α) :
                                      theorem isOpen_iff_ball_subset {α : Type ua} [UniformSpace α] {s : Set α} :
                                      IsOpen s xs, Vuniformity α, UniformSpace.ball x V s

                                      See also isOpen_iff_isOpen_ball_subset.

                                      theorem nhds_basis_uniformity' {α : Type ua} {ι : Sort u_1} [UniformSpace α] {p : ιProp} {s : ιSetRel α α} (h : (uniformity α).HasBasis p s) {x : α} :
                                      (nhds x).HasBasis p fun (i : ι) => UniformSpace.ball x (s i)
                                      theorem nhds_basis_uniformity {α : Type ua} {ι : Sort u_1} [UniformSpace α] {p : ιProp} {s : ιSetRel α α} (h : (uniformity α).HasBasis p s) {x : α} :
                                      (nhds x).HasBasis p fun (i : ι) => {y : α | (y, x) s i}
                                      theorem nhds_eq_comap_uniformity' {α : Type ua} [UniformSpace α] {x : α} :
                                      nhds x = Filter.comap (fun (y : α) => (y, x)) (uniformity α)
                                      theorem UniformSpace.mem_nhds_iff {α : Type ua} [UniformSpace α] {x : α} {s : Set α} :
                                      s nhds x Vuniformity α, ball x V s
                                      theorem UniformSpace.ball_mem_nhds {α : Type ua} [UniformSpace α] (x : α) V : SetRel α α (V_in : V uniformity α) :
                                      ball x V nhds x
                                      theorem UniformSpace.ball_mem_nhdsWithin {α : Type ua} [UniformSpace α] {x : α} {S : Set α} V : SetRel α α (x_in : x S) (V_in : V uniformity αFilter.principal (S ×ˢ S)) :
                                      theorem UniformSpace.mem_nhds_iff_symm {α : Type ua} [UniformSpace α] {x : α} {s : Set α} :
                                      s nhds x Vuniformity α, SetRel.IsSymm V ball x V s
                                      theorem UniformSpace.hasBasis_nhds {α : Type ua} [UniformSpace α] (x : α) :
                                      (nhds x).HasBasis (fun (s : SetRel α α) => s uniformity α s.IsSymm) fun (s : SetRel α α) => ball x s
                                      theorem UniformSpace.mem_closure_iff_symm_ball {α : Type ua} [UniformSpace α] {s : Set α} {x : α} :
                                      x closure s ∀ {V : Set (α × α)}, V uniformity αSetRel.IsSymm V(s ball x V).Nonempty
                                      theorem UniformSpace.mem_closure_iff_ball {α : Type ua} [UniformSpace α] {s : Set α} {x : α} :
                                      x closure s ∀ {V : Set (α × α)}, V uniformity α(ball x V s).Nonempty
                                      theorem nhds_eq_uniformity' {α : Type ua} [UniformSpace α] {x : α} :
                                      nhds x = (uniformity α).lift' fun (s : Set (α × α)) => {y : α | (y, x) s}
                                      theorem mem_nhds_left {α : Type ua} [UniformSpace α] (x : α) {s : SetRel α α} (h : s uniformity α) :
                                      {y : α | (x, y) s} nhds x
                                      theorem mem_nhds_right {α : Type ua} [UniformSpace α] (y : α) {s : SetRel α α} (h : s uniformity α) :
                                      {x : α | (x, y) s} nhds y
                                      theorem exists_mem_nhds_ball_subset_of_mem_nhds {α : Type ua} [UniformSpace α] {a : α} {U : Set α} (h : U nhds a) :
                                      Vnhds a, tuniformity α, a'V, UniformSpace.ball a' t U
                                      theorem tendsto_right_nhds_uniformity {α : Type ua} [UniformSpace α] {a : α} :
                                      Filter.Tendsto (fun (a' : α) => (a', a)) (nhds a) (uniformity α)
                                      theorem tendsto_left_nhds_uniformity {α : Type ua} [UniformSpace α] {a : α} :
                                      Filter.Tendsto (fun (a' : α) => (a, a')) (nhds a) (uniformity α)
                                      theorem lift_nhds_left {α : Type ua} {β : Type ub} [UniformSpace α] {x : α} {g : Set αFilter β} (hg : Monotone g) :
                                      (nhds x).lift g = (uniformity α).lift fun (s : SetRel α α) => g (UniformSpace.ball x s)
                                      theorem lift_nhds_right {α : Type ua} {β : Type ub} [UniformSpace α] {x : α} {g : Set αFilter β} (hg : Monotone g) :
                                      (nhds x).lift g = (uniformity α).lift fun (s : SetRel α α) => g {y : α | (y, x) s}
                                      theorem nhds_nhds_eq_uniformity_uniformity_prod {α : Type ua} [UniformSpace α] {a b : α} :
                                      nhds a ×ˢ nhds b = (uniformity α).lift fun (s : SetRel α α) => (uniformity α).lift' fun (t : Set (α × α)) => {y : α | (y, a) s} ×ˢ {y : α | (b, y) t}
                                      theorem Filter.HasBasis.biInter_biUnion_ball {α : Type ua} {ι : Sort u_1} [UniformSpace α] {p : ιProp} {U : ιSetRel α α} (h : (uniformity α).HasBasis p U) (s : Set α) :
                                      ⋂ (i : ι), ⋂ (_ : p i), xs, UniformSpace.ball x (U i) = closure s

                                      Uniform continuity #

                                      def UniformContinuous {α : Type ua} {β : Type ub} [UniformSpace α] [UniformSpace β] (f : αβ) :

                                      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
                                      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
                                          def UniformContinuousOn {α : Type ua} {β : Type ub} [UniformSpace α] [UniformSpace β] (f : αβ) (s : Set α) :

                                          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
                                          Instances For
                                            theorem uniformContinuous_def {α : Type ua} {β : Type ub} [UniformSpace α] [UniformSpace β] {f : αβ} :
                                            UniformContinuous f runiformity β, {x : α × α | (f x.1, f x.2) r} uniformity α
                                            theorem uniformContinuous_iff_eventually {α : Type ua} {β : Type ub} [UniformSpace α] [UniformSpace β] {f : αβ} :
                                            UniformContinuous f runiformity β, ∀ᶠ (x : α × α) in uniformity α, (f x.1, f x.2) r
                                            theorem uniformContinuous_of_const {α : Type ua} {β : Type ub} [UniformSpace α] [UniformSpace β] {c : αβ} (h : ∀ (a b : α), c a = c b) :
                                            theorem uniformContinuous_const {α : Type ua} {β : Type ub} [UniformSpace α] [UniformSpace β] {b : β} :
                                            UniformContinuous fun (x : α) => b
                                            theorem UniformContinuous.comp {α : Type ua} {β : Type ub} {γ : Type uc} [UniformSpace α] [UniformSpace β] [UniformSpace γ] {g : βγ} {f : αβ} (hg : UniformContinuous g) (hf : UniformContinuous f) :
                                            theorem UniformContinuous.iterate {β : Type ub} [UniformSpace β] (T : ββ) (n : ) (h : UniformContinuous T) :

                                            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 {α : Type ua} {β : Type ub} {ι : Sort u_1} [UniformSpace α] {ι' : Sort u_2} [UniformSpace β] {p : ιProp} {s : ιSetRel α α} (ha : (uniformity α).HasBasis p s) {q : ι'Prop} {t : ι'Set (β × β)} (hb : (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 {α : Type ua} {β : Type ub} {ι : Sort u_1} [UniformSpace α] {ι' : Sort u_2} [UniformSpace β] {p : ιProp} {s : ιSetRel α α} (ha : (uniformity α).HasBasis p s) {q : ι'Prop} {t : ι'Set (β × β)} (hb : (uniformity β).HasBasis q t) {f : αβ} {S : Set α} :
                                            UniformContinuousOn f S ∀ (i : ι'), q i∃ (j : ι), p j xS, yS, (x, y) s j(f x, f y) t i