File: Mathlib/Topology/Metrizable/Uniformity.lean

full_name: PseudoMetricSpace.ofPreNNDist
code: /-- The maximal pseudo metric space structure on `X` such that `dist x y ≤ d x y` for all `x y`,
where `d : X → X → ℝ≥0` is a function such that `d x x = 0` and `d x y = d y x` for all `x`, `y`. -/
noncomputable def ofPreNNDist (d : X → X → ℝ≥0) (dist_self : ∀ x, d x x = 0)
    (dist_comm : ∀ x y, d x y = d y x) : PseudoMetricSpace X 
goal: PseudoMetricSpace X

full_name: PseudoMetricSpace.dist_ofPreNNDist
code: theorem dist_ofPreNNDist (d : X → X → ℝ≥0) (dist_self : ∀ x, d x x = 0)
    (dist_comm : ∀ x y, d x y = d y x) (x y : X) :
    @dist X (@PseudoMetricSpace.toDist X (PseudoMetricSpace.ofPreNNDist d dist_self dist_comm)) x
        y =
      ↑(⨅ l : List X, ((x::l).zipWith d (l ++ [y])).sum : ℝ≥0) 
goal: dist x y = ↑(⨅ l, (List.zipWith d (x :: l) (l ++ [y])).sum)

full_name: PseudoMetricSpace.dist_ofPreNNDist_le
code: theorem dist_ofPreNNDist_le (d : X → X → ℝ≥0) (dist_self : ∀ x, d x x = 0)
    (dist_comm : ∀ x y, d x y = d y x) (x y : X) :
    @dist X (@PseudoMetricSpace.toDist X (PseudoMetricSpace.ofPreNNDist d dist_self dist_comm)) x
        y ≤
      d x y 
goal: dist x y ≤ ↑(d x y)

full_name: PseudoMetricSpace.le_two_mul_dist_ofPreNNDist
code: /-- Consider a function `d : X → X → ℝ≥0` such that `d x x = 0` and `d x y = d y x` for all `x`,
`y`. Let `dist` be the largest pseudometric distance such that `dist x y ≤ d x y`, see
`PseudoMetricSpace.ofPreNNDist`. Suppose that `d` satisfies the following triangle-like
inequality: `d x₁ x₄ ≤ 2 * max (d x₁ x₂, d x₂ x₃, d x₃ x₄)`. Then `d x y ≤ 2 * dist x y` for all
`x`, `y`. -/
theorem le_two_mul_dist_ofPreNNDist (d : X → X → ℝ≥0) (dist_self : ∀ x, d x x = 0)
    (dist_comm : ∀ x y, d x y = d y x)
    (hd : ∀ x₁ x₂ x₃ x₄, d x₁ x₄ ≤ 2 * max (d x₁ x₂) (max (d x₂ x₃) (d x₃ x₄))) (x y : X) :
    ↑(d x y) ≤ 2 * @dist X
      (@PseudoMetricSpace.toDist X (PseudoMetricSpace.ofPreNNDist d dist_self dist_comm)) x y 
goal: ↑(d x y) ≤ 2 * dist x y

full_name: UniformSpace.metrizable_uniformity
code: /-- If `X` is a uniform space with countably generated uniformity filter, there exists a
`PseudoMetricSpace` structure compatible with the `UniformSpace` structure. Use
`UniformSpace.pseudoMetricSpace` or `UniformSpace.metricSpace` instead. -/
protected theorem UniformSpace.metrizable_uniformity (X : Type*) [UniformSpace X]
    [IsCountablyGenerated (𝓤 X)] : ∃ I : PseudoMetricSpace X, I.toUniformSpace = ‹_› 
goal: ∃ I, PseudoMetricSpace.toUniformSpace = inst✝

full_name: UniformSpace.pseudoMetricSpace
code: /-- A `PseudoMetricSpace` instance compatible with a given `UniformSpace` structure. -/
protected noncomputable def UniformSpace.pseudoMetricSpace (X : Type*) [UniformSpace X]
    [IsCountablyGenerated (𝓤 X)] : PseudoMetricSpace X 
goal: PseudoMetricSpace X

full_name: UniformSpace.metricSpace
code: /-- A `MetricSpace` instance compatible with a given `UniformSpace` structure. -/
protected noncomputable def UniformSpace.metricSpace (X : Type*) [UniformSpace X]
    [IsCountablyGenerated (𝓤 X)] [T0Space X] : MetricSpace X 
goal: MetricSpace X

full_name: UniformSpace.pseudoMetrizableSpace
code: /-- A uniform space with countably generated `𝓤 X` is pseudo metrizable. -/
instance (priority := 100) UniformSpace.pseudoMetrizableSpace [UniformSpace X]
    [IsCountablyGenerated (𝓤 X)] : TopologicalSpace.PseudoMetrizableSpace X 
goal: TopologicalSpace.PseudoMetrizableSpace X

full_name: UniformSpace.metrizableSpace
code: /-- A T₀ uniform space with countably generated `𝓤 X` is metrizable. This is not an instance to
avoid loops. -/
theorem UniformSpace.metrizableSpace [UniformSpace X] [IsCountablyGenerated (𝓤 X)] [T0Space X] :
    TopologicalSpace.MetrizableSpace X 
goal: TopologicalSpace.MetrizableSpace X

full_name: TotallyBounded.isSeparable
code: /-- A totally bounded set is separable in countably generated uniform spaces. This can be obtained
from the more general `EMetric.subset_countable_closure_of_almost_dense_set`.-/
lemma TotallyBounded.isSeparable [UniformSpace X] [i : IsCountablyGenerated (𝓤 X)]
    {s : Set X} (h : TotallyBounded s) : TopologicalSpace.IsSeparable s 
goal: TopologicalSpace.IsSeparable s