The areas / V13. General topology
Mathlib.Topology.MetricSpace.Lipschitz
55 declarations and 1 deprecated aliases. Mathlib docs · Source
Lipschitz continuous functions
A map f : α → β between two (extended) metric spaces is called Lipschitz continuous
with constant K ≥ 0 if for all x, y we have edist (f x) (f y) ≤ K * edist x y.
For a metric space, the latter inequality is equivalent to dist (f x) (f y) ≤ K * dist x y.
There is also a version asserting this inequality only for x and y in some set s.
Finally, f : α → β is called locally Lipschitz continuous if each x : α has a neighbourhood
on which f is Lipschitz continuous (with some constant).
In this file we specialize various facts about Lipschitz continuous maps to the case of (pseudo) metric spaces.
Implementation notes
The parameter K has type ℝ≥0. This way we avoid conjunction in the definition and have
coercions both to ℝ and ℝ≥0∞. Constructors whose names end with ' take K : ℝ as an
argument, and return LipschitzWith (Real.toNNReal K) f.
theorem lipschitzWith_iff_dist_le_mul E1 #
∀ {α : Type u} {β : Type v} [inst : PseudoMetricSpace α] [inst_1 : PseudoMetricSpace β] {K : NNReal} {f : α → β},
LipschitzWith K f ↔ ∀ (x y : α), dist (f x) (f y) ≤ ↑K * dist x y
theorem LipschitzWith.dist_le_mul E1 #
∀ {α : Type u} {β : Type v} [inst : PseudoMetricSpace α] [inst_1 : PseudoMetricSpace β] {K : NNReal} {f : α → β},
LipschitzWith K f → ∀ (x y : α), dist (f x) (f y) ≤ ↑K * dist x y
Alias of the forward direction of lipschitzWith_iff_dist_le_mul.
theorem LipschitzWith.of_dist_le_mul E1 #
∀ {α : Type u} {β : Type v} [inst : PseudoMetricSpace α] [inst_1 : PseudoMetricSpace β] {K : NNReal} {f : α → β},
(∀ (x y : α), dist (f x) (f y) ≤ ↑K * dist x y) → LipschitzWith K f
Alias of the reverse direction of lipschitzWith_iff_dist_le_mul.
theorem lipschitzOnWith_iff_dist_le_mul E1 #
∀ {α : Type u} {β : Type v} [inst : PseudoMetricSpace α] [inst_1 : PseudoMetricSpace β] {K : NNReal} {s : Set α}
{f : α → β}, LipschitzOnWith K f s ↔ ∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ ↑K * dist x y
theorem LipschitzOnWith.of_dist_le_mul E1 #
∀ {α : Type u} {β : Type v} [inst : PseudoMetricSpace α] [inst_1 : PseudoMetricSpace β] {K : NNReal} {s : Set α}
{f : α → β}, (∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ ↑K * dist x y) → LipschitzOnWith K f s
Alias of the reverse direction of lipschitzOnWith_iff_dist_le_mul.
theorem LipschitzOnWith.dist_le_mul E1 #
∀ {α : Type u} {β : Type v} [inst : PseudoMetricSpace α] [inst_1 : PseudoMetricSpace β] {K : NNReal} {s : Set α}
{f : α → β}, LipschitzOnWith K f s → ∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ ↑K * dist x y
Alias of the forward direction of lipschitzOnWith_iff_dist_le_mul.
theorem LipschitzWith.of_dist_le' E1 #
∀ {α : Type u} {β : Type v} [inst : PseudoMetricSpace α] [inst_1 : PseudoMetricSpace β] {f : α → β} {K : ℝ},
(∀ (x y : α), dist (f x) (f y) ≤ K * dist x y) → LipschitzWith K.toNNReal f
theorem LipschitzWith.mk_one E1 #
∀ {α : Type u} {β : Type v} [inst : PseudoMetricSpace α] [inst_1 : PseudoMetricSpace β] {f : α → β},
(∀ (x y : α), dist (f x) (f y) ≤ dist x y) → LipschitzWith 1 f
theorem LipschitzWith.of_le_add_mul' E1 #
∀ {α : Type u} [inst : PseudoMetricSpace α] {f : α → ℝ} (K : ℝ),
(∀ (x y : α), f x ≤ f y + K * dist x y) → LipschitzWith K.toNNReal f
For functions to ℝ, it suffices to prove f x ≤ f y + K * dist x y; this version
doesn't assume 0≤K.
theorem LipschitzWith.of_le_add_mul E1 #
∀ {α : Type u} [inst : PseudoMetricSpace α] {f : α → ℝ} (K : NNReal),
(∀ (x y : α), f x ≤ f y + ↑K * dist x y) → LipschitzWith K f
For functions to ℝ, it suffices to prove f x ≤ f y + K * dist x y; this version
assumes 0≤K.
theorem LipschitzWith.of_le_add E1 #
∀ {α : Type u} [inst : PseudoMetricSpace α] {f : α → ℝ}, (∀ (x y : α), f x ≤ f y + dist x y) → LipschitzWith 1 f
theorem LipschitzWith.le_add_mul E1 #
∀ {α : Type u} [inst : PseudoMetricSpace α] {f : α → ℝ} {K : NNReal},
LipschitzWith K f → ∀ (x y : α), f x ≤ f y + ↑K * dist x y
theorem LipschitzWith.iff_le_add_mul E1 #
∀ {α : Type u} [inst : PseudoMetricSpace α] {f : α → ℝ} {K : NNReal},
LipschitzWith K f ↔ ∀ (x y : α), f x ≤ f y + ↑K * dist x y
theorem LipschitzWith.nnDist_le E1 #
∀ {α : Type u} {β : Type v} [inst : PseudoMetricSpace α] [inst_1 : PseudoMetricSpace β] {K : NNReal} {f : α → β},
LipschitzWith K f → ∀ (x y : α), nnDist (f x) (f y) ≤ K * nnDist x y
theorem LipschitzWith.dist_le_mul_of_le E1 #
∀ {α : Type u} {β : Type v} [inst : PseudoMetricSpace α] [inst_1 : PseudoMetricSpace β] {K : NNReal} {f : α → β}
{x y : α} {r : ℝ}, LipschitzWith K f → dist x y ≤ r → dist (f x) (f y) ≤ ↑K * r
theorem LipschitzWith.mapsTo_closedBall E1 #
∀ {α : Type u} {β : Type v} [inst : PseudoMetricSpace α] [inst_1 : PseudoMetricSpace β] {K : NNReal} {f : α → β},
LipschitzWith K f → ∀ (x : α) (r : ℝ), Set.MapsTo f (Metric.closedBall x r) (Metric.closedBall (f x) (↑K * r))
theorem LipschitzWith.dist_lt_mul_of_lt E1 #
∀ {α : Type u} {β : Type v} [inst : PseudoMetricSpace α] [inst_1 : PseudoMetricSpace β] {K : NNReal} {f : α → β}
{x y : α} {r : ℝ}, LipschitzWith K f → K ≠ 0 → dist x y < r → dist (f x) (f y) < ↑K * r
theorem LipschitzWith.mapsTo_ball E1 #
∀ {α : Type u} {β : Type v} [inst : PseudoMetricSpace α] [inst_1 : PseudoMetricSpace β] {K : NNReal} {f : α → β},
LipschitzWith K f → K ≠ 0 → ∀ (x : α) (r : ℝ), Set.MapsTo f (Metric.ball x r) (Metric.ball (f x) (↑K * r))
def LipschitzWith.toLocallyBoundedMap E1 #
{α : Type u} →
{β : Type v} →
[inst : PseudoMetricSpace α] →
[inst_1 : PseudoMetricSpace β] → {K : NNReal} → (f : α → β) → LipschitzWith K f → LocallyBoundedMap α β
A Lipschitz continuous map is a locally bounded map.
theorem LipschitzWith.coe_toLocallyBoundedMap E0 #
∀ {α : Type u} {β : Type v} [inst : PseudoMetricSpace α] [inst_1 : PseudoMetricSpace β] {K : NNReal} {f : α → β}
(hf : LipschitzWith K f), ⇑(LipschitzWith.toLocallyBoundedMap f hf) = f
theorem LipschitzWith.comap_cobounded_le E1 #
∀ {α : Type u} {β : Type v} [inst : PseudoMetricSpace α] [inst_1 : PseudoMetricSpace β] {K : NNReal} {f : α → β},
LipschitzWith K f → Filter.comap f (Bornology.cobounded β) ≤ Bornology.cobounded α
theorem LipschitzWith.isBounded_image E1 #
∀ {α : Type u} {β : Type v} [inst : PseudoMetricSpace α] [inst_1 : PseudoMetricSpace β] {K : NNReal} {f : α → β},
LipschitzWith K f → ∀ {s : Set α}, Bornology.IsBounded s → Bornology.IsBounded (f '' s)
The image of a bounded set under a Lipschitz map is bounded.
theorem LipschitzWith.diam_image_le E1 #
∀ {α : Type u} {β : Type v} [inst : PseudoMetricSpace α] [inst_1 : PseudoMetricSpace β] {K : NNReal} {f : α → β},
LipschitzWith K f → ∀ (s : Set α), Bornology.IsBounded s → Metric.diam (f '' s) ≤ ↑K * Metric.diam s
theorem LipschitzWith.dist_left E1 #
∀ {α : Type u} [inst : PseudoMetricSpace α] (y : α), LipschitzWith 1 fun x ↦ dist x y
theorem LipschitzWith.dist_right E1 #
∀ {α : Type u} [inst : PseudoMetricSpace α] (x : α), LipschitzWith 1 (dist x)
theorem LipschitzWith.dist E1 #
∀ {α : Type u} [inst : PseudoMetricSpace α], LipschitzWith 2 (Function.uncurry dist)
theorem LipschitzWith.dist_iterate_succ_le_geometric E1 #
∀ {α : Type u} [inst : PseudoMetricSpace α] {K : NNReal} {f : α → α},
LipschitzWith K f → ∀ (x : α) (n : ℕ), dist (f^[n] x) (f^[n + 1] x) ≤ dist x (f x) * ↑K ^ n
theorem lipschitzWith_max E1 #
LipschitzWith 1 fun p ↦ max p.1 p.2
theorem lipschitzWith_min E1 #
LipschitzWith 1 fun p ↦ min p.1 p.2
theorem Real.lipschitzWith_toNNReal E1 #
LipschitzWith 1 Real.toNNReal
theorem Set.separatesPoints_lipschitzWith_one E1 #
∀ (E : Type u_1) [inst : MetricSpace E], {f | LipschitzWith 1 f}.SeparatesPoints
The set of functions which are 1-Lipschitz on a metric space separates points.
theorem LipschitzWith.max E1 #
∀ {α : Type u} [inst : PseudoEMetricSpace α] {f g : α → ℝ} {Kf Kg : NNReal},
LipschitzWith Kf f → LipschitzWith Kg g → LipschitzWith (max Kf Kg) fun x ↦ max (f x) (g x)
theorem LipschitzWith.min E1 #
∀ {α : Type u} [inst : PseudoEMetricSpace α] {f g : α → ℝ} {Kf Kg : NNReal},
LipschitzWith Kf f → LipschitzWith Kg g → LipschitzWith (max Kf Kg) fun x ↦ min (f x) (g x)
theorem LipschitzWith.max_const E1 #
∀ {α : Type u} [inst : PseudoEMetricSpace α] {f : α → ℝ} {Kf : NNReal},
LipschitzWith Kf f → ∀ (a : ℝ), LipschitzWith Kf fun x ↦ max (f x) a
theorem LipschitzWith.const_max E1 #
∀ {α : Type u} [inst : PseudoEMetricSpace α] {f : α → ℝ} {Kf : NNReal},
LipschitzWith Kf f → ∀ (a : ℝ), LipschitzWith Kf fun x ↦ max a (f x)
theorem LipschitzWith.min_const E1 #
∀ {α : Type u} [inst : PseudoEMetricSpace α] {f : α → ℝ} {Kf : NNReal},
LipschitzWith Kf f → ∀ (a : ℝ), LipschitzWith Kf fun x ↦ min (f x) a
theorem LipschitzWith.const_min E1 #
∀ {α : Type u} [inst : PseudoEMetricSpace α] {f : α → ℝ} {Kf : NNReal},
LipschitzWith Kf f → ∀ (a : ℝ), LipschitzWith Kf fun x ↦ min a (f x)
theorem LipschitzWith.projIcc E1 #
∀ {a b : ℝ} (h : a ≤ b), LipschitzWith 1 (Set.projIcc a b h)
theorem LipschitzWith.properSpace E1 #
∀ {X : Type u_1} {Y : Type u_2} [inst : PseudoMetricSpace X] [inst_1 : PseudoMetricSpace Y] [ProperSpace Y] {f : X → Y},
IsProperMap f → ∀ {K : NNReal}, LipschitzWith K f → ProperSpace X
The preimage of a proper space under a Lipschitz proper map is proper.
theorem LipschitzOnWith.of_dist_le' E1 #
∀ {α : Type u} {β : Type v} [inst : PseudoMetricSpace α] [inst_1 : PseudoMetricSpace β] {s : Set α} {f : α → β} {K : ℝ},
(∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ K * dist x y) → LipschitzOnWith K.toNNReal f s
theorem LipschitzOnWith.mk_one E1 #
∀ {α : Type u} {β : Type v} [inst : PseudoMetricSpace α] [inst_1 : PseudoMetricSpace β] {s : Set α} {f : α → β},
(∀ x ∈ s, ∀ y ∈ s, dist (f x) (f y) ≤ dist x y) → LipschitzOnWith 1 f s
theorem LipschitzOnWith.of_le_add_mul' E1 #
∀ {α : Type u} [inst : PseudoMetricSpace α] {s : Set α} {f : α → ℝ} (K : ℝ),
(∀ x ∈ s, ∀ y ∈ s, f x ≤ f y + K * dist x y) → LipschitzOnWith K.toNNReal f s
For functions to ℝ, it suffices to prove f x ≤ f y + K * dist x y; this version
doesn't assume 0≤K.
theorem LipschitzOnWith.of_le_add_mul E1 #
∀ {α : Type u} [inst : PseudoMetricSpace α] {s : Set α} {f : α → ℝ} (K : NNReal),
(∀ x ∈ s, ∀ y ∈ s, f x ≤ f y + ↑K * dist x y) → LipschitzOnWith K f s
For functions to ℝ, it suffices to prove f x ≤ f y + K * dist x y; this version
assumes 0≤K.
theorem LipschitzOnWith.of_le_add E1 #
∀ {α : Type u} [inst : PseudoMetricSpace α] {s : Set α} {f : α → ℝ},
(∀ x ∈ s, ∀ y ∈ s, f x ≤ f y + dist x y) → LipschitzOnWith 1 f s
theorem LipschitzOnWith.le_add_mul E1 #
∀ {α : Type u} [inst : PseudoMetricSpace α] {s : Set α} {f : α → ℝ} {K : NNReal},
LipschitzOnWith K f s → ∀ {x : α}, x ∈ s → ∀ {y : α}, y ∈ s → f x ≤ f y + ↑K * dist x y
theorem LipschitzOnWith.iff_le_add_mul E1 #
∀ {α : Type u} [inst : PseudoMetricSpace α] {s : Set α} {f : α → ℝ} {K : NNReal},
LipschitzOnWith K f s ↔ ∀ x ∈ s, ∀ y ∈ s, f x ≤ f y + ↑K * dist x y
theorem LipschitzOnWith.isBounded_image2 E1 #
∀ {α : Type u} {β : Type v} {γ : Type w} [inst : PseudoMetricSpace α] [inst_1 : PseudoMetricSpace β]
[inst_2 : PseudoMetricSpace γ] (f : α → β → γ) {K₁ K₂ : NNReal} {s : Set α} {t : Set β},
Bornology.IsBounded s →
Bornology.IsBounded t →
(∀ b ∈ t, LipschitzOnWith K₁ (fun a ↦ f a b) s) →
(∀ a ∈ s, LipschitzOnWith K₂ (f a) t) → Bornology.IsBounded (Set.image2 f s t)
theorem LocallyLipschitz.min E1 #
∀ {α : Type u} [inst : PseudoEMetricSpace α] {f g : α → ℝ},
LocallyLipschitz f → LocallyLipschitz g → LocallyLipschitz fun x ↦ min (f x) (g x)
The minimum of locally Lipschitz functions is locally Lipschitz.
theorem LocallyLipschitz.max E1 #
∀ {α : Type u} [inst : PseudoEMetricSpace α] {f g : α → ℝ},
LocallyLipschitz f → LocallyLipschitz g → LocallyLipschitz fun x ↦ max (f x) (g x)
The maximum of locally Lipschitz functions is locally Lipschitz.
theorem LocallyLipschitz.max_const E1 #
∀ {α : Type u} [inst : PseudoEMetricSpace α] {f : α → ℝ},
LocallyLipschitz f → ∀ (a : ℝ), LocallyLipschitz fun x ↦ max (f x) a
theorem LocallyLipschitz.const_max E1 #
∀ {α : Type u} [inst : PseudoEMetricSpace α] {f : α → ℝ},
LocallyLipschitz f → ∀ (a : ℝ), LocallyLipschitz fun x ↦ max a (f x)
theorem LocallyLipschitz.min_const E1 #
∀ {α : Type u} [inst : PseudoEMetricSpace α] {f : α → ℝ},
LocallyLipschitz f → ∀ (a : ℝ), LocallyLipschitz fun x ↦ min (f x) a
theorem LocallyLipschitz.const_min E1 #
∀ {α : Type u} [inst : PseudoEMetricSpace α] {f : α → ℝ},
LocallyLipschitz f → ∀ (a : ℝ), LocallyLipschitz fun x ↦ min a (f x)
theorem LipschitzOnWith.extend_real E1 #
∀ {α : Type u} [inst : PseudoMetricSpace α] {f : α → ℝ} {s : Set α} {K : NNReal},
LipschitzOnWith K f s → ∃ g, LipschitzWith K g ∧ Set.EqOn f g s
A function f : α → ℝ which is K-Lipschitz on a subset s admits a K-Lipschitz extension
to the whole space.
theorem LipschitzOnWith.extend_pi E1 #
∀ {α : Type u} {ι : Type x} [inst : PseudoMetricSpace α] [inst_1 : Fintype ι] {f : α → ι → ℝ} {s : Set α} {K : NNReal},
LipschitzOnWith K f s → ∃ g, LipschitzWith K g ∧ Set.EqOn f g s
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.
Deprecated aliases
| Name | New name | Since |
|---|---|---|
LipschitzWith.nndist_le | LipschitzWith.nnDist_le | 2026-11-07 |