math / data /lean /OAI /Probability /InvariantIsing /Arrays /NSpinTensorAncestorInput.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
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