Buckets:
| import OAI.Probability.InvariantIsing.Gaussian.GaussianBaseComparison | |
| namespace OAI | |
| /-! Finite-prior exhaustion with the bounded deterministic cavity energy | |
| left inside the partition. A uniform second moment gives convergence of | |
| the actual expected logarithms. -/ | |
| noncomputable section | |
| open MeasureTheory ProbabilityTheory IsingPerceptron Filter | |
| open scoped Topology | |
| namespace InvariantIsing | |
| lemma cavity_bounded_base_exp_integrable {X : Type*} [MeasurableSpace X] [Countable X] | |
| [MeasurableSingletonClass X] (ν : Measure X) [IsProbabilityMeasure ν] | |
| (H : X → ℝ) {M : ℝ} (hH : ∀ x, |H x| ≤ M) : | |
| Integrable (fun x => Real.exp (H x)) ν := by | |
| apply Integrable.of_bound (measurable_of_countable _).aestronglyMeasurable (Real.exp M) | |
| exact ae_of_all _ (fun x => by | |
| rw [Real.norm_eq_abs, abs_of_pos (Real.exp_pos _)] | |
| exact Real.exp_le_exp.mpr ((le_abs_self _).trans (hH x))) | |
| lemma cavity_bounded_base_log_second {X : Type*} [MeasurableSpace X] [Countable X] | |
| [MeasurableSingletonClass X] (ν : Measure X) [IsProbabilityMeasure ν] | |
| (H : X → ℝ) {M : ℝ} (hH : ∀ x, |H x| ≤ M) | |
| (A : X → ℕ →₀ ℝ) {B : ℝ} (hA : ∀ x, (A x).sum (fun _ c => c ^ 2) ≤ B) : | |
| (∫ g : ℕ → ℝ, (Real.log (∫ x, Real.exp (H x + cylinderField (A x) g) ∂ν)) ^ 2 | |
| ∂gaussianCoordinates) ≤ 2 * M ^ 2 + 8 * Real.exp (2 * B) := by | |
| have hiH := cavity_bounded_base_exp_integrable ν H hH | |
| have : IsProbabilityMeasure (ν.tilted H) := isProbabilityMeasure_tilted hiH | |
| let L := Real.log (∫ x, Real.exp (H x) ∂ν) | |
| let Q := fun g : ℕ → ℝ => cgf (fun x => cylinderField (A x) g) (ν.tilted H) 1 | |
| have hc : |L| ≤ M := by | |
| simpa only [logMean, div_one, one_mul] using | |
| logMean_bounds ν (measurable_of_countable H) (by norm_num : (0 : ℝ) < 1) hH | |
| have hc2 : L ^ 2 ≤ M ^ 2 := by | |
| have hh := abs_le.mp hc | |
| nlinarith [mul_nonneg (sub_nonneg.mpr hh.2) (by linarith [hh.1] : 0 ≤ M + L)] | |
| have hv (x : X) : (((A x).sum (fun _ c => c ^ 2)).toNNReal : ℝ) ≤ B := by | |
| rw [Real.coe_toNNReal _ (show 0 ≤ (A x).sum (fun _ c => c ^ 2) from | |
| Finset.sum_nonneg (fun _ _ => sq_nonneg _))] | |
| exact hA x | |
| have hs := gaussian_log_partition_second (ν := ν.tilted H) (measurable_cylinderFields A) | |
| (fun x => cylinderField_law (A x)) hv | |
| have hs : Integrable (fun g => (Q g) ^ 2) gaussianCoordinates ∧ | |
| (∫ g, (Q g) ^ 2 ∂gaussianCoordinates) ≤ 4 * Real.exp (2 * B) := by | |
| simpa only [Q, cgf, mgf, one_mul] using hs | |
| have he := cylinder_log_partition_base ν H hiH A hA 1 | |
| simp only [one_mul] at he | |
| have hip : Integrable (fun g => (L + Q g) ^ 2) gaussianCoordinates := | |
| (memLp_two_iff_integrable_sq ((memLp_const L).add | |
| (cylinder_cgf_memLp_two (ν.tilted H) A hA 1)).aestronglyMeasurable).mp | |
| ((memLp_const L).add (cylinder_cgf_memLp_two (ν.tilted H) A hA 1)) | |
| calc | |
| _ = ∫ g, (L + Q g) ^ 2 ∂gaussianCoordinates := | |
| integral_congr_ae (he.mono (fun g hg => congrArg (fun z : ℝ => z ^ 2) hg)) | |
| _ ≤ ∫ g, (2 * M ^ 2 + 2 * (Q g) ^ 2) ∂gaussianCoordinates := by | |
| apply integral_mono hip ((integrable_const _).add (hs.1.const_mul 2)) | |
| intro g | |
| change (L + Q g) ^ 2 ≤ 2 * M ^ 2 + 2 * (Q g) ^ 2 | |
| nlinarith [sq_nonneg (L - Q g)] | |
| _ = 2 * M ^ 2 + 2 * (∫ g, (Q g) ^ 2 ∂gaussianCoordinates) := by | |
| rw [integral_add (integrable_const _) (hs.1.const_mul 2)] | |
| simp only [integral_const_mul, integral_const, probReal_univ, one_smul] | |
| _ ≤ _ := by linarith [hs.2] | |
| theorem cavity_bounded_base_restriction_mean_tendsto {X : Type*} | |
| [MeasurableSpace X] [Countable X] [MeasurableSingletonClass X] | |
| (ν : Measure X) [IsProbabilityMeasure ν] (H : X → ℝ) | |
| {M : ℝ} (hH : ∀ x, |H x| ≤ M) | |
| (A : X → ℕ →₀ ℝ) {B : ℝ} (hA : ∀ x, (A x).sum (fun _ c => c ^ 2) ≤ B) | |
| {S : ℕ → Set X} (hS : ∀ n, MeasurableSet (S n)) | |
| (hExh : ∀ x, ∀ᶠ n in atTop, x ∈ S n) (hpos : ∀ n, ν (S n) ≠ 0) : | |
| Tendsto (fun n => ∫ g : ℕ → ℝ, Real.log | |
| (∫ x, Real.exp (H x + cylinderField (A x) g) ∂normalizedRestriction ν (S n)) | |
| ∂gaussianCoordinates) atTop | |
| (𝓝 (∫ g : ℕ → ℝ, Real.log (∫ x, Real.exp (H x + cylinderField (A x) g) ∂ν) | |
| ∂gaussianCoordinates)) := by | |
| let νn := fun n => normalizedRestriction ν (S n) | |
| have : ∀ n, IsProbabilityMeasure (νn n) := fun n => normalizedRestriction_probability (hpos n) | |
| have hm (n : ℕ) : Measurable (fun g : ℕ → ℝ => Real.log | |
| (∫ x, Real.exp (H x + cylinderField (A x) g) ∂νn n)) := | |
| (((measurable_of_countable H).comp measurable_snd).add | |
| (measurable_cylinderFields A)).exp.stronglyMeasurable.integral_prod_right'.measurable.log | |
| have hi (n : ℕ) : Integrable (fun g : ℕ → ℝ => (Real.log | |
| (∫ x, Real.exp (H x + cylinderField (A x) g) ∂νn n)) ^ 2) gaussianCoordinates := by | |
| apply (memLp_two_iff_integrable_sq (hm n).aestronglyMeasurable).mp | |
| simpa only [one_mul] using cylinder_log_partition_memLp_two (νn n) H | |
| (cavity_bounded_base_exp_integrable (νn n) H hH) A hA 1 | |
| apply (integral_tendsto_of_second_moment_bound hm hi | |
| (fun n => cavity_bounded_base_log_second (νn n) H hH A hA) ?_).2 | |
| filter_upwards [cylinder_partition_exp_integrable_ae ν H | |
| (cavity_bounded_base_exp_integrable ν H hH) A hA] with g hg | |
| have hz : 0 < ∫ x, Real.exp (H x + cylinderField (A x) g) ∂ν := integral_exp_pos hg | |
| exact (Real.continuousAt_log hz.ne').tendsto.comp | |
| (normalized_restriction_integral_tendsto hS hExh hg) | |
| end InvariantIsing | |
| end | |
| end OAI | |
Xet Storage Details
- Size:
- 5.61 kB
- Xet hash:
- 6652943e00eaf5ae108ec8fdba68fb3fd16aa13ce19522ce25d14343b7cee811
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.