Documentation

LeanForControl.ODEs.ComparisonLemma

ODEs.ComparisonLemma #

Comparison Lemma 3.4 for scalar ODEs: if u is an exact solution of u̇ = f(t, u) with u(t₀) = u₀, and v is continuous with upper Dini derivative satisfying D⁺v(t) ≤ f(t, v(t)) and v(t₀) ≤ u₀, then v(t) ≤ u(t) for all t ∈ [t₀, t₁].

Proof strategy (Appendix C.2) #

Main declarations #

Integral solution helper #

theorem isIntegralSolution_of_hasDerivAt {f : } {u : } {t₀ t₁ u₀ : } (hu_deriv : tSet.Ioo t₀ t₁, HasDerivAt u (f t (u t)) t) (hu_cont : ContinuousOn u (Set.Icc t₀ t₁)) (hf_cont : Continuous fun (p : × ) => f p.1 p.2) (hu₀ : u t₀ = u₀) :
IsIntegralSolution t₀ t₁ u u₀ f

Converts a classical (pointwise) ODE solution into an integral solution.

If u has derivative f(t, u(t)) at every interior point of [t₀, t₁], is continuous on [t₀, t₁], and satisfies u(t₀) = u₀, then u is an integral solution in the sense of IsIntegralSolution.

Comparison Lemma 3.4 #

theorem comparison_lemma {f : } {u v : } {t₀ t₁ u₀ L : } (ht : t₀ < t₁) (hL : 0 < L) (hf_cont : Continuous fun (p : × ) => f p.1 p.2) (hLip : tSet.Icc t₀ t₁, LipschitzWith L, (f t)) (hu_deriv : tSet.Ioo t₀ t₁, HasDerivAt u (f t (u t)) t) (hu_cont : ContinuousOn u (Set.Icc t₀ t₁)) (hu₀ : u t₀ = u₀) (hv_cont : Continuous v) (hDv : tSet.Ico t₀ t₁, D⁺ v t f t (v t)) (hv_bdd : tSet.Ico t₀ t₁, Filter.IsBoundedUnder (fun (x1 x2 : ) => x1 x2) (nhdsWithin 0 (Set.Ioi 0)) fun (h : ) => (v (t + h) - v t) / h) (hv₀ : v t₀ u₀) (hz_exists : ∀ (lam : ), 0 < lam∃ (z : ), (IsIntegralSolution t₀ t₁ z u₀ fun (s x : ) => f s x + lam) ContinuousOn z (Set.Icc t₀ t₁) sSet.Ico t₀ t₁, HasDerivWithinAt z (f s (z s) + lam) (Set.Ici s) s) (t : ) :
t Set.Icc t₀ t₁v t u t

Comparison Lemma 3.4. If u solves u̇ = f(t, u) with u(t₀) = u₀, and v is continuous with D⁺v(t) ≤ f(t, v(t)) and v(t₀) ≤ u₀, then v(t) ≤ u(t) on [t₀, t₁].

Hypotheses:

  • f is jointly continuous and globally Lipschitz in the state variable on [t₀, t₁].
  • u solves the ODE classically (pointwise derivative).
  • v satisfies the Dini subsolution inequality and has bounded difference quotients.
  • For each λ > 0, a perturbed solution z_λ of ż = f(t, z) + λ exists on [t₀, t₁] (the existence hypothesis hz_exists).

The proof uses comparison_claim_1 to get v ≤ z_λ, then continuous_dependence_parameters (Theorem 3.5) to bound ‖u - z_λ‖ ≤ ε/2, and concludes v(t) < u(t) + ε for all ε > 0.