math / data /lean /OAI /Probability /SKBarriers /Interpolation /AdaptiveODEExistence.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
2.46 kB
import Mathlib
import OAI.Probability.SKBarriers.Interpolation.AdaptiveODERegular
namespace OAI
section
section
noncomputable section
open scoped BigOperators NNReal
open Set Metric
namespace SK.Analytic
theorem exists_floored_adaptive_path {k : β„•}
(R : (ℝ Γ— (Fin (k+1) β†’ ℝ)) β†’ (Fin (k+1) β†’ ℝ)) (hR : ContDiff ℝ 1 R)
(hRb : βˆ€ p j, R p j ∈ Icc (0:ℝ) 1)
(Ξ΅ : ℝ) (hΞ΅ : 0 < Ξ΅) (qβ‚€ : Fin (k+1) β†’ ℝ) :
βˆƒ q : ℝ β†’ (Fin (k+1) β†’ ℝ), q 0 = qβ‚€ ∧
βˆ€ t ∈ Icc (0:ℝ) 1, HasDerivWithinAt q
(R (Real.sqrt (1-t),positiveGapScales k Ξ΅ (q t))) (Icc (0:ℝ) 1) t := by
let G := fun p : ℝ Γ— (Fin (k+1) β†’ ℝ) => R (p.1,positiveGapScales k Ξ΅ p.2)
have hG : LocallyLipschitz G := regular_positiveGapScales R hR Ξ΅ hΞ΅
obtain ⟨K,hK⟩ := LocallyLipschitzOn.exists_lipschitzOnWith_of_compact
(isCompact_Icc.prod (isCompact_closedBall qβ‚€ 1)) hG.locallyLipschitzOn
have hs (t : ℝ) (ht : t ∈ Icc (0:ℝ) 1) : Real.sqrt (1-t) ∈ Icc (0:ℝ) 1 := by
refine ⟨Real.sqrt_nonneg _,?_⟩
apply Real.sqrt_le_one.mpr
linarith [ht.1]
let F := fun t q => G (Real.sqrt (1-t),q)
have hf : IsPicardLindelof F (⟨0,by norm_num⟩ : Icc (0:ℝ) 1) qβ‚€ 1 0 1 K := by
constructor
Β· intro t ht
apply LipschitzOnWith.of_dist_le_mul
intro x hx y hy
simpa only [F,Prod.dist_eq,dist_self,max_eq_right dist_nonneg] using
hK.dist_le_mul (Real.sqrt (1-t),x) ⟨hs t ht,hx⟩
(Real.sqrt (1-t),y) ⟨hs t ht,hy⟩
Β· intro x _
exact (hG.continuous.comp ((Real.continuous_sqrt.comp
(continuous_const.sub continuous_id)).prodMk continuous_const)).continuousOn
Β· intro t _ x _
apply (pi_norm_le_iff_of_nonneg (by norm_num : (0:ℝ) ≀ 1)).mpr
intro j
rw [Real.norm_eq_abs,abs_of_nonneg (hRb _ j).1]
exact (hRb _ j).2
Β· norm_num
exact hf.exists_eq_forall_mem_Icc_hasDerivWithinAtβ‚€
theorem monotoneOn_unit_of_deriv_nonneg {f g : ℝ β†’ ℝ}
(hf : βˆ€ t ∈ Icc (0:ℝ) 1, HasDerivWithinAt f (g t) (Icc (0:ℝ) 1) t)
(hg : βˆ€ t ∈ Icc (0:ℝ) 1, 0 ≀ g t) : MonotoneOn f (Icc (0:ℝ) 1) := by
apply monotoneOn_of_hasDerivWithinAt_nonneg (convex_Icc 0 1)
(fun t ht => (hf t ht).continuousWithinAt)
Β· intro t ht
exact (hf t (interior_subset ht)).mono interior_subset
Β· intro t ht
exact hg t (interior_subset ht)
end SK.Analytic
end
end
end
end OAI