fact
stringlengths
6
3.84k
type
stringclasses
11 values
library
stringclasses
32 values
imports
listlengths
1
14
filename
stringlengths
20
95
symbolic_name
stringlengths
1
90
docstring
stringlengths
7
20k
lipschitzOnWith_iff {f : γ → α →ᵤ β} {K : ℝ≥0} {s : Set γ} : LipschitzOnWith K f s ↔ ∀ c, LipschitzOnWith K (fun x ↦ toFun (f x) c) s := by simp [lipschitzOnWith_iff_restrict, lipschitzWith_iff] rfl
lemma
Topology
[ "Mathlib.Order.CompleteLattice.Group", "Mathlib.Topology.ContinuousMap.Bounded.Basic", "Mathlib.Topology.ContinuousMap.Compact", "Mathlib.Topology.MetricSpace.Lipschitz", "Mathlib.Topology.UniformSpace.UniformConvergenceTopology" ]
Mathlib/Topology/MetricSpace/UniformConvergence.lean
lipschitzOnWith_iff
null
lipschitzOnWith_ofFun_iff {f : γ → α → β} {K : ℝ≥0} {s : Set γ} : LipschitzOnWith K (fun x ↦ ofFun (f x)) s ↔ ∀ c, LipschitzOnWith K (f · c) s := lipschitzOnWith_iff
lemma
Topology
[ "Mathlib.Order.CompleteLattice.Group", "Mathlib.Topology.ContinuousMap.Bounded.Basic", "Mathlib.Topology.ContinuousMap.Compact", "Mathlib.Topology.MetricSpace.Lipschitz", "Mathlib.Topology.UniformSpace.UniformConvergenceTopology" ]
Mathlib/Topology/MetricSpace/UniformConvergence.lean
lipschitzOnWith_ofFun_iff
null
_root_.LipschitzOnWith.uniformEquicontinuousOn (f : α → γ → β) (K : ℝ≥0) {s : Set γ} (h : ∀ c, LipschitzOnWith K (f c) s) : UniformEquicontinuousOn f s := by rw [uniformEquicontinuousOn_iff_uniformContinuousOn] rw [← lipschitzOnWith_ofFun_iff] at h exact h.uniformContinuousOn
lemma
Topology
[ "Mathlib.Order.CompleteLattice.Group", "Mathlib.Topology.ContinuousMap.Bounded.Basic", "Mathlib.Topology.ContinuousMap.Compact", "Mathlib.Topology.MetricSpace.Lipschitz", "Mathlib.Topology.UniformSpace.UniformConvergenceTopology" ]
Mathlib/Topology/MetricSpace/UniformConvergence.lean
_root_.LipschitzOnWith.uniformEquicontinuousOn
If `f : α → γ → β` is a family of a functions, all of which are Lipschitz on `s` with the same constant, then the family is uniformly equicontinuous on `s`.
edist_eval_le {f g : α →ᵤ β} {x : α} : edist (toFun f x) (toFun g x) ≤ edist f g := edist_le.mp le_rfl x
lemma
Topology
[ "Mathlib.Order.CompleteLattice.Group", "Mathlib.Topology.ContinuousMap.Bounded.Basic", "Mathlib.Topology.ContinuousMap.Compact", "Mathlib.Topology.MetricSpace.Lipschitz", "Mathlib.Topology.UniformSpace.UniformConvergenceTopology" ]
Mathlib/Topology/MetricSpace/UniformConvergence.lean
edist_eval_le
null
lipschitzWith_eval (x : α) : LipschitzWith 1 (fun f : α →ᵤ β ↦ toFun f x) := by intro f g simpa using edist_eval_le
lemma
Topology
[ "Mathlib.Order.CompleteLattice.Group", "Mathlib.Topology.ContinuousMap.Bounded.Basic", "Mathlib.Topology.ContinuousMap.Compact", "Mathlib.Topology.MetricSpace.Lipschitz", "Mathlib.Topology.UniformSpace.UniformConvergenceTopology" ]
Mathlib/Topology/MetricSpace/UniformConvergence.lean
lipschitzWith_eval
null
dist_def [BoundedSpace β] (f g : α →ᵤ β) : dist f g = ⨆ x, dist (toFun f x) (toFun g x) := rfl
lemma
Topology
[ "Mathlib.Order.CompleteLattice.Group", "Mathlib.Topology.ContinuousMap.Bounded.Basic", "Mathlib.Topology.ContinuousMap.Compact", "Mathlib.Topology.MetricSpace.Lipschitz", "Mathlib.Topology.UniformSpace.UniformConvergenceTopology" ]
Mathlib/Topology/MetricSpace/UniformConvergence.lean
dist_def
null
dist_le [BoundedSpace β] {f g : α →ᵤ β} {C : ℝ} (hC : 0 ≤ C) : dist f g ≤ C ↔ ∀ x, dist (toFun f x) (toFun g x) ≤ C := by simp_rw [dist_edist, ← ENNReal.le_ofReal_iff_toReal_le (edist_ne_top _ _) hC, edist_le]
lemma
Topology
[ "Mathlib.Order.CompleteLattice.Group", "Mathlib.Topology.ContinuousMap.Bounded.Basic", "Mathlib.Topology.ContinuousMap.Compact", "Mathlib.Topology.MetricSpace.Lipschitz", "Mathlib.Topology.UniformSpace.UniformConvergenceTopology" ]
Mathlib/Topology/MetricSpace/UniformConvergence.lean
dist_le
null
isometry_ofFun_boundedContinuousFunction [TopologicalSpace α] : Isometry (ofFun ∘ DFunLike.coe : (α →ᵇ β) → α →ᵤ β) := by simp [Isometry, edist_def, edist_eq_iSup]
lemma
Topology
[ "Mathlib.Order.CompleteLattice.Group", "Mathlib.Topology.ContinuousMap.Bounded.Basic", "Mathlib.Topology.ContinuousMap.Compact", "Mathlib.Topology.MetricSpace.Lipschitz", "Mathlib.Topology.UniformSpace.UniformConvergenceTopology" ]
Mathlib/Topology/MetricSpace/UniformConvergence.lean
isometry_ofFun_boundedContinuousFunction
null
isometry_ofFun_continuousMap [TopologicalSpace α] [CompactSpace α] : Isometry (ofFun ∘ DFunLike.coe : C(α, β) → α →ᵤ β) := isometry_ofFun_boundedContinuousFunction.comp <| ContinuousMap.isometryEquivBoundedOfCompact α β |>.isometry
lemma
Topology
[ "Mathlib.Order.CompleteLattice.Group", "Mathlib.Topology.ContinuousMap.Bounded.Basic", "Mathlib.Topology.ContinuousMap.Compact", "Mathlib.Topology.MetricSpace.Lipschitz", "Mathlib.Topology.UniformSpace.UniformConvergenceTopology" ]
Mathlib/Topology/MetricSpace/UniformConvergence.lean
isometry_ofFun_continuousMap
null
edist_continuousMapMk [TopologicalSpace α] [CompactSpace α] {f g : α →ᵤ β} (hf : Continuous (toFun f)) (hg : Continuous (toFun g)) : edist (⟨_, hf⟩ : C(α, β)) ⟨_, hg⟩ = edist f g := by simp [← isometry_ofFun_continuousMap.edist_eq]
lemma
Topology
[ "Mathlib.Order.CompleteLattice.Group", "Mathlib.Topology.ContinuousMap.Bounded.Basic", "Mathlib.Topology.ContinuousMap.Compact", "Mathlib.Topology.MetricSpace.Lipschitz", "Mathlib.Topology.UniformSpace.UniformConvergenceTopology" ]
Mathlib/Topology/MetricSpace/UniformConvergence.lean
edist_continuousMapMk
null
continuous_of_forall_lipschitzWith {f : γ → α →ᵤ[𝔖] β} (K : Set α → ℝ≥0) (h : ∀ s ∈ 𝔖, ∀ c ∈ s, LipschitzWith (K s) (fun x ↦ toFun 𝔖 (f x) c)) : Continuous f := by rw [UniformOnFun.continuous_rng_iff] refine fun s hs ↦ LipschitzWith.continuous (K := K s) ?_ rw [UniformFun.lipschitzWith_iff] rintro ⟨y, hy⟩ exact h s hs y hy @[nolint unusedArguments]
lemma
Topology
[ "Mathlib.Order.CompleteLattice.Group", "Mathlib.Topology.ContinuousMap.Bounded.Basic", "Mathlib.Topology.ContinuousMap.Compact", "Mathlib.Topology.MetricSpace.Lipschitz", "Mathlib.Topology.UniformSpace.UniformConvergenceTopology" ]
Mathlib/Topology/MetricSpace/UniformConvergence.lean
continuous_of_forall_lipschitzWith
Let `f : γ → α →ᵤ[𝔖] β`. If for every `s ∈ 𝔖` and for every `c ∈ s`, the function `fun x ↦ f x c` is Lipschitz (with Lipschitz constant depending on `s`), then `f` is continuous.
edist_def [Finite 𝔖] (f g : α →ᵤ[𝔖] β) : edist f g = ⨆ x ∈ ⋃₀ 𝔖, edist (toFun 𝔖 f x) (toFun 𝔖 g x) := rfl
lemma
Topology
[ "Mathlib.Order.CompleteLattice.Group", "Mathlib.Topology.ContinuousMap.Bounded.Basic", "Mathlib.Topology.ContinuousMap.Compact", "Mathlib.Topology.MetricSpace.Lipschitz", "Mathlib.Topology.UniformSpace.UniformConvergenceTopology" ]
Mathlib/Topology/MetricSpace/UniformConvergence.lean
edist_def
null
edist_def' [Finite 𝔖] (f g : α →ᵤ[𝔖] β) : edist f g = ⨆ s ∈ 𝔖, ⨆ x ∈ s, edist (toFun 𝔖 f x) (toFun 𝔖 g x) := by simp [edist_def, iSup_and, iSup_comm (ι := α)]
lemma
Topology
[ "Mathlib.Order.CompleteLattice.Group", "Mathlib.Topology.ContinuousMap.Bounded.Basic", "Mathlib.Topology.ContinuousMap.Compact", "Mathlib.Topology.MetricSpace.Lipschitz", "Mathlib.Topology.UniformSpace.UniformConvergenceTopology" ]
Mathlib/Topology/MetricSpace/UniformConvergence.lean
edist_def'
null
edist_eq_restrict_sUnion [Finite 𝔖] {f g : α →ᵤ[𝔖] β} : edist f g = edist (UniformFun.ofFun ((⋃₀ 𝔖).restrict (toFun 𝔖 f))) (UniformFun.ofFun ((⋃₀ 𝔖).restrict (toFun 𝔖 g))) := iSup_subtype'
lemma
Topology
[ "Mathlib.Order.CompleteLattice.Group", "Mathlib.Topology.ContinuousMap.Bounded.Basic", "Mathlib.Topology.ContinuousMap.Compact", "Mathlib.Topology.MetricSpace.Lipschitz", "Mathlib.Topology.UniformSpace.UniformConvergenceTopology" ]
Mathlib/Topology/MetricSpace/UniformConvergence.lean
edist_eq_restrict_sUnion
null
edist_eq_pi_restrict [Fintype 𝔖] {f g : α →ᵤ[𝔖] β} : edist f g = edist (fun s : 𝔖 ↦ UniformFun.ofFun ((s : Set α).restrict (toFun 𝔖 f))) (fun s : 𝔖 ↦ UniformFun.ofFun ((s : Set α).restrict (toFun 𝔖 g))) := by simp_rw [edist_def', iSup_subtype', edist_pi_def, Finset.sup_univ_eq_iSup] rfl variable [Finite 𝔖]
lemma
Topology
[ "Mathlib.Order.CompleteLattice.Group", "Mathlib.Topology.ContinuousMap.Bounded.Basic", "Mathlib.Topology.ContinuousMap.Compact", "Mathlib.Topology.MetricSpace.Lipschitz", "Mathlib.Topology.UniformSpace.UniformConvergenceTopology" ]
Mathlib/Topology/MetricSpace/UniformConvergence.lean
edist_eq_pi_restrict
null
edist_le {f g : α →ᵤ[𝔖] β} {C : ℝ≥0∞} : edist f g ≤ C ↔ ∀ x ∈ ⋃₀ 𝔖, edist (toFun 𝔖 f x) (toFun 𝔖 g x) ≤ C := by simp_rw [edist_def, iSup₂_le_iff]
lemma
Topology
[ "Mathlib.Order.CompleteLattice.Group", "Mathlib.Topology.ContinuousMap.Bounded.Basic", "Mathlib.Topology.ContinuousMap.Compact", "Mathlib.Topology.MetricSpace.Lipschitz", "Mathlib.Topology.UniformSpace.UniformConvergenceTopology" ]
Mathlib/Topology/MetricSpace/UniformConvergence.lean
edist_le
null
lipschitzWith_iff {f : γ → α →ᵤ[𝔖] β} {K : ℝ≥0} : LipschitzWith K f ↔ ∀ c ∈ ⋃₀ 𝔖, LipschitzWith K (fun x ↦ toFun 𝔖 (f x) c) := by simp [LipschitzWith, edist_le] tauto
lemma
Topology
[ "Mathlib.Order.CompleteLattice.Group", "Mathlib.Topology.ContinuousMap.Bounded.Basic", "Mathlib.Topology.ContinuousMap.Compact", "Mathlib.Topology.MetricSpace.Lipschitz", "Mathlib.Topology.UniformSpace.UniformConvergenceTopology" ]
Mathlib/Topology/MetricSpace/UniformConvergence.lean
lipschitzWith_iff
null
lipschitzOnWith_iff {f : γ → α →ᵤ[𝔖] β} {K : ℝ≥0} {s : Set γ} : LipschitzOnWith K f s ↔ ∀ c ∈ ⋃₀ 𝔖, LipschitzOnWith K (fun x ↦ toFun 𝔖 (f x) c) s := by simp [lipschitzOnWith_iff_restrict, lipschitzWith_iff] rfl
lemma
Topology
[ "Mathlib.Order.CompleteLattice.Group", "Mathlib.Topology.ContinuousMap.Bounded.Basic", "Mathlib.Topology.ContinuousMap.Compact", "Mathlib.Topology.MetricSpace.Lipschitz", "Mathlib.Topology.UniformSpace.UniformConvergenceTopology" ]
Mathlib/Topology/MetricSpace/UniformConvergence.lean
lipschitzOnWith_iff
null
edist_eval_le {f g : α →ᵤ[𝔖] β} {x : α} (hx : x ∈ ⋃₀ 𝔖) : edist (toFun 𝔖 f x) (toFun 𝔖 g x) ≤ edist f g := edist_le.mp le_rfl x hx
lemma
Topology
[ "Mathlib.Order.CompleteLattice.Group", "Mathlib.Topology.ContinuousMap.Bounded.Basic", "Mathlib.Topology.ContinuousMap.Compact", "Mathlib.Topology.MetricSpace.Lipschitz", "Mathlib.Topology.UniformSpace.UniformConvergenceTopology" ]
Mathlib/Topology/MetricSpace/UniformConvergence.lean
edist_eval_le
null
lipschitzWith_eval {x : α} (hx : x ∈ ⋃₀ 𝔖) : LipschitzWith 1 (fun f : α →ᵤ[𝔖] β ↦ toFun 𝔖 f x) := by intro f g simpa only [ENNReal.coe_one, one_mul] using edist_eval_le hx
lemma
Topology
[ "Mathlib.Order.CompleteLattice.Group", "Mathlib.Topology.ContinuousMap.Bounded.Basic", "Mathlib.Topology.ContinuousMap.Compact", "Mathlib.Topology.MetricSpace.Lipschitz", "Mathlib.Topology.UniformSpace.UniformConvergenceTopology" ]
Mathlib/Topology/MetricSpace/UniformConvergence.lean
lipschitzWith_eval
null
lipschitzWith_one_ofFun_toFun : LipschitzWith 1 (ofFun 𝔖 ∘ UniformFun.toFun : (α →ᵤ β) → (α →ᵤ[𝔖] β)) := lipschitzWith_iff.mpr fun _ _ ↦ UniformFun.lipschitzWith_eval _
lemma
Topology
[ "Mathlib.Order.CompleteLattice.Group", "Mathlib.Topology.ContinuousMap.Bounded.Basic", "Mathlib.Topology.ContinuousMap.Compact", "Mathlib.Topology.MetricSpace.Lipschitz", "Mathlib.Topology.UniformSpace.UniformConvergenceTopology" ]
Mathlib/Topology/MetricSpace/UniformConvergence.lean
lipschitzWith_one_ofFun_toFun
null
lipschitzWith_one_ofFun_toFun' [Finite 𝔗] (h : ⋃₀ 𝔖 ⊆ ⋃₀ 𝔗) : LipschitzWith 1 (ofFun 𝔖 ∘ toFun 𝔗 : (α →ᵤ[𝔗] β) → (α →ᵤ[𝔖] β)) := lipschitzWith_iff.mpr fun _x hx ↦ lipschitzWith_eval (h hx)
lemma
Topology
[ "Mathlib.Order.CompleteLattice.Group", "Mathlib.Topology.ContinuousMap.Bounded.Basic", "Mathlib.Topology.ContinuousMap.Compact", "Mathlib.Topology.MetricSpace.Lipschitz", "Mathlib.Topology.UniformSpace.UniformConvergenceTopology" ]
Mathlib/Topology/MetricSpace/UniformConvergence.lean
lipschitzWith_one_ofFun_toFun'
null
lipschitzWith_restrict (s : Set α) (hs : s ∈ 𝔖) : LipschitzWith 1 (UniformFun.ofFun ∘ s.restrict ∘ toFun 𝔖 : (α →ᵤ[𝔖] β) → (s →ᵤ β)) := UniformFun.lipschitzWith_iff.mpr fun x ↦ lipschitzWith_eval ⟨s, hs, x.2⟩
lemma
Topology
[ "Mathlib.Order.CompleteLattice.Group", "Mathlib.Topology.ContinuousMap.Bounded.Basic", "Mathlib.Topology.ContinuousMap.Compact", "Mathlib.Topology.MetricSpace.Lipschitz", "Mathlib.Topology.UniformSpace.UniformConvergenceTopology" ]
Mathlib/Topology/MetricSpace/UniformConvergence.lean
lipschitzWith_restrict
null
isometry_restrict (s : Set α) : Isometry (UniformFun.ofFun ∘ s.restrict ∘ toFun {s} : (α →ᵤ[{s}] β) → (s →ᵤ β)) := by simp [Isometry, edist_def, UniformFun.edist_def, iSup_subtype]
lemma
Topology
[ "Mathlib.Order.CompleteLattice.Group", "Mathlib.Topology.ContinuousMap.Bounded.Basic", "Mathlib.Topology.ContinuousMap.Compact", "Mathlib.Topology.MetricSpace.Lipschitz", "Mathlib.Topology.UniformSpace.UniformConvergenceTopology" ]
Mathlib/Topology/MetricSpace/UniformConvergence.lean
isometry_restrict
null
edist_continuousRestrict [TopologicalSpace α] {f g : α →ᵤ[𝔖] β} [CompactSpace (⋃₀ 𝔖)] (hf : ContinuousOn (toFun 𝔖 f) (⋃₀ 𝔖)) (hg : ContinuousOn (toFun 𝔖 g) (⋃₀ 𝔖)) : edist (⟨_, hf.restrict⟩ : C(⋃₀ 𝔖, β)) ⟨_, hg.restrict⟩ = edist f g := by simp [ContinuousMap.edist_eq_iSup, iSup_subtype, edist_def]
lemma
Topology
[ "Mathlib.Order.CompleteLattice.Group", "Mathlib.Topology.ContinuousMap.Bounded.Basic", "Mathlib.Topology.ContinuousMap.Compact", "Mathlib.Topology.MetricSpace.Lipschitz", "Mathlib.Topology.UniformSpace.UniformConvergenceTopology" ]
Mathlib/Topology/MetricSpace/UniformConvergence.lean
edist_continuousRestrict
null
edist_continuousRestrict_of_singleton [TopologicalSpace α] {s : Set α} {f g : α →ᵤ[{s}] β} [CompactSpace s] (hf : ContinuousOn (toFun {s} f) s) (hg : ContinuousOn (toFun {s} g) s) : edist (⟨_, hf.restrict⟩ : C(s, β)) ⟨_, hg.restrict⟩ = edist f g := by simp [ContinuousMap.edist_eq_iSup, iSup_subtype, edist_def]
lemma
Topology
[ "Mathlib.Order.CompleteLattice.Group", "Mathlib.Topology.ContinuousMap.Bounded.Basic", "Mathlib.Topology.ContinuousMap.Compact", "Mathlib.Topology.MetricSpace.Lipschitz", "Mathlib.Topology.UniformSpace.UniformConvergenceTopology" ]
Mathlib/Topology/MetricSpace/UniformConvergence.lean
edist_continuousRestrict_of_singleton
null
PseudoMetrizableSpace (X : Type*) [t : TopologicalSpace X] : Prop where exists_pseudo_metric : ∃ m : PseudoMetricSpace X, m.toUniformSpace.toTopologicalSpace = t
class
Topology
[ "Mathlib.Topology.MetricSpace.Basic" ]
Mathlib/Topology/Metrizable/Basic.lean
PseudoMetrizableSpace
A topological space is *pseudo metrizable* if there exists a pseudo metric space structure compatible with the topology. To endow such a space with a compatible distance, use `letI : PseudoMetricSpace X := TopologicalSpace.pseudoMetrizableSpacePseudoMetric X`.
noncomputable pseudoMetrizableSpacePseudoMetric (X : Type*) [TopologicalSpace X] [h : PseudoMetrizableSpace X] : PseudoMetricSpace X := h.exists_pseudo_metric.choose.replaceTopology h.exists_pseudo_metric.choose_spec.symm
def
Topology
[ "Mathlib.Topology.MetricSpace.Basic" ]
Mathlib/Topology/Metrizable/Basic.lean
pseudoMetrizableSpacePseudoMetric
Construct on a metrizable space a metric compatible with the topology.
pseudoMetrizableSpace_prod [PseudoMetrizableSpace X] [PseudoMetrizableSpace Y] : PseudoMetrizableSpace (X × Y) := letI : PseudoMetricSpace X := pseudoMetrizableSpacePseudoMetric X letI : PseudoMetricSpace Y := pseudoMetrizableSpacePseudoMetric Y inferInstance
instance
Topology
[ "Mathlib.Topology.MetricSpace.Basic" ]
Mathlib/Topology/Metrizable/Basic.lean
pseudoMetrizableSpace_prod
null
_root_.Topology.IsInducing.pseudoMetrizableSpace [PseudoMetrizableSpace Y] {f : X → Y} (hf : IsInducing f) : PseudoMetrizableSpace X := letI : PseudoMetricSpace Y := pseudoMetrizableSpacePseudoMetric Y ⟨⟨hf.comapPseudoMetricSpace, rfl⟩⟩
theorem
Topology
[ "Mathlib.Topology.MetricSpace.Basic" ]
Mathlib/Topology/Metrizable/Basic.lean
_root_.Topology.IsInducing.pseudoMetrizableSpace
Given an inducing map of a topological space into a pseudo metrizable space, the source space is also pseudo metrizable.
MetrizableSpace (X : Type*) [t : TopologicalSpace X] : Prop where exists_metric : ∃ m : MetricSpace X, m.toUniformSpace.toTopologicalSpace = t
class
Topology
[ "Mathlib.Topology.MetricSpace.Basic" ]
Mathlib/Topology/Metrizable/Basic.lean
MetrizableSpace
Every pseudo-metrizable space is first countable. -/ instance (priority := 100) PseudoMetrizableSpace.firstCountableTopology [h : PseudoMetrizableSpace X] : FirstCountableTopology X := by rcases h with ⟨_, hm⟩ rw [← hm] exact @UniformSpace.firstCountableTopology X PseudoMetricSpace.toUniformSpace EMetric.instIsCountablyGeneratedUniformity instance PseudoMetrizableSpace.subtype [PseudoMetrizableSpace X] (s : Set X) : PseudoMetrizableSpace s := IsInducing.subtypeVal.pseudoMetrizableSpace instance pseudoMetrizableSpace_pi [∀ i, PseudoMetrizableSpace (A i)] : PseudoMetrizableSpace (∀ i, A i) := by cases nonempty_fintype ι letI := fun i => pseudoMetrizableSpacePseudoMetric (A i) infer_instance /-- A topological space is metrizable if there exists a metric space structure compatible with the topology. To endow such a space with a compatible distance, use `letI : MetricSpace X := TopologicalSpace.metrizableSpaceMetric X`.
noncomputable metrizableSpaceMetric (X : Type*) [TopologicalSpace X] [h : MetrizableSpace X] : MetricSpace X := h.exists_metric.choose.replaceTopology h.exists_metric.choose_spec.symm
def
Topology
[ "Mathlib.Topology.MetricSpace.Basic" ]
Mathlib/Topology/Metrizable/Basic.lean
metrizableSpaceMetric
Construct on a metrizable space a metric compatible with the topology.
metrizableSpace_prod [MetrizableSpace X] [MetrizableSpace Y] : MetrizableSpace (X × Y) := letI : MetricSpace X := metrizableSpaceMetric X letI : MetricSpace Y := metrizableSpaceMetric Y inferInstance
instance
Topology
[ "Mathlib.Topology.MetricSpace.Basic" ]
Mathlib/Topology/Metrizable/Basic.lean
metrizableSpace_prod
null
_root_.Topology.IsEmbedding.metrizableSpace [MetrizableSpace Y] {f : X → Y} (hf : IsEmbedding f) : MetrizableSpace X := letI : MetricSpace Y := metrizableSpaceMetric Y ⟨⟨hf.comapMetricSpace f, rfl⟩⟩
theorem
Topology
[ "Mathlib.Topology.MetricSpace.Basic" ]
Mathlib/Topology/Metrizable/Basic.lean
_root_.Topology.IsEmbedding.metrizableSpace
Given an embedding of a topological space into a metrizable space, the source space is also metrizable.
MetrizableSpace.subtype [MetrizableSpace X] (s : Set X) : MetrizableSpace s := IsEmbedding.subtypeVal.metrizableSpace
instance
Topology
[ "Mathlib.Topology.MetricSpace.Basic" ]
Mathlib/Topology/Metrizable/Basic.lean
MetrizableSpace.subtype
null
metrizableSpace_pi [∀ i, MetrizableSpace (A i)] : MetrizableSpace (∀ i, A i) := by cases nonempty_fintype ι letI := fun i => metrizableSpaceMetric (A i) infer_instance
instance
Topology
[ "Mathlib.Topology.MetricSpace.Basic" ]
Mathlib/Topology/Metrizable/Basic.lean
metrizableSpace_pi
null
IsSeparable.secondCountableTopology [PseudoMetrizableSpace X] {s : Set X} (hs : IsSeparable s) : SecondCountableTopology s := by letI := pseudoMetrizableSpacePseudoMetric X have := hs.separableSpace exact UniformSpace.secondCountable_of_separable s
theorem
Topology
[ "Mathlib.Topology.MetricSpace.Basic" ]
Mathlib/Topology/Metrizable/Basic.lean
IsSeparable.secondCountableTopology
null
IsCompletelyMetrizableSpace (X : Type*) [t : TopologicalSpace X] : Prop where complete : ∃ m : MetricSpace X, m.toUniformSpace.toTopologicalSpace = t ∧ @CompleteSpace X m.toUniformSpace
class
Topology
[ "Mathlib.Topology.MetricSpace.Gluing", "Mathlib.Topology.Metrizable.Uniformity" ]
Mathlib/Topology/Metrizable/CompletelyMetrizable.lean
IsCompletelyMetrizableSpace
A topological space is completely metrizable if there exists a metric space structure compatible with the topology which makes the space complete. To endow such a space with a compatible distance, use `letI := upgradeIsCompletelyMetrizable X`.
UpgradedIsCompletelyMetrizableSpace (X : Type*) extends MetricSpace X, CompleteSpace X open scoped Uniformity in
class
Topology
[ "Mathlib.Topology.MetricSpace.Gluing", "Mathlib.Topology.Metrizable.Uniformity" ]
Mathlib/Topology/Metrizable/CompletelyMetrizable.lean
UpgradedIsCompletelyMetrizableSpace
A convenience class, for a completely metrizable space endowed with a complete metric. No instance of this class should be registered: It should be used as `letI := upgradeIsCompletelyMetrizable X` to endow a completely metrizable space with a complete metric.
noncomputable completelyMetrizableMetric (X : Type*) [TopologicalSpace X] [h : IsCompletelyMetrizableSpace X] : MetricSpace X := h.complete.choose.replaceTopology h.complete.choose_spec.1.symm
def
Topology
[ "Mathlib.Topology.MetricSpace.Gluing", "Mathlib.Topology.Metrizable.Uniformity" ]
Mathlib/Topology/Metrizable/CompletelyMetrizable.lean
completelyMetrizableMetric
Construct on a completely metrizable space a metric (compatible with the topology) which is complete.
complete_completelyMetrizableMetric (X : Type*) [ht : TopologicalSpace X] [h : IsCompletelyMetrizableSpace X] : @CompleteSpace X (completelyMetrizableMetric X).toUniformSpace := by convert h.complete.choose_spec.2 exact MetricSpace.replaceTopology_eq _ _
theorem
Topology
[ "Mathlib.Topology.MetricSpace.Gluing", "Mathlib.Topology.Metrizable.Uniformity" ]
Mathlib/Topology/Metrizable/CompletelyMetrizable.lean
complete_completelyMetrizableMetric
null
noncomputable upgradeIsCompletelyMetrizable (X : Type*) [TopologicalSpace X] [IsCompletelyMetrizableSpace X] : UpgradedIsCompletelyMetrizableSpace X := letI := completelyMetrizableMetric X { complete_completelyMetrizableMetric X with }
def
Topology
[ "Mathlib.Topology.MetricSpace.Gluing", "Mathlib.Topology.Metrizable.Uniformity" ]
Mathlib/Topology/Metrizable/CompletelyMetrizable.lean
upgradeIsCompletelyMetrizable
This definition endows a completely metrizable space with a complete metric. Use it as: `letI := upgradeIsCompletelyMetrizable X`.
pi_countable {ι : Type*} [Countable ι] {X : ι → Type*} [∀ i, TopologicalSpace (X i)] [∀ i, IsCompletelyMetrizableSpace (X i)] : IsCompletelyMetrizableSpace (Π i, X i) := by letI := fun i ↦ upgradeIsCompletelyMetrizable (X i) infer_instance
instance
Topology
[ "Mathlib.Topology.MetricSpace.Gluing", "Mathlib.Topology.Metrizable.Uniformity" ]
Mathlib/Topology/Metrizable/CompletelyMetrizable.lean
pi_countable
Note: the priority is set to 90 to ensure that this instance is only applied after `EMetricSpace.metrizableSpace`. This prevents unnecessary attempts to infer completeness. -/ instance (priority := 90) MetrizableSpace [TopologicalSpace X] [IsCompletelyMetrizableSpace X] : MetrizableSpace X := by letI := upgradeIsCompletelyMetrizable X infer_instance /-- A countable product of completely metrizable spaces is completely metrizable.
sigma {ι : Type*} {X : ι → Type*} [∀ n, TopologicalSpace (X n)] [∀ n, IsCompletelyMetrizableSpace (X n)] : IsCompletelyMetrizableSpace (Σ n, X n) := letI := fun n ↦ upgradeIsCompletelyMetrizable (X n) letI : MetricSpace (Σ n, X n) := Metric.Sigma.metricSpace haveI : CompleteSpace (Σ n, X n) := Metric.Sigma.completeSpace inferInstance
instance
Topology
[ "Mathlib.Topology.MetricSpace.Gluing", "Mathlib.Topology.Metrizable.Uniformity" ]
Mathlib/Topology/Metrizable/CompletelyMetrizable.lean
sigma
A disjoint union of completely metrizable spaces is completely metrizable.
prod [TopologicalSpace X] [IsCompletelyMetrizableSpace X] [TopologicalSpace Y] [IsCompletelyMetrizableSpace Y] : IsCompletelyMetrizableSpace (X × Y) := letI := upgradeIsCompletelyMetrizable X letI := upgradeIsCompletelyMetrizable Y inferInstance
instance
Topology
[ "Mathlib.Topology.MetricSpace.Gluing", "Mathlib.Topology.Metrizable.Uniformity" ]
Mathlib/Topology/Metrizable/CompletelyMetrizable.lean
prod
The product of two completely metrizable spaces is completely metrizable.
sum [TopologicalSpace X] [IsCompletelyMetrizableSpace X] [TopologicalSpace Y] [IsCompletelyMetrizableSpace Y] : IsCompletelyMetrizableSpace (X ⊕ Y) := letI := upgradeIsCompletelyMetrizable X letI := upgradeIsCompletelyMetrizable Y inferInstance
instance
Topology
[ "Mathlib.Topology.MetricSpace.Gluing", "Mathlib.Topology.Metrizable.Uniformity" ]
Mathlib/Topology/Metrizable/CompletelyMetrizable.lean
sum
The disjoint union of two completely metrizable spaces is completely metrizable.
_root_.Topology.IsClosedEmbedding.IsCompletelyMetrizableSpace [TopologicalSpace X] [TopologicalSpace Y] [IsCompletelyMetrizableSpace Y] {f : X → Y} (hf : IsClosedEmbedding f) : IsCompletelyMetrizableSpace X := by letI := upgradeIsCompletelyMetrizable Y letI : MetricSpace X := hf.isEmbedding.comapMetricSpace f have : CompleteSpace X := by rw [completeSpace_iff_isComplete_range hf.isEmbedding.to_isometry.isUniformInducing] exact hf.isClosed_range.isComplete infer_instance
theorem
Topology
[ "Mathlib.Topology.MetricSpace.Gluing", "Mathlib.Topology.Metrizable.Uniformity" ]
Mathlib/Topology/Metrizable/CompletelyMetrizable.lean
_root_.Topology.IsClosedEmbedding.IsCompletelyMetrizableSpace
Given a closed embedding into a completely metrizable space, the source space is also completely metrizable.
_root_.IsClosed.isCompletelyMetrizableSpace [TopologicalSpace X] [IsCompletelyMetrizableSpace X] {s : Set X} (hs : IsClosed s) : IsCompletelyMetrizableSpace s := hs.isClosedEmbedding_subtypeVal.IsCompletelyMetrizableSpace
theorem
Topology
[ "Mathlib.Topology.MetricSpace.Gluing", "Mathlib.Topology.Metrizable.Uniformity" ]
Mathlib/Topology/Metrizable/CompletelyMetrizable.lean
_root_.IsClosed.isCompletelyMetrizableSpace
Any discrete space is completely metrizable. -/ instance (priority := 50) discrete [TopologicalSpace X] [DiscreteTopology X] : IsCompletelyMetrizableSpace X := by classical let m : MetricSpace X := { dist x y := if x = y then 0 else 1 dist_self x := by simp dist_comm x y := by obtain h | h := eq_or_ne x y · simp [h] · simp [h, h.symm] dist_triangle x y z := by by_cases x = y <;> by_cases x = z <;> by_cases y = z <;> simp_all eq_of_dist_eq_zero := by simp } refine ⟨m, ?_, ?_⟩ · rw [DiscreteTopology.eq_bot (α := X)] refine eq_bot_of_singletons_open fun x ↦ ?_ convert @Metric.isOpen_ball _ _ x 1 refine subset_antisymm (singleton_subset_iff.2 (Metric.mem_ball_self (by simp))) fun y hy ↦ ?_ simp only [Metric.mem_ball, mem_singleton_iff] at * by_contra change (if y = x then 0 else 1) < 1 at hy simp_all · refine Metric.complete_of_cauchySeq_tendsto fun u hu ↦ ?_ rw [Metric.cauchySeq_iff'] at hu obtain ⟨N, hN⟩ := hu 1 (by simp) refine ⟨u N, @tendsto_atTop_of_eventually_const X UniformSpace.toTopologicalSpace (u N) _ _ _ N fun n hn ↦ ?_⟩ specialize hN n hn by_contra change (if u n = u N then 0 else 1) < 1 at hN simp_all /-- A closed subset of a completely metrizable space is also completely metrizable.
univ [TopologicalSpace X] [IsCompletelyMetrizableSpace X] : IsCompletelyMetrizableSpace (univ : Set X) := isClosed_univ.isCompletelyMetrizableSpace
instance
Topology
[ "Mathlib.Topology.MetricSpace.Gluing", "Mathlib.Topology.Metrizable.Uniformity" ]
Mathlib/Topology/Metrizable/CompletelyMetrizable.lean
univ
null
noncomputable ofPreNNDist (d : X → X → ℝ≥0) (dist_self : ∀ x, d x x = 0) (dist_comm : ∀ x y, d x y = d y x) : PseudoMetricSpace X where dist x y := ↑(⨅ l : List X, ((x::l).zipWith d (l ++ [y])).sum : ℝ≥0) dist_self x := NNReal.coe_eq_zero.2 <| nonpos_iff_eq_zero.1 <| (ciInf_le (OrderBot.bddBelow _) []).trans_eq <| by simp [dist_self] dist_comm x y := NNReal.coe_inj.2 <| by refine reverse_surjective.iInf_congr _ fun l ↦ ?_ rw [← sum_reverse, reverse_zipWith, reverse_append, reverse_reverse, reverse_singleton, singleton_append, reverse_cons, reverse_reverse, zipWith_comm_of_comm dist_comm] simp only [length, length_append] dist_triangle x y z := by rw [← NNReal.coe_add, NNReal.coe_le_coe] refine NNReal.le_iInf_add_iInf fun lxy lyz ↦ ?_ calc ⨅ l, (zipWith d (x::l) (l ++ [z])).sum ≤ (zipWith d (x::lxy ++ y::lyz) ((lxy ++ y::lyz) ++ [z])).sum := ciInf_le (OrderBot.bddBelow _) (lxy ++ y::lyz) _ = (zipWith d (x::lxy) (lxy ++ [y])).sum + (zipWith d (y::lyz) (lyz ++ [z])).sum := by rw [← sum_append, ← zipWith_append, cons_append, ← @singleton_append _ y, append_assoc, append_assoc, append_assoc] rw [length_cons, length_append, length_singleton]
def
Topology
[ "Mathlib.Data.Nat.Lattice", "Mathlib.Data.NNReal.Basic", "Mathlib.Topology.Metrizable.Basic" ]
Mathlib/Topology/Metrizable/Uniformity.lean
ofPreNNDist
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`.
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) := rfl
theorem
Topology
[ "Mathlib.Data.Nat.Lattice", "Mathlib.Data.NNReal.Basic", "Mathlib.Topology.Metrizable.Basic" ]
Mathlib/Topology/Metrizable/Uniformity.lean
dist_ofPreNNDist
null
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 := NNReal.coe_le_coe.2 <| (ciInf_le (OrderBot.bddBelow _) []).trans_eq <| by simp
theorem
Topology
[ "Mathlib.Data.Nat.Lattice", "Mathlib.Data.NNReal.Basic", "Mathlib.Topology.Metrizable.Basic" ]
Mathlib/Topology/Metrizable/Uniformity.lean
dist_ofPreNNDist_le
null
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 := by /- We need to show that `d x y` is at most twice the sum `L` of `d xᵢ xᵢ₊₁` over a path `x₀=x, ..., xₙ=y`. We prove it by induction on the length `n` of the sequence. Find an edge that splits the path into two parts of almost equal length: both `d x₀ x₁ + ... + d xₖ₋₁ xₖ` and `d xₖ₊₁ xₖ₊₂ + ... + d xₙ₋₁ xₙ` are less than or equal to `L / 2`. Then `d x₀ xₖ ≤ L`, `d xₖ xₖ₊₁ ≤ L`, and `d xₖ₊₁ xₙ ≤ L`, thus `d x₀ xₙ ≤ 2 * L`. -/ rw [dist_ofPreNNDist, ← NNReal.coe_two, ← NNReal.coe_mul, NNReal.mul_iInf, NNReal.coe_le_coe] refine le_ciInf fun l => ?_ have hd₀_trans : Transitive fun x y => d x y = 0 := by intro a b c hab hbc rw [← nonpos_iff_eq_zero] simpa only [nonpos_iff_eq_zero, hab, hbc, dist_self c, max_self, mul_zero] using hd a b c c haveI : IsTrans X fun x y => d x y = 0 := ⟨hd₀_trans⟩ suffices ∀ n, length l = n → d x y ≤ 2 * (zipWith d (x :: l) (l ++ [y])).sum by exact this _ rfl intro n hn induction n using Nat.strong_induction_on generalizing x y l with | h n ihn => simp only at ihn subst n set L := zipWith d (x::l) (l ++ [y]) have hL_len : length L = length l + 1 := by simp [L] rcases eq_or_ne (d x y) 0 with hd₀ | hd₀ · simp only [hd₀, zero_le] rsuffices ⟨z, z', hxz, hzz', hz'y⟩ : ∃ z z' : X, d x z ≤ L.sum ∧ d z z' ≤ L.sum ∧ d z' y ≤ L.sum · exact (hd x z z' y).trans (mul_le_mul_left' (max_le hxz (max_le hzz' hz'y)) _) set s : Set ℕ := { m : ℕ | 2 * (take m L).sum ≤ L.sum } have hs₀ : 0 ∈ s := by simp [s] have hsne : s.Nonempty := ⟨0, hs₀⟩ obtain ⟨M, hMl, hMs⟩ : ∃ M ≤ length l, IsGreatest s M := by have hs_ub : length l ∈ upperBounds s := by intro m hm rw [← not_lt, Nat.lt_iff_add_one_le, ← hL_len] intro hLm rw [mem_setOf_eq, take_of_length_le hLm, two_mul, add_le_iff_nonpos_left, nonpos_iff_eq_zero, sum_eq_zero_iff, ← forall_iff_forall_mem, forall_zipWith, ← isChain_cons_append_singleton_iff_forall₂] at hm <;> [skip; simp] exact hd₀ (hm.rel_cons (mem_append.2 <| Or.inr <| mem_singleton_self _)) have hs_bdd : BddAbove s := ⟨length l, hs_ub⟩ exact ⟨sSup s, csSup_le hsne hs_ub, ⟨Nat.sSup_mem hsne hs_bdd, fun k => le_csSup hs_bdd⟩⟩ have hM_lt : M < length L := by rwa [hL_len, Nat.lt_succ_iff] have hM_ltx : M < length (x::l) := lt_length_left_of_zipWith hM_lt have hM_lty : M < length (l ++ [y]) := lt_length_right_of_zipWith hM_lt refine ⟨(x::l)[M], (l ++ [y])[M], ?_, ?_, ?_⟩ · cases M with | zero => simp [dist_self] ...
theorem
Topology
[ "Mathlib.Data.Nat.Lattice", "Mathlib.Data.NNReal.Basic", "Mathlib.Topology.Metrizable.Basic" ]
Mathlib/Topology/Metrizable/Uniformity.lean
le_two_mul_dist_ofPreNNDist
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`.
protected UniformSpace.metrizable_uniformity (X : Type*) [UniformSpace X] [IsCountablyGenerated (𝓤 X)] : ∃ I : PseudoMetricSpace X, I.toUniformSpace = ‹_› := by classical /- Choose a fast decreasing antitone basis `U : ℕ → set (X × X)` of the uniformity filter `𝓤 X`. Define `d x y : ℝ≥0` to be `(1 / 2) ^ n`, where `n` is the minimal index of `U n` that separates `x` and `y`: `(x, y) ∉ U n`, or `0` if `x` is not separated from `y`. This function satisfies the assumptions of `PseudoMetricSpace.ofPreNNDist` and `PseudoMetricSpace.le_two_mul_dist_ofPreNNDist`, hence the distance given by the former pseudo metric space structure is Lipschitz equivalent to the `d`. Thus the uniformities generated by `d` and `dist` are equal. Since the former uniformity is equal to `𝓤 X`, the latter is equal to `𝓤 X` as well. -/ obtain ⟨U, hU_symm, hU_comp, hB⟩ : ∃ U : ℕ → Set (X × X), (∀ n, IsSymmetricRel (U n)) ∧ (∀ ⦃m n⦄, m < n → U n ○ (U n ○ U n) ⊆ U m) ∧ (𝓤 X).HasAntitoneBasis U := by rcases UniformSpace.has_seq_basis X with ⟨V, hB, hV_symm⟩ rcases hB.subbasis_with_rel fun m => hB.tendsto_smallSets.eventually (eventually_uniformity_iterate_comp_subset (hB.mem m) 2) with ⟨φ, -, hφ_comp, hφB⟩ exact ⟨V ∘ φ, fun n => hV_symm _, hφ_comp, hφB⟩ set d : X → X → ℝ≥0 := fun x y => if h : ∃ n, (x, y) ∉ U n then (1 / 2) ^ Nat.find h else 0 have hd₀ : ∀ {x y}, d x y = 0 ↔ Inseparable x y := by intro x y refine Iff.trans ?_ hB.inseparable_iff_uniformity.symm simp only [d, true_imp_iff] split_ifs with h · simp [h, pow_eq_zero_iff'] · simpa only [not_exists, Classical.not_not, eq_self_iff_true, true_iff] using h have hd_symm : ∀ x y, d x y = d y x := by intro x y simp only [d, @IsSymmetricRel.mk_mem_comm _ _ (hU_symm _) x y] have hr : (1 / 2 : ℝ≥0) ∈ Ioo (0 : ℝ≥0) 1 := ⟨half_pos one_pos, NNReal.half_lt_self one_ne_zero⟩ letI I := PseudoMetricSpace.ofPreNNDist d (fun x => hd₀.2 rfl) hd_symm have hdist_le : ∀ x y, dist x y ≤ d x y := PseudoMetricSpace.dist_ofPreNNDist_le _ _ _ have hle_d : ∀ {x y : X} {n : ℕ}, (1 / 2) ^ n ≤ d x y ↔ (x, y) ∉ U n := by intro x y n dsimp only [d] split_ifs with h · rw [(pow_right_strictAnti₀ hr.1 hr.2).le_iff_ge, Nat.find_le_iff] exact ⟨fun ⟨m, hmn, hm⟩ hn => hm (hB.antitone hmn hn), fun h => ⟨n, le_rfl, h⟩⟩ · push_neg at h simp only [h, not_true, (pow_pos hr.1 _).not_ge] have hd_le : ∀ x y, ↑(d x y) ≤ 2 * dist x y := by refine PseudoMetricSpace.le_two_mul_dist_ofPreNNDist _ _ _ fun x₁ x₂ x₃ x₄ => ?_ by_cases H : ∃ n, (x₁, x₄) ∉ U n · refine (dif_pos H).trans_le ?_ rw [← div_le_iff₀' zero_lt_two, ← mul_one_div (_ ^ _), ← pow_succ] simp only [le_max_iff, hle_d, ← not_and_or] rintro ⟨h₁₂, h₂₃, h₃₄⟩ refine Nat.find_spec H (hU_comp (lt_add_one <| Nat.find H) ?_) ...
theorem
Topology
[ "Mathlib.Data.Nat.Lattice", "Mathlib.Data.NNReal.Basic", "Mathlib.Topology.Metrizable.Basic" ]
Mathlib/Topology/Metrizable/Uniformity.lean
UniformSpace.metrizable_uniformity
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 noncomputable UniformSpace.pseudoMetricSpace (X : Type*) [UniformSpace X] [IsCountablyGenerated (𝓤 X)] : PseudoMetricSpace X := (UniformSpace.metrizable_uniformity X).choose.replaceUniformity <| congr_arg _ (UniformSpace.metrizable_uniformity X).choose_spec.symm
def
Topology
[ "Mathlib.Data.Nat.Lattice", "Mathlib.Data.NNReal.Basic", "Mathlib.Topology.Metrizable.Basic" ]
Mathlib/Topology/Metrizable/Uniformity.lean
UniformSpace.pseudoMetricSpace
A `PseudoMetricSpace` instance compatible with a given `UniformSpace` structure.
protected noncomputable UniformSpace.metricSpace (X : Type*) [UniformSpace X] [IsCountablyGenerated (𝓤 X)] [T0Space X] : MetricSpace X := @MetricSpace.ofT0PseudoMetricSpace X (UniformSpace.pseudoMetricSpace X) _
def
Topology
[ "Mathlib.Data.Nat.Lattice", "Mathlib.Data.NNReal.Basic", "Mathlib.Topology.Metrizable.Basic" ]
Mathlib/Topology/Metrizable/Uniformity.lean
UniformSpace.metricSpace
A `MetricSpace` instance compatible with a given `UniformSpace` structure.
UniformSpace.metrizableSpace [UniformSpace X] [IsCountablyGenerated (𝓤 X)] [T0Space X] : TopologicalSpace.MetrizableSpace X := by letI := UniformSpace.metricSpace X infer_instance
theorem
Topology
[ "Mathlib.Data.Nat.Lattice", "Mathlib.Data.NNReal.Basic", "Mathlib.Topology.Metrizable.Basic" ]
Mathlib/Topology/Metrizable/Uniformity.lean
UniformSpace.metrizableSpace
A uniform space with countably generated `𝓤 X` is pseudo metrizable. -/ instance (priority := 100) UniformSpace.pseudoMetrizableSpace [UniformSpace X] [IsCountablyGenerated (𝓤 X)] : TopologicalSpace.PseudoMetrizableSpace X := by letI := UniformSpace.pseudoMetricSpace X infer_instance /-- A T₀ uniform space with countably generated `𝓤 X` is metrizable. This is not an instance to avoid loops.
TotallyBounded.isSeparable [UniformSpace X] [i : IsCountablyGenerated (𝓤 X)] {s : Set X} (h : TotallyBounded s) : TopologicalSpace.IsSeparable s := by letI := (UniformSpace.pseudoMetricSpace (X := X)).toPseudoEMetricSpace rw [EMetric.totallyBounded_iff] at h have h' : ∀ ε > 0, ∃ t, Set.Countable t ∧ s ⊆ ⋃ y ∈ t, EMetric.closedBall y ε := by intro ε hε obtain ⟨t, ht⟩ := h ε hε refine ⟨t, ht.1.countable, subset_trans ht.2 ?_⟩ gcongr exact EMetric.ball_subset_closedBall obtain ⟨t, _, htc, hts⟩ := EMetric.subset_countable_closure_of_almost_dense_set s h' exact ⟨t, htc, hts⟩ variable {α : Type*} open TopologicalSpace
lemma
Topology
[ "Mathlib.Data.Nat.Lattice", "Mathlib.Data.NNReal.Basic", "Mathlib.Topology.Metrizable.Basic" ]
Mathlib/Topology/Metrizable/Uniformity.lean
TotallyBounded.isSeparable
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`.
exists_isInducing_l_infty : ∃ f : X → ℕ →ᵇ ℝ, IsInducing f := by rcases exists_countable_basis X with ⟨B, hBc, -, hB⟩ let s : Set (Set X × Set X) := { UV ∈ B ×ˢ B | closure UV.1 ⊆ UV.2 } haveI : Encodable s := ((hBc.prod hBc).mono inter_subset_left).toEncodable letI : TopologicalSpace s := ⊥ haveI : DiscreteTopology s := ⟨rfl⟩ rsuffices ⟨f, hf⟩ : ∃ f : X → s →ᵇ ℝ, IsInducing f · exact ⟨fun x => (f x).extend (Encodable.encode' s) 0, (BoundedContinuousFunction.isometry_extend (Encodable.encode' s) (0 : ℕ →ᵇ ℝ)).isEmbedding.isInducing.comp hf⟩ have hd : ∀ UV : s, Disjoint (closure UV.1.1) UV.1.2ᶜ := fun UV => disjoint_compl_right.mono_right (compl_subset_compl.2 UV.2.2) obtain ⟨ε, ε01, hε⟩ : ∃ ε : s → ℝ, (∀ UV, ε UV ∈ Ioc (0 : ℝ) 1) ∧ Tendsto ε cofinite (𝓝 0) := by rcases posSumOfEncodable zero_lt_one s with ⟨ε, ε0, c, hεc, hc1⟩ refine ⟨ε, fun UV => ⟨ε0 UV, ?_⟩, hεc.summable.tendsto_cofinite_zero⟩ exact (le_hasSum hεc UV fun _ _ => (ε0 _).le).trans hc1 /- For each `UV = (U, V) ∈ s` we use Urysohn's lemma to choose a function `f UV` that is equal to zero on `U` and is equal to `ε UV` on the complement to `V`. -/ have : ∀ UV : s, ∃ f : C(X, ℝ), EqOn f 0 UV.1.1 ∧ EqOn f (fun _ => ε UV) UV.1.2ᶜ ∧ ∀ x, f x ∈ Icc 0 (ε UV) := by intro UV rcases exists_continuous_zero_one_of_isClosed isClosed_closure (hB.isOpen UV.2.1.2).isClosed_compl (hd UV) with ⟨f, hf₀, hf₁, hf01⟩ exact ⟨ε UV • f, fun x hx => by simp [hf₀ (subset_closure hx)], fun x hx => by simp [hf₁ hx], fun x => ⟨mul_nonneg (ε01 _).1.le (hf01 _).1, mul_le_of_le_one_right (ε01 _).1.le (hf01 _).2⟩⟩ choose f hf0 hfε hf0ε using this have hf01 : ∀ UV x, f UV x ∈ Icc (0 : ℝ) 1 := fun UV x => Icc_subset_Icc_right (ε01 _).2 (hf0ε _ _) set F : X → s →ᵇ ℝ := fun x => ⟨⟨fun UV => f UV x, continuous_of_discreteTopology⟩, 1, fun UV₁ UV₂ => Real.dist_le_of_mem_Icc_01 (hf01 _ _) (hf01 _ _)⟩ have hF : ∀ x UV, F x UV = f UV x := fun _ _ => rfl refine ⟨F, isInducing_iff_nhds.2 fun x => le_antisymm ?_ ?_⟩ · /- First we prove that `F` is continuous. Given `δ > 0`, consider the set `T` of `(U, V) ∈ s` such that `ε (U, V) ≥ δ`. Since `ε` tends to zero, `T` is finite. Since each `f` is continuous, we can choose a neighborhood such that `dist (F y (U, V)) (F x (U, V)) ≤ δ` for any `(U, V) ∈ T`. For `(U, V) ∉ T`, the same inequality is true because both `F y (U, V)` and `F x (U, V)` belong to the interval `[0, ε (U, V)]`. -/ refine (nhds_basis_closedBall.comap _).ge_iff.2 fun δ δ0 => ?_ have h_fin : { UV : s | δ ≤ ε UV }.Finite := by simpa only [← not_lt] using hε (gt_mem_nhds δ0) have : ∀ᶠ y in 𝓝 x, ∀ UV, δ ≤ ε UV → dist (F y UV) (F x UV) ≤ δ := by refine (eventually_all_finite h_fin).2 fun UV _ => ?_ exact (f UV).continuous.tendsto x (closedBall_mem_nhds _ δ0) refine this.mono fun y hy => (BoundedContinuousFunction.dist_le δ0.le).2 fun UV => ?_ rcases le_total δ (ε UV) with hle | hle exacts [hy _ hle, (Real.dist_le_of_mem_Icc (hf0ε _ _) (hf0ε _ _)).trans (by rwa [sub_zero])] · /- Finally, we prove that each neighborhood `V` of `x : X` includes a preimage of a neighborhood of `F x` under `F`. Without loss of generality, `V` belongs to `B`. Choose `U ∈ B` such that `x ∈ V` and `closure V ⊆ U`. ...
theorem
Topology
[ "Mathlib.Analysis.SpecificLimits.Basic", "Mathlib.Topology.UrysohnsLemma", "Mathlib.Topology.Metrizable.Basic", "Mathlib.Topology.ContinuousMap.Bounded.Basic" ]
Mathlib/Topology/Metrizable/Urysohn.lean
exists_isInducing_l_infty
For a regular topological space with second countable topology, there exists an inducing map to `l^∞ = ℕ →ᵇ ℝ`.
exists_embedding_l_infty : ∃ f : X → ℕ →ᵇ ℝ, IsEmbedding f := let ⟨f, hf⟩ := exists_isInducing_l_infty X; ⟨f, hf.isEmbedding⟩
theorem
Topology
[ "Mathlib.Analysis.SpecificLimits.Basic", "Mathlib.Topology.UrysohnsLemma", "Mathlib.Topology.Metrizable.Basic", "Mathlib.Topology.ContinuousMap.Bounded.Basic" ]
Mathlib/Topology/Metrizable/Urysohn.lean
exists_embedding_l_infty
*Urysohn's metrization theorem* (Tychonoff's version): a regular topological space with second countable topology `X` is metrizable, i.e., there exists a pseudometric space structure that generates the same topology. -/ instance (priority := 90) PseudoMetrizableSpace.of_regularSpace_secondCountableTopology : PseudoMetrizableSpace X := let ⟨_, hf⟩ := exists_isInducing_l_infty X hf.pseudoMetrizableSpace end RegularSpace variable (X : Type*) [TopologicalSpace X] [T3Space X] [SecondCountableTopology X] /-- A T₃ topological space with second countable topology can be embedded into `l^∞ = ℕ →ᵇ ℝ`.
is equal to the order topology. We prove many basic properties of such topologies.
structure
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
is
null
OrderTopology (α : Type*) [t : TopologicalSpace α] [Preorder α] : Prop where /-- The topology is generated by open intervals `Set.Ioi _` and `Set.Iio _`. -/ topology_eq_generate_intervals : t = generateFrom { s | ∃ a, s = Ioi a ∨ s = Iio a }
class
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
OrderTopology
The order topology on an ordered type is the topology generated by open intervals. We register it on a preorder, but it is mostly interesting in linear orders, where it is also order-closed. We define it as a mixin. If you want to introduce the order topology on a preorder, use `Preorder.topology`.
Preorder.topology (α : Type*) [Preorder α] : TopologicalSpace α := generateFrom { s : Set α | ∃ a : α, s = { b : α | a < b } ∨ s = { b : α | b < a } }
def
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
Preorder.topology
(Order) topology on a partial order `α` generated by the subbase of open intervals `(a, ∞) = { x ∣ a < x }, (-∞, b) = {x ∣ x < b}` for all `a, b` in `α`. We do not register it as an instance as many ordered sets are already endowed with the same topology, most often in a non-defeq way though. Register as a local instance when necessary.
protected OrderTopology.continuous_iff [OrderTopology α] [TopologicalSpace β] {f : β → α} : Continuous f ↔ ∀ a, IsOpen (f ⁻¹' Ioi a) ∧ IsOpen (f ⁻¹' Iio a) := by simp_rw [OrderTopology.topology_eq_generate_intervals, continuous_generateFrom_iff] aesop
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
OrderTopology.continuous_iff
null
isOpen_iff_generate_intervals [t : OrderTopology α] {s : Set α} : IsOpen s ↔ GenerateOpen { s | ∃ a, s = Ioi a ∨ s = Iio a } s := by rw [t.topology_eq_generate_intervals]; rfl
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
isOpen_iff_generate_intervals
null
isOpen_lt' [OrderTopology α] (a : α) : IsOpen { b : α | a < b } := isOpen_iff_generate_intervals.2 <| .basic _ ⟨a, .inl rfl⟩
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
isOpen_lt'
null
isOpen_Ioi' [OrderTopology α] (a : α) : IsOpen (Ioi a) := isOpen_lt' a
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
isOpen_Ioi'
null
isOpen_gt' [OrderTopology α] (a : α) : IsOpen { b : α | b < a } := isOpen_iff_generate_intervals.2 <| .basic _ ⟨a, .inr rfl⟩
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
isOpen_gt'
null
isOpen_Iio' [OrderTopology α] (a : α) : IsOpen (Iio a) := isOpen_gt' a
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
isOpen_Iio'
null
lt_mem_nhds [OrderTopology α] {a b : α} (h : a < b) : ∀ᶠ x in 𝓝 b, a < x := (isOpen_lt' _).mem_nhds h
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
lt_mem_nhds
null
le_mem_nhds [OrderTopology α] {a b : α} (h : a < b) : ∀ᶠ x in 𝓝 b, a ≤ x := (lt_mem_nhds h).mono fun _ => le_of_lt
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
le_mem_nhds
null
gt_mem_nhds [OrderTopology α] {a b : α} (h : a < b) : ∀ᶠ x in 𝓝 a, x < b := (isOpen_gt' _).mem_nhds h
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
gt_mem_nhds
null
ge_mem_nhds [OrderTopology α] {a b : α} (h : a < b) : ∀ᶠ x in 𝓝 a, x ≤ b := (gt_mem_nhds h).mono fun _ => le_of_lt
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
ge_mem_nhds
null
nhds_eq_order [OrderTopology α] (a : α) : 𝓝 a = (⨅ b ∈ Iio a, 𝓟 (Ioi b)) ⊓ ⨅ b ∈ Ioi a, 𝓟 (Iio b) := by rw [OrderTopology.topology_eq_generate_intervals (α := α), nhds_generateFrom] simp_rw [mem_setOf_eq, @and_comm (a ∈ _), exists_or, or_and_right, iInf_or, iInf_and, iInf_exists, iInf_inf_eq, iInf_comm (ι := Set α), iInf_iInf_eq_left, mem_Ioi, mem_Iio]
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
nhds_eq_order
null
tendsto_order [OrderTopology α] {f : β → α} {a : α} {x : Filter β} : Tendsto f x (𝓝 a) ↔ (∀ a' < a, ∀ᶠ b in x, a' < f b) ∧ ∀ a' > a, ∀ᶠ b in x, f b < a' := by simp only [nhds_eq_order a, tendsto_inf, tendsto_iInf, tendsto_principal]; rfl
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
tendsto_order
null
tendstoIccClassNhds [OrderTopology α] (a : α) : TendstoIxxClass Icc (𝓝 a) (𝓝 a) := by simp only [nhds_eq_order, iInf_subtype'] refine ((hasBasis_iInf_principal_finite _).inf (hasBasis_iInf_principal_finite _)).tendstoIxxClass fun s _ => ?_ refine ((ordConnected_biInter ?_).inter (ordConnected_biInter ?_)).out <;> intro _ _ exacts [ordConnected_Ioi, ordConnected_Iio]
instance
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
tendstoIccClassNhds
null
tendstoIcoClassNhds [OrderTopology α] (a : α) : TendstoIxxClass Ico (𝓝 a) (𝓝 a) := tendstoIxxClass_of_subset fun _ _ => Ico_subset_Icc_self
instance
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
tendstoIcoClassNhds
null
tendstoIocClassNhds [OrderTopology α] (a : α) : TendstoIxxClass Ioc (𝓝 a) (𝓝 a) := tendstoIxxClass_of_subset fun _ _ => Ioc_subset_Icc_self
instance
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
tendstoIocClassNhds
null
tendstoIooClassNhds [OrderTopology α] (a : α) : TendstoIxxClass Ioo (𝓝 a) (𝓝 a) := tendstoIxxClass_of_subset fun _ _ => Ioo_subset_Icc_self variable (α) in
instance
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
tendstoIooClassNhds
null
exists_countable_generateFrom_Ioi_Iio [OrderTopology α] [SecondCountableTopology α] : ∃ (c : Set α), c.Countable ∧ ts = generateFrom { s | ∃ a ∈ c, s = Ioi a ∨ s = Iio a } := by rcases isEmpty_or_nonempty α with hα | hα · exact ⟨∅, by simp, Subsingleton.elim _ _⟩ obtain ⟨t, t_subs, t_count, ht⟩ : ∃ t ⊆ { s | ∃ a, s = Ioi a ∨ s = Iio a }, t.Countable ∧ ts = generateFrom t := exists_countable_of_generateFrom OrderTopology.topology_eq_generate_intervals have A : ∀ s ∈ t, ∃ a, s = Ioi a ∨ s = Iio a := t_subs choose! a ha using A refine ⟨a '' t, t_count.image _, ?_⟩ apply le_antisymm · apply le_generateFrom_iff_subset_isOpen.2 simp only [mem_image, exists_exists_and_eq_and, setOf_subset_setOf, forall_exists_index, and_imp] grind [isOpen_Iio', isOpen_Ioi'] · rw [ht] apply generateFrom_anti intro s hs simp only [mem_image, exists_exists_and_eq_and, mem_setOf_eq] grind
lemma
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
exists_countable_generateFrom_Ioi_Iio
In a second countable topological space with the order topology, the topology is generated by half-infinite open intervals with endpoints in a countable set.
isTopologicalBasis_biInter_Ioi_Iio_of_generateFrom (c : Set α) (h : ts = generateFrom { s | ∃ a ∈ c, s = Ioi a ∨ s = Iio a }) : IsTopologicalBasis {s | ∃ (f g : Set α), f ⊆ c ∧ g ⊆ c ∧ f.Finite ∧ g.Finite ∧ s = (⋂ a ∈ f, Ioi a) ∩ (⋂ a ∈ g, Iio a)} := by refine IsTopologicalBasis.of_isOpen_of_subset ?_ (isTopologicalBasis_of_subbasis h) ?_ · rintro u ⟨f, g, hfc, hgc, hf_fin, hg_fin, rfl⟩ apply IsOpen.inter · apply hf_fin.isOpen_biInter (fun i hi ↦ ?_) rw [h] exact isOpen_generateFrom_of_mem ⟨i, hfc hi, Or.inl rfl⟩ · apply hg_fin.isOpen_biInter (fun i hi ↦ ?_) rw [h] exact isOpen_generateFrom_of_mem ⟨i, hgc hi, Or.inr rfl⟩ simp only [exists_and_left, image_subset_iff, preimage_setOf_eq, setOf_subset_setOf, and_imp] intro k k_fin hk let kl := {s ∈ k | ∃ a ∈ c, s = Ioi a} let kr := {s ∈ k | ∃ a ∈ c, s = Iio a} have k_eq : k = kl ∪ kr := by have : ∀ s ∈ k, ∃ a ∈ c, s = Ioi a ∨ s = Iio a := hk ext simp only [mem_union, mem_setOf_eq, kl, kr] grind have : Finite kl := k_fin.subset (by simp [k_eq]) have : Finite kr := k_fin.subset (by simp [k_eq]) have Al : ∀ s : kl, ∃ a ∈ c, s = Ioi a := fun s ↦ s.2.2 choose al alc hal using Al have Ar : ∀ s : kr, ∃ a ∈ c, s = Iio a := fun s ↦ s.2.2 choose ar arc har using Ar refine ⟨range al, by simp [range_subset_iff, alc], range ar, by simp [range_subset_iff, arc], finite_range _, finite_range _, ?_⟩ rw [k_eq, sInter_eq_biInter, biInter_union, biInter_range, biInter_range, biInter_eq_iInter, biInter_eq_iInter] simp [hal, har]
lemma
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
isTopologicalBasis_biInter_Ioi_Iio_of_generateFrom
If a topology is generated by half-open intervals with endpoints in a set `c`, then the sets formed by intersecting finitely many of these intervals form a topological basis.
tendsto_of_tendsto_of_tendsto_of_le_of_le' [OrderTopology α] {f g h : β → α} {b : Filter β} {a : α} (hg : Tendsto g b (𝓝 a)) (hh : Tendsto h b (𝓝 a)) (hgf : ∀ᶠ b in b, g b ≤ f b) (hfh : ∀ᶠ b in b, f b ≤ h b) : Tendsto f b (𝓝 a) := (hg.Icc hh).of_smallSets <| hgf.and hfh alias Filter.Tendsto.squeeze' := tendsto_of_tendsto_of_tendsto_of_le_of_le'
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
tendsto_of_tendsto_of_tendsto_of_le_of_le'
**Squeeze theorem** (also known as **sandwich theorem**). This version assumes that inequalities hold eventually for the filter.
tendsto_of_tendsto_of_tendsto_of_le_of_le [OrderTopology α] {f g h : β → α} {b : Filter β} {a : α} (hg : Tendsto g b (𝓝 a)) (hh : Tendsto h b (𝓝 a)) (hgf : g ≤ f) (hfh : f ≤ h) : Tendsto f b (𝓝 a) := tendsto_of_tendsto_of_tendsto_of_le_of_le' hg hh (Eventually.of_forall hgf) (Eventually.of_forall hfh) alias Filter.Tendsto.squeeze := tendsto_of_tendsto_of_tendsto_of_le_of_le
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
tendsto_of_tendsto_of_tendsto_of_le_of_le
**Squeeze theorem** (also known as **sandwich theorem**). This version assumes that inequalities hold everywhere.
nhds_order_unbounded [OrderTopology α] {a : α} (hu : ∃ u, a < u) (hl : ∃ l, l < a) : 𝓝 a = ⨅ (l) (_ : l < a) (u) (_ : a < u), 𝓟 (Ioo l u) := by simp only [nhds_eq_order, ← inf_biInf, ← biInf_inf, *, ← inf_principal, ← Ioi_inter_Iio]; rfl
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
nhds_order_unbounded
null
tendsto_order_unbounded [OrderTopology α] {f : β → α} {a : α} {x : Filter β} (hu : ∃ u, a < u) (hl : ∃ l, l < a) (h : ∀ l u, l < a → a < u → ∀ᶠ b in x, l < f b ∧ f b < u) : Tendsto f x (𝓝 a) := by simp only [nhds_order_unbounded hu hl, tendsto_iInf, tendsto_principal] exact fun l hl u => h l u hl
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
tendsto_order_unbounded
null
tendstoIxxNhdsWithin {α : Type*} [TopologicalSpace α] (a : α) {s t : Set α} {Ixx} [TendstoIxxClass Ixx (𝓝 a) (𝓝 a)] [TendstoIxxClass Ixx (𝓟 s) (𝓟 t)] : TendstoIxxClass Ixx (𝓝[s] a) (𝓝[t] a) := Filter.tendstoIxxClass_inf
instance
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
tendstoIxxNhdsWithin
null
tendstoIccClassNhdsPi {ι : Type*} {α : ι → Type*} [∀ i, Preorder (α i)] [∀ i, TopologicalSpace (α i)] [∀ i, OrderTopology (α i)] (f : ∀ i, α i) : TendstoIxxClass Icc (𝓝 f) (𝓝 f) := by constructor conv in (𝓝 f).smallSets => rw [nhds_pi, Filter.pi] simp only [smallSets_iInf, smallSets_comap_eq_comap_image, tendsto_iInf, tendsto_comap_iff] intro i have : Tendsto (fun g : ∀ i, α i => g i) (𝓝 f) (𝓝 (f i)) := (continuous_apply i).tendsto f refine (this.comp tendsto_fst).Icc (this.comp tendsto_snd) |>.smallSets_mono ?_ filter_upwards [] using fun ⟨f, g⟩ ↦ image_subset_iff.mpr fun p hp ↦ ⟨hp.1 i, hp.2 i⟩
instance
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
tendstoIccClassNhdsPi
null
induced_topology_le_preorder [Preorder α] [Preorder β] [TopologicalSpace β] [OrderTopology β] {f : α → β} (hf : ∀ {x y}, f x < f y ↔ x < y) : induced f ‹TopologicalSpace β› ≤ Preorder.topology α := by let _ := Preorder.topology α; have : OrderTopology α := ⟨rfl⟩ refine le_of_nhds_le_nhds fun x => ?_ simp only [nhds_eq_order, nhds_induced, comap_inf, comap_iInf, comap_principal, Ioi, Iio, ← hf] refine inf_le_inf (le_iInf₂ fun a ha => ?_) (le_iInf₂ fun a ha => ?_) exacts [iInf₂_le (f a) ha, iInf₂_le (f a) ha]
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
induced_topology_le_preorder
null
induced_topology_eq_preorder [Preorder α] [Preorder β] [TopologicalSpace β] [OrderTopology β] {f : α → β} (hf : ∀ {x y}, f x < f y ↔ x < y) (H₁ : ∀ {a b x}, b < f a → ¬(b < f x) → ∃ y, y < a ∧ b ≤ f y) (H₂ : ∀ {a b x}, f a < b → ¬(f x < b) → ∃ y, a < y ∧ f y ≤ b) : induced f ‹TopologicalSpace β› = Preorder.topology α := by let _ := Preorder.topology α; have : OrderTopology α := ⟨rfl⟩ refine le_antisymm (induced_topology_le_preorder hf) ?_ refine le_of_nhds_le_nhds fun a => ?_ simp only [nhds_eq_order, nhds_induced, comap_inf, comap_iInf, comap_principal] refine inf_le_inf (le_iInf₂ fun b hb => ?_) (le_iInf₂ fun b hb => ?_) · rcases em (∃ x, ¬(b < f x)) with (⟨x, hx⟩ | hb) · rcases H₁ hb hx with ⟨y, hya, hyb⟩ exact iInf₂_le_of_le y hya (principal_mono.2 fun z hz => hyb.trans_lt (hf.2 hz)) · push_neg at hb exact le_principal_iff.2 (univ_mem' hb) · rcases em (∃ x, ¬(f x < b)) with (⟨x, hx⟩ | hb) · rcases H₂ hb hx with ⟨y, hya, hyb⟩ exact iInf₂_le_of_le y hya (principal_mono.2 fun z hz => (hf.2 hz).trans_le hyb) · push_neg at hb exact le_principal_iff.2 (univ_mem' hb)
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
induced_topology_eq_preorder
null
induced_orderTopology' {α : Type u} {β : Type v} [Preorder α] [ta : TopologicalSpace β] [Preorder β] [OrderTopology β] (f : α → β) (hf : ∀ {x y}, f x < f y ↔ x < y) (H₁ : ∀ {a x}, x < f a → ∃ b < a, x ≤ f b) (H₂ : ∀ {a x}, f a < x → ∃ b > a, f b ≤ x) : @OrderTopology _ (induced f ta) _ := let _ := induced f ta ⟨induced_topology_eq_preorder hf (fun h _ => H₁ h) (fun h _ => H₂ h)⟩
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
induced_orderTopology'
null
induced_orderTopology {α : Type u} {β : Type v} [Preorder α] [ta : TopologicalSpace β] [Preorder β] [OrderTopology β] (f : α → β) (hf : ∀ {x y}, f x < f y ↔ x < y) (H : ∀ {x y}, x < y → ∃ a, x < f a ∧ f a < y) : @OrderTopology _ (induced f ta) _ := induced_orderTopology' f (hf) (fun xa => let ⟨b, xb, ba⟩ := H xa; ⟨b, hf.1 ba, le_of_lt xb⟩) fun ax => let ⟨b, ab, bx⟩ := H ax; ⟨b, hf.1 ab, le_of_lt bx⟩
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
induced_orderTopology
null
StrictMono.isEmbedding_of_ordConnected {α β : Type*} [LinearOrder α] [LinearOrder β] [TopologicalSpace α] [h : OrderTopology α] [TopologicalSpace β] [OrderTopology β] {f : α → β} (hf : StrictMono f) (hc : OrdConnected (range f)) : IsEmbedding f := ⟨⟨h.1.trans <| Eq.symm <| hf.induced_topology_eq_preorder hc⟩, hf.injective⟩
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
StrictMono.isEmbedding_of_ordConnected
The topology induced by a strictly monotone function with order-connected range is the preorder topology. -/ nonrec theorem StrictMono.induced_topology_eq_preorder {α β : Type*} [LinearOrder α] [LinearOrder β] [t : TopologicalSpace β] [OrderTopology β] {f : α → β} (hf : StrictMono f) (hc : OrdConnected (range f)) : t.induced f = Preorder.topology α := by refine induced_topology_eq_preorder hf.lt_iff_lt (fun h₁ h₂ => ?_) fun h₁ h₂ => ?_ · rcases hc.out (mem_range_self _) (mem_range_self _) ⟨not_lt.1 h₂, h₁.le⟩ with ⟨y, rfl⟩ exact ⟨y, hf.lt_iff_lt.1 h₁, le_rfl⟩ · rcases hc.out (mem_range_self _) (mem_range_self _) ⟨h₁.le, not_lt.1 h₂⟩ with ⟨y, rfl⟩ exact ⟨y, hf.lt_iff_lt.1 h₁, le_rfl⟩ /-- A strictly monotone function between linear orders with order topology is a topological embedding provided that the range of `f` is order-connected.
OrderEmbedding.isEmbedding_of_ordConnected {α β : Type*} [LinearOrder α] [LinearOrder β] [TopologicalSpace α] [OrderTopology α] [TopologicalSpace β] [OrderTopology β] (f : α ↪o β) (hc : OrdConnected (range f)) : Topology.IsEmbedding f := f.strictMono.isEmbedding_of_ordConnected hc
lemma
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
OrderEmbedding.isEmbedding_of_ordConnected
An `OrderEmbedding` is a topological embedding provided that the range of `f` is order-connected
orderTopology_of_ordConnected {α : Type u} [TopologicalSpace α] [LinearOrder α] [OrderTopology α] {t : Set α} [ht : OrdConnected t] : OrderTopology t := ⟨(Subtype.strictMono_coe t).induced_topology_eq_preorder <| by rwa [← @Subtype.range_val _ t] at ht⟩
instance
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
orderTopology_of_ordConnected
On a `Set.OrdConnected` subset of a linear order, the order topology for the restriction of the order is the same as the restriction to the subset of the order topology.
nhdsGE_eq_iInf_inf_principal [TopologicalSpace α] [Preorder α] [OrderTopology α] (a : α) : 𝓝[≥] a = (⨅ (u) (_ : a < u), 𝓟 (Iio u)) ⊓ 𝓟 (Ici a) := by rw [nhdsWithin, nhds_eq_order] refine le_antisymm (inf_le_inf_right _ inf_le_right) (le_inf (le_inf ?_ inf_le_left) inf_le_right) exact inf_le_right.trans (le_iInf₂ fun l hl => principal_mono.2 <| Ici_subset_Ioi.2 hl)
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
nhdsGE_eq_iInf_inf_principal
null
nhdsLE_eq_iInf_inf_principal [TopologicalSpace α] [Preorder α] [OrderTopology α] (a : α) : 𝓝[≤] a = (⨅ l < a, 𝓟 (Ioi l)) ⊓ 𝓟 (Iic a) := nhdsGE_eq_iInf_inf_principal (toDual a)
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
nhdsLE_eq_iInf_inf_principal
null
nhdsGE_eq_iInf_principal [TopologicalSpace α] [Preorder α] [OrderTopology α] {a : α} (ha : ∃ u, a < u) : 𝓝[≥] a = ⨅ (u) (_ : a < u), 𝓟 (Ico a u) := by simp only [nhdsGE_eq_iInf_inf_principal, biInf_inf ha, inf_principal, Iio_inter_Ici]
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
nhdsGE_eq_iInf_principal
null
nhdsLE_eq_iInf_principal [TopologicalSpace α] [Preorder α] [OrderTopology α] {a : α} (ha : ∃ l, l < a) : 𝓝[≤] a = ⨅ l < a, 𝓟 (Ioc l a) := by simp only [nhdsLE_eq_iInf_inf_principal, biInf_inf ha, inf_principal, Ioi_inter_Iic]
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
nhdsLE_eq_iInf_principal
null
nhdsGE_basis_of_exists_gt [TopologicalSpace α] [LinearOrder α] [OrderTopology α] {a : α} (ha : ∃ u, a < u) : (𝓝[≥] a).HasBasis (fun u => a < u) fun u => Ico a u := (nhdsGE_eq_iInf_principal ha).symm ▸ hasBasis_biInf_principal (fun b hb c hc => ⟨min b c, lt_min hb hc, Ico_subset_Ico_right (min_le_left _ _), Ico_subset_Ico_right (min_le_right _ _)⟩) ha
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
nhdsGE_basis_of_exists_gt
null
nhdsLE_basis_of_exists_lt [TopologicalSpace α] [LinearOrder α] [OrderTopology α] {a : α} (ha : ∃ l, l < a) : (𝓝[≤] a).HasBasis (fun l => l < a) fun l => Ioc l a := by convert nhdsGE_basis_of_exists_gt (α := αᵒᵈ) ha using 2 exact Ico_toDual.symm
theorem
Topology
[ "Mathlib.Order.Filter.Interval", "Mathlib.Order.Interval.Set.Pi", "Mathlib.Order.OrdContinuous", "Mathlib.Tactic.TFAE", "Mathlib.Tactic.NormNum", "Mathlib.Topology.Order.LeftRight", "Mathlib.Topology.Order.OrderClosed" ]
Mathlib/Topology/Order/Basic.lean
nhdsLE_basis_of_exists_lt
null