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
toLocallyBoundedMap (f : α → β) (hf : LipschitzWith K f) : LocallyBoundedMap α β := LocallyBoundedMap.ofMapBounded f fun _s hs => let ⟨C, hC⟩ := Metric.isBounded_iff.1 hs Metric.isBounded_iff.2 ⟨K * C, forall_mem_image.2 fun _x hx => forall_mem_image.2 fun _y hy => hf.dist_le_mul_of_le (hC hx hy)⟩ @[simp]
def
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
toLocallyBoundedMap
A Lipschitz continuous map is a locally bounded map.
coe_toLocallyBoundedMap (hf : LipschitzWith K f) : ⇑(hf.toLocallyBoundedMap f) = f := rfl
theorem
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
coe_toLocallyBoundedMap
null
comap_cobounded_le (hf : LipschitzWith K f) : comap f (Bornology.cobounded β) ≤ Bornology.cobounded α := (hf.toLocallyBoundedMap f).2
theorem
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
comap_cobounded_le
null
isBounded_image (hf : LipschitzWith K f) {s : Set α} (hs : IsBounded s) : IsBounded (f '' s) := hs.image (toLocallyBoundedMap f hf)
theorem
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
isBounded_image
The image of a bounded set under a Lipschitz map is bounded.
diam_image_le (hf : LipschitzWith K f) (s : Set α) (hs : IsBounded s) : Metric.diam (f '' s) ≤ K * Metric.diam s := Metric.diam_le_of_forall_dist_le (mul_nonneg K.coe_nonneg Metric.diam_nonneg) <| forall_mem_image.2 fun _x hx => forall_mem_image.2 fun _y hy => hf.dist_le_mul_of_le <| Metric.dist_le_diam_of_mem hs hx hy
theorem
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
diam_image_le
null
protected dist_left (y : α) : LipschitzWith 1 (dist · y) := LipschitzWith.mk_one fun _ _ => dist_dist_dist_le_left _ _ _
theorem
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
dist_left
null
protected dist_right (x : α) : LipschitzWith 1 (dist x) := LipschitzWith.of_le_add fun _ _ => dist_triangle_right _ _ _
theorem
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
dist_right
null
protected dist : LipschitzWith 2 (Function.uncurry <| @dist α _) := by rw [← one_add_one_eq_two] exact LipschitzWith.uncurry LipschitzWith.dist_left LipschitzWith.dist_right
theorem
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
dist
null
dist_iterate_succ_le_geometric {f : α → α} (hf : LipschitzWith K f) (x n) : dist (f^[n] x) (f^[n+1] x) ≤ dist x (f x) * (K : ℝ) ^ n := by rw [iterate_succ, mul_comm] simpa only [NNReal.coe_pow] using (hf.iterate n).dist_le_mul x (f x)
theorem
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
dist_iterate_succ_le_geometric
null
_root_.lipschitzWith_max : LipschitzWith 1 fun p : ℝ × ℝ => max p.1 p.2 := LipschitzWith.of_le_add fun _ _ => sub_le_iff_le_add'.1 <| (le_abs_self _).trans (abs_max_sub_max_le_max _ _ _ _)
theorem
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
_root_.lipschitzWith_max
null
_root_.lipschitzWith_min : LipschitzWith 1 fun p : ℝ × ℝ => min p.1 p.2 := LipschitzWith.of_le_add fun _ _ => sub_le_iff_le_add'.1 <| (le_abs_self _).trans (abs_min_sub_min_le_max _ _ _ _)
theorem
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
_root_.lipschitzWith_min
null
_root_.Real.lipschitzWith_toNNReal : LipschitzWith 1 Real.toNNReal := by refine lipschitzWith_iff_dist_le_mul.mpr (fun x y ↦ ?_) simpa only [NNReal.coe_one, dist_prod_same_right, one_mul, Real.dist_eq] using lipschitzWith_iff_dist_le_mul.mp lipschitzWith_max (x, 0) (y, 0)
lemma
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
_root_.Real.lipschitzWith_toNNReal
null
protected max (hf : LipschitzWith Kf f) (hg : LipschitzWith Kg g) : LipschitzWith (max Kf Kg) fun x => max (f x) (g x) := by simpa only [(· ∘ ·), one_mul] using lipschitzWith_max.comp (hf.prodMk hg)
theorem
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
max
null
protected min (hf : LipschitzWith Kf f) (hg : LipschitzWith Kg g) : LipschitzWith (max Kf Kg) fun x => min (f x) (g x) := by simpa only [(· ∘ ·), one_mul] using lipschitzWith_min.comp (hf.prodMk hg)
theorem
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
min
null
max_const (hf : LipschitzWith Kf f) (a : ℝ) : LipschitzWith Kf fun x => max (f x) a := by simpa only [max_eq_left (zero_le Kf)] using hf.max (LipschitzWith.const a)
theorem
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
max_const
null
const_max (hf : LipschitzWith Kf f) (a : ℝ) : LipschitzWith Kf fun x => max a (f x) := by simpa only [max_comm] using hf.max_const a
theorem
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
const_max
null
min_const (hf : LipschitzWith Kf f) (a : ℝ) : LipschitzWith Kf fun x => min (f x) a := by simpa only [max_eq_left (zero_le Kf)] using hf.min (LipschitzWith.const a)
theorem
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
min_const
null
const_min (hf : LipschitzWith Kf f) (a : ℝ) : LipschitzWith Kf fun x => min a (f x) := by simpa only [min_comm] using hf.min_const a
theorem
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
const_min
null
protected projIcc {a b : ℝ} (h : a ≤ b) : LipschitzWith 1 (projIcc a b h) := ((LipschitzWith.id.const_min _).const_max _).subtype_mk _
theorem
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
projIcc
null
LipschitzWith.properSpace {X Y : Type*} [PseudoMetricSpace X] [PseudoMetricSpace Y] [ProperSpace Y] {f : X → Y} (hf : IsProperMap f) {K : ℝ≥0} (hf' : LipschitzWith K f) : ProperSpace X := ⟨fun x r ↦ (hf.isCompact_preimage (isCompact_closedBall (f x) (K * r))).of_isClosed_subset Metric.isClosed_closedBall (hf'.mapsTo_closedBall x r).subset_preimage⟩
lemma
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
LipschitzWith.properSpace
The preimage of a proper space under a Lipschitz proper map is proper.
protected of_dist_le' {K : ℝ} (h : ∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ K * dist x y) : LipschitzOnWith (Real.toNNReal K) f s := of_dist_le_mul fun x hx y hy => le_trans (h x hx y hy) <| by gcongr; apply Real.le_coe_toNNReal
theorem
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
of_dist_le'
null
protected mk_one (h : ∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ dist x y) : LipschitzOnWith 1 f s := of_dist_le_mul <| by simpa only [NNReal.coe_one, one_mul] using h
theorem
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
mk_one
null
protected of_le_add_mul' {f : α → ℝ} (K : ℝ) (h : ∀ x ∈ s, ∀ y ∈ s, f x ≤ f y + K * dist x y) : LipschitzOnWith (Real.toNNReal K) f s := have I : ∀ x ∈ s, ∀ y ∈ s, f x - f y ≤ K * dist x y := fun x hx y hy => sub_le_iff_le_add'.2 (h x hx y hy) LipschitzOnWith.of_dist_le' fun x hx y hy => abs_sub_le_iff.2 ⟨I x hx y hy, dist_comm y x ▸ I y hy x hx⟩
theorem
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
of_le_add_mul'
For functions to `ℝ`, it suffices to prove `f x ≤ f y + K * dist x y`; this version doesn't assume `0≤K`.
protected of_le_add_mul {f : α → ℝ} (K : ℝ≥0) (h : ∀ x ∈ s, ∀ y ∈ s, f x ≤ f y + K * dist x y) : LipschitzOnWith K f s := by simpa only [Real.toNNReal_coe] using LipschitzOnWith.of_le_add_mul' K h
theorem
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
of_le_add_mul
For functions to `ℝ`, it suffices to prove `f x ≤ f y + K * dist x y`; this version assumes `0≤K`.
protected of_le_add {f : α → ℝ} (h : ∀ x ∈ s, ∀ y ∈ s, f x ≤ f y + dist x y) : LipschitzOnWith 1 f s := LipschitzOnWith.of_le_add_mul 1 <| by simpa only [NNReal.coe_one, one_mul]
theorem
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
of_le_add
null
protected le_add_mul {f : α → ℝ} {K : ℝ≥0} (h : LipschitzOnWith K f s) {x : α} (hx : x ∈ s) {y : α} (hy : y ∈ s) : f x ≤ f y + K * dist x y := sub_le_iff_le_add'.1 <| le_trans (le_abs_self _) <| h.dist_le_mul x hx y hy
theorem
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
le_add_mul
null
protected iff_le_add_mul {f : α → ℝ} {K : ℝ≥0} : LipschitzOnWith K f s ↔ ∀ x ∈ s, ∀ y ∈ s, f x ≤ f y + K * dist x y := ⟨LipschitzOnWith.le_add_mul, LipschitzOnWith.of_le_add_mul K⟩
theorem
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
iff_le_add_mul
null
isBounded_image2 (f : α → β → γ) {K₁ K₂ : ℝ≥0} {s : Set α} {t : Set β} (hs : Bornology.IsBounded s) (ht : Bornology.IsBounded t) (hf₁ : ∀ b ∈ t, LipschitzOnWith K₁ (fun a => f a b) s) (hf₂ : ∀ a ∈ s, LipschitzOnWith K₂ (f a) t) : Bornology.IsBounded (Set.image2 f s t) := Metric.isBounded_iff_ediam_ne_top.2 <| ne_top_of_le_ne_top (ENNReal.add_ne_top.mpr ⟨ENNReal.mul_ne_top ENNReal.coe_ne_top hs.ediam_ne_top, ENNReal.mul_ne_top ENNReal.coe_ne_top ht.ediam_ne_top⟩) (ediam_image2_le _ _ _ hf₁ hf₂)
theorem
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
isBounded_image2
null
protected min (hf : LocallyLipschitz f) (hg : LocallyLipschitz g) : LocallyLipschitz (fun x => min (f x) (g x)) := lipschitzWith_min.locallyLipschitz.comp (hf.prodMk hg)
lemma
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
min
The minimum of locally Lipschitz functions is locally Lipschitz.
protected max (hf : LocallyLipschitz f) (hg : LocallyLipschitz g) : LocallyLipschitz (fun x => max (f x) (g x)) := lipschitzWith_max.locallyLipschitz.comp (hf.prodMk hg)
lemma
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
max
The maximum of locally Lipschitz functions is locally Lipschitz.
max_const (hf : LocallyLipschitz f) (a : ℝ) : LocallyLipschitz fun x => max (f x) a := hf.max (LocallyLipschitz.const a)
theorem
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
max_const
null
const_max (hf : LocallyLipschitz f) (a : ℝ) : LocallyLipschitz fun x => max a (f x) := by simpa [max_comm] using (hf.max_const a)
theorem
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
const_max
null
min_const (hf : LocallyLipschitz f) (a : ℝ) : LocallyLipschitz fun x => min (f x) a := hf.min (LocallyLipschitz.const a)
theorem
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
min_const
null
const_min (hf : LocallyLipschitz f) (a : ℝ) : LocallyLipschitz fun x => min a (f x) := by simpa [min_comm] using (hf.min_const a)
theorem
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
const_min
null
LipschitzOnWith.extend_real {f : α → ℝ} {s : Set α} {K : ℝ≥0} (hf : LipschitzOnWith K f s) : ∃ g : α → ℝ, LipschitzWith K g ∧ EqOn f g s := by /- An extension is given by `g y = Inf {f x + K * dist y x | x ∈ s}`. Taking `x = y`, one has `g y ≤ f y` for `y ∈ s`, and the other inequality holds because `f` is `K`-Lipschitz, so that it cannot counterbalance the growth of `K * dist y x`. One readily checks from the formula that the extended function is also `K`-Lipschitz. -/ rcases eq_empty_or_nonempty s with (rfl | hs) · exact ⟨fun _ => 0, (LipschitzWith.const _).weaken (zero_le _), eqOn_empty _ _⟩ have : Nonempty s := by simp only [hs, nonempty_coe_sort] let g := fun y : α => iInf fun x : s => f x + K * dist y x have B : ∀ y : α, BddBelow (range fun x : s => f x + K * dist y x) := fun y => by rcases hs with ⟨z, hz⟩ refine ⟨f z - K * dist y z, ?_⟩ rintro w ⟨t, rfl⟩ dsimp rw [sub_le_iff_le_add, add_assoc, ← mul_add, add_comm (dist y t)] calc f z ≤ f t + K * dist z t := hf.le_add_mul hz t.2 _ ≤ f t + K * (dist y z + dist y t) := by gcongr; apply dist_triangle_left have E : EqOn f g s := fun x hx => by refine le_antisymm (le_ciInf fun y => hf.le_add_mul hx y.2) ?_ simpa only [add_zero, Subtype.coe_mk, mul_zero, dist_self] using ciInf_le (B x) ⟨x, hx⟩ refine ⟨g, LipschitzWith.of_le_add_mul K fun x y => ?_, E⟩ rw [← sub_le_iff_le_add] refine le_ciInf fun z => ?_ rw [sub_le_iff_le_add] calc g x ≤ f z + K * dist x z := ciInf_le (B x) _ _ ≤ f z + K * dist y z + K * dist x y := by rw [add_assoc, ← mul_add, add_comm (dist y z)] gcongr apply dist_triangle
theorem
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
LipschitzOnWith.extend_real
A function `f : α → ℝ` which is `K`-Lipschitz on a subset `s` admits a `K`-Lipschitz extension to the whole space.
LipschitzOnWith.extend_pi [Fintype ι] {f : α → ι → ℝ} {s : Set α} {K : ℝ≥0} (hf : LipschitzOnWith K f s) : ∃ g : α → ι → ℝ, LipschitzWith K g ∧ EqOn f g s := by have : ∀ i, ∃ g : α → ℝ, LipschitzWith K g ∧ EqOn (fun x => f x i) g s := fun i => by have : LipschitzOnWith K (fun x : α => f x i) s := LipschitzOnWith.of_dist_le_mul fun x hx y hy => (dist_le_pi_dist _ _ i).trans (hf.dist_le_mul x hx y hy) exact this.extend_real choose g hg using this refine ⟨fun x i => g i x, LipschitzWith.of_dist_le_mul fun x y => ?_, fun x hx ↦ ?_⟩ · exact (dist_pi_le_iff (mul_nonneg K.2 dist_nonneg)).2 fun i => (hg i).1.dist_le_mul x y · ext1 i exact (hg i).2 hx
theorem
Topology
[ "Mathlib.Order.Interval.Set.ProjIcc", "Mathlib.Topology.Bornology.Hom", "Mathlib.Topology.EMetricSpace.Lipschitz", "Mathlib.Topology.Maps.Proper.Basic", "Mathlib.Topology.MetricSpace.Basic", "Mathlib.Topology.MetricSpace.Bounded" ]
Mathlib/Topology/MetricSpace/Lipschitz.lean
LipschitzOnWith.extend_pi
A function `f : α → (ι → ℝ)` which is `K`-Lipschitz on a subset `s` admits a `K`-Lipschitz extension to the whole space. The same result for the space `ℓ^∞ (ι, ℝ)` over a possibly infinite type `ι` is implemented in `LipschitzOnWith.extend_lp_infty`.
IsSeparated (ε : ℝ≥0∞) (s : Set X) : Prop := s.Pairwise (ε < edist · ·)
def
Topology
[ "Mathlib.Topology.EMetricSpace.Defs" ]
Mathlib/Topology/MetricSpace/MetricSeparated.lean
IsSeparated
A set `s` is `ε`-separated if its elements are pairwise at distance at least `ε` from each other.
protected IsSeparated.empty : IsSeparated ε (∅ : Set X) := pairwise_empty _
lemma
Topology
[ "Mathlib.Topology.EMetricSpace.Defs" ]
Mathlib/Topology/MetricSpace/MetricSeparated.lean
IsSeparated.empty
null
protected IsSeparated.singleton : IsSeparated ε {x} := pairwise_singleton .. @[simp] lemma IsSeparated.of_subsingleton (hs : s.Subsingleton) : IsSeparated ε s := hs.pairwise _ alias _root_.Set.Subsingleton.isSeparated := IsSeparated.of_subsingleton nonrec lemma IsSeparated.anti (hεδ : ε ≤ δ) (hs : IsSeparated δ s) : IsSeparated ε s := hs.mono' fun _ _ ↦ hεδ.trans_lt
lemma
Topology
[ "Mathlib.Topology.EMetricSpace.Defs" ]
Mathlib/Topology/MetricSpace/MetricSeparated.lean
IsSeparated.singleton
null
IsSeparated.subset (hst : s ⊆ t) (hs : IsSeparated ε t) : IsSeparated ε s := hs.mono hst
lemma
Topology
[ "Mathlib.Topology.EMetricSpace.Defs" ]
Mathlib/Topology/MetricSpace/MetricSeparated.lean
IsSeparated.subset
null
isSeparated_insert : IsSeparated ε (insert x s) ↔ IsSeparated ε s ∧ ∀ y ∈ s, x ≠ y → ε < edist x y := pairwise_insert_of_symmetric fun _ _ ↦ by simp [edist_comm]
lemma
Topology
[ "Mathlib.Topology.EMetricSpace.Defs" ]
Mathlib/Topology/MetricSpace/MetricSeparated.lean
isSeparated_insert
null
isSeparated_insert_of_notMem (hx : x ∉ s) : IsSeparated ε (insert x s) ↔ IsSeparated ε s ∧ ∀ y ∈ s, ε < edist x y := pairwise_insert_of_symmetric_of_notMem (fun _ _ ↦ by simp [edist_comm]) hx @[deprecated (since := "2025-05-23")] alias isSeparated_insert_of_not_mem := isSeparated_insert_of_notMem
lemma
Topology
[ "Mathlib.Topology.EMetricSpace.Defs" ]
Mathlib/Topology/MetricSpace/MetricSeparated.lean
isSeparated_insert_of_notMem
null
protected IsSeparated.insert (hs : IsSeparated ε s) (h : ∀ y ∈ s, x ≠ y → ε < edist x y) : IsSeparated ε (insert x s) := isSeparated_insert.2 ⟨hs, h⟩ /-!
lemma
Topology
[ "Mathlib.Topology.EMetricSpace.Defs" ]
Mathlib/Topology/MetricSpace/MetricSeparated.lean
IsSeparated.insert
null
AreSeparated (s t : Set X) := ∃ r, r ≠ 0 ∧ ∀ x ∈ s, ∀ y ∈ t, r ≤ edist x y
def
Topology
[ "Mathlib.Topology.EMetricSpace.Defs" ]
Mathlib/Topology/MetricSpace/MetricSeparated.lean
AreSeparated
Two sets in an (extended) metric space are called *metric separated* if the (extended) distance between `x ∈ s` and `y ∈ t` is bounded from below by a positive constant.
@[symm] symm (h : AreSeparated s t) : AreSeparated t s := let ⟨r, r0, hr⟩ := h ⟨r, r0, fun y hy x hx => edist_comm x y ▸ hr x hx y hy⟩
theorem
Topology
[ "Mathlib.Topology.EMetricSpace.Defs" ]
Mathlib/Topology/MetricSpace/MetricSeparated.lean
symm
null
comm : AreSeparated s t ↔ AreSeparated t s := ⟨symm, symm⟩ @[simp]
theorem
Topology
[ "Mathlib.Topology.EMetricSpace.Defs" ]
Mathlib/Topology/MetricSpace/MetricSeparated.lean
comm
null
empty_left (s : Set X) : AreSeparated ∅ s := ⟨1, one_ne_zero, fun _x => False.elim⟩ @[simp]
theorem
Topology
[ "Mathlib.Topology.EMetricSpace.Defs" ]
Mathlib/Topology/MetricSpace/MetricSeparated.lean
empty_left
null
empty_right (s : Set X) : AreSeparated s ∅ := (empty_left s).symm
theorem
Topology
[ "Mathlib.Topology.EMetricSpace.Defs" ]
Mathlib/Topology/MetricSpace/MetricSeparated.lean
empty_right
null
protected disjoint (h : AreSeparated s t) : Disjoint s t := let ⟨r, r0, hr⟩ := h Set.disjoint_left.mpr fun x hx1 hx2 => r0 <| by simpa using hr x hx1 x hx2
theorem
Topology
[ "Mathlib.Topology.EMetricSpace.Defs" ]
Mathlib/Topology/MetricSpace/MetricSeparated.lean
disjoint
null
subset_compl_right (h : AreSeparated s t) : s ⊆ tᶜ := fun _ hs ht => h.disjoint.le_bot ⟨hs, ht⟩ @[mono]
theorem
Topology
[ "Mathlib.Topology.EMetricSpace.Defs" ]
Mathlib/Topology/MetricSpace/MetricSeparated.lean
subset_compl_right
null
mono {s' t'} (hs : s ⊆ s') (ht : t ⊆ t') : AreSeparated s' t' → AreSeparated s t := fun ⟨r, r0, hr⟩ => ⟨r, r0, fun x hx y hy => hr x (hs hx) y (ht hy)⟩
theorem
Topology
[ "Mathlib.Topology.EMetricSpace.Defs" ]
Mathlib/Topology/MetricSpace/MetricSeparated.lean
mono
null
mono_left {s'} (h' : AreSeparated s' t) (hs : s ⊆ s') : AreSeparated s t := h'.mono hs Subset.rfl
theorem
Topology
[ "Mathlib.Topology.EMetricSpace.Defs" ]
Mathlib/Topology/MetricSpace/MetricSeparated.lean
mono_left
null
mono_right {t'} (h' : AreSeparated s t') (ht : t ⊆ t') : AreSeparated s t := h'.mono Subset.rfl ht
theorem
Topology
[ "Mathlib.Topology.EMetricSpace.Defs" ]
Mathlib/Topology/MetricSpace/MetricSeparated.lean
mono_right
null
union_left {s'} (h : AreSeparated s t) (h' : AreSeparated s' t) : AreSeparated (s ∪ s') t := by rcases h, h' with ⟨⟨r, r0, hr⟩, ⟨r', r0', hr'⟩⟩ refine ⟨min r r', ?_, fun x hx y hy => hx.elim ?_ ?_⟩ · rw [← pos_iff_ne_zero] at r0 r0' ⊢ exact lt_min r0 r0' · exact fun hx => (min_le_left _ _).trans (hr _ hx _ hy) · exact fun hx => (min_le_right _ _).trans (hr' _ hx _ hy) @[simp]
theorem
Topology
[ "Mathlib.Topology.EMetricSpace.Defs" ]
Mathlib/Topology/MetricSpace/MetricSeparated.lean
union_left
null
union_left_iff {s'} : AreSeparated (s ∪ s') t ↔ AreSeparated s t ∧ AreSeparated s' t := ⟨fun h => ⟨h.mono_left subset_union_left, h.mono_left subset_union_right⟩, fun h => h.1.union_left h.2⟩
theorem
Topology
[ "Mathlib.Topology.EMetricSpace.Defs" ]
Mathlib/Topology/MetricSpace/MetricSeparated.lean
union_left_iff
null
union_right {t'} (h : AreSeparated s t) (h' : AreSeparated s t') : AreSeparated s (t ∪ t') := (h.symm.union_left h'.symm).symm @[simp]
theorem
Topology
[ "Mathlib.Topology.EMetricSpace.Defs" ]
Mathlib/Topology/MetricSpace/MetricSeparated.lean
union_right
null
union_right_iff {t'} : AreSeparated s (t ∪ t') ↔ AreSeparated s t ∧ AreSeparated s t' := comm.trans <| union_left_iff.trans <| and_congr comm comm
theorem
Topology
[ "Mathlib.Topology.EMetricSpace.Defs" ]
Mathlib/Topology/MetricSpace/MetricSeparated.lean
union_right_iff
null
finite_iUnion_left_iff {ι : Type*} {I : Set ι} (hI : I.Finite) {s : ι → Set X} {t : Set X} : AreSeparated (⋃ i ∈ I, s i) t ↔ ∀ i ∈ I, AreSeparated (s i) t := by induction I, hI using Set.Finite.induction_on with | empty => simp | insert _ _ hI => rw [biUnion_insert, forall_mem_insert, union_left_iff, hI] alias ⟨_, finite_iUnion_left⟩ := finite_iUnion_left_iff
theorem
Topology
[ "Mathlib.Topology.EMetricSpace.Defs" ]
Mathlib/Topology/MetricSpace/MetricSeparated.lean
finite_iUnion_left_iff
null
finite_iUnion_right_iff {ι : Type*} {I : Set ι} (hI : I.Finite) {s : Set X} {t : ι → Set X} : AreSeparated s (⋃ i ∈ I, t i) ↔ ∀ i ∈ I, AreSeparated s (t i) := by simpa only [@comm _ _ s] using finite_iUnion_left_iff hI @[simp]
theorem
Topology
[ "Mathlib.Topology.EMetricSpace.Defs" ]
Mathlib/Topology/MetricSpace/MetricSeparated.lean
finite_iUnion_right_iff
null
finset_iUnion_left_iff {ι : Type*} {I : Finset ι} {s : ι → Set X} {t : Set X} : AreSeparated (⋃ i ∈ I, s i) t ↔ ∀ i ∈ I, AreSeparated (s i) t := finite_iUnion_left_iff I.finite_toSet alias ⟨_, finset_iUnion_left⟩ := finset_iUnion_left_iff @[simp]
theorem
Topology
[ "Mathlib.Topology.EMetricSpace.Defs" ]
Mathlib/Topology/MetricSpace/MetricSeparated.lean
finset_iUnion_left_iff
null
finset_iUnion_right_iff {ι : Type*} {I : Finset ι} {s : Set X} {t : ι → Set X} : AreSeparated s (⋃ i ∈ I, t i) ↔ ∀ i ∈ I, AreSeparated s (t i) := finite_iUnion_right_iff I.finite_toSet alias ⟨_, finset_iUnion_right⟩ := finset_iUnion_right_iff
theorem
Topology
[ "Mathlib.Topology.EMetricSpace.Defs" ]
Mathlib/Topology/MetricSpace/MetricSeparated.lean
finset_iUnion_right_iff
null
eventually_nhds_zero_forall_closedBall_subset (hK : ∀ i, IsClosed (K i)) (hU : ∀ i, IsOpen (U i)) (hKU : ∀ i, K i ⊆ U i) (hfin : LocallyFinite K) (x : X) : ∀ᶠ p : ℝ≥0∞ × X in 𝓝 0 ×ˢ 𝓝 x, ∀ i, p.2 ∈ K i → closedBall p.2 p.1 ⊆ U i := by suffices ∀ i, x ∈ K i → ∀ᶠ p : ℝ≥0∞ × X in 𝓝 0 ×ˢ 𝓝 x, closedBall p.2 p.1 ⊆ U i by apply mp_mem ((eventually_all_finite (hfin.point_finite x)).2 this) (mp_mem (@tendsto_snd ℝ≥0∞ _ (𝓝 0) _ _ (hfin.iInter_compl_mem_nhds hK x)) _) apply univ_mem' rintro ⟨r, y⟩ hxy hyU i hi simp only [mem_iInter, mem_compl_iff, not_imp_not, mem_preimage] at hxy exact hyU _ (hxy _ hi) intro i hi rcases nhds_basis_closed_eball.mem_iff.1 ((hU i).mem_nhds <| hKU i hi) with ⟨R, hR₀, hR⟩ rcases ENNReal.lt_iff_exists_nnreal_btwn.mp hR₀ with ⟨r, hr₀, hrR⟩ filter_upwards [prod_mem_prod (eventually_lt_nhds hr₀) (closedBall_mem_nhds x (tsub_pos_iff_lt.2 hrR))] with p hp z hz apply hR calc edist z x ≤ edist z p.2 + edist p.2 x := edist_triangle _ _ _ _ ≤ p.1 + (R - p.1) := add_le_add hz <| le_trans hp.2 <| tsub_le_tsub_left hp.1.out.le _ _ = R := add_tsub_cancel_of_le (lt_trans (by exact hp.1) hrR).le
theorem
Topology
[ "Mathlib.Topology.EMetricSpace.Paracompact", "Mathlib.Topology.Instances.ENNReal.Lemmas", "Mathlib.Analysis.Convex.PartitionOfUnity" ]
Mathlib/Topology/MetricSpace/PartitionOfUnity.lean
eventually_nhds_zero_forall_closedBall_subset
Let `K : ι → Set X` be a locally finite family of closed sets in an emetric space. Let `U : ι → Set X` be a family of open sets such that `K i ⊆ U i` for all `i`. Then for any point `x : X`, for sufficiently small `r : ℝ≥0∞` and for `y` sufficiently close to `x`, for all `i`, if `y ∈ K i`, then `EMetric.closedBall y r ⊆ U i`.
exists_forall_closedBall_subset_aux₁ (hK : ∀ i, IsClosed (K i)) (hU : ∀ i, IsOpen (U i)) (hKU : ∀ i, K i ⊆ U i) (hfin : LocallyFinite K) (x : X) : ∃ r : ℝ, ∀ᶠ y in 𝓝 x, r ∈ Ioi (0 : ℝ) ∩ ENNReal.ofReal ⁻¹' ⋂ (i) (_ : y ∈ K i), { r | closedBall y r ⊆ U i } := by have := (ENNReal.continuous_ofReal.tendsto' 0 0 ENNReal.ofReal_zero).eventually (eventually_nhds_zero_forall_closedBall_subset hK hU hKU hfin x).curry rcases this.exists_gt with ⟨r, hr0, hr⟩ refine ⟨r, hr.mono fun y hy => ⟨hr0, ?_⟩⟩ rwa [mem_preimage, mem_iInter₂]
theorem
Topology
[ "Mathlib.Topology.EMetricSpace.Paracompact", "Mathlib.Topology.Instances.ENNReal.Lemmas", "Mathlib.Analysis.Convex.PartitionOfUnity" ]
Mathlib/Topology/MetricSpace/PartitionOfUnity.lean
exists_forall_closedBall_subset_aux₁
null
exists_forall_closedBall_subset_aux₂ (y : X) : Convex ℝ (Ioi (0 : ℝ) ∩ ENNReal.ofReal ⁻¹' ⋂ (i) (_ : y ∈ K i), { r | closedBall y r ⊆ U i }) := (convex_Ioi _).inter <| OrdConnected.convex <| OrdConnected.preimage_ennreal_ofReal <| ordConnected_iInter fun i => ordConnected_iInter fun (_ : y ∈ K i) => ordConnected_setOf_closedBall_subset y (U i)
theorem
Topology
[ "Mathlib.Topology.EMetricSpace.Paracompact", "Mathlib.Topology.Instances.ENNReal.Lemmas", "Mathlib.Analysis.Convex.PartitionOfUnity" ]
Mathlib/Topology/MetricSpace/PartitionOfUnity.lean
exists_forall_closedBall_subset_aux₂
null
exists_continuous_real_forall_closedBall_subset (hK : ∀ i, IsClosed (K i)) (hU : ∀ i, IsOpen (U i)) (hKU : ∀ i, K i ⊆ U i) (hfin : LocallyFinite K) : ∃ δ : C(X, ℝ), (∀ x, 0 < δ x) ∧ ∀ (i), ∀ x ∈ K i, closedBall x (ENNReal.ofReal <| δ x) ⊆ U i := by simpa only [mem_inter_iff, forall_and, mem_preimage, mem_iInter, @forall_swap ι X] using exists_continuous_forall_mem_convex_of_local_const exists_forall_closedBall_subset_aux₂ (exists_forall_closedBall_subset_aux₁ hK hU hKU hfin)
theorem
Topology
[ "Mathlib.Topology.EMetricSpace.Paracompact", "Mathlib.Topology.Instances.ENNReal.Lemmas", "Mathlib.Analysis.Convex.PartitionOfUnity" ]
Mathlib/Topology/MetricSpace/PartitionOfUnity.lean
exists_continuous_real_forall_closedBall_subset
Let `X` be an extended metric space. Let `K : ι → Set X` be a locally finite family of closed sets, let `U : ι → Set X` be a family of open sets such that `K i ⊆ U i` for all `i`. Then there exists a positive continuous function `δ : C(X, ℝ)` such that for any `i` and `x ∈ K i`, we have `EMetric.closedBall x (ENNReal.ofReal (δ x)) ⊆ U i`.
exists_continuous_nnreal_forall_closedBall_subset (hK : ∀ i, IsClosed (K i)) (hU : ∀ i, IsOpen (U i)) (hKU : ∀ i, K i ⊆ U i) (hfin : LocallyFinite K) : ∃ δ : C(X, ℝ≥0), (∀ x, 0 < δ x) ∧ ∀ (i), ∀ x ∈ K i, closedBall x (δ x) ⊆ U i := by rcases exists_continuous_real_forall_closedBall_subset hK hU hKU hfin with ⟨δ, hδ₀, hδ⟩ lift δ to C(X, ℝ≥0) using fun x => (hδ₀ x).le refine ⟨δ, hδ₀, fun i x hi => ?_⟩ simpa only [← ENNReal.ofReal_coe_nnreal] using hδ i x hi
theorem
Topology
[ "Mathlib.Topology.EMetricSpace.Paracompact", "Mathlib.Topology.Instances.ENNReal.Lemmas", "Mathlib.Analysis.Convex.PartitionOfUnity" ]
Mathlib/Topology/MetricSpace/PartitionOfUnity.lean
exists_continuous_nnreal_forall_closedBall_subset
Let `X` be an extended metric space. Let `K : ι → Set X` be a locally finite family of closed sets, let `U : ι → Set X` be a family of open sets such that `K i ⊆ U i` for all `i`. Then there exists a positive continuous function `δ : C(X, ℝ≥0)` such that for any `i` and `x ∈ K i`, we have `EMetric.closedBall x (δ x) ⊆ U i`.
exists_continuous_eNNReal_forall_closedBall_subset (hK : ∀ i, IsClosed (K i)) (hU : ∀ i, IsOpen (U i)) (hKU : ∀ i, K i ⊆ U i) (hfin : LocallyFinite K) : ∃ δ : C(X, ℝ≥0∞), (∀ x, 0 < δ x) ∧ ∀ (i), ∀ x ∈ K i, closedBall x (δ x) ⊆ U i := let ⟨δ, hδ₀, hδ⟩ := exists_continuous_nnreal_forall_closedBall_subset hK hU hKU hfin ⟨ContinuousMap.comp ⟨Coe.coe, ENNReal.continuous_coe⟩ δ, fun x => ENNReal.coe_pos.2 (hδ₀ x), hδ⟩
theorem
Topology
[ "Mathlib.Topology.EMetricSpace.Paracompact", "Mathlib.Topology.Instances.ENNReal.Lemmas", "Mathlib.Analysis.Convex.PartitionOfUnity" ]
Mathlib/Topology/MetricSpace/PartitionOfUnity.lean
exists_continuous_eNNReal_forall_closedBall_subset
Let `X` be an extended metric space. Let `K : ι → Set X` be a locally finite family of closed sets, let `U : ι → Set X` be a family of open sets such that `K i ⊆ U i` for all `i`. Then there exists a positive continuous function `δ : C(X, ℝ≥0∞)` such that for any `i` and `x ∈ K i`, we have `EMetric.closedBall x (δ x) ⊆ U i`.
exists_continuous_nnreal_forall_closedBall_subset (hK : ∀ i, IsClosed (K i)) (hU : ∀ i, IsOpen (U i)) (hKU : ∀ i, K i ⊆ U i) (hfin : LocallyFinite K) : ∃ δ : C(X, ℝ≥0), (∀ x, 0 < δ x) ∧ ∀ (i), ∀ x ∈ K i, closedBall x (δ x) ⊆ U i := by rcases EMetric.exists_continuous_nnreal_forall_closedBall_subset hK hU hKU hfin with ⟨δ, hδ0, hδ⟩ refine ⟨δ, hδ0, fun i x hx => ?_⟩ rw [← emetric_closedBall_nnreal] exact hδ i x hx
theorem
Topology
[ "Mathlib.Topology.EMetricSpace.Paracompact", "Mathlib.Topology.Instances.ENNReal.Lemmas", "Mathlib.Analysis.Convex.PartitionOfUnity" ]
Mathlib/Topology/MetricSpace/PartitionOfUnity.lean
exists_continuous_nnreal_forall_closedBall_subset
Let `X` be a metric space. Let `K : ι → Set X` be a locally finite family of closed sets, let `U : ι → Set X` be a family of open sets such that `K i ⊆ U i` for all `i`. Then there exists a positive continuous function `δ : C(X, ℝ≥0)` such that for any `i` and `x ∈ K i`, we have `Metric.closedBall x (δ x) ⊆ U i`.
exists_continuous_real_forall_closedBall_subset (hK : ∀ i, IsClosed (K i)) (hU : ∀ i, IsOpen (U i)) (hKU : ∀ i, K i ⊆ U i) (hfin : LocallyFinite K) : ∃ δ : C(X, ℝ), (∀ x, 0 < δ x) ∧ ∀ (i), ∀ x ∈ K i, closedBall x (δ x) ⊆ U i := let ⟨δ, hδ₀, hδ⟩ := exists_continuous_nnreal_forall_closedBall_subset hK hU hKU hfin ⟨ContinuousMap.comp ⟨Coe.coe, NNReal.continuous_coe⟩ δ, hδ₀, hδ⟩
theorem
Topology
[ "Mathlib.Topology.EMetricSpace.Paracompact", "Mathlib.Topology.Instances.ENNReal.Lemmas", "Mathlib.Analysis.Convex.PartitionOfUnity" ]
Mathlib/Topology/MetricSpace/PartitionOfUnity.lean
exists_continuous_real_forall_closedBall_subset
Let `X` be a metric space. Let `K : ι → Set X` be a locally finite family of closed sets, let `U : ι → Set X` be a family of open sets such that `K i ⊆ U i` for all `i`. Then there exists a positive continuous function `δ : C(X, ℝ)` such that for any `i` and `x ∈ K i`, we have `Metric.closedBall x (δ x) ⊆ U i`.
private Perfect.small_diam_aux (hC : Perfect C) (ε_pos : 0 < ε) {x : α} (xC : x ∈ C) : let D := closure (EMetric.ball x (ε / 2) ∩ C) Perfect D ∧ D.Nonempty ∧ D ⊆ C ∧ EMetric.diam D ≤ ε := by have : x ∈ EMetric.ball x (ε / 2) := by apply EMetric.mem_ball_self rw [ENNReal.div_pos_iff] exact ⟨ne_of_gt ε_pos, by simp⟩ have := hC.closure_nhds_inter x xC this EMetric.isOpen_ball refine ⟨this.1, this.2, ?_, ?_⟩ · rw [IsClosed.closure_subset_iff hC.closed] apply inter_subset_right rw [EMetric.diam_closure] apply le_trans (EMetric.diam_mono inter_subset_left) convert EMetric.diam_ball (x := x) rw [mul_comm, ENNReal.div_mul_cancel] <;> norm_num
theorem
Topology
[ "Mathlib.Topology.Perfect", "Mathlib.Topology.MetricSpace.Polish", "Mathlib.Topology.MetricSpace.CantorScheme", "Mathlib.Topology.Metrizable.Real" ]
Mathlib/Topology/MetricSpace/Perfect.lean
Perfect.small_diam_aux
null
Perfect.small_diam_splitting (hC : Perfect C) (hnonempty : C.Nonempty) (ε_pos : 0 < ε) : ∃ C₀ C₁ : Set α, (Perfect C₀ ∧ C₀.Nonempty ∧ C₀ ⊆ C ∧ EMetric.diam C₀ ≤ ε) ∧ (Perfect C₁ ∧ C₁.Nonempty ∧ C₁ ⊆ C ∧ EMetric.diam C₁ ≤ ε) ∧ Disjoint C₀ C₁ := by rcases hC.splitting hnonempty with ⟨D₀, D₁, ⟨perf0, non0, sub0⟩, ⟨perf1, non1, sub1⟩, hdisj⟩ obtain ⟨x₀, hx₀⟩ := non0 obtain ⟨x₁, hx₁⟩ := non1 rcases perf0.small_diam_aux ε_pos hx₀ with ⟨perf0', non0', sub0', diam0⟩ rcases perf1.small_diam_aux ε_pos hx₁ with ⟨perf1', non1', sub1', diam1⟩ refine ⟨closure (EMetric.ball x₀ (ε / 2) ∩ D₀), closure (EMetric.ball x₁ (ε / 2) ∩ D₁), ⟨perf0', non0', sub0'.trans sub0, diam0⟩, ⟨perf1', non1', sub1'.trans sub1, diam1⟩, ?_⟩ apply Disjoint.mono _ _ hdisj <;> assumption open CantorScheme
theorem
Topology
[ "Mathlib.Topology.Perfect", "Mathlib.Topology.MetricSpace.Polish", "Mathlib.Topology.MetricSpace.CantorScheme", "Mathlib.Topology.Metrizable.Real" ]
Mathlib/Topology/MetricSpace/Perfect.lean
Perfect.small_diam_splitting
A refinement of `Perfect.splitting` for metric spaces, where we also control the diameter of the new perfect sets.
Perfect.exists_nat_bool_injection (hC : Perfect C) (hnonempty : C.Nonempty) [CompleteSpace α] : ∃ f : (ℕ → Bool) → α, range f ⊆ C ∧ Continuous f ∧ Injective f := by obtain ⟨u, -, upos', hu⟩ := exists_seq_strictAnti_tendsto' (zero_lt_one' ℝ≥0∞) have upos := fun n => (upos' n).1 let P := Subtype fun E : Set α => Perfect E ∧ E.Nonempty choose C0 C1 h0 h1 hdisj using fun {C : Set α} (hC : Perfect C) (hnonempty : C.Nonempty) {ε : ℝ≥0∞} (hε : 0 < ε) => hC.small_diam_splitting hnonempty hε let DP : List Bool → P := fun l => by induction l with | nil => exact ⟨C, ⟨hC, hnonempty⟩⟩ | cons a l ih => cases a · use C0 ih.property.1 ih.property.2 (upos (l.length + 1)) exact ⟨(h0 _ _ _).1, (h0 _ _ _).2.1⟩ use C1 ih.property.1 ih.property.2 (upos (l.length + 1)) exact ⟨(h1 _ _ _).1, (h1 _ _ _).2.1⟩ let D : List Bool → Set α := fun l => (DP l).val have hanti : ClosureAntitone D := by refine Antitone.closureAntitone ?_ fun l => (DP l).property.1.closed intro l a cases a · exact (h0 _ _ _).2.2.1 exact (h1 _ _ _).2.2.1 have hdiam : VanishingDiam D := by intro x apply tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds hu · simp rw [eventually_atTop] refine ⟨1, fun m (hm : 1 ≤ m) => ?_⟩ rw [Nat.one_le_iff_ne_zero] at hm rcases Nat.exists_eq_succ_of_ne_zero hm with ⟨n, rfl⟩ dsimp cases x n · convert (h0 _ _ _).2.2.2 rw [PiNat.res_length] convert (h1 _ _ _).2.2.2 rw [PiNat.res_length] have hdisj' : CantorScheme.Disjoint D := by rintro l (a | a) (b | b) hab <;> try contradiction · exact hdisj _ _ _ exact (hdisj _ _ _).symm have hdom : ∀ {x : ℕ → Bool}, x ∈ (inducedMap D).1 := fun {x} => by rw [hanti.map_of_vanishingDiam hdiam fun l => (DP l).property.2] apply mem_univ refine ⟨fun x => (inducedMap D).2 ⟨x, hdom⟩, ?_, ?_, ?_⟩ · rintro y ⟨x, rfl⟩ exact map_mem ⟨_, hdom⟩ 0 · apply hdiam.map_continuous.comp fun_prop ...
theorem
Topology
[ "Mathlib.Topology.Perfect", "Mathlib.Topology.MetricSpace.Polish", "Mathlib.Topology.MetricSpace.CantorScheme", "Mathlib.Topology.Metrizable.Real" ]
Mathlib/Topology/MetricSpace/Perfect.lean
Perfect.exists_nat_bool_injection
Any nonempty perfect set in a complete metric space admits a continuous injection from the Cantor space, `ℕ → Bool`.
IsClosed.exists_nat_bool_injection_of_not_countable {α : Type*} [TopologicalSpace α] [PolishSpace α] {C : Set α} (hC : IsClosed C) (hunc : ¬C.Countable) : ∃ f : (ℕ → Bool) → α, range f ⊆ C ∧ Continuous f ∧ Function.Injective f := by letI := TopologicalSpace.upgradeIsCompletelyMetrizable α obtain ⟨D, hD, Dnonempty, hDC⟩ := exists_perfect_nonempty_of_isClosed_of_not_countable hC hunc obtain ⟨f, hfD, hf⟩ := hD.exists_nat_bool_injection Dnonempty exact ⟨f, hfD.trans hDC, hf⟩
theorem
Topology
[ "Mathlib.Topology.Perfect", "Mathlib.Topology.MetricSpace.Polish", "Mathlib.Topology.MetricSpace.CantorScheme", "Mathlib.Topology.Metrizable.Real" ]
Mathlib/Topology/MetricSpace/Perfect.lean
IsClosed.exists_nat_bool_injection_of_not_countable
Any closed uncountable subset of a Polish space admits a continuous injection from the Cantor space `ℕ → Bool`.
cylinder (x : ∀ n, E n) (n : ℕ) : Set (∀ n, E n) := { y | ∀ i, i < n → y i = x i }
def
Topology
[ "Mathlib.Topology.Algebra.MetricSpace.Lipschitz", "Mathlib.Topology.MetricSpace.HausdorffDistance" ]
Mathlib/Topology/MetricSpace/PiNat.lean
cylinder
In a product space `Π n, E n`, then `firstDiff x y` is the first index at which `x` and `y` differ. If `x = y`, then by convention we set `firstDiff x x = 0`. -/ irreducible_def firstDiff (x y : ∀ n, E n) : ℕ := if h : x ≠ y then Nat.find (ne_iff.1 h) else 0 theorem apply_firstDiff_ne {x y : ∀ n, E n} (h : x ≠ y) : x (firstDiff x y) ≠ y (firstDiff x y) := by rw [firstDiff_def, dif_pos h] classical exact Nat.find_spec (ne_iff.1 h) theorem apply_eq_of_lt_firstDiff {x y : ∀ n, E n} {n : ℕ} (hn : n < firstDiff x y) : x n = y n := by rw [firstDiff_def] at hn split_ifs at hn with h · convert Nat.find_min (ne_iff.1 h) hn simp · exact (not_lt_zero' hn).elim theorem firstDiff_comm (x y : ∀ n, E n) : firstDiff x y = firstDiff y x := by classical simp only [firstDiff_def, ne_comm] theorem min_firstDiff_le (x y z : ∀ n, E n) (h : x ≠ z) : min (firstDiff x y) (firstDiff y z) ≤ firstDiff x z := by by_contra! H rw [lt_min_iff] at H refine apply_firstDiff_ne h ?_ calc x (firstDiff x z) = y (firstDiff x z) := apply_eq_of_lt_firstDiff H.1 _ = z (firstDiff x z) := apply_eq_of_lt_firstDiff H.2 /-! ### Cylinders -/ /-- In a product space `Π n, E n`, the cylinder set of length `n` around `x`, denoted `cylinder x n`, is the set of sequences `y` that coincide with `x` on the first `n` symbols, i.e., such that `y i = x i` for all `i < n`.
cylinder_eq_pi (x : ∀ n, E n) (n : ℕ) : cylinder x n = Set.pi (Finset.range n : Set ℕ) fun i : ℕ => {x i} := by ext y simp [cylinder] @[simp]
theorem
Topology
[ "Mathlib.Topology.Algebra.MetricSpace.Lipschitz", "Mathlib.Topology.MetricSpace.HausdorffDistance" ]
Mathlib/Topology/MetricSpace/PiNat.lean
cylinder_eq_pi
null
cylinder_zero (x : ∀ n, E n) : cylinder x 0 = univ := by simp [cylinder_eq_pi]
theorem
Topology
[ "Mathlib.Topology.Algebra.MetricSpace.Lipschitz", "Mathlib.Topology.MetricSpace.HausdorffDistance" ]
Mathlib/Topology/MetricSpace/PiNat.lean
cylinder_zero
null
cylinder_anti (x : ∀ n, E n) {m n : ℕ} (h : m ≤ n) : cylinder x n ⊆ cylinder x m := fun _y hy i hi => hy i (hi.trans_le h) @[simp]
theorem
Topology
[ "Mathlib.Topology.Algebra.MetricSpace.Lipschitz", "Mathlib.Topology.MetricSpace.HausdorffDistance" ]
Mathlib/Topology/MetricSpace/PiNat.lean
cylinder_anti
null
mem_cylinder_iff {x y : ∀ n, E n} {n : ℕ} : y ∈ cylinder x n ↔ ∀ i < n, y i = x i := Iff.rfl
theorem
Topology
[ "Mathlib.Topology.Algebra.MetricSpace.Lipschitz", "Mathlib.Topology.MetricSpace.HausdorffDistance" ]
Mathlib/Topology/MetricSpace/PiNat.lean
mem_cylinder_iff
null
self_mem_cylinder (x : ∀ n, E n) (n : ℕ) : x ∈ cylinder x n := by simp
theorem
Topology
[ "Mathlib.Topology.Algebra.MetricSpace.Lipschitz", "Mathlib.Topology.MetricSpace.HausdorffDistance" ]
Mathlib/Topology/MetricSpace/PiNat.lean
self_mem_cylinder
null
mem_cylinder_iff_eq {x y : ∀ n, E n} {n : ℕ} : y ∈ cylinder x n ↔ cylinder y n = cylinder x n := by constructor · intro hy apply Subset.antisymm · intro z hz i hi rw [← hy i hi] exact hz i hi · intro z hz i hi rw [hy i hi] exact hz i hi · intro h rw [← h] exact self_mem_cylinder _ _
theorem
Topology
[ "Mathlib.Topology.Algebra.MetricSpace.Lipschitz", "Mathlib.Topology.MetricSpace.HausdorffDistance" ]
Mathlib/Topology/MetricSpace/PiNat.lean
mem_cylinder_iff_eq
null
mem_cylinder_comm (x y : ∀ n, E n) (n : ℕ) : y ∈ cylinder x n ↔ x ∈ cylinder y n := by simp [eq_comm]
theorem
Topology
[ "Mathlib.Topology.Algebra.MetricSpace.Lipschitz", "Mathlib.Topology.MetricSpace.HausdorffDistance" ]
Mathlib/Topology/MetricSpace/PiNat.lean
mem_cylinder_comm
null
mem_cylinder_iff_le_firstDiff {x y : ∀ n, E n} (hne : x ≠ y) (i : ℕ) : x ∈ cylinder y i ↔ i ≤ firstDiff x y := by constructor · intro h by_contra! exact apply_firstDiff_ne hne (h _ this) · intro hi j hj exact apply_eq_of_lt_firstDiff (hj.trans_le hi)
theorem
Topology
[ "Mathlib.Topology.Algebra.MetricSpace.Lipschitz", "Mathlib.Topology.MetricSpace.HausdorffDistance" ]
Mathlib/Topology/MetricSpace/PiNat.lean
mem_cylinder_iff_le_firstDiff
null
mem_cylinder_firstDiff (x y : ∀ n, E n) : x ∈ cylinder y (firstDiff x y) := fun _i hi => apply_eq_of_lt_firstDiff hi
theorem
Topology
[ "Mathlib.Topology.Algebra.MetricSpace.Lipschitz", "Mathlib.Topology.MetricSpace.HausdorffDistance" ]
Mathlib/Topology/MetricSpace/PiNat.lean
mem_cylinder_firstDiff
null
cylinder_eq_cylinder_of_le_firstDiff (x y : ∀ n, E n) {n : ℕ} (hn : n ≤ firstDiff x y) : cylinder x n = cylinder y n := by rw [← mem_cylinder_iff_eq] intro i hi exact apply_eq_of_lt_firstDiff (hi.trans_le hn)
theorem
Topology
[ "Mathlib.Topology.Algebra.MetricSpace.Lipschitz", "Mathlib.Topology.MetricSpace.HausdorffDistance" ]
Mathlib/Topology/MetricSpace/PiNat.lean
cylinder_eq_cylinder_of_le_firstDiff
null
iUnion_cylinder_update (x : ∀ n, E n) (n : ℕ) : ⋃ k, cylinder (update x n k) (n + 1) = cylinder x n := by ext y simp only [mem_cylinder_iff, mem_iUnion] constructor · rintro ⟨k, hk⟩ i hi simpa [hi.ne] using hk i (Nat.lt_succ_of_lt hi) · intro H refine ⟨y n, fun i hi => ?_⟩ rcases Nat.lt_succ_iff_lt_or_eq.1 hi with (h'i | rfl) · simp [H i h'i, h'i.ne] · simp
theorem
Topology
[ "Mathlib.Topology.Algebra.MetricSpace.Lipschitz", "Mathlib.Topology.MetricSpace.HausdorffDistance" ]
Mathlib/Topology/MetricSpace/PiNat.lean
iUnion_cylinder_update
null
update_mem_cylinder (x : ∀ n, E n) (n : ℕ) (y : E n) : update x n y ∈ cylinder x n := mem_cylinder_iff.2 fun i hi => by simp [hi.ne]
theorem
Topology
[ "Mathlib.Topology.Algebra.MetricSpace.Lipschitz", "Mathlib.Topology.MetricSpace.HausdorffDistance" ]
Mathlib/Topology/MetricSpace/PiNat.lean
update_mem_cylinder
null
res (x : ℕ → α) : ℕ → List α | 0 => nil | Nat.succ n => x n :: res x n @[simp]
def
Topology
[ "Mathlib.Topology.Algebra.MetricSpace.Lipschitz", "Mathlib.Topology.MetricSpace.HausdorffDistance" ]
Mathlib/Topology/MetricSpace/PiNat.lean
res
In the case where `E` has constant value `α`, the cylinder `cylinder x n` can be identified with the element of `List α` consisting of the first `n` entries of `x`. See `cylinder_eq_res`. We call this list `res x n`, the restriction of `x` to `n`.
res_zero (x : ℕ → α) : res x 0 = @nil α := rfl @[simp]
theorem
Topology
[ "Mathlib.Topology.Algebra.MetricSpace.Lipschitz", "Mathlib.Topology.MetricSpace.HausdorffDistance" ]
Mathlib/Topology/MetricSpace/PiNat.lean
res_zero
null
res_succ (x : ℕ → α) (n : ℕ) : res x n.succ = x n :: res x n := rfl @[simp]
theorem
Topology
[ "Mathlib.Topology.Algebra.MetricSpace.Lipschitz", "Mathlib.Topology.MetricSpace.HausdorffDistance" ]
Mathlib/Topology/MetricSpace/PiNat.lean
res_succ
null
res_length (x : ℕ → α) (n : ℕ) : (res x n).length = n := by induction n <;> simp [*]
theorem
Topology
[ "Mathlib.Topology.Algebra.MetricSpace.Lipschitz", "Mathlib.Topology.MetricSpace.HausdorffDistance" ]
Mathlib/Topology/MetricSpace/PiNat.lean
res_length
null
res_eq_res {x y : ℕ → α} {n : ℕ} : res x n = res y n ↔ ∀ ⦃m⦄, m < n → x m = y m := by constructor <;> intro h · induction n with | zero => simp | succ n ih => intro m hm rw [Nat.lt_succ_iff_lt_or_eq] at hm simp only [res_succ, cons.injEq] at h rcases hm with hm | hm · exact ih h.2 hm rw [hm] exact h.1 · induction n with | zero => simp | succ n ih => simp only [res_succ, cons.injEq] refine ⟨h (Nat.lt_succ_self _), ih fun m hm => ?_⟩ exact h (hm.trans (Nat.lt_succ_self _))
theorem
Topology
[ "Mathlib.Topology.Algebra.MetricSpace.Lipschitz", "Mathlib.Topology.MetricSpace.HausdorffDistance" ]
Mathlib/Topology/MetricSpace/PiNat.lean
res_eq_res
The restrictions of `x` and `y` to `n` are equal if and only if `x m = y m` for all `m < n`.
res_injective : Injective (@res α) := by intro x y h ext n apply res_eq_res.mp _ (Nat.lt_succ_self _) rw [h]
theorem
Topology
[ "Mathlib.Topology.Algebra.MetricSpace.Lipschitz", "Mathlib.Topology.MetricSpace.HausdorffDistance" ]
Mathlib/Topology/MetricSpace/PiNat.lean
res_injective
null
cylinder_eq_res (x : ℕ → α) (n : ℕ) : cylinder x n = { y | res y n = res x n } := by ext y dsimp [cylinder] rw [res_eq_res]
theorem
Topology
[ "Mathlib.Topology.Algebra.MetricSpace.Lipschitz", "Mathlib.Topology.MetricSpace.HausdorffDistance" ]
Mathlib/Topology/MetricSpace/PiNat.lean
cylinder_eq_res
`cylinder x n` is equal to the set of sequences `y` with the same restriction to `n` as `x`.
protected dist : Dist (∀ n, E n) := ⟨fun x y => if x ≠ y then (1 / 2 : ℝ) ^ firstDiff x y else 0⟩ attribute [local instance] PiNat.dist
def
Topology
[ "Mathlib.Topology.Algebra.MetricSpace.Lipschitz", "Mathlib.Topology.MetricSpace.HausdorffDistance" ]
Mathlib/Topology/MetricSpace/PiNat.lean
dist
The distance function on a product space `Π n, E n`, given by `dist x y = (1/2)^n` where `n` is the first index at which `x` and `y` differ.
dist_eq_of_ne {x y : ∀ n, E n} (h : x ≠ y) : dist x y = (1 / 2 : ℝ) ^ firstDiff x y := by simp [dist, h]
theorem
Topology
[ "Mathlib.Topology.Algebra.MetricSpace.Lipschitz", "Mathlib.Topology.MetricSpace.HausdorffDistance" ]
Mathlib/Topology/MetricSpace/PiNat.lean
dist_eq_of_ne
null
protected dist_self (x : ∀ n, E n) : dist x x = 0 := by simp [dist]
theorem
Topology
[ "Mathlib.Topology.Algebra.MetricSpace.Lipschitz", "Mathlib.Topology.MetricSpace.HausdorffDistance" ]
Mathlib/Topology/MetricSpace/PiNat.lean
dist_self
null
protected dist_comm (x y : ∀ n, E n) : dist x y = dist y x := by classical simp [dist, @eq_comm _ x y, firstDiff_comm]
theorem
Topology
[ "Mathlib.Topology.Algebra.MetricSpace.Lipschitz", "Mathlib.Topology.MetricSpace.HausdorffDistance" ]
Mathlib/Topology/MetricSpace/PiNat.lean
dist_comm
null
protected dist_nonneg (x y : ∀ n, E n) : 0 ≤ dist x y := by rcases eq_or_ne x y with (rfl | h) · simp [dist] · simp [dist, h]
theorem
Topology
[ "Mathlib.Topology.Algebra.MetricSpace.Lipschitz", "Mathlib.Topology.MetricSpace.HausdorffDistance" ]
Mathlib/Topology/MetricSpace/PiNat.lean
dist_nonneg
null
dist_triangle_nonarch (x y z : ∀ n, E n) : dist x z ≤ max (dist x y) (dist y z) := by rcases eq_or_ne x z with (rfl | hxz) · simp [PiNat.dist_self x, PiNat.dist_nonneg] rcases eq_or_ne x y with (rfl | hxy) · simp rcases eq_or_ne y z with (rfl | hyz) · simp simp only [dist_eq_of_ne, hxz, hxy, hyz, inv_le_inv₀, one_div, inv_pow, zero_lt_two, Ne, not_false_iff, le_max_iff, pow_le_pow_iff_right₀, one_lt_two, pow_pos, min_le_iff.1 (min_firstDiff_le x y z hxz)]
theorem
Topology
[ "Mathlib.Topology.Algebra.MetricSpace.Lipschitz", "Mathlib.Topology.MetricSpace.HausdorffDistance" ]
Mathlib/Topology/MetricSpace/PiNat.lean
dist_triangle_nonarch
null
protected dist_triangle (x y z : ∀ n, E n) : dist x z ≤ dist x y + dist y z := calc dist x z ≤ max (dist x y) (dist y z) := dist_triangle_nonarch x y z _ ≤ dist x y + dist y z := max_le_add_of_nonneg (PiNat.dist_nonneg _ _) (PiNat.dist_nonneg _ _)
theorem
Topology
[ "Mathlib.Topology.Algebra.MetricSpace.Lipschitz", "Mathlib.Topology.MetricSpace.HausdorffDistance" ]
Mathlib/Topology/MetricSpace/PiNat.lean
dist_triangle
null