Download data/lean/OAI/Probability/InvariantIsing/Arrays/NSpinCascade.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 7.56 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/InvariantIsing/Arrays/NSpinCascade.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/InvariantIsing/Arrays/NSpinCascade.lean
-
curl -L -o NSpinCascade.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/InvariantIsing/Arrays/NSpinCascade.lean
7.56 kB
| import OAI.Probability.InvariantIsing.Fields.CascadeMarking | |
| import OAI.Probability.InvariantIsing.Haar.Rotation | |
| import OAI.Probability.IsingPerceptron.EnrichedFieldCap | |
| namespace OAI | |
| /-! | |
| Gaussian cascade marking for the actual finite Ising partition function at | |
| a fixed orthogonal rotation. The Haar variable is fixed in this result. | |
| -/ | |
| noncomputable section | |
| open MeasureTheory ProbabilityTheory | |
| open scoped BigOperators NNReal | |
| namespace InvariantIsing | |
| def rotatedFieldTerminal {N : β} (eig : Fin N β β) (U : Rotation N) | |
| (c z : Fin N β β) : β := | |
| logPartition (fun Ο => rotatedEnergy eig U Ο + fieldEnergy (c + z) Ο) | |
| lemma measurable_rotatedFieldTerminal {N : β} (eig : Fin N β β) (U : Rotation N) | |
| (c : Fin N β β) : Measurable (rotatedFieldTerminal eig U c) := by | |
| unfold rotatedFieldTerminal logPartition fieldEnergy | |
| fun_prop | |
| lemma abs_rotatedFieldTerminal_sub_le {N : β} (eig : Fin N β β) (U : Rotation N) | |
| (c z w : Fin N β β) : | |
| |rotatedFieldTerminal eig U c z - rotatedFieldTerminal eig U c w| β€ | |
| (N : β) * βz - wβ := by | |
| have he (Ο : Spin N) : | |
| |(rotatedEnergy eig U Ο + fieldEnergy (c + z) Ο) - | |
| (rotatedEnergy eig U Ο + fieldEnergy (c + w) Ο)| β€ (N : β) * βz - wβ := by | |
| rw [add_sub_add_left_eq_sub] | |
| calc | |
| _ β€ β i, |(c + z) i - (c + w) i| := abs_fieldEnergy_sub_le _ _ Ο | |
| _ = β i, |z i - w i| := by simp only [Pi.add_apply, add_sub_add_left_eq_sub] | |
| _ β€ β _ : Fin N, βz - wβ := Finset.sum_le_sum fun i _ => by | |
| simpa only [Pi.sub_apply, Real.norm_eq_abs] using norm_le_pi_norm (z - w) i | |
| _ = (N : β) * βz - wβ := by simp | |
| exact abs_logPartition_sub_le _ _ _ he | |
| lemma rotatedFieldTerminal_linearGrowth {N : β} (eig : Fin N β β) (U : Rotation N) | |
| (c : Fin N β β) : IsingPerceptron.HasLinearGrowth (rotatedFieldTerminal eig U c) := by | |
| refine β¨|rotatedFieldTerminal eig U c 0|, N, abs_nonneg _, Nat.cast_nonneg _, fun z => ?_β© | |
| have hl := abs_rotatedFieldTerminal_sub_le eig U c z 0 | |
| rw [sub_zero] at hl | |
| have ht := abs_add_le (rotatedFieldTerminal eig U c z - rotatedFieldTerminal eig U c 0) | |
| (rotatedFieldTerminal eig U c 0) | |
| rw [sub_add_cancel] at ht | |
| linarith | |
| def vectorGaussianLaw (N : β) (v : ββ₯0) : ProbabilityMeasure (Fin N β β) := | |
| β¨Measure.pi (fun _ : Fin N => gaussianReal 0 v), inferInstanceβ© | |
| lemma vectorGaussianLaw_moments {N : β} (hN : 0 < N) (v : ββ₯0) : | |
| IsingPerceptron.ExponentialNormMoments (vectorGaussianLaw N v : Measure (Fin N β β)) := by | |
| let : Nonempty (Fin N) := β¨β¨0, hNβ©β© | |
| have hm := IsingPerceptron.finite_gaussian_exponentialNormMoments | |
| (P := Measure.pi (fun _ : Fin N => gaussianReal 0 v)) | |
| (X := fun z : Fin N β β => z) measurable_id (fun _ => 0) (fun _ => v) | |
| (fun i => (measurePreserving_eval (fun _ : Fin N => gaussianReal 0 v) i).map_eq) | |
| change IsingPerceptron.ExponentialNormMoments | |
| ((Measure.pi (fun _ : Fin N => gaussianReal 0 v)).map id) at hm | |
| rw [Measure.map_id] at hm | |
| exact hm | |
| def rotatedCascadeLaw (N n : β) (b : β β β) (v : β β ββ₯0) : | |
| Measure (IsingPerceptron.NoiseTree (Fin N β β) n) := | |
| IsingPerceptron.noiseCascadeLaw (Fin N β β) n b (fun i => vectorGaussianLaw N (v i)) | |
| def rotatedCascadeLog {N : β} (n : β) (eig : Fin N β β) (U : Rotation N) | |
| (c z : Fin N β β) (T : IsingPerceptron.NoiseTree (Fin N β β) n) : β := | |
| Real.log (β« leaf, Real.exp (IsingPerceptron.noiseLeafTerminal n | |
| (fun _ => rotatedFieldTerminal eig U c) (fun _ p => p.1 + p.2) z leaf) | |
| βIsingPerceptron.noiseLeafKernel (Fin N β β) n T) | |
| def rotatedCascadeValue {N : β} (n : β) (b : β β β) (v : β β ββ₯0) | |
| (eig : Fin N β β) (U : Rotation N) (c z : Fin N β β) : β := | |
| IsingPerceptron.cascadeRecursion n b (fun i => vectorGaussianLaw N (v i)) | |
| (fun _ p => p.1 + p.2) (rotatedFieldTerminal eig U c) z | |
| /-- The published Gaussian marking recursion specialized to the actual | |
| finite rotated Ising terminal, with the Haar rotation held fixed. -/ | |
| theorem rotatedCascadeLog_recursion {N : β} (hN : 0 < N) (n : β) (b : β β β) | |
| (v : β β ββ₯0) (hb : IsingPerceptron.CascadeExponents n b) | |
| (eig : Fin N β β) (U : Rotation N) (c z : Fin N β β) : | |
| Integrable (rotatedCascadeLog n eig U c z) (rotatedCascadeLaw N n b v) β§ | |
| (β« T, rotatedCascadeLog n eig U c z T βrotatedCascadeLaw N n b v) = | |
| rotatedCascadeValue n b v eig U c z := by | |
| have h := IsingPerceptron.linearGrowth_noiseCascade_recursion n b hb | |
| (fun i => vectorGaussianLaw N (v i)) (fun i _ => vectorGaussianLaw_moments hN (v i)) | |
| (measurable_rotatedFieldTerminal eig U c) (rotatedFieldTerminal_linearGrowth eig U c) z | |
| have he := IsingPerceptron.noise_leaf_log_eq_ratio n b hb | |
| (fun i => vectorGaussianLaw N (v i)) | |
| (fun _ => measurable_fst.add measurable_snd) (measurable_rotatedFieldTerminal eig U c) z | |
| refine β¨h.2.1.congr (Filter.EventuallyEq.symm he), ?_β© | |
| exact (integral_congr_ae he).trans h.2.2.1 | |
| lemma integrable_rotatedCascadeValue {N : β} (hN : 0 < N) (n : β) (b : β β β) | |
| (v : β β ββ₯0) (hb : IsingPerceptron.CascadeExponents n b) | |
| (eig : Fin N β β) (U : Rotation N) (c : Fin N β β) (root : ββ₯0) : | |
| Integrable (rotatedCascadeValue n b v eig U c) | |
| (vectorGaussianLaw N root : Measure (Fin N β β)) := by | |
| have hm := IsingPerceptron.measurable_cascadeRecursion n b | |
| (fun i => vectorGaussianLaw N (v i)) | |
| (fun _ => measurable_fst.add measurable_snd) (measurable_rotatedFieldTerminal eig U c) | |
| change Measurable (rotatedCascadeValue n b v eig U c) at hm | |
| have hg := IsingPerceptron.cascadeRecursion_linearGrowth n b | |
| (fun i => vectorGaussianLaw N (v i)) (fun i _ => vectorGaussianLaw_moments hN (v i)) | |
| (measurable_rotatedFieldTerminal eig U c) (rotatedFieldTerminal_linearGrowth eig U c) | |
| (fun i hi => (hb.1 i hi).1) | |
| obtain β¨C, L, _, hL, hboundβ© := hg | |
| have hi := (integrable_const C).add ((vectorGaussianLaw_moments hN root 1).const_mul L) | |
| apply hi.mono' hm.aestronglyMeasurable | |
| exact ae_of_all _ fun z => by | |
| change |rotatedCascadeValue n b v eig U c z| β€ C + L * Real.exp (1 * βzβ) | |
| rw [one_mul] | |
| exact (hbound z).trans (add_le_add le_rfl | |
| (mul_le_mul_of_nonneg_left | |
| ((le_add_of_nonneg_right zero_le_one).trans (Real.add_one_le_exp βzβ)) hL)) | |
| def rotatedEnrichedPressure {N : β} (n : β) (b : β β β) (v : β β ββ₯0) | |
| (root : ββ₯0) (eig : Fin N β β) (U : Rotation N) (c : Fin N β β) : β := | |
| (N : β)β»ΒΉ * β« z, rotatedCascadeValue n b v eig U c z | |
| β(vectorGaussianLaw N root : Measure (Fin N β β)) | |
| /-- The fixed-rotation enriched pressure is the actual iterated Gaussian | |
| root and cascade expectation of the finite Ising log partition. -/ | |
| theorem rotatedEnrichedPressure_eq_cascade_expectation {N : β} (hN : 0 < N) | |
| (n : β) (b : β β β) (v : β β ββ₯0) (root : ββ₯0) | |
| (hb : IsingPerceptron.CascadeExponents n b) | |
| (eig : Fin N β β) (U : Rotation N) (c : Fin N β β) : | |
| rotatedEnrichedPressure n b v root eig U c = | |
| (N : β)β»ΒΉ * β« z, (β« T, rotatedCascadeLog n eig U c z T | |
| βrotatedCascadeLaw N n b v) β(vectorGaussianLaw N root : Measure (Fin N β β)) := by | |
| unfold rotatedEnrichedPressure | |
| congr 1 | |
| apply integral_congr_ae | |
| exact ae_of_all _ fun z => (rotatedCascadeLog_recursion hN n b v hb eig U c z).2.symm | |
| end InvariantIsing | |
| end | |
| end OAI | |