File size: 5,068 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 | import Mathlib
import OAI.Probability.LogConcave.JetEstimates.SmoothTensorCurve
namespace OAI
section
section
noncomputable section
namespace LogConcaveSampling.TensorEnergy
open Set Function
open scoped Classical BigOperators RealInnerProductSpace
def flowJetMajorant (A : β β β) (hA : βk,0β€A k) (n : β) : β :=
(smoothTensorCurve_bounds A hA n).choose
lemma flowJetMajorant_nonneg (A : β β β) (hA : βk,0β€A k) (n : β) :
0β€flowJetMajorant A hA n := (smoothTensorCurve_bounds A hA n).choose_spec.1
def flowCorrectionMajorant (A : β β β) (hA : βk,0β€A k) (n : β) : β :=
βc : OrderedFinpartition n,A c.length*βi,flowJetMajorant A hA (c.partSize i)
lemma flowCorrectionMajorant_nonneg (A : β β β) (hA : βk,0β€A k) (n : β) :
0β€flowCorrectionMajorant A hA n :=
Finset.sum_nonneg (fun _ _ => mul_nonneg (hA _) (Finset.prod_nonneg (fun _ _ => flowJetMajorant_nonneg A hA _)))
lemma multilinearTensor_sub {d n : β} (f g : Point d β Point d)
(hf : ContDiff β (β€:ββ) f) (hg : ContDiff β (β€:ββ) g) (y : Point d) :
multilinearTensor (iteratedFDeriv β n (fun z => f z-g z) y)=
multilinearTensor (iteratedFDeriv β n f y)-multilinearTensor (iteratedFDeriv β n g y) := by
change multilinearTensor (iteratedFDeriv β n (f-g) y)=_
rw [iteratedFDeriv_sub_apply (hf.contDiffAt.of_le (by exact_mod_cast (le_top : (n:ββ)β€β€)))
(hg.contDiffAt.of_le (by exact_mod_cast (le_top : (n:ββ)β€β€)))]
ext c
simp only [multilinearTensor,sub_apply,inner_sub_right,Pi.sub_apply]
theorem smoothTensorCurve_correction {d n : β} (hn : 0<n) (A : β β β) (hA : βk,0β€A k)
{R b Ξ· : β} (hR : 0<R) (hR1 : Rβ€1) (hb : 0β€b) (hb1 : bβ€1) (hΞ· : 0β€Ξ·)
(X : β Γ Point d β Point d) (V : β β Point d β Point d)
(hX : SmoothTensorCurve d A R b X V)
(hv : βk u,uβIcc 0 b β βz,AllSplitBound
(multilinearTensor (iteratedFDeriv β k (V u) z)) (Ξ·*A k/R^(k-1)))
{t : β} (ht : tβIcc 0 b) (y : Point d) :
AllSplitBound (multilinearTensor (iteratedFDeriv β n (fun z => X (t,z)-z) y))
(Ξ·*flowCorrectionMajorant A hA n/R^(n-1)) := by
let T (u : β) := multilinearTensor (iteratedFDeriv β n (fun z => X (u,z)) y)-
multilinearTensor (iteratedFDeriv β n (id : Point d β Point d) y)
let D (u : β) := multilinearTensor (iteratedFDeriv β n (fun z => V u (X (u,z))) y)
let M (k : β) := (Ξ·*A k)/R^(k-1)
let N (k : β) := flowJetMajorant A hA k/R^(k-1)
have hM (k : β) : 0β€M k := by exact div_nonneg (mul_nonneg hΞ· (hA k)) (pow_nonneg hR.le _)
have hN (k : β) : 0β€N k := div_nonneg (flowJetMajorant_nonneg A hA _) (pow_nonneg hR.le _)
have hflow (k : β) (u : β) (hu : uβIcc 0 b) :
AllSplitBound (multilinearTensor (iteratedFDeriv β k (fun z => X (u,z)) y)) (N k) :=
(smoothTensorCurve_bounds A hA k).choose_spec.2 d R b X V hR hR1 hb hb1 hX u hu y
have hbound (u : β) (hu : uβIco 0 b) :
AllSplitBound (D u) (Ξ·*flowCorrectionMajorant A hA n/R^(n-1)) := by
have hs : ContDiff β (β€:ββ) (fun z => X (u,z)) := hX.smooth.comp (contDiff_const.prodMk contDiff_id)
have hvs := (hX.velocity_smooth u β¨hu.1,hu.2.leβ©).contDiffAt (x:=X (u,y))
have he := iteratedFDeriv_comp_allSplit y
(hs.contDiffAt.of_le (by exact_mod_cast (le_top : (n:ββ)β€β€)))
(hvs.of_le (by exact_mod_cast (le_top : (n:ββ)β€β€))) M N hM hN
(fun k hk => hv k u β¨hu.1,hu.2.leβ© (X (u,y)))
(fun k hk => hflow k u β¨hu.1,hu.2.leβ©)
have heq : (βc : OrderedFinpartition n,M c.length*βi,N (c.partSize i))=
Ξ·*flowCorrectionMajorant A hA n/R^(n-1) := by
dsimp only [M,N]
rw [partition_sum_scale hn (fun k => Ξ·*A k) (flowJetMajorant A hA) R]
simp only [flowCorrectionMajorant,βFinset.mul_sum,mul_assoc]
rw [heq] at he
exact he
have hinit : AllSplitBound (T 0) 0 := by
have he : (fun z => X (0,z))=(id : Point d β Point d) := funext hX.initial
dsimp only [T]
rw [he,sub_self]
exact allSplitBound_zero
have hpos : 0β€Ξ·*flowCorrectionMajorant A hA n/R^(n-1) :=
div_nonneg (mul_nonneg hΞ· (flowCorrectionMajorant_nonneg A hA n)) (pow_nonneg hR.le _)
have hg := allSplit_gronwall (T:=T) (D:=D) (K:=0)
((spatialTensor_continuous hX.smooth y).sub continuous_const).continuousOn
(fun u hu => ((spatialTensor_time_deriv hX.smooth (V u) u
(hX.equation u β¨hu.1,hu.2.leβ©) y).sub_const _).hasDerivWithinAt)
(le_refl (0:β)) hpos (le_refl (0:β)) hinit
(fun u hu => by simpa only [zero_mul,zero_add] using hbound u hu) ht
simp only [gronwallBound_K0,zero_add,sub_zero] at hg
have hfinal := hg.mono (mul_nonneg hpos ht.1) (mul_le_of_le_one_right hpos (ht.2.trans hb1))
have hs : ContDiff β (β€:ββ) (fun z => X (t,z)) := hX.smooth.comp (contDiff_const.prodMk contDiff_id)
rw [multilinearTensor_sub (fun z => X (t,z)) (fun z => z) hs contDiff_id]
exact hfinal
end LogConcaveSampling.TensorEnergy
end
end
end
end OAI
|