File size: 4,121 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 | 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
|