Buckets:
| import Mathlib | |
| import OAI.Probability.LogConcave.Analysis.GibbsOpenPos | |
| import OAI.Probability.LogConcave.Sampling.InnerBasisCoordinate | |
| namespace OAI | |
| section | |
| section | |
| noncomputable section | |
| namespace LogConcaveSampling | |
| open Set Function MeasureTheory ProbabilityTheory | |
| open scoped Classical BigOperators RealInnerProductSpace NNReal | |
| open TensorEnergy | |
| theorem exists_actual_joint_centering_flow {d : ℕ} {F : Point d → ℝ} {lam : ℝ≥0} | |
| (hF : Primitive F lam) (x : Point d) {r T : ℝ} (hr : 0<r) (hlam : 0<lam) | |
| (hl : (lam:ℝ)*r^2≤1/2) (hT0 : 0≤T) (hT1 : T<1) {s : ℝ} (hs : 0<s) : | |
| ∃Ξ : Point (d+d) → ℝ → Point (d+d), | |
| (∀y,Continuous (Ξ y) ∧ Ξ y 0=y) ∧ | |
| (∀y t,t∈Icc (0:ℝ) 1 → HasDerivWithinAt (Ξ y) | |
| (skewLieField (productPotential (interpolationPotential F x r T) | |
| (fun z : Point d => ‖z‖^2/2)) | |
| (jointSkew (centeringKernel hF x hr hl hT0 hT1) s) (Ξ y t)) (Icc (0:ℝ) 1) t) ∧ | |
| Measurable (fun p : ℝ × Point (d+d) => Ξ p.2 p.1) ∧ | |
| (∀t∈Icc (0:ℝ) 1,(gibbs (productPotential (interpolationPotential F x r T) | |
| (fun z : Point d => ‖z‖^2/2))).map (fun y => Ξ y t)= | |
| gibbs (productPotential (interpolationPotential F x r T) (fun z : Point d => ‖z‖^2/2))) := by | |
| obtain ⟨Ψ,hΨ,hc,hlaw⟩ := exists_actual_centering_flow hF x hr hlam hl hT0 hT1 hs (by norm_num : (0:ℝ)≤1) | |
| let E := productPointEquiv d d | |
| let τ : ℝ → ℝ := fun t => min (max t 0) 1 | |
| have hτ : Continuous τ := (continuous_id.max continuous_const).min continuous_const | |
| have hτmem (t : ℝ) : τ t∈Icc (0:ℝ) 1 := | |
| ⟨le_min (le_max_right _ _) (by norm_num),min_le_right _ _⟩ | |
| have hτeq (t : ℝ) (ht : t∈Icc (0:ℝ) 1) : τ t=t := by | |
| exact (min_eq_left (by rw [max_eq_left ht.1]; exact ht.2)).trans (max_eq_left ht.1) | |
| let Ξ : Point (d+d) → ℝ → Point (d+d) := fun y t => E.symm (Ψ (E y) (τ t)) | |
| have hΞc (y : Point (d+d)) : Continuous (Ξ y) := E.symm.continuous.comp ((hΨ (E y)).1.comp hτ) | |
| have hΞs (t : ℝ) : Continuous (fun y => Ξ y t) := E.symm.continuous.comp ((hc (τ t) (hτmem t)).comp E.continuous) | |
| have hH := interpolationPotential_smooth hF x hr.le hl hT0 hT1 | |
| have hK (i j : Fin d) : Differentiable ℝ (fun y => inner ℝ (EuclideanSpace.basisFun (Fin d) ℝ i) | |
| (centeringKernel hF x hr hl hT0 hT1 y (EuclideanSpace.basisFun (Fin d) ℝ j))) := | |
| contDiff_const.inner ℝ ((centeringKernel_smooth hF x hr hlam hl hT0 hT1).clm_apply contDiff_const) |>.differentiable (by simp) | |
| let μ := gibbs (productPotential (interpolationPotential F x r T) (fun z : Point d => ‖z‖^2/2)) | |
| let ν := (interpolationLaw F x r T).prod (stdGaussian (Point d)) | |
| have hm : μ.map E=ν := by | |
| rw [productPotential_gibbs hH.continuous (gaussianPotential_polySmooth d).smooth.continuous, | |
| gaussianPotential_gibbs] | |
| dsimp only [ν] | |
| rw [interpolationLaw_eq_gibbs hF x hr.le (by linarith only [hl]) (by nlinarith [probability_time hT0 hT1])] | |
| have hmi : ν.map E.symm=μ := by | |
| rw [←hm,Measure.map_map E.symm.continuous.measurable E.continuous.measurable] | |
| simp only [Function.comp_def,ContinuousLinearEquiv.symm_apply_apply,Measure.map_id'] | |
| refine ⟨Ξ,fun y => ⟨hΞc y,?_⟩,?_,?_,?_⟩ | |
| · dsimp [Ξ] | |
| rw [hτeq 0 ⟨le_rfl,by norm_num⟩,(hΨ (E y)).2.1,E.symm_apply_apply] | |
| · intro y t ht | |
| have hd := E.symm.toContinuousLinearMap.hasFDerivAt.comp_hasDerivWithinAt t ((hΨ (E y)).2.2 t ht) | |
| have hfield := jointSkew_field (hH.differentiable (by simp)) hK | |
| (centeringKernel_strong hF x hr hlam hl hT0 hT1) s (E.symm (Ψ (E y) t)) | |
| change E _=skewCenteringField _ _ _ (E (E.symm (Ψ (E y) t))) at hfield | |
| rw [E.apply_symm_apply] at hfield | |
| have he := congrArg E.symm hfield | |
| rw [E.symm_apply_apply] at he | |
| change HasDerivWithinAt (fun u => E.symm (Ψ (E y) u)) | |
| (E.symm (skewCenteringField _ _ _ (Ψ (E y) t))) _ _ at hd | |
| rw [←he] at hd | |
| have hde := hd.congr (f₁:=Ξ y) (fun u hu => by dsimp [Ξ]; rw [hτeq u hu]) | |
| (by dsimp [Ξ]; rw [hτeq t ht]) | |
| simpa only [Ξ,hτeq t ht] using hde | |
| · exact measurable_uncurry_of_continuous_of_measurable hΞc (fun t => (hΞs t).measurable) | |
| · intro t ht | |
| change μ.map (fun y => E.symm (Ψ (E y) (τ t)))=μ | |
| rw [hτeq t ht] | |
| have hc' := hc t ht | |
| calc | |
| _ = ((μ.map E).map (fun p => Ψ p t)).map E.symm := by | |
| rw [Measure.map_map E.symm.continuous.measurable hc'.measurable, | |
| Measure.map_map (E.symm.continuous.measurable.comp hc'.measurable) E.continuous.measurable] | |
| rfl | |
| _ = ν.map E.symm := by rw [hm,hlaw t ht] | |
| _ = μ := hmi | |
| end LogConcaveSampling | |
| end | |
| end | |
| end | |
| end OAI | |
Xet Storage Details
- Size:
- 4.71 kB
- Xet hash:
- 0493ecabbf5da117442cb8246c02a27061bf2774443dd6e4fafeb827621b6dc6
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.