Download data/lean/OAI/Probability/InvariantIsing/Arrays/NSpinTensorHaarFluctuation.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 8.41 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/InvariantIsing/Arrays/NSpinTensorHaarFluctuation.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/InvariantIsing/Arrays/NSpinTensorHaarFluctuation.lean
-
curl -L -o NSpinTensorHaarFluctuation.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/InvariantIsing/Arrays/NSpinTensorHaarFluctuation.lean
8.41 kB
| import OAI.Probability.InvariantIsing.Arrays.NSpinTensorHaar | |
| import OAI.Probability.InvariantIsing.Arrays.NSpinTensorFluctuation | |
| namespace OAI | |
| /-! Full Haar, Gaussian-root, and cascade fluctuations for the actual finite tensor model. -/ | |
| noncomputable section | |
| open MeasureTheory ProbabilityTheory IsingPerceptron | |
| open scoped BigOperators NNReal | |
| namespace InvariantIsing | |
| /-- Independent common Gaussian root and marked cascade. -/ | |
| def tensorRootTreeLaw {N m k : β} (I : Fin m β Finset (Fin N)) | |
| (degree : Fin k β Fin m β β) (n : β) (b : β β β) | |
| (v : β β SpinTensorIndex I degree β ββ₯0) (root : SpinTensorIndex I degree β ββ₯0) : | |
| Measure ((SpinTensorIndex I degree β β) Γ NoiseTree (SpinTensorIndex I degree β β) n) := | |
| (tensorGaussianLaw I degree root : Measure (SpinTensorIndex I degree β β)).prod | |
| (tensorCascadeLaw I degree n b v) | |
| instance tensorRootTreeLaw_probability {N m k : β} (I : Fin m β Finset (Fin N)) | |
| (degree : Fin k β Fin m β β) (n : β) (b : β β β) | |
| (v : β β SpinTensorIndex I degree β ββ₯0) (root : SpinTensorIndex I degree β ββ₯0) : | |
| IsProbabilityMeasure (tensorRootTreeLaw I degree n b v root) := by | |
| let : IsProbabilityMeasure (tensorCascadeLaw I degree n b v) := | |
| (noiseCascadeLaw (SpinTensorIndex I degree β β) n b | |
| (fun i => tensorGaussianLaw I degree (v i))).prop | |
| unfold tensorRootTreeLaw | |
| infer_instance | |
| /-- The normalized spin/leaf log partition retaining all three disorders. -/ | |
| def tensorDisorderPressure {N m k : β} (eig c : Fin N β β) | |
| (I : Fin m β Finset (Fin N)) (degree : Fin k β Fin m β β) (amplitude : Fin k β β) (n : β) | |
| (p : SpecialOrthogonal N Γ ((SpinTensorIndex I degree β β) Γ | |
| NoiseTree (SpinTensorIndex I degree β β) n)) : β := | |
| (N : β)β»ΒΉ * tensorCascadeLog eig (specialRotation p.1) c I degree amplitude n p.2.1 p.2.2 | |
| private lemma measurable_tensorLeafState {N m k : β} (I : Fin m β Finset (Fin N)) | |
| (degree : Fin k β Fin m β β) (n : β) : | |
| Measurable (fun p : (SpinTensorIndex I degree β β) Γ NoiseLeaf (SpinTensorIndex I degree β β) n => | |
| tensorLeafState I degree n p.1 p.2) := by | |
| induction n with | |
| | zero => exact measurable_fst | |
| | succ n ih => | |
| exact ih.comp ((measurable_fst.add measurable_snd.snd.fst).prodMk measurable_snd.snd.snd) | |
| lemma measurable_tensorDisorderPressure {N m k : β} (eig c : Fin N β β) | |
| (I : Fin m β Finset (Fin N)) (degree : Fin k β Fin m β β) (amplitude : Fin k β β) (n : β) : | |
| Measurable (tensorDisorderPressure eig c I degree amplitude n) := by | |
| let Ξ© := SpecialOrthogonal N Γ ((SpinTensorIndex I degree β β) Γ | |
| NoiseTree (SpinTensorIndex I degree β β) n) | |
| have hs : Measurable (fun p : Ξ© Γ NoiseLeaf (SpinTensorIndex I degree β β) n => | |
| (p.1.1, tensorLeafState I degree n p.1.2.1 p.2)) := | |
| measurable_fst.fst.prodMk ((measurable_tensorLeafState I degree n).comp | |
| (measurable_fst.snd.fst.prodMk measurable_snd)) | |
| have ht := ((measurable_spinTensorTerminal_joint eig c I degree amplitude).comp hs).exp | |
| have hi := (ht.stronglyMeasurable.integral_kernel_prod_right' | |
| (ΞΊ := (noiseLeafKernel (SpinTensorIndex I degree β β) n).comap | |
| (fun p : Ξ© => p.2.2) measurable_snd.snd)).measurable.log | |
| have hlog : Measurable (fun p : Ξ© => tensorCascadeLog eig (specialRotation p.1) c | |
| I degree amplitude n p.2.1 p.2.2) := by | |
| simpa only [tensorCascadeLog, noiseLeafTerminal_spinTensorTerminal, Function.comp_apply, | |
| Kernel.comap_apply] using hi | |
| exact hlog.const_mul (N : β)β»ΒΉ | |
| lemma tensorDisorderPressure_conditional_mean (hpub : GaussianLipschitzVarianceInput) | |
| {N m k : β} (hN : 0 < N) (eig c : Fin N β β) (U : SpecialOrthogonal N) | |
| (I : Fin m β Finset (Fin N)) (degree : Fin k β Fin m β β) (amplitude : Fin k β β) | |
| (n : β) (b : β β β) (v : β β SpinTensorIndex I degree β ββ₯0) | |
| (hb : CascadeExponents n b) (site : ββ₯0) (monomial : Fin k β ββ₯0) : | |
| (β« q, tensorDisorderPressure eig c I degree amplitude n (U, q) | |
| βtensorRootTreeLaw I degree n b v (tensorVarianceProfile I degree site monomial)) = | |
| tensorEnrichedPressure eig (specialRotation U) c I degree amplitude n b v | |
| (tensorVarianceProfile I degree site monomial) := by | |
| let : IsProbabilityMeasure (tensorCascadeLaw I degree n b v) := | |
| (noiseCascadeLaw (SpinTensorIndex I degree β β) n b | |
| (fun i => tensorGaussianLaw I degree (v i))).prop | |
| have h := tensorCascadeLog_root_tree_variance_le hpub hN eig (specialRotation U) c | |
| I degree amplitude n b v hb site monomial | |
| unfold tensorDisorderPressure tensorEnrichedPressure tensorRootTreeLaw | |
| rw [integral_const_mul, integral_prod _ (h.1.integrable (by norm_num))] | |
| congr 1 | |
| apply integral_congr_ae | |
| exact ae_of_all _ fun z => | |
| (tensorCascadeLog_recursion hN eig (specialRotation U) c I degree amplitude n b v hb z).2.1 | |
| /-- The full pressure variance is the sum of the root/cascade conditional | |
| contribution and the Haar variance of its conditional mean. -/ | |
| theorem tensorDisorderPressure_variance (hhaar : HaarConcentrationInput) | |
| (hgauss : GaussianLipschitzVarianceInput) : | |
| β C : β, 0 < C β§ | |
| β N : β, 3 β€ N β | |
| β ΞΌ : Measure (SpecialOrthogonal N), IsProbabilityMeasure ΞΌ β ΞΌ.IsMulLeftInvariant β | |
| β m k : β, β eig c : Fin N β β, β K : β, 0 < K β (β i, |eig i| β€ K) β | |
| β I : Fin m β Finset (Fin N), β degree : Fin k β Fin m β β, | |
| β amplitude : Fin k β β, β n : β, β b : β β β, CascadeExponents n b β | |
| β site : β β ββ₯0, β monomial : β β Fin k β ββ₯0, | |
| let v := fun i => tensorVarianceProfile I degree (site i) (monomial i) | |
| let P := tensorRootTreeLaw I degree n b (fun i => v (i + 1)) (v 0) | |
| let F := tensorDisorderPressure eig c I degree amplitude n | |
| let L := K + 2 * (N : β)β»ΒΉ * | |
| (β i : Fin (n + 1), β j, (monomial i j : β) * amplitude j ^ 2 * β a, (degree j a : β)) | |
| MemLp F 2 (ΞΌ.prod P) β§ variance F (ΞΌ.prod P) β€ | |
| (4 * (β« T, (Real.log (rawTreeTotal n T).toReal) ^ 2 | |
| β(rawCascadeLaw n b : Measure (RawTree n))) + | |
| (site 0 : β) * N + β j, (monomial 0 j : β) * amplitude j ^ 2) / (N : β) ^ 2 + | |
| C * L ^ 2 / N := by | |
| obtain β¨C, hC, hHaarβ© := haar_tensorEnrichedPressure_variance hhaar | |
| refine β¨C, hC, ?_β© | |
| intro N hN ΞΌ hΞΌ hΞΌinv m k eig c K hK heig I degree amplitude n b hb site monomial v P F L | |
| let : IsProbabilityMeasure ΞΌ := hΞΌ | |
| have hNm : 0 < N := by omega | |
| let X := fun U : SpecialOrthogonal N => tensorEnrichedPressure eig (specialRotation U) c | |
| I degree amplitude n b (fun i => v (i + 1)) (v 0) | |
| have hX := hHaar N hN ΞΌ hΞΌ hΞΌinv m k eig c K hK heig I degree amplitude n b hb site monomial | |
| have hsec (U : SpecialOrthogonal N) : MemLp (fun q => F (U, q)) 2 P β§ | |
| variance (fun q => F (U, q)) P β€ | |
| (4 * (β« T, (Real.log (rawTreeTotal n T).toReal) ^ 2 | |
| β(rawCascadeLaw n b : Measure (RawTree n))) + | |
| (site 0 : β) * N + β j, (monomial 0 j : β) * amplitude j ^ 2) / (N : β) ^ 2 := | |
| normalized_tensorCascadeLog_root_tree_variance_le hgauss hNm eig (specialRotation U) c | |
| I degree amplitude n b (fun i => v (i + 1)) hb (site 0) (monomial 0) | |
| have hc (U : SpecialOrthogonal N) : (β« q, F (U, q) βP) = X U := | |
| tensorDisorderPressure_conditional_mean hgauss hNm eig c U I degree amplitude n b | |
| (fun i => v (i + 1)) hb (site 0) (monomial 0) | |
| have hi (U : SpecialOrthogonal N) : Integrable (fun q => (F (U, q) - X U) ^ 2) P := | |
| ((hsec U).1.sub (memLp_const (X U))).integrable_sq | |
| have hbnd (U : SpecialOrthogonal N) : (β« q, (F (U, q) - X U) ^ 2 βP) β€ | |
| (4 * (β« T, (Real.log (rawTreeTotal n T).toReal) ^ 2 | |
| β(rawCascadeLaw n b : Measure (RawTree n))) + | |
| (site 0 : β) * N + β j, (monomial 0 j : β) * amplitude j ^ 2) / (N : β) ^ 2 := by | |
| have he := variance_eq_integral (hsec U).1.aemeasurable | |
| rw [hc U] at he | |
| rw [β he] | |
| exact (hsec U).2 | |
| have h := variance_of_conditional_center ΞΌ P | |
| (measurable_tensorDisorderPressure eig c I degree amplitude n) hX.1 hi hc hbnd | |
| exact β¨h.1, h.2.trans (add_le_add_right hX.2 _)β© | |
| end InvariantIsing | |
| end | |
| end OAI | |