Download data/lean/OAI/Probability/LogConcave/Sampling/JointMeanMaterial.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 4.6 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/LogConcave/Sampling/JointMeanMaterial.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/LogConcave/Sampling/JointMeanMaterial.lean
-
curl -L -o JointMeanMaterial.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/LogConcave/Sampling/JointMeanMaterial.lean
4.6 kB
| import Mathlib | |
| import OAI.Probability.LogConcave.JetEstimates.JetMaterial | |
| namespace OAI | |
| section | |
| section | |
| noncomputable section | |
| namespace LogConcaveSampling | |
| open scoped Classical BigOperators NNReal RealInnerProductSpace | |
| lemma joint_mean_material {d : β} {F : Point d β β} {lam : ββ₯0} | |
| (hF : Primitive F lam) (x : Point d) {r Ο : β} (hr : 0 < r) | |
| (hlam : 0 < lam) (hl : (lam:β)*r^2β€1/2) (h0 : 0β€Ο) (h1 : Ο<1) | |
| (i : Fin d) (y : Point d) : | |
| JetCalculus.mdir (1,0) jointSpace r (jointMean F x r) (jointMean F x r i) (Ο,y)= | |
| JetCalculus.gadj jointSpace (jointScore F x r) (fun k => jointU F x r ((lam:β)*r) | |
| (fun _ : Unit => JetCalculus.spaceBasis d k) [()] i) (Ο,y) := by | |
| have hm := jointMean_timeSmooth hF x hr.le hl i (Ο,y) (by dsimp; linarith) h1 | |
| have ht := joint_mdir_eq_material F x r (hm.differentiableAt (by simp)) | |
| change JetCalculus.mdir (1,0) jointSpace r (jointMean F x r) (jointMean F x r i) (Ο,y)=_ at ht | |
| rw [ht] | |
| change materialScalar F x r (fun t y => inner β (EuclideanSpace.basisFun (Fin d) β i) | |
| (conditionalFieldMean F x r t y)) Ο y=_ | |
| rw [material_conditionalFieldMean hF x hr hlam hl h0 h1] | |
| rw [joint_gadj_slice hF x hr.le hl h0 h1 (fun k => | |
| (jointU_timeSmooth hF x hr hlam hl (fun _ : Unit => JetCalculus.spaceBasis d k) [()] | |
| (by simp) i (Ο,y) (by dsimp; linarith) h1).differentiableAt (by simp))] | |
| rfl | |
| lemma joint_mean_outer {d : β} {F : Point d β β} {lam : ββ₯0} | |
| (hF : Primitive F lam) (x : Point d) {r Ο : β} (hr : 0 < r) | |
| (hlam : 0 < lam) (hl : (lam:β)*r^2β€1/2) (h0 : 0β€Ο) (h1 : Ο<1) | |
| (i : Fin d) (y : Point d) : | |
| JetCalculus.mdir (1,0) jointSpace r (jointMean F x r) (jointMean F x r i) (Ο,y)= | |
| ((lam:β)*r)*(TensorSum.pure TensorAtom.one).outer F x r ((lam:β)*r) (fun _ => i) (Ο,y) := by | |
| rw [joint_mean_material hF x hr hlam hl h0 h1] | |
| have hL : (lam:β)*rβ 0 := ne_of_gt (mul_pos (by exact_mod_cast hlam) hr) | |
| have he : (fun k => jointU F x r ((lam:β)*r) | |
| (fun _ : Unit => JetCalculus.spaceBasis d k) [()] i)= | |
| fun k p => ((lam:β)*r)*(TensorSum.pure TensorAtom.one).eval F x r ((lam:β)*r) | |
| (Sum.elim (fun _ => i) (fun _ => k)) p := by | |
| funext k p | |
| rw [TensorSum.pure_eval,TensorAtom.one_eval] | |
| dsimp only [Sum.elim_inl,Sum.elim_inr] | |
| field_simp | |
| rw [he,JetCalculus.gadj_scalar_at _ _ (fun k => | |
| ((TensorSum.pure TensorAtom.one).timeSmooth hF x hr hlam hl _ (Ο,y) | |
| (by dsimp; linarith) h1).differentiableAt (by simp))] | |
| rfl | |
| theorem mean_material_representation (n : β) : | |
| βA : TensorSum (Unit β Unit), A.weightLE (2*n) β§ | |
| β{d : β} {F : Point d β β} {lam : ββ₯0}, Primitive F lam β | |
| β(x : Point d) {r Ο : β},0 < r β 0 < lam β (lam:β)*r^2β€1/2 β 0β€Ο β Ο<1 β | |
| β(i : Fin d) (y : Point d), | |
| JetCalculus.materialIter (1,0) jointSpace r (jointMean F x r) (n+1) (jointMean F x r i) (Ο,y)= | |
| ((lam:β)*r)*A.outer F x r ((lam:β)*r) (fun _ => i) (Ο,y) := by | |
| induction n with | |
| | zero => | |
| refine β¨TensorSum.pure TensorAtom.one,TensorSum.weightLE_pure _ (by rfl),?_β© | |
| intro d F lam hF x r Ο hr hlam hl h0 h1 i y | |
| exact joint_mean_outer hF x hr hlam hl h0 h1 i y | |
| | succ n ih => | |
| obtain β¨A,hA,heβ© := ih | |
| obtain β¨B,hB,hABβ© := A.hasMaterial hA | |
| refine β¨B.add (A.insertOne.scale 1 Polynomial.X),?_,?_β© | |
| Β· apply TensorSum.weightLE_add | |
| Β· convert hB using 1 | |
| Β· exact TensorSum.weightLE_mono (TensorSum.weightLE_scale | |
| (TensorSum.weightLE_insertOne hA) _ _) (by omega) | |
| Β· intro d F lam hF x r Ο hr hlam hl h0 h1 i y | |
| have ho := A.outer_timeSmooth hF x hr hlam hl (fun _ : Unit => i) | |
| have hs : JetCalculus.TimeSmooth (fun p => ((lam:β)*r)*A.outer F x r ((lam:β)*r) (fun _ => i) p) := | |
| fun p hp0 hp1 => contDiffAt_const.mul (ho p hp0 hp1) | |
| change JetCalculus.mdir (1,0) jointSpace r (jointMean F x r) | |
| (JetCalculus.materialIter (1,0) jointSpace r (jointMean F x r) (n+1) (jointMean F x r i)) (Ο,y)=_ | |
| rw [JetCalculus.mdir_congr_nonneg_time (1,0) jointSpace r (jointMean F x r) | |
| (JetCalculus.materialIter_timeSmooth _ _ _ (jointMean_timeSmooth hF x hr.le hl) | |
| (jointMean_timeSmooth hF x hr.le hl i) (n+1)) hs | |
| (fun ht0 ht1 z => he hF x hr hlam hl ht0 ht1 i z) h0 h1 y, | |
| JetCalculus.mdir_const_mul_at _ _ _ _ ((ho (Ο,y) (by dsimp; linarith) h1).differentiableAt (by simp)), | |
| TensorSum.outer_material hF x hr hlam hl h0 h1 hAB] | |
| end LogConcaveSampling | |
| end | |
| end | |
| end | |
| end OAI | |