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