Download data/lean/OAI/Probability/InvariantIsing/Gaussian/BaseGaussianVariance.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 5.25 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/InvariantIsing/Gaussian/BaseGaussianVariance.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/InvariantIsing/Gaussian/BaseGaussianVariance.lean
-
curl -L -o BaseGaussianVariance.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/InvariantIsing/Gaussian/BaseGaussianVariance.lean
5.25 kB
| import OAI.Probability.InvariantIsing.Gaussian.CountableGaussianVariance | |
| namespace OAI | |
| /-! Gaussian variance for the countable spin/leaf partition with base energy. -/ | |
| noncomputable section | |
| open MeasureTheory ProbabilityTheory IsingPerceptron | |
| open scoped NNReal | |
| namespace InvariantIsing | |
| lemma cylinder_cgf_memLp_two {X : Type*} [MeasurableSpace X] [Countable X] | |
| [MeasurableSingletonClass X] (Ξ½ : Measure X) [IsProbabilityMeasure Ξ½] | |
| (A : X β β ββ β) {B : β} (hA : β x, (A x).sum (fun _ c => c ^ 2) β€ B) | |
| (t : β) : | |
| MemLp (fun g : β β β => cgf (fun x => cylinderField (A x) g) Ξ½ t) | |
| 2 gaussianCoordinates := by | |
| let H := fun p : (β β β) Γ X => t * cylinderField (A p.2) p.1 | |
| have hH : Measurable H := (measurable_cylinderFields A).const_mul t | |
| have hLaw (x : X) : gaussianCoordinates.map (fun g => H (g, x)) = | |
| gaussianReal 0 (β¨t ^ 2, sq_nonneg tβ© * (((A x).sum (fun _ c => c ^ 2)).toNNReal)) := | |
| cylinder_scaled_law A x t | |
| have hVar (x : X) : | |
| ((β¨t ^ 2, sq_nonneg tβ© : ββ₯0) * (((A x).sum (fun _ c => c ^ 2)).toNNReal) : β) β€ t ^ 2 * B := by | |
| change t ^ 2 * (((A x).sum (fun _ c => c ^ 2)).toNNReal : β) β€ _ | |
| rw [Real.coe_toNNReal _ (show 0 β€ (A x).sum (fun _ c => c ^ 2) from | |
| Finset.sum_nonneg (fun _ _ => sq_nonneg _))] | |
| exact mul_le_mul_of_nonneg_left (hA x) (sq_nonneg t) | |
| exact (memLp_two_iff_integrable_sq | |
| hH.exp.stronglyMeasurable.integral_prod_right'.measurable.log.aestronglyMeasurable).mpr | |
| (gaussian_log_partition_second (Ξ½ := Ξ½) hH hLaw hVar).1 | |
| /-- Splitting off a fixed integrable base energy is an almost-everywhere | |
| identity for the actual countable Gaussian partition, including nonuniform | |
| and cascade-leaf weights. -/ | |
| lemma cylinder_log_partition_base {X : Type*} [MeasurableSpace X] [Countable X] | |
| [MeasurableSingletonClass X] (Ξ½ : Measure X) [IsProbabilityMeasure Ξ½] | |
| (H : X β β) (hH : Integrable (fun x => Real.exp (H x)) Ξ½) | |
| (A : X β β ββ β) {B : β} (hA : β x, (A x).sum (fun _ c => c ^ 2) β€ B) (t : β) : | |
| (fun g : β β β => Real.log (β« x, Real.exp (H x + t * cylinderField (A x) g) βΞ½)) | |
| =α΅[gaussianCoordinates] | |
| (fun g => Real.log (β« x, Real.exp (H x) βΞ½) + | |
| cgf (fun x => cylinderField (A x) g) (Ξ½.tilted H) t) := by | |
| have : IsProbabilityMeasure (Ξ½.tilted H) := isProbabilityMeasure_tilted hH | |
| have hVar (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 he := (gaussian_field_exp_integrable (Ξ½ := Ξ½.tilted H) | |
| (measurable_cylinderFields A) (fun x => cylinderField_law (A x)) hVar t).1.prod_right_ae | |
| filter_upwards [he] with g hg | |
| have hz : 0 < β« x, Real.exp (H x) βΞ½ := integral_exp_pos hH | |
| have hz' : 0 < β« x, Real.exp (t * cylinderField (A x) g) βΞ½.tilted H := integral_exp_pos hg | |
| have hi := integral_exp_tilted (ΞΌ := Ξ½) H (fun x => t * cylinderField (A x) g) | |
| have hid : (β« x, Real.exp (H x + t * cylinderField (A x) g) βΞ½) = | |
| (β« x, Real.exp (H x) βΞ½) * | |
| (β« x, Real.exp (t * cylinderField (A x) g) βΞ½.tilted H) := by | |
| rw [hi] | |
| simp only [Pi.add_apply] | |
| field_simp | |
| rw [hid, Real.log_mul hz.ne' hz'.ne'] | |
| rfl | |
| lemma cylinder_log_partition_memLp_two {X : Type*} [MeasurableSpace X] [Countable X] | |
| [MeasurableSingletonClass X] (Ξ½ : Measure X) [IsProbabilityMeasure Ξ½] | |
| (H : X β β) (hH : Integrable (fun x => Real.exp (H x)) Ξ½) | |
| (A : X β β ββ β) {B : β} (hA : β x, (A x).sum (fun _ c => c ^ 2) β€ B) (t : β) : | |
| MemLp (fun g : β β β => Real.log | |
| (β« x, Real.exp (H x + t * cylinderField (A x) g) βΞ½)) 2 gaussianCoordinates := by | |
| have : IsProbabilityMeasure (Ξ½.tilted H) := isProbabilityMeasure_tilted hH | |
| have he := cylinder_log_partition_base Ξ½ H hH A hA t | |
| exact MemLp.ae_eq (Filter.EventuallyEq.symm he) | |
| ((memLp_const (Real.log (β« x, Real.exp (H x) βΞ½))).add | |
| (cylinder_cgf_memLp_two (Ξ½.tilted H) A hA t)) | |
| /-- The actual countable Gaussian partition with arbitrary integrable base | |
| energy has the same coefficient variance bound. This is conditional only on | |
| the specified published Gaussian PoincarΓ© consequence. -/ | |
| theorem countable_cylinder_log_partition_variance_le (hpub : GaussianLipschitzVarianceInput) | |
| {X : Type*} [MeasurableSpace X] [Countable X] [MeasurableSingletonClass X] | |
| (Ξ½ : Measure X) [IsProbabilityMeasure Ξ½] (H : X β β) | |
| (hH : Integrable (fun x => Real.exp (H x)) Ξ½) | |
| (A : X β β ββ β) (B : β) (hB : 0 β€ B) | |
| (hA : β x, (A x).sum (fun _ c => c ^ 2) β€ B) (t : β) : | |
| variance (fun g : β β β => Real.log | |
| (β« x, Real.exp (H x + t * cylinderField (A x) g) βΞ½)) gaussianCoordinates β€ t ^ 2 * B := by | |
| have : IsProbabilityMeasure (Ξ½.tilted H) := isProbabilityMeasure_tilted hH | |
| have he := cylinder_log_partition_base Ξ½ H hH A hA t | |
| rw [variance_congr he, variance_const_add (cylinder_cgf_memLp_two (Ξ½.tilted H) A hA t).aestronglyMeasurable] | |
| exact countable_cylinder_cgf_variance_le hpub (Ξ½.tilted H) A B hB hA t | |
| end InvariantIsing | |
| end | |
| end OAI | |