Functions of bounded variation #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
We study functions of bounded variation. In particular, we show that a bounded variation function is a difference of monotone functions, and differentiable almost everywhere. This implies that Lipschitz functions from the real line into finite-dimensional vector space are also differentiable almost everywhere.
Main definitions and results #
-
evariation_on f s
is the total variation of the functionf
on the sets
, inℝ≥0∞
. -
has_bounded_variation_on f s
registers that the variation off
ons
is finite. -
has_locally_bounded_variation f s
registers thatf
has finite variation on any compact subinterval ofs
. -
variation_on_from_to f s a b
is the signed variation off
ons ∩ Icc a b
, converted toℝ
. -
evariation_on.Icc_add_Icc
states that the variation off
on[a, c]
is the sum of its variations on[a, b]
and[b, c]
. -
has_locally_bounded_variation_on.exists_monotone_on_sub_monotone_on
proves that a function with locally bounded variation is the difference of two monotone functions. -
lipschitz_with.has_locally_bounded_variation_on
shows that a Lipschitz function has locally bounded variation. -
has_locally_bounded_variation_on.ae_differentiable_within_at
shows that a bounded variation function into a finite dimensional real vector space is differentiable almost everywhere. -
lipschitz_on_with.ae_differentiable_within_at
is the same result for Lipschitz functions.
We also give several variations around these results.
Implementation #
We define the variation as an extended nonnegative real, to allow for infinite variation. This makes
it possible to use the complete linear order structure of ℝ≥0∞
. The proofs would be much
more tedious with an ℝ
-valued or ℝ≥0
-valued variation, since one would always need to check
that the sets one uses are nonempty and bounded above as these are only conditionally complete.
The (extended real valued) variation of a function f
on a set s
inside a linear order is
the supremum of the sum of edist (f (u (i+1))) (f (u i))
over all finite increasing
sequences u
in s
.
A function has bounded variation on a set s
if its total variation there is finite.
Equations
- has_bounded_variation_on f s = (evariation_on f s ≠ ⊤)
A function has locally bounded variation on a set s
if, given any interval [a, b]
with
endpoints in s
, then the function has finite variation on s ∩ [a, b]
.
Equations
- has_locally_bounded_variation_on f s = ∀ (a b : α), a ∈ s → b ∈ s → has_bounded_variation_on f (s ∩ set.Icc a b)
Basic computations of variation #
The map λ f, evariation_on f s
is lower semicontinuous for pointwise convergence on s
.
Pointwise convergence on s
is encoded here as uniform convergence on the family consisting of the
singletons of elements of s
.
The map λ f, evariation_on f s
is lower semicontinuous for uniform convergence on s
.
Consider a monotone function u
parameterizing some points of a set s
. Given x ∈ s
, then
one can find another monotone function v
parameterizing the same points as u
, with x
added.
In particular, the variation of a function along u
is bounded by its variation along v
.
The variation of a function on the union of two sets s
and t
, with s
to the left of t
,
bounds the sum of the variations along s
and t
.
If a set s
is to the left of a set t
, and both contain the boundary point x
, then
the variation of f
along s ∪ t
is the sum of the variations.
Monotone functions and bounded variation #
The signed variation of f
on the interval Icc a b
intersected with the set s
,
squashed to a real (therefore only really meaningful if the variation is finite)
Equations
- variation_on_from_to f s a b = ite (a ≤ b) (evariation_on f (s ∩ set.Icc a b)).to_real (-(evariation_on f (s ∩ set.Icc b a)).to_real)
If a real valued function has bounded variation on a set, then it is a difference of monotone functions there.
Lipschitz functions and bounded variation #
Almost everywhere differentiability of functions with locally bounded variation #
A bounded variation function into ℝ
is differentiable almost everywhere. Superseded by
ae_differentiable_within_at_of_mem
.
A bounded variation function into a finite dimensional product vector space is differentiable
almost everywhere. Superseded by ae_differentiable_within_at_of_mem
.
A real function into a finite dimensional real vector space with bounded variation on a set is differentiable almost everywhere in this set.
A real function into a finite dimensional real vector space with bounded variation on a set is differentiable almost everywhere in this set.
A real function into a finite dimensional real vector space with bounded variation is differentiable almost everywhere.
A real function into a finite dimensional real vector space which is Lipschitz on a set is differentiable almost everywhere in this set .
A real function into a finite dimensional real vector space which is Lipschitz on a set is differentiable almost everywhere in this set.
A real Lipschitz function into a finite dimensional real vector space is differentiable almost everywhere.