Download data/lean/OAI/Probability/InvariantIsing/Arrays/NSpinTensorAncestorInput.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 11 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/InvariantIsing/Arrays/NSpinTensorAncestorInput.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/InvariantIsing/Arrays/NSpinTensorAncestorInput.lean
-
curl -L -o NSpinTensorAncestorInput.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/InvariantIsing/Arrays/NSpinTensorAncestorInput.lean
11 kB
| import OAI.Probability.InvariantIsing.Arrays.NSpinTensorRetained | |
| import OAI.Probability.IsingPerceptron.NormalizedRestrictionPi | |
| import OAI.Probability.IsingPerceptron.SamplingIndependent | |
| namespace OAI | |
| /-! | |
| The finite Ising tensor application of the conditional marked-path law. | |
| The conditional marked-path law is the finite two-path specialization of | |
| Panchenko--Talagrand, C. R. Acad. Sci. Paris I 345 (2007), 653--656, | |
| Section 3, Lemma 3.1, equation (8), p.655, and Corollary 3.2, equation (9), | |
| p.656. The mark spaces are complete separable metric spaces with their Borel | |
| sigma algebras; ancestor conditional distributions may be arbitrary and | |
| the measurable terminal need only satisfy `E exp X < infinity`. | |
| The Gaussian-vector terminal satisfies this exponential integrability | |
| hypothesis. | |
| The law describes the joint branching and marks, including their | |
| conditional ancestor distributions. | |
| Averaging the fixed-root law gives the random-root law. | |
| Forest edge `i` has shared mark exactly when `i < commonDepth`. | |
| -/ | |
| noncomputable section | |
| open MeasureTheory ProbabilityTheory IsingPerceptron | |
| open scoped BigOperators NNReal | |
| namespace InvariantIsing | |
| /-- The published marking theorem's exponential integrability hypothesis | |
| holds for the actual finite Ising terminal on a finite Gaussian path. -/ | |
| theorem tensorFinitePath_exp_integrable {N m k : β} (hN : 0 < N) | |
| (eig : Fin N β β) (U : Rotation N) (c : Fin N β β) | |
| (I : Fin m β Finset (Fin N)) (degree : Fin k β Fin m β β) (amplitude : Fin k β β) | |
| (n : β) (v : β β SpinTensorIndex I degree β ββ₯0) | |
| (z : SpinTensorIndex I degree β β) : | |
| Integrable (fun w : Fin n β SpinTensorIndex I degree β β => | |
| Real.exp (spinTensorTerminal eig U c I degree amplitude (z + β i, w i))) | |
| (Measure.pi (fun i : Fin n => | |
| (tensorGaussianLaw I degree (v i) : Measure (SpinTensorIndex I degree β β)))) := by | |
| obtain β¨C, L, _, hL, hboundβ© := spinTensorTerminal_linearGrowth eig U c I degree amplitude | |
| have hprod : Integrable (fun w : Fin n β SpinTensorIndex I degree β β => | |
| β i, Real.exp (L * βw iβ)) | |
| (Measure.pi (fun i : Fin n => | |
| (tensorGaussianLaw I degree (v i) : Measure (SpinTensorIndex I degree β β)))) := | |
| Integrable.fintype_prod (f := fun (i : Fin n) (a : SpinTensorIndex I degree β β) => | |
| Real.exp (L * βaβ)) fun i => tensorGaussianLaw_moments hN I degree (v i) L | |
| apply (hprod.const_mul (Real.exp (C + L * βzβ))).mono' | |
| (((measurable_spinTensorTerminal eig U c I degree amplitude).comp | |
| (measurable_const.add (Finset.measurable_sum _ fun i _ => measurable_pi_apply i))).exp.aestronglyMeasurable) | |
| apply ae_of_all | |
| intro w | |
| rw [Real.norm_eq_abs, abs_of_pos (Real.exp_pos _), β Real.exp_sum, β Real.exp_add] | |
| apply Real.exp_le_exp.mpr | |
| calc | |
| _ β€ |spinTensorTerminal eig U c I degree amplitude (z + β i, w i)| := le_abs_self _ | |
| _ β€ C + L * βz + β i, w iβ := hbound _ | |
| _ β€ C + L * (βzβ + β i, βw iβ) := by | |
| apply add_le_add_right (mul_le_mul_of_nonneg_left _ hL) | |
| exact (norm_add_le _ _).trans (add_le_add_right (norm_sum_le _ _) _) | |
| _ = C + L * βzβ + β i, L * βw iβ := by rw [mul_add, Finset.mul_sum]; ring | |
| private lemma tensor_abs_integral_bound {A : Type*} [MeasurableSpace A] | |
| {ΞΌ : Measure A} [IsProbabilityMeasure ΞΌ] (f : A β β) {C : β} | |
| (hf : β a, |f a| β€ C) : |β« a, f a βΞΌ| β€ C := by | |
| have hh : βα΅ a βΞΌ, βf aβ β€ C := ae_of_all _ fun a => by | |
| simpa only [Real.norm_eq_abs] using hf a | |
| simpa only [Real.norm_eq_abs, probReal_univ, mul_one] using | |
| norm_integral_le_of_norm_le_const (ΞΌ := ΞΌ) (f := f) hh | |
| /-- Iterated conditional expectation of two Gaussian increment paths. Before | |
| their branching depth the two paths receive the same tilted increment; | |
| afterwards their next increments are conditionally independent. -/ | |
| def tensorAncestorPairPathMean {N m k : β} | |
| (eig : Fin N β β) (U : Rotation N) (c : Fin N β β) | |
| (I : Fin m β Finset (Fin N)) (degree : Fin k β Fin m β β) (amplitude : Fin k β β) | |
| (n : β) (b : β β β) (v : β β SpinTensorIndex I degree β ββ₯0) (d : β) : | |
| (q : β) β β β (SpinTensorIndex I degree β β) β (SpinTensorIndex I degree β β) β | |
| ((Fin q β (SpinTensorIndex I degree β β) Γ (SpinTensorIndex I degree β β)) β β) β β | |
| | 0, _, _, _, F => F Fin.elim0 | |
| | q + 1, i, zβ, zβ, F => | |
| if i < d then | |
| β« a, tensorAncestorPairPathMean eig U c I degree amplitude n b v d q (i + 1) | |
| (zβ + a) (zβ + a) (fun w => F (Fin.cons (a, a) w)) | |
| βtensorAncestorMarkKernel eig U c I degree amplitude n b v i zβ | |
| else | |
| β« aβ, β« aβ, tensorAncestorPairPathMean eig U c I degree amplitude n b v d q (i + 1) | |
| (zβ + aβ) (zβ + aβ) (fun w => F (Fin.cons (aβ, aβ) w)) | |
| βtensorAncestorMarkKernel eig U c I degree amplitude n b v i zβ | |
| βtensorAncestorMarkKernel eig U c I degree amplitude n b v i zβ | |
| theorem tensorAncestorPairPathMean_abs_le {N m k : β} (hN : 0 < N) | |
| (eig : Fin N β β) (U : Rotation N) (c : Fin 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) (d q i : β) | |
| (zβ zβ : SpinTensorIndex I degree β β) | |
| (F : (Fin q β (SpinTensorIndex I degree β β) Γ (SpinTensorIndex I degree β β)) β β) | |
| {C : β} (hF : β w, |F w| β€ C) : | |
| |tensorAncestorPairPathMean eig U c I degree amplitude n b v d q i zβ zβ F| β€ C := by | |
| induction q generalizing i zβ zβ with | |
| | zero => exact hF _ | |
| | succ q ih => | |
| have := tensorAncestorMarkKernel_markov hN eig U c I degree amplitude n b v hb i | |
| dsimp only [tensorAncestorPairPathMean] | |
| split_ifs | |
| Β· apply tensor_abs_integral_bound | |
| intro a | |
| exact ih (i + 1) (zβ + a) (zβ + a) | |
| (fun w => F (Fin.cons (a, a) w)) (fun w => hF _) | |
| Β· have hinner (aβ : SpinTensorIndex I degree β β) : | |
| |β« aβ, tensorAncestorPairPathMean eig U c I degree amplitude n b v d q (i + 1) | |
| (zβ + aβ) (zβ + aβ) (fun w => F (Fin.cons (aβ, aβ) w)) | |
| βtensorAncestorMarkKernel eig U c I degree amplitude n b v i zβ| β€ C := by | |
| apply tensor_abs_integral_bound | |
| intro aβ | |
| exact ih (i + 1) (zβ + aβ) (zβ + aβ) | |
| (fun w => F (Fin.cons (aβ, aβ) w)) (fun w => hF _) | |
| exact tensor_abs_integral_bound _ hinner | |
| /-- The actual tilted two-leaf Gaussian path expectation, with the spin | |
| residual integrated in the finite Ising terminal. -/ | |
| def tensorTiltedPairPathMean {N m k : β} | |
| (eig : Fin N β β) (U : Rotation N) (c : Fin N β β) | |
| (I : Fin m β Finset (Fin N)) (degree : Fin k β Fin m β β) (amplitude : Fin k β β) | |
| (n : β) (b : β β β) (v : β β SpinTensorIndex I degree β ββ₯0) | |
| (z : SpinTensorIndex I degree β β) | |
| (Ξ¦ : β Γ (Fin n β (SpinTensorIndex I degree β β) Γ (SpinTensorIndex I degree β β)) β β) : β := | |
| β« p : TensorCoordinateData I degree n, | |
| referenceReplicaMean (labeledLeafLaw n p.1) | |
| (fun Ξ± => spinTensorTerminal eig U c I degree amplitude | |
| (labeledEnergy n (markForestOfCoords (SpinTensorIndex I degree β β) n p.2) Ξ± z)) | |
| (fun Ο : Fin 2 β LabeledLeaf n => Ξ¦ | |
| (labeledCommonDepth n (Ο 0) (Ο 1), | |
| fun i => (p.2 (edgeAt n (Ο 0) i), p.2 (edgeAt n (Ο 1) i)))) | |
| βtensorCoordinateLaw I degree n b v | |
| /-- The exact finite tensor specialization of the published joint marked | |
| path law. The unperturbed cascade supplies the shared-prefix depth and | |
| the normalized ancestor kernels supply the conditional marks. -/ | |
| def TensorAncestorPairLaw {N m k : β} | |
| (eig : Fin N β β) (U : Rotation N) (c : Fin N β β) | |
| (I : Fin m β Finset (Fin N)) (degree : Fin k β Fin m β β) (amplitude : Fin k β β) | |
| (n : β) (b : β β β) (v : β β SpinTensorIndex I degree β ββ₯0) : Prop := | |
| β z : SpinTensorIndex I degree β β, | |
| β Ξ¦ : β Γ (Fin n β (SpinTensorIndex I degree β β) Γ (SpinTensorIndex I degree β β)) β β, | |
| Measurable Ξ¦ β (β C : β, β p, |Ξ¦ p| β€ C) β | |
| tensorTiltedPairPathMean eig U c I degree amplitude n b v z Ξ¦ = | |
| β« Ξ± : β β LabeledLeaf n, | |
| tensorAncestorPairPathMean eig U c I degree amplitude n b v | |
| (labeledCommonDepth n (Ξ± 0) (Ξ± 1)) n 0 z z | |
| (fun w => Ξ¦ (labeledCommonDepth n (Ξ± 0) (Ξ± 1), w)) | |
| βcascadeReplicaLaw n b | |
| /-- Conditional two-path marking law for finite hierarchical tensor fields. -/ | |
| def PanchenkoTalagrandTensorPairInput : Prop := | |
| β N m k : β, 0 < N β | |
| β (eig : Fin N β β) (U : Rotation N) (c : Fin N β β) | |
| (I : Fin m β Finset (Fin N)) (degree : Fin k β Fin m β β) (amplitude : Fin k β β) | |
| (n : β) (b : β β β) (v : β β SpinTensorIndex I degree β ββ₯0), | |
| CascadeExponents n b β TensorAncestorPairLaw eig U c I degree amplitude n b v | |
| /-- The independent root Gaussian is averaged after the fixed-root path | |
| identity. Root level zero and forest levels one through `n` agree with | |
| the flat tensor coefficient convention. -/ | |
| theorem tensorRootedPairPath_identity (hpub : PanchenkoTalagrandTensorPairInput) | |
| {N m k : β} (hN : 0 < N) | |
| (eig : Fin N β β) (U : Rotation N) (c : Fin 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) | |
| (Ξ¦ : (SpinTensorIndex I degree β β) Γ | |
| (β Γ (Fin n β (SpinTensorIndex I degree β β) Γ (SpinTensorIndex I degree β β))) β β) | |
| (hΞ¦ : Measurable Ξ¦) (hΞ¦b : β C : β, β p, |Ξ¦ p| β€ C) : | |
| (β« z, tensorTiltedPairPathMean eig U c I degree amplitude n b (fun i => v (i + 1)) z | |
| (fun p => Ξ¦ (z, p)) | |
| β(tensorGaussianLaw I degree (v 0) : Measure (SpinTensorIndex I degree β β))) = | |
| β« z, β« Ξ± : β β LabeledLeaf n, | |
| tensorAncestorPairPathMean eig U c I degree amplitude n b (fun i => v (i + 1)) | |
| (labeledCommonDepth n (Ξ± 0) (Ξ± 1)) n 0 z z | |
| (fun w => Ξ¦ (z, labeledCommonDepth n (Ξ± 0) (Ξ± 1), w)) | |
| βcascadeReplicaLaw n b | |
| β(tensorGaussianLaw I degree (v 0) : Measure (SpinTensorIndex I degree β β)) := by | |
| apply integral_congr_ae | |
| apply ae_of_all | |
| intro z | |
| apply hpub N m k hN eig U c I degree amplitude n b (fun i => v (i + 1)) hb z | |
| · exact hΦ.comp (measurable_const.prodMk measurable_id) | |
| Β· obtain β¨C, hCβ© := hΞ¦b | |
| exact β¨C, fun p => hC (z, p)β© | |
| end InvariantIsing | |
| end | |
| end OAI | |