Lipschitz continuous functions #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
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
.
In this file we provide various ways to prove that various combinations of Lipschitz continuous functions are Lipschitz continuous. We also prove that Lipschitz continuous functions are uniformly continuous.
Main definitions and lemmas #
lipschitz_with K f
: states thatf
is Lipschitz with constantK : ℝ≥0
lipschitz_on_with K f
: states thatf
is Lipschitz with constantK : ℝ≥0
on a sets
lipschitz_with.uniform_continuous
: a Lipschitz function is uniformly continuouslipschitz_on_with.uniform_continuous_on
: a function which is Lipschitz on a set is uniformly continuous on that set.
Implementation notes #
The parameter K
has type ℝ≥0
. This way we avoid conjuction in the definition and have
coercions both to ℝ
and ℝ≥0∞
. Constructors whose names end with '
take K : ℝ
as an
argument, and return lipschitz_with (real.to_nnreal K) f
.
A function f
is Lipschitz continuous with constant K ≥ 0
if for all x, y
we have dist (f x) (f y) ≤ K * dist x y
Equations
- lipschitz_with K f = ∀ (x y : α), has_edist.edist (f x) (f y) ≤ ↑K * has_edist.edist x y
Alias of the reverse direction of lipschitz_with_iff_dist_le_mul
.
Alias of the forward direction of lipschitz_with_iff_dist_le_mul
.
A function f
is Lipschitz continuous with constant K ≥ 0
on s
if for all x, y
in s
we have dist (f x) (f y) ≤ K * dist x y
Equations
- lipschitz_on_with K f s = ∀ ⦃x : α⦄, x ∈ s → ∀ ⦃y : α⦄, y ∈ s → has_edist.edist (f x) (f y) ≤ ↑K * has_edist.edist x y
Alias of the forward direction of lipschitz_on_with_iff_dist_le_mul
.
Alias of the reverse direction of lipschitz_on_with_iff_dist_le_mul
.
Alias of the forward direction of lipschitz_on_with_iff_restrict
.
Alias of the forward direction of maps_to.lipschitz_on_with_iff_restrict
.
A Lipschitz function is uniformly continuous
A Lipschitz function is continuous
The product of a list of Lipschitz continuous endomorphisms is a Lipschitz continuous endomorphism.
For functions to ℝ
, it suffices to prove f x ≤ f y + K * dist x y
; this version
doesn't assume 0≤K
.
For functions to ℝ
, it suffices to prove f x ≤ f y + K * dist x y
; this version
assumes 0≤K
.
A Lipschitz continuous map is a locally bounded map.
Equations
For functions to ℝ
, it suffices to prove f x ≤ f y + K * dist x y
; this version
doesn't assume 0≤K
.
For functions to ℝ
, it suffices to prove f x ≤ f y + K * dist x y
; this version
assumes 0≤K
.
Consider a function f : α × β → γ
. Suppose that it is continuous on each “vertical fiber”
{a} × t
, a ∈ s
, and is Lipschitz continuous on each “horizontal fiber” s × {b}
, b ∈ t
with the same Lipschitz constant K
. Then it is continuous on s × t
.
The actual statement uses (Lipschitz) continuity of λ y, f (a, y)
and λ x, f (x, b)
instead
of continuity of f
on subsets of the product space.
Consider a function f : α × β → γ
. Suppose that it is continuous on each “vertical section”
{a} × univ
, a : α
, and is Lipschitz continuous on each “horizontal section”
univ × {b}
, b : β
with the same Lipschitz constant K
. Then it is continuous.
The actual statement uses (Lipschitz) continuity of λ y, f (a, y)
and λ x, f (x, b)
instead
of continuity of f
on subsets of the product space.
If a function is locally Lipschitz around a point, then it is continuous at this point.
A function f : α → ℝ
which is K
-Lipschitz on a subset s
admits a K
-Lipschitz extension
to the whole space.
A function f : α → (ι → ℝ)
which is K
-Lipschitz on a subset s
admits a K
-Lipschitz
extension to the whole space.
TODO: state the same result (with the same proof) for the space ℓ^∞ (ι, ℝ)
over a possibly
infinite type ι
.