Download data/lean/OAI/Probability/FreeIsing/Posterior/GaussianEnergyIntegral.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 4.12 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/FreeIsing/Posterior/GaussianEnergyIntegral.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/FreeIsing/Posterior/GaussianEnergyIntegral.lean
-
curl -L -o GaussianEnergyIntegral.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/FreeIsing/Posterior/GaussianEnergyIntegral.lean
4.12 kB
| import OAI.Probability.FreeIsing.Posterior.GaussianEnergy | |
| import OAI.Probability.FreeIsing.Posterior.SqrtObservationDerivative | |
| namespace OAI | |
| noncomputable section | |
| open MeasureTheory ProbabilityTheory Set | |
| open scoped NNReal | |
| namespace Problem367.FinitePosterior | |
| variable {S V : Type*} [Fintype S] [Nonempty S] [Fintype V] [DecidableEq V] | |
| [MeasurableSpace S] [MeasurableSingletonClass S] [StandardBorelSpace S] | |
| theorem integral_finiteStandardEnergy | |
| (ΞΌ : Measure S) [IsProbabilityMeasure ΞΌ] | |
| (energy : S β β) | |
| (hprior : β s, ΞΌ.real {s} = Real.exp (energy s) / β a, Real.exp (energy a)) | |
| (spin : S β V β β) (observable : S β β) | |
| (A : β) (hbound : β s, |observable s| β€ A) | |
| (hcoords : β s v, spin s v = -1 β¨ spin s v = 1) | |
| {T : β} (hT : 0 β€ T) : | |
| let C : β β β := fun t => β« x, β v, fieldCovariance energy spin observable | |
| (finiteStandardObservation spin t x) v ^ 2 | |
| βΞΌ.prod (Measure.pi (fun _ : V => gaussianReal 0 1)) | |
| IntervalIntegrable C volume 0 T β§ | |
| (β« t in 0..T, C t) = | |
| (β« x, fieldMean energy spin observable (finiteStandardObservation spin T x) ^ 2 | |
| βΞΌ.prod (Measure.pi (fun _ : V => gaussianReal 0 1))) - | |
| fieldMean energy spin observable 0 ^ 2 β§ | |
| 0 β€ (β« t in 0..T, C t) β§ (β« t in 0..T, C t) β€ A ^ 2 := by | |
| let Ο := ΞΌ.prod (Measure.pi (fun _ : V => gaussianReal 0 1)) | |
| let E : β β β := fun t => β« x, | |
| fieldMean energy spin observable (finiteStandardObservation spin t x) ^ 2 βΟ | |
| let C : β β β := fun t => β« x, β v, fieldCovariance energy spin observable | |
| (finiteStandardObservation spin t x) v ^ 2 βΟ | |
| have hE : Continuous E := by | |
| simpa only [E, finiteStandardObservation, gaussianObservationCurve, Pi.pow_apply, Function.comp_def] using | |
| (continuous_integral_sqrt_observation (P := Ο) | |
| (((measurable_of_finite spin).comp measurable_fst).aestronglyMeasurable) | |
| (measurable_snd.aestronglyMeasurable) | |
| ((continuous_fieldMean energy spin observable).pow 2) | |
| (fun x => abs_fieldMean_square_le energy spin observable x A hbound)) | |
| have hd (t : β) (ht : 0 < t) : HasDerivAt E (C t) t := | |
| hasDerivAt_finiteStandardEnergy ΞΌ energy hprior spin observable A | |
| hbound hcoords ht | |
| have hCpos (t : β) : 0 β€ C t := | |
| integral_nonneg fun x => Finset.sum_nonneg fun v _ => sq_nonneg _ | |
| have hCI : IntervalIntegrable C volume 0 T := by | |
| apply intervalIntegral.intervalIntegrable_deriv_of_nonneg hE.continuousOn | |
| Β· intro t ht | |
| exact hd t (by simpa only [min_eq_left hT, max_eq_right hT] using ht.1) | |
| Β· exact fun t _ => hCpos t | |
| have hFTC : (β« t in 0..T, C t) = E T - E 0 := | |
| intervalIntegral.integral_eq_sub_of_hasDerivAt_of_le hT hE.continuousOn | |
| (fun t ht => hd t ht.1) hCI | |
| have hzero : E 0 = fieldMean energy spin observable 0 ^ 2 := by | |
| simp [E, finiteStandardObservation, gaussianObservationCurve, Ο] | |
| have hm : AEStronglyMeasurable | |
| (fun x => fieldMean energy spin observable (finiteStandardObservation spin T x) ^ 2) Ο := | |
| (((continuous_fieldMean energy spin observable).pow 2).measurable.comp | |
| (measurable_finiteStandardObservation spin T)).aestronglyMeasurable | |
| have hb (x : S Γ (V β β)) : | |
| |fieldMean energy spin observable (finiteStandardObservation spin T x) ^ 2| β€ A ^ 2 := | |
| abs_fieldMean_square_le energy spin observable _ A hbound | |
| have hInt : Integrable | |
| (fun x => fieldMean energy spin observable (finiteStandardObservation spin T x) ^ 2) Ο := | |
| Integrable.of_bound hm (A ^ 2) (Filter.Eventually.of_forall fun x => by | |
| simpa only [Real.norm_eq_abs] using hb x) | |
| have hEbound : E T β€ A ^ 2 := by | |
| calc | |
| E T β€ β« _x, A ^ 2 βΟ := integral_mono hInt (integrable_const _) fun x => | |
| (le_abs_self _).trans (hb x) | |
| _ = A ^ 2 := by simp [Ο] | |
| refine β¨hCI, ?_, intervalIntegral.integral_nonneg_of_forall hT hCpos, ?_β© | |
| Β· simpa only [hzero] using hFTC | |
| Β· rw [hFTC, hzero] | |
| exact sub_le_self _ (sq_nonneg _) |>.trans hEbound | |
| end Problem367.FinitePosterior | |
| end | |
| end OAI | |