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 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, and that locally Lipschitz functions are continuous.
Main definitions and lemmas #
LipschitzWith K f
: states thatf
is Lipschitz with constantK : ℝ≥0
LipschitzOnWith K f s
: states thatf
is Lipschitz with constantK : ℝ≥0
on a sets
LipschitzWith.uniformContinuous
: a Lipschitz function is uniformly continuousLipschitzOnWith.uniformContinuousOn
: a function which is Lipschitz on a sets
is uniformly continuous ons
.LocallyLipschitz f
: states thatf
is locally LipschitzLocallyLipschitz.continuous
: a locally Lipschitz function is continuous.
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
.
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
.
Instances For
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
Instances For
f : α → β
is called locally Lipschitz continuous iff every point x
has a neighourhood on which f
is Lipschitz.
Equations
- LocallyLipschitz f = ∀ (x : α), ∃ (K : NNReal), ∃ t ∈ nhds x, LipschitzOnWith K f t
Instances For
Every function is Lipschitz on the empty set (with any Lipschitz constant).
Being Lipschitz on a set is monotone w.r.t. that set.
f
is Lipschitz iff it is Lipschitz on the entire space.
Alias of the forward direction of lipschitzOnWith_iff_restrict
.
Alias of the forward direction of MapsTo.lipschitzOnWith_iff_restrict
.
A Lipschitz function is uniformly continuous.
A Lipschitz function is continuous.
Constant functions are Lipschitz (with any constant).
The identity is 1-Lipschitz.
The inclusion of a subset is 1-Lipschitz.
The restriction of a K
-Lipschitz function is K
-Lipschitz.
The composition of Lipschitz functions is Lipschitz.
If f
and g
are Lipschitz functions, so is the induced map f × g
to the product type.
Iterates of a Lipschitz function are Lipschitz.
The product of a list of Lipschitz continuous endomorphisms is a Lipschitz continuous endomorphism.
If f
and g
are Lipschitz on s
, so is the induced map f × g
to the product type.
A Lipschitz function is locally Lipschitz.
The identity function is locally Lipschitz.
Constant functions are locally Lipschitz.
A locally Lipschitz function is continuous. (The converse is false: for example, $x ↦ \sqrt{x}$ is continuous, but not locally Lipschitz at 0.)
The composition of locally Lipschitz functions is locally Lipschitz. -
If f
and g
are locally Lipschitz, so is the induced map f × g
to the product type.
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
. Moreover, it suffices
to require continuity on vertical fibers for a
from a subset s' ⊆ s
that is dense in s
.
The actual statement uses (Lipschitz) continuity of fun y ↦ f (a, y)
and fun 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 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 fun y ↦ f (a, y)
and fun 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
for a : α
from a dense set. Suppose that it 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 fun y ↦ f (a, y)
and fun 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 fun y ↦ f (a, y)
and fun x ↦ f (x, b)
instead of continuity of f
on subsets of the product space.