File size: 4,733 Bytes
4a56cd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | import Mathlib.Topology.ContinuousMap.Compact
import Mathlib.MeasureTheory.Integral.IntervalIntegral.FundThmCalculus
import Mathlib.Analysis.Calculus.ContDiff.Deriv
import Mathlib.Tactic.Abel
namespace OAI
noncomputable section
open Set MeasureTheory
open scoped Topology Interval ContDiff
namespace SmoothLocal.ODE
variable {X E : Type*} [TopologicalSpace X] [CompactSpace X]
[NormedAddCommGroup E] [NormedSpace β E] [CompleteSpace E]
theorem hasDerivAt_continuousMap_of_eval
{a b : β} {F P : β β C(X, E)}
(hP : ContinuousOn P (Ioo a b))
(hpoint : β t β Ioo a b, β x : X,
HasDerivAt (fun s => F s x) (P t x) t)
{t : β} (ht : t β Ioo a b) : HasDerivAt F (P t) t := by
have hmeas : StronglyMeasurableAtFilter P (π t) volume :=
ContinuousOn.stronglyMeasurableAtFilter isOpen_Ioo hP t ht
have hprim : HasDerivAt (fun y => F t + β« s in t..y, P s) (P t) t :=
(intervalIntegral.integral_hasDerivAt_right
(IntervalIntegrable.refl : IntervalIntegrable P volume t t)
hmeas (hP.continuousAt (Ioo_mem_nhds ht.1 ht.2))).const_add (F t)
have heq : F =αΆ [π t] (fun y => F t + β« s in t..y, P s) := by
apply Filter.mem_of_superset (Ioo_mem_nhds ht.1 ht.2)
intro y hy
have hseg : uIcc t y β Ioo a b := by
intro s hs
exact β¨lt_of_lt_of_le (lt_min ht.1 hy.1) hs.1,
lt_of_le_of_lt hs.2 (max_lt ht.2 hy.2)β©
have hPI : IntervalIntegrable P volume t y := (hP.mono hseg).intervalIntegrable
apply ContinuousMap.ext
intro x
have hPIx : IntervalIntegrable (fun s => P s x) volume t y :=
((ContinuousMap.evalCLM β x).continuous.comp_continuousOn
(hP.mono hseg)).intervalIntegrable
have hscalar : (β« s in t..y, P s x) = F y x - F t x :=
intervalIntegral.integral_eq_sub_of_hasDerivAt
(fun s hs => hpoint s (hseg hs) x) hPIx
change F y x = F t x + (ContinuousMap.evalCLM β x) (β« s in t..y, P s)
rw [β (ContinuousMap.evalCLM β x).intervalIntegral_comp_comm hPI]
change F y x = F t x + β« s in t..y, P s x
rw [hscalar]
abel
exact hprim.congr_of_eventuallyEq heq
theorem continuousMap_smooth_of_eval_derivative_sequence
{a b : β} (F : β β β β C(X, E))
(hcont : β n, ContinuousOn (F n) (Ioo a b))
(hpoint : β n t, t β Ioo a b β β x : X,
HasDerivAt (fun s => F n s x) (F (n + 1) t x) t) :
β n, ContDiffOn β β (F n) (Ioo a b) := by
have hd (n : β) (t : β) (ht : t β Ioo a b) :
HasDerivAt (F n) (F (n + 1) t) t :=
hasDerivAt_continuousMap_of_eval (hcont (n + 1)) (hpoint n) ht
have hnat : β m : β, β n : β, ContDiffOn β m (F n) (Ioo a b) := by
intro m
induction m with
| zero =>
intro n
simpa only [Nat.cast_zero, contDiffOn_zero] using hcont n
| succ m hm =>
intro n
have hnext : ContDiffOn β ((m : ββΟ) + 1) (F n) (Ioo a b) := by
rw [contDiffOn_succ_iff_deriv_of_isOpen isOpen_Ioo]
refine β¨fun t ht => (hd n t ht).differentiableAt.differentiableWithinAt,
by simp, ?_β©
exact (hm (n + 1)).congr (fun t ht => (hd n t ht).deriv)
simpa only [Nat.cast_add, Nat.cast_one] using hnext
intro n
exact contDiffOn_infty.mpr (fun m => hnat m n)
theorem smooth_curry_of_joint_derivative_sequence
{a b : β} (H : β β β β X β E)
(hjoint : β n, ContinuousOn (Function.uncurry (H n))
((Ioo a b) ΓΛ’ (Set.univ : Set X)))
(hpoint : β n t, t β Ioo a b β β x : X,
HasDerivAt (fun s => H n s x) (H (n + 1) t x) t) :
β n, ContDiffOn β β (fun t => ContinuousMap.mkD (H n t) 0) (Ioo a b) := by
let F : β β β β C(X, E) := fun n t => ContinuousMap.mkD (H n t) 0
have hslice (n : β) (t : β) (ht : t β Ioo a b) : Continuous (H n t) :=
(hjoint n).comp_continuous (continuous_const.prodMk continuous_id)
(fun _ => β¨ht, Set.mem_univ _β©)
have heval (n : β) (t : β) (ht : t β Ioo a b) (x : X) : F n t x = H n t x := by
dsimp only [F]
rw [ContinuousMap.mkD_of_continuous (hslice n t ht)]
rfl
have hcont (n : β) : ContinuousOn (F n) (Ioo a b) :=
ContinuousMap.continuousOn_mkD_of_uncurry (H n) 0 (hjoint n)
have hpointF (n : β) (t : β) (ht : t β Ioo a b) (x : X) :
HasDerivAt (fun s => F n s x) (F (n + 1) t x) t := by
have hevent : (fun s => F n s x) =αΆ [π t] (fun s => H n s x) :=
Filter.mem_of_superset (Ioo_mem_nhds ht.1 ht.2)
(fun s hs => heval n s hs x)
rw [heval (n + 1) t ht x]
exact (hpoint n t ht x).congr_of_eventuallyEq hevent
exact continuousMap_smooth_of_eval_derivative_sequence F hcont hpointF
end SmoothLocal.ODE
end
end OAI
|