File size: 5,351 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 | import OAI.MathematicalPhysics.NavierStokes.VelocityDetection.Model
namespace OAI
noncomputable section
namespace VelocityDetection.CompactIntegral
open scoped BigOperators Topology ContDiff
open Set Function Filter
open MeasureTheory
theorem hasDerivAt_integral {n : β} {F : β Γ Coord n β β}
(hF : ContDiff β 1 F) (t : β) {K : Set (Coord n)} (hK : IsCompact K)
(hoff : β s β Icc (t - 1) (t + 1), β X β K, F (s, X) = 0) :
HasDerivAt (fun s => β« X, F (s, X))
(β« X, fderiv β F (t, X) (1, 0)) t := by
let F' : β β Coord n β β := fun s X => fderiv β F (s, X) (1, 0)
have hd (s : β) (X : Coord n) : HasDerivAt (fun r => F (r, X)) (F' s X) s := by
have hpair : HasDerivAt (fun r : β => (r, X)) (1, 0) s :=
(hasDerivAt_id s).prodMk (hasDerivAt_const s X)
exact ((hF.differentiable (by norm_num) (s, X)).hasFDerivAt.comp_hasDerivAt s hpair)
have hFc : Continuous F := hF.continuous
have hF'c : Continuous (fun q : β Γ Coord n => F' q.1 q.2) :=
(hF.continuous_fderiv (by norm_num)).clm_apply continuous_const
have hF'supp {s : β} (hs : s β Ioo (t - 1) (t + 1)) {X : Coord n} (hX : X β K) :
F' s X = 0 := by
have he : (fun r => F (r, X)) =αΆ [π s] (fun _ => (0 : β)) := by
filter_upwards [Icc_mem_nhds hs.1 hs.2] with r hr
exact hoff r hr X hX
exact (hd s X).unique ((hasDerivAt_const s 0).congr_of_eventuallyEq he)
have hFcpt : HasCompactSupport (fun X => F (t, X)) := by
apply HasCompactSupport.of_support_subset_isCompact hK
intro X hX
by_contra hnot
exact hX (hoff t (by constructor <;> linarith) X hnot)
have hFcX (s : β) : Continuous (fun X => F (s, X)) :=
hFc.comp (continuous_const.prodMk continuous_id)
have hF'cX : Continuous (F' t) := hF'c.comp (continuous_const.prodMk continuous_id)
obtain β¨B, hBβ© := ((isCompact_Icc (a := t - 1) (b := t + 1)).prod hK).exists_bound_of_continuousOn hF'c.continuousOn
let bound : Coord n β β := K.indicator (fun _ => B)
have hboundint : Integrable bound := by
exact (integrable_indicator_iff hK.measurableSet).2
(integrableOn_const (C := B) (hK.measure_lt_top (ΞΌ := volume)).ne)
have hb : β X, β s β Ioo (t - 1) (t + 1), βF' s Xβ β€ bound X := by
intro X s hs
by_cases hX : X β K
Β· simpa only [bound, indicator_of_mem hX] using hB (s, X) β¨β¨hs.1.le, hs.2.leβ©, hXβ©
Β· simp only [hF'supp hs hX, norm_zero, bound, indicator_of_notMem hX, le_refl]
exact (hasDerivAt_integral_of_dominated_loc_of_deriv_le
(Ioo_mem_nhds (by linarith) (by linarith))
(Filter.Eventually.of_forall (fun s => (hFcX s).aestronglyMeasurable))
((hFcX t).integrable_of_hasCompactSupport hFcpt) hF'cX.aestronglyMeasurable
(Filter.Eventually.of_forall hb) hboundint
(Filter.Eventually.of_forall (fun X s _ => hd s X))).2
theorem hasDerivAt_moving_capture {n : β} {Ο : Coord n β β}
{Ο : β β Coord n β β} {c : β β Coord n}
(hΟ : ContDiff β 1 Ο) (hΟc : HasCompactSupport Ο)
(hΟ : ContDiff β 1 (uncurry Ο)) (hc : ContDiff β 1 c) (t : β) :
HasDerivAt (fun s => β« X, Ο (X - c s) * Ο s X)
(β« X, Ο (X - c t) * deriv (fun s => Ο s X) t -
fderiv β Ο (X - c t) (deriv c t) * Ο t X) t := by
let F : β Γ Coord n β β := fun q => Ο (q.2 - c q.1) * Ο q.1 q.2
have hF : ContDiff β 1 F :=
(hΟ.comp (contDiff_snd.sub (hc.comp contDiff_fst))).mul hΟ
let K : Set (Coord n) := (fun q : β Γ Coord n => c q.1 + q.2) ''
(Icc (t - 1) (t + 1) ΓΛ’ tsupport Ο)
have hK : IsCompact K :=
(isCompact_Icc.prod hΟc).image ((hc.continuous.comp continuous_fst).add continuous_snd)
have hoff : β s β Icc (t - 1) (t + 1), β X β K, F (s, X) = 0 := by
intro s hs X hX
have hz : Ο (X - c s) = 0 := by
by_contra hnz
apply hX
refine β¨(s, X - c s), β¨hs, subset_closure hnzβ©, ?_β©
dsimp only
abel
simp only [F, hz, zero_mul]
have hi := hasDerivAt_integral hF t hK hoff
have hdF (X : Coord n) : fderiv β F (t, X) (1, 0) =
Ο (X - c t) * deriv (fun s => Ο s X) t -
fderiv β Ο (X - c t) (deriv c t) * Ο t X := by
have hdiff : HasFDerivAt F (fderiv β F (t, X)) (t, X) :=
(hF.differentiable (by norm_num) (t, X)).hasFDerivAt
have hline : HasDerivAt (fun s => F (s, X)) (fderiv β F (t, X) (1, 0)) t := by
simpa only [Function.comp_def, id_eq] using
hdiff.comp_hasDerivAt t ((hasDerivAt_id t).prodMk (hasDerivAt_const t X))
have hΟX : ContDiff β 1 (fun s => Ο s X) := hΟ.comp (contDiff_id.prodMk contDiff_const)
have harg := (hasDerivAt_const t X).sub ((hc.differentiable (by norm_num) t).hasDerivAt)
have hΟX := (hΟ.differentiable (by norm_num) (X - c t)).hasFDerivAt.comp_hasDerivAt t harg
have hprod := hΟX.mul ((hΟX.differentiable (by norm_num) t).hasDerivAt)
have hval := hline.unique hprod
simp only [zero_sub, map_neg, Function.comp_apply, Pi.sub_apply] at hval
rw [hval]
ring
have heq : (β« X, fderiv β F (t, X) (1, 0)) =
β« X, Ο (X - c t) * deriv (fun s => Ο s X) t -
fderiv β Ο (X - c t) (deriv c t) * Ο t X :=
integral_congr_ae (Filter.Eventually.of_forall hdF)
rw [heq] at hi
exact hi
end VelocityDetection.CompactIntegral
end
end OAI
|