The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V17. Differential calculus in normed spaces

Mathlib.Analysis.ODE.Gronwall

16 declarations. Mathlib docs · Source

Grönwall's inequality

The main technical result of this file is the Grönwall-like inequality norm_le_gronwallBound_of_norm_deriv_right_le. It states that if f : ℝ → E satisfies ‖f a‖ ≤ δ and ∀ x ∈ [a, b), ‖f' x‖ ≤ K * ‖f x‖ + ε, then for all x ∈ [a, b] we have ‖f x‖ ≤ δ * exp (K * x) + (ε / K) * (exp (K * x) - 1).

Then we use this inequality to prove some estimates on the possible rate of growth of the distance between two approximate or exact solutions of an ordinary differential equation.

The proofs are based on [Hubbard and West, Differential Equations: A Dynamical Systems Approach, Sec. 4.5][HubbardWest-ode], where norm_le_gronwallBound_of_norm_deriv_right_le is called “Fundamental Inequality”.

TODO

  • Once we have FTC, prove an inequality for a function satisfying ‖f' x‖ ≤ K x * ‖f x‖ + ε, or more generally liminf_{y→x+0} (f y - f x)/(y - x) ≤ K x * f x + ε with any sign of K x and f x.

Technical lemmas about gronwallBound

Inequality and corollaries

def gronwallBound E1 #

ℝ → ℝ → ℝ → ℝ → ℝ

Upper bound used in several Grönwall-like inequalities.

theorem gronwallBound_K0 E1 #

∀ (δ ε : ℝ), gronwallBound δ 0 ε = fun x ↦ δ + ε * x

theorem gronwallBound_of_K_ne_0 E1 #

∀ {δ K ε : ℝ}, K ≠ 0 → gronwallBound δ K ε = fun x ↦ δ * Real.exp (K * x) + ε / K * (Real.exp (K * x) - 1)

theorem hasDerivAt_gronwallBound E1 #

∀ (δ K ε x : ℝ), HasDerivAt (gronwallBound δ K ε) (K * gronwallBound δ K ε x + ε) x

theorem hasDerivAt_gronwallBound_shift E1 #

∀ (δ K ε x a : ℝ), HasDerivAt (fun y ↦ gronwallBound δ K ε (y - a)) (K * gronwallBound δ K ε (x - a) + ε) x

theorem gronwallBound_x0 E1 #

∀ (δ K ε : ℝ), gronwallBound δ K ε 0 = δ

theorem gronwallBound_ε0 E1 #

∀ (δ K x : ℝ), gronwallBound δ K 0 x = δ * Real.exp (K * x)

theorem gronwallBound_ε0_δ0 E1 #

∀ (K x : ℝ), gronwallBound 0 K 0 x = 0

theorem gronwallBound_continuous_ε E1 #

∀ (δ K x : ℝ), Continuous fun ε ↦ gronwallBound δ K ε x

theorem gronwallBound_mono E1 #

∀ {δ K ε : ℝ}, 0 ≤ δ → 0 ≤ ε → 0 ≤ K → Monotone (gronwallBound δ K ε)

The Grönwall bound is monotone with respect to the time variable x.

theorem le_gronwallBound_of_liminf_deriv_right_le E1 #

∀ {f f' : ℝ → ℝ} {δ K ε a b : ℝ},
  ContinuousOn f (Set.Icc a b) →
    (∀ x ∈ Set.Ico a b, ∀ (r : ℝ), f' x < r → ∃ᶠ (z : ℝ) in nhdsWithin x (Set.Ioi x), (z - x)⁻¹ * (f z - f x) < r) →
      f a ≤ δ → (∀ x ∈ Set.Ico a b, f' x ≤ K * f x + ε) → ∀ x ∈ Set.Icc a b, f x ≤ gronwallBound δ K ε (x - a)

A Grönwall-like inequality: if f : ℝ → ℝ is continuous on [a, b] and satisfies the inequalities f a ≤ δ and ∀ x ∈ [a, b), liminf_{z→x+0} (f z - f x)/(z - x) ≤ K * (f x) + ε, then f x is bounded by gronwallBound δ K ε (x - a) on [a, b].

See also norm_le_gronwallBound_of_norm_deriv_right_le for a version bounding ‖f x‖, f : ℝ → E.

theorem norm_le_gronwallBound_of_norm_deriv_right_le E3 #

∀ {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] {f f' : ℝ → E} {δ K ε a b : ℝ},
  ContinuousOn f (Set.Icc a b) →
    (∀ x ∈ Set.Ico a b, HasDerivWithinAt f (f' x) (Set.Ici x) x) →
      ‖f a‖ ≤ δ → (∀ x ∈ Set.Ico a b, ‖f' x‖ ≤ K * ‖f x‖ + ε) → ∀ x ∈ Set.Icc a b, ‖f x‖ ≤ gronwallBound δ K ε (x - a)

A Grönwall-like inequality: if f : ℝ → E is continuous on [a, b], has right derivative f' x at every point x ∈ [a, b), and satisfies the inequalities ‖f a‖ ≤ δ, ∀ x ∈ [a, b), ‖f' x‖ ≤ K * ‖f x‖ + ε, then ‖f x‖ is bounded by gronwallBound δ K ε (x - a) on [a, b].

theorem dist_le_of_approx_trajectories_ODE_of_mem E2 #

∀ {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] {v : ℝ → E → E} {s : ℝ → Set E} {K : NNReal}
  {f g f' g' : ℝ → E} {a b εf εg δ : ℝ},
  (∀ t ∈ Set.Ico a b, LipschitzOnWith K (v t) (s t)) →
    ContinuousOn f (Set.Icc a b) →
      (∀ t ∈ Set.Ico a b, HasDerivWithinAt f (f' t) (Set.Ici t) t) →
        (∀ t ∈ Set.Ico a b, dist (f' t) (v t (f t)) ≤ εf) →
          (∀ t ∈ Set.Ico a b, f t ∈ s t) →
            ContinuousOn g (Set.Icc a b) →
              (∀ t ∈ Set.Ico a b, HasDerivWithinAt g (g' t) (Set.Ici t) t) →
                (∀ t ∈ Set.Ico a b, dist (g' t) (v t (g t)) ≤ εg) →
                  (∀ t ∈ Set.Ico a b, g t ∈ s t) →
                    dist (f a) (g a) ≤ δ → ∀ t ∈ Set.Icc a b, dist (f t) (g t) ≤ gronwallBound δ (↑K) (εf + εg) (t - a)

If f and g are two approximate solutions of the same ODE, then the distance between them can't grow faster than exponentially. This is a simple corollary of Grönwall's inequality, and some people call this Grönwall's inequality too.

This version assumes all inequalities to be true in some time-dependent set s t, and assumes that the solutions never leave this set.

theorem dist_le_of_approx_trajectories_ODE E2 #

∀ {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] {v : ℝ → E → E} {K : NNReal}
  {f g f' g' : ℝ → E} {a b εf εg δ : ℝ},
  (∀ (t : ℝ), LipschitzWith K (v t)) →
    ContinuousOn f (Set.Icc a b) →
      (∀ t ∈ Set.Ico a b, HasDerivWithinAt f (f' t) (Set.Ici t) t) →
        (∀ t ∈ Set.Ico a b, dist (f' t) (v t (f t)) ≤ εf) →
          ContinuousOn g (Set.Icc a b) →
            (∀ t ∈ Set.Ico a b, HasDerivWithinAt g (g' t) (Set.Ici t) t) →
              (∀ t ∈ Set.Ico a b, dist (g' t) (v t (g t)) ≤ εg) →
                dist (f a) (g a) ≤ δ → ∀ t ∈ Set.Icc a b, dist (f t) (g t) ≤ gronwallBound δ (↑K) (εf + εg) (t - a)

If f and g are two approximate solutions of the same ODE, then the distance between them can't grow faster than exponentially. This is a simple corollary of Grönwall's inequality, and some people call this Grönwall's inequality too.

This version assumes all inequalities to be true in the whole space.

theorem dist_le_of_trajectories_ODE_of_mem E2 #

∀ {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] {v : ℝ → E → E} {s : ℝ → Set E} {K : NNReal}
  {f g : ℝ → E} {a b δ : ℝ},
  (∀ t ∈ Set.Ico a b, LipschitzOnWith K (v t) (s t)) →
    ContinuousOn f (Set.Icc a b) →
      (∀ t ∈ Set.Ico a b, HasDerivWithinAt f (v t (f t)) (Set.Ici t) t) →
        (∀ t ∈ Set.Ico a b, f t ∈ s t) →
          ContinuousOn g (Set.Icc a b) →
            (∀ t ∈ Set.Ico a b, HasDerivWithinAt g (v t (g t)) (Set.Ici t) t) →
              (∀ t ∈ Set.Ico a b, g t ∈ s t) →
                dist (f a) (g a) ≤ δ → ∀ t ∈ Set.Icc a b, dist (f t) (g t) ≤ δ * Real.exp (↑K * (t - a))

If f and g are two exact solutions of the same ODE, then the distance between them can't grow faster than exponentially. This is a simple corollary of Grönwall's inequality, and some people call this Grönwall's inequality too.

This version assumes all inequalities to be true in some time-dependent set s t, and assumes that the solutions never leave this set.

theorem dist_le_of_trajectories_ODE E2 #

∀ {E : Type u_1} [inst : NormedAddCommGroup E] [inst_1 : NormedSpace ℝ E] {v : ℝ → E → E} {K : NNReal} {f g : ℝ → E}
  {a b δ : ℝ},
  (∀ (t : ℝ), LipschitzWith K (v t)) →
    ContinuousOn f (Set.Icc a b) →
      (∀ t ∈ Set.Ico a b, HasDerivWithinAt f (v t (f t)) (Set.Ici t) t) →
        ContinuousOn g (Set.Icc a b) →
          (∀ t ∈ Set.Ico a b, HasDerivWithinAt g (v t (g t)) (Set.Ici t) t) →
            dist (f a) (g a) ≤ δ → ∀ t ∈ Set.Icc a b, dist (f t) (g t) ≤ δ * Real.exp (↑K * (t - a))

If f and g are two exact solutions of the same ODE, then the distance between them can't grow faster than exponentially. This is a simple corollary of Grönwall's inequality, and some people call this Grönwall's inequality too.

This version assumes all inequalities to be true in the whole space.