mathlib documentation

analysis.calculus.fderiv_measurable

Derivative is measurable #

In this file we prove that the derivative of any function with complete codomain is a measurable function. Namely, we prove:

We also show the same results for the right derivative on the real line (see measurable_deriv_within_Ici and ``measurable_deriv_within_Ioi`), following the same proof strategy.

Implementation #

We give a proof that avoids second-countability issues, by expressing the differentiability set as a function of open sets in the following way. Define A (L, r, Ρ) to be the set of points where, on a ball of radius roughly r around x, the function is uniformly approximated by the linear map L, up to Ρ r. It is an open set. Let also B (L, r, s, Ρ) = A (L, r, Ρ) ∩ A (L, s, Ρ): we require that at two possibly different scales r and s, the function is well approximated by the linear map L. It is also open.

We claim that the differentiability set of f is exactly D = β‹‚ Ξ΅ > 0, ⋃ Ξ΄ > 0, β‹‚ r, s < Ξ΄, ⋃ L, B (L, r, s, Ξ΅). In other words, for any Ξ΅ > 0, we require that there is a size Ξ΄ such that, for any two scales below this size, the function is well approximated by a linear map, common to the two scales.

The set ⋃ L, B (L, r, s, Ξ΅) is open, as a union of open sets. Converting the intersections and unions to countable ones (using real numbers of the form 2 ^ (-n)), it follows that the differentiability set is measurable.

To prove the claim, there are two inclusions. One is trivial: if the function is differentiable at x, then x belongs to D (just take L to be the derivative, and use that the differentiability exactly says that the map is well approximated by L). This is proved in mem_A_of_differentiable and differentiable_set_subset_D.

For the other direction, the difficulty is that L in the union may depend on Ξ΅, r, s. The key point is that, in fact, it doesn't depend too much on them. First, if x belongs both to A (L, r, Ξ΅) and A (L', r, Ξ΅), then L and L' have to be close on a shell, and thus β€–L - L'β€– is bounded by Ξ΅ (see norm_sub_le_of_mem_A). Assume now x ∈ D. If one has two maps L and L' such that x belongs to A (L, r, Ξ΅) and to A (L', r', Ξ΅'), one deduces that L is close to L' by arguing as follows. Consider another scale s smaller than r and r'. Take a linear map L₁ that approximates f around x both at scales r and s w.r.t. Ξ΅ (it exists as x belongs to D). Take also Lβ‚‚ that approximates f around x both at scales r' and s w.r.t. Ξ΅'. Then L₁ is close to L (as they are close on a shell of radius r), and Lβ‚‚ is close to L₁ (as they are close on a shell of radius s), and L' is close to Lβ‚‚ (as they are close on a shell of radius r'). It follows that L is close to L', as we claimed.

It follows that the different approximating linear maps that show up form a Cauchy sequence when Ξ΅ tends to 0. When the target space is complete, this sequence converges, to a limit f'. With the same kind of arguments, one checks that f is differentiable with derivative f'.

To show that the derivative itself is measurable, add in the definition of B and D a set K of continuous linear maps to which L should belong. Then, when K is complete, the set D K is exactly the set of points where f is differentiable with a derivative in K.

Tags #

derivative, measurable function, Borel Οƒ-algebra

def fderiv_measurable_aux.A {π•œ : Type u_1} [nontrivially_normed_field π•œ] {E : Type u_2} [normed_add_comm_group E] [normed_space π•œ E] {F : Type u_3} [normed_add_comm_group F] [normed_space π•œ F] (f : E β†’ F) (L : E β†’L[π•œ] F) (r Ξ΅ : ℝ) :
set E

The set A f L r Ξ΅ is the set of points x around which the function f is well approximated at scale r by the linear map L, up to an error Ξ΅. We tweak the definition to make sure that this is an open set.

Equations
def fderiv_measurable_aux.B {π•œ : Type u_1} [nontrivially_normed_field π•œ] {E : Type u_2} [normed_add_comm_group E] [normed_space π•œ E] {F : Type u_3} [normed_add_comm_group F] [normed_space π•œ F] (f : E β†’ F) (K : set (E β†’L[π•œ] F)) (r s Ξ΅ : ℝ) :
set E

The set B f K r s Ξ΅ is the set of points x around which there exists a continuous linear map L belonging to K (a given set of continuous linear maps) that approximates well the function f (up to an error Ξ΅), simultaneously at scales r and s.

Equations
def fderiv_measurable_aux.D {π•œ : Type u_1} [nontrivially_normed_field π•œ] {E : Type u_2} [normed_add_comm_group E] [normed_space π•œ E] {F : Type u_3} [normed_add_comm_group F] [normed_space π•œ F] (f : E β†’ F) (K : set (E β†’L[π•œ] F)) :
set E

The set D f K is a complicated set constructed using countable intersections and unions. Its main use is that, when K is complete, it is exactly the set of points where f is differentiable, with a derivative in K.

Equations
theorem fderiv_measurable_aux.is_open_A {π•œ : Type u_1} [nontrivially_normed_field π•œ] {E : Type u_2} [normed_add_comm_group E] [normed_space π•œ E] {F : Type u_3} [normed_add_comm_group F] [normed_space π•œ F] {f : E β†’ F} (L : E β†’L[π•œ] F) (r Ξ΅ : ℝ) :
theorem fderiv_measurable_aux.is_open_B {π•œ : Type u_1} [nontrivially_normed_field π•œ] {E : Type u_2} [normed_add_comm_group E] [normed_space π•œ E] {F : Type u_3} [normed_add_comm_group F] [normed_space π•œ F] {f : E β†’ F} {K : set (E β†’L[π•œ] F)} {r s Ξ΅ : ℝ} :
theorem fderiv_measurable_aux.A_mono {π•œ : Type u_1} [nontrivially_normed_field π•œ] {E : Type u_2} [normed_add_comm_group E] [normed_space π•œ E] {F : Type u_3} [normed_add_comm_group F] [normed_space π•œ F] {f : E β†’ F} (L : E β†’L[π•œ] F) (r : ℝ) {Ξ΅ Ξ΄ : ℝ} (h : Ξ΅ ≀ Ξ΄) :
theorem fderiv_measurable_aux.le_of_mem_A {π•œ : Type u_1} [nontrivially_normed_field π•œ] {E : Type u_2} [normed_add_comm_group E] [normed_space π•œ E] {F : Type u_3} [normed_add_comm_group F] [normed_space π•œ F] {f : E β†’ F} {r Ξ΅ : ℝ} {L : E β†’L[π•œ] F} {x : E} (hx : x ∈ fderiv_measurable_aux.A f L r Ξ΅) {y z : E} (hy : y ∈ metric.closed_ball x (r / 2)) (hz : z ∈ metric.closed_ball x (r / 2)) :
β€–f z - f y - ⇑L (z - y)β€– ≀ Ξ΅ * r
theorem fderiv_measurable_aux.mem_A_of_differentiable {π•œ : Type u_1} [nontrivially_normed_field π•œ] {E : Type u_2} [normed_add_comm_group E] [normed_space π•œ E] {F : Type u_3} [normed_add_comm_group F] [normed_space π•œ F] {f : E β†’ F} {Ξ΅ : ℝ} (hΞ΅ : 0 < Ξ΅) {x : E} (hx : differentiable_at π•œ f x) :
βˆƒ (R : ℝ) (H : R > 0), βˆ€ (r : ℝ), r ∈ set.Ioo 0 R β†’ x ∈ fderiv_measurable_aux.A f (fderiv π•œ f x) r Ξ΅
theorem fderiv_measurable_aux.norm_sub_le_of_mem_A {π•œ : Type u_1} [nontrivially_normed_field π•œ] {E : Type u_2} [normed_add_comm_group E] [normed_space π•œ E] {F : Type u_3} [normed_add_comm_group F] [normed_space π•œ F] {f : E β†’ F} {c : π•œ} (hc : 1 < β€–cβ€–) {r Ξ΅ : ℝ} (hΞ΅ : 0 < Ξ΅) (hr : 0 < r) {x : E} {L₁ Lβ‚‚ : E β†’L[π•œ] F} (h₁ : x ∈ fderiv_measurable_aux.A f L₁ r Ξ΅) (hβ‚‚ : x ∈ fderiv_measurable_aux.A f Lβ‚‚ r Ξ΅) :
β€–L₁ - Lβ‚‚β€– ≀ 4 * β€–cβ€– * Ξ΅
theorem fderiv_measurable_aux.differentiable_set_subset_D {π•œ : Type u_1} [nontrivially_normed_field π•œ] {E : Type u_2} [normed_add_comm_group E] [normed_space π•œ E] {F : Type u_3} [normed_add_comm_group F] [normed_space π•œ F] {f : E β†’ F} (K : set (E β†’L[π•œ] F)) :
{x : E | differentiable_at π•œ f x ∧ fderiv π•œ f x ∈ K} βŠ† fderiv_measurable_aux.D f K

Easy inclusion: a differentiability point with derivative in K belongs to D f K.

theorem fderiv_measurable_aux.D_subset_differentiable_set {π•œ : Type u_1} [nontrivially_normed_field π•œ] {E : Type u_2} [normed_add_comm_group E] [normed_space π•œ E] {F : Type u_3} [normed_add_comm_group F] [normed_space π•œ F] {f : E β†’ F} {K : set (E β†’L[π•œ] F)} (hK : is_complete K) :
fderiv_measurable_aux.D f K βŠ† {x : E | differentiable_at π•œ f x ∧ fderiv π•œ f x ∈ K}

Harder inclusion: at a point in D f K, the function f has a derivative, in K.

theorem fderiv_measurable_aux.differentiable_set_eq_D {π•œ : Type u_1} [nontrivially_normed_field π•œ] {E : Type u_2} [normed_add_comm_group E] [normed_space π•œ E] {F : Type u_3} [normed_add_comm_group F] [normed_space π•œ F] {f : E β†’ F} (K : set (E β†’L[π•œ] F)) (hK : is_complete K) :
{x : E | differentiable_at π•œ f x ∧ fderiv π•œ f x ∈ K} = fderiv_measurable_aux.D f K
theorem measurable_set_of_differentiable_at_of_is_complete (π•œ : Type u_1) [nontrivially_normed_field π•œ] {E : Type u_2} [normed_add_comm_group E] [normed_space π•œ E] {F : Type u_3} [normed_add_comm_group F] [normed_space π•œ F] (f : E β†’ F) [measurable_space E] [opens_measurable_space E] {K : set (E β†’L[π•œ] F)} (hK : is_complete K) :
measurable_set {x : E | differentiable_at π•œ f x ∧ fderiv π•œ f x ∈ K}

The set of differentiability points of a function, with derivative in a given complete set, is Borel-measurable.

theorem measurable_set_of_differentiable_at (π•œ : Type u_1) [nontrivially_normed_field π•œ] {E : Type u_2} [normed_add_comm_group E] [normed_space π•œ E] {F : Type u_3} [normed_add_comm_group F] [normed_space π•œ F] (f : E β†’ F) [measurable_space E] [opens_measurable_space E] [complete_space F] :
measurable_set {x : E | differentiable_at π•œ f x}

The set of differentiability points of a function taking values in a complete space is Borel-measurable.

@[measurability]
theorem measurable_fderiv (π•œ : Type u_1) [nontrivially_normed_field π•œ] {E : Type u_2} [normed_add_comm_group E] [normed_space π•œ E] {F : Type u_3} [normed_add_comm_group F] [normed_space π•œ F] (f : E β†’ F) [measurable_space E] [opens_measurable_space E] [complete_space F] :
measurable (fderiv π•œ f)
@[measurability]
theorem measurable_fderiv_apply_const (π•œ : Type u_1) [nontrivially_normed_field π•œ] {E : Type u_2} [normed_add_comm_group E] [normed_space π•œ E] {F : Type u_3} [normed_add_comm_group F] [normed_space π•œ F] (f : E β†’ F) [measurable_space E] [opens_measurable_space E] [complete_space F] [measurable_space F] [borel_space F] (y : E) :
measurable (Ξ» (x : E), ⇑(fderiv π•œ f x) y)
@[measurability]
theorem measurable_deriv {π•œ : Type u_1} [nontrivially_normed_field π•œ] {F : Type u_3} [normed_add_comm_group F] [normed_space π•œ F] [complete_space F] [measurable_space π•œ] [opens_measurable_space π•œ] [measurable_space F] [borel_space F] (f : π•œ β†’ F) :
theorem ae_measurable_deriv {π•œ : Type u_1} [nontrivially_normed_field π•œ] {F : Type u_3} [normed_add_comm_group F] [normed_space π•œ F] [complete_space F] [measurable_space π•œ] [opens_measurable_space π•œ] [measurable_space F] [borel_space F] (f : π•œ β†’ F) (ΞΌ : measure_theory.measure π•œ) :

The set A f L r Ξ΅ is the set of points x around which the function f is well approximated at scale r by the linear map h ↦ h β€’ L, up to an error Ξ΅. We tweak the definition to make sure that this is open on the right.

Equations

The set B f K r s Ξ΅ is the set of points x around which there exists a vector L belonging to K (a given set of vectors) such that h β€’ L approximates well f (x + h) (up to an error Ξ΅), simultaneously at scales r and s.

Equations

The set D f K is a complicated set constructed using countable intersections and unions. Its main use is that, when K is complete, it is exactly the set of points where f is differentiable, with a derivative in K.

Equations
theorem right_deriv_measurable_aux.A_mono {F : Type u_1} [normed_add_comm_group F] [normed_space ℝ F] {f : ℝ β†’ F} (L : F) (r : ℝ) {Ξ΅ Ξ΄ : ℝ} (h : Ξ΅ ≀ Ξ΄) :
theorem right_deriv_measurable_aux.le_of_mem_A {F : Type u_1} [normed_add_comm_group F] [normed_space ℝ F] {f : ℝ β†’ F} {r Ξ΅ : ℝ} {L : F} {x : ℝ} (hx : x ∈ right_deriv_measurable_aux.A f L r Ξ΅) {y z : ℝ} (hy : y ∈ set.Icc x (x + r / 2)) (hz : z ∈ set.Icc x (x + r / 2)) :
β€–f z - f y - (z - y) β€’ Lβ€– ≀ Ξ΅ * r
theorem right_deriv_measurable_aux.norm_sub_le_of_mem_A {F : Type u_1} [normed_add_comm_group F] [normed_space ℝ F] {f : ℝ β†’ F} {r x : ℝ} (hr : 0 < r) (Ξ΅ : ℝ) {L₁ Lβ‚‚ : F} (h₁ : x ∈ right_deriv_measurable_aux.A f L₁ r Ξ΅) (hβ‚‚ : x ∈ right_deriv_measurable_aux.A f Lβ‚‚ r Ξ΅) :
β€–L₁ - Lβ‚‚β€– ≀ 4 * Ξ΅

Easy inclusion: a differentiability point with derivative in K belongs to D f K.

Harder inclusion: at a point in D f K, the function f has a derivative, in K.

The set of right differentiability points of a function, with derivative in a given complete set, is Borel-measurable.

The set of right differentiability points of a function taking values in a complete space is Borel-measurable.

The set of right differentiability points of a function taking values in a complete space is Borel-measurable.