File size: 6,691 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 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | import Mathlib
namespace OAI
noncomputable section
open Set Filter MeasureTheory
open scoped ContDiff
namespace ParabolicInterpolation
variable {V E : Type*} [NormedAddCommGroup V] [NormedSpace β V]
[NormedAddCommGroup E] [NormedSpace β E] [CompleteSpace E]
def difference : (n : β) β (V β E) β (Fin n β V) β V β E
| 0,f,_,x => f x
| n+1,f,v,x => difference n f (Fin.tail v) (x+v 0)-difference n f (Fin.tail v) x
def average : (n : β) β (V β E) β (Fin n β V) β V β E
| 0,f,_,x => f x
| n+1,f,v,x => average n (fun y => β« t in (0:β)..1, f (y+t β’ v 0)) (Fin.tail v) x
omit [CompleteSpace E] in
lemma continuous_average (n : β) (f : V β E) (hf : Continuous f) (v : Fin n β V) :
Continuous (average n f v) := by
induction n generalizing f with
| zero => exact hf
| succ n ih =>
apply ih
apply intervalIntegral.continuous_parametric_intervalIntegral_of_continuous'
exact hf.comp (by fun_prop)
omit [CompleteSpace E] in
lemma average_sub (n : β) (f g : V β E) (hf : Continuous f) (hg : Continuous g)
(v : Fin n β V) (x : V) :
average n (fun y => f y-g y) v x=average n f v x-average n g v x := by
induction n generalizing f g with
| zero => rfl
| succ n ih =>
change average n (fun y => β« t in (0:β)..1, f (y+t β’ v 0)-g (y+t β’ v 0)) _ x=_
have he (y : V) : (β« t in (0:β)..1, f (y+t β’ v 0)-g (y+t β’ v 0))=
(β« t in (0:β)..1, f (y+t β’ v 0))-(β« t in (0:β)..1, g (y+t β’ v 0)) := by
apply intervalIntegral.integral_sub
Β· exact (hf.comp (by fun_prop)).intervalIntegrable _ _
Β· exact (hg.comp (by fun_prop)).intervalIntegrable _ _
simp only [he]
apply ih
Β· apply intervalIntegral.continuous_parametric_intervalIntegral_of_continuous'
exact hf.comp (by fun_prop)
Β· apply intervalIntegral.continuous_parametric_intervalIntegral_of_continuous'
exact hg.comp (by fun_prop)
lemma average_const (n : β) (c : E) (v : Fin n β V) (x : V) :
average n (fun _ => c) v x=c := by
induction n with
| zero => rfl
| succ n ih => simpa [average] using ih (Fin.tail v)
omit [CompleteSpace E] in
lemma average_translate (n : β) (f : V β E) (v : Fin n β V) (x z : V) :
average n (fun y => f (y+z)) v x=average n f v (x+z) := by
induction n generalizing f x with
| zero => rfl
| succ n ih =>
simp only [average]
have he : (fun y => β« t in (0:β)..1, f (y+t β’ v 0+z))=
fun y => (fun w => β« t in (0:β)..1, f (w+t β’ v 0)) (y+z) := by
funext y
congr 1
funext t
congr 1
abel
rw [he]
exact ih (fun y : V => β« t in (0:β)..1, f (y+t β’ v 0)) (Fin.tail v) x
lemma average_jet_eq_difference (n : β) (f : V β E) (hf : ContDiff β n f)
(v : Fin n β V) (x : V) :
average n (fun y => iteratedFDeriv β n f y v) v x=difference n f v x := by
induction n generalizing x with
| zero => rfl
| succ n ih =>
let g : V β E := fun y => iteratedFDeriv β n f y (Fin.tail v)
have hgd : Differentiable β (iteratedFDeriv β n f) :=
hf.differentiable_iteratedFDeriv (by exact_mod_cast Nat.lt_succ_self n)
have hgc : Continuous g := hgd.continuous.eval_const _
have he (y : V) : (β« t in (0:β)..1, iteratedFDeriv β (n+1) f (y+t β’ v 0) v)=g (y+v 0)-g y := by
have hd (t : β) : HasDerivAt (fun t => g (y+t β’ v 0))
(iteratedFDeriv β (n+1) f (y+t β’ v 0) v) t := by
rw [(hgd (y+t β’ v 0)).iteratedFDeriv_succ_apply_left']
have hg : DifferentiableAt β g (y+t β’ v 0) :=
(hgd _).continuousMultilinear_apply_const _
convert hg.hasFDerivAt.comp_hasDerivAt t ((hasDerivAt_id t).smul_const (v 0) |>.const_add y) using 1
all_goals simp [Function.comp_def,g]
have hc0 : Continuous (fun z : V => iteratedFDeriv β (n+1) f z v) :=
(hf.continuous_iteratedFDeriv le_rfl).eval_const v
have hc1 : Continuous (fun t : β => y+t β’ v 0) := by fun_prop
have hc : Continuous (fun t : β => iteratedFDeriv β (n+1) f (y+t β’ v 0) v) := hc0.comp hc1
simpa [g] using intervalIntegral.integral_eq_sub_of_hasDerivAt
(fun t _ => hd t) (hc.intervalIntegrable 0 1)
change average n (fun y => β« t in (0:β)..1, iteratedFDeriv β (n+1) f (y+t β’ v 0) v) _ x=_
simp only [he]
rw [average_sub n (fun y => g (y+v 0)) g (hgc.comp (continuous_id.add continuous_const)) hgc,average_translate]
rw [ih (hf.of_le (by exact_mod_cast Nat.le_succ n)),ih (hf.of_le (by exact_mod_cast Nat.le_succ n))]
rfl
omit [CompleteSpace E] in
lemma norm_average_le (n : β) (f : V β E) (v : Fin n β V) (x : V) (C : β)
(_hC : 0β€C) (hf : β y, βy-xββ€β i, βv iβ β βf yββ€C) :
βaverage n f v xββ€C := by
induction n generalizing f with
| zero => exact hf x (by simp)
| succ n ih =>
apply ih
intro y hy
have hi : ββ« t in (0:β)..1, f (y+t β’ v 0)ββ€C*|1-0| :=
intervalIntegral.norm_integral_le_of_norm_le_const (fun t ht => by
apply hf
have ht' : tβIcc (0:β) 1 := by
simp only [uIoc_of_le zero_le_one] at ht
exact β¨ht.1.le,ht.2β©
calc
βy+t β’ v 0-xβ=β(y-x)+t β’ v 0β := by congr 1; abel
_β€βy-xβ+βt β’ v 0β := norm_add_le _ _
_β€(β i, βFin.tail v iβ)+βv 0β := by
gcongr
rw [norm_smul,Real.norm_of_nonneg ht'.1]
exact mul_le_of_le_one_left (norm_nonneg _) ht'.2
_=β i, βv iβ := by rw [Fin.sum_univ_succ]; simp [Fin.tail]; ring)
simpa using hi
omit [NormedSpace β V] [NormedSpace β E] [CompleteSpace E] in
lemma norm_difference_le (n : β) (f : V β E) (v : Fin n β V) (x : V) (U : β)
(_hU : 0β€U) (hf : β y, βy-xββ€β i, βv iβ β βf yββ€U) :
βdifference n f v xββ€2^n*U := by
induction n generalizing x with
| zero => simpa [difference] using hf x (by simp)
| succ n ih =>
have hsum : (β i : Fin n, βFin.tail v iβ)+βv 0β=β i, βv iβ := by
rw [Fin.sum_univ_succ]; simp [Fin.tail]; ring
have h1 := ih (Fin.tail v) (x+v 0) (fun y hy => hf y (by
calc
βy-xβ=β(y-(x+v 0))+v 0β := by congr 1; abel
_β€βy-(x+v 0)β+βv 0β := norm_add_le _ _
_β€(β i : Fin n, βFin.tail v iβ)+βv 0β := add_le_add hy le_rfl
_=_ := hsum))
have h2 := ih (Fin.tail v) x (fun y hy => hf y (by
rw [βhsum]; exact hy.trans (le_add_of_nonneg_right (norm_nonneg _))))
exact (norm_sub_le _ _).trans (by change _β€2^(n+1)*U; rw [pow_succ]; linarith)
end ParabolicInterpolation
end
end OAI
|