math / data /lean /OAI /Probability /InvariantIsing /Fields /FieldDepthPair.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
5.23 kB
import OAI.Probability.InvariantIsing.Fields.FieldSpinMeasurability
namespace OAI
/-! Preservation of the common-level law by the published finite-field
terminal tilt, including the independent scalar-field spins. -/
noncomputable section
open MeasureTheory ProbabilityTheory IsingPerceptron
open scoped BigOperators NNReal
namespace InvariantIsing
lemma field_leaf_depth_pair_conditioning {N n : β„•}
(Ξ½ : Measure (LabeledLeaf n)) [IsProbabilityMeasure Ξ½]
(Y : LabeledLeaf n β†’ Fin N β†’ ℝ)
(he : Integrable (fun p : Spin N Γ— LabeledLeaf n => Real.exp (fieldEnergy (Y p.2) p.1))
((uniformSpinPrior N : Measure (Spin N)).prod Ξ½))
(ψ : β„• β†’ ℝ) {C : ℝ} (hψ : βˆ€ d, |ψ d| ≀ C) :
referenceReplicaMean ((uniformSpinPrior N : Measure (Spin N)).prod Ξ½)
(fun p => fieldEnergy (Y p.2) p.1)
(fun Οƒ : Fin 2 β†’ Spin N Γ— LabeledLeaf n => ψ (labeledCommonDepth n (Οƒ 0).2 (Οƒ 1).2)) =
referenceReplicaMean Ξ½ (fun Ξ± => βˆ‘ i, Real.log (Real.cosh (Y Ξ± i)))
(fun Ξ± : Fin 2 β†’ LabeledLeaf n => ψ (labeledCommonDepth n (Ξ± 0) (Ξ± 1))) := by
let H := fun p : Spin N Γ— LabeledLeaf n => fieldEnergy (Y p.2) p.1
have ht : spinLeafTerminal H = (fun Ξ± => βˆ‘ i, Real.log (Real.cosh (Y Ξ± i))) := by
funext Ξ±
change finiteLogIntegral (uniformSpinPrior N : Measure (Spin N)) (fieldEnergy (Y Ξ±)) = _
rw [finiteLogIntegral_uniformSpinPrior, logPartition_fieldEnergy]
rw [spinLeafPair_conditioning Ξ½ H he _ ⟨C, fun Οƒ => hψ _⟩, ht]
congr 1
funext Ξ±
change (∫ _ : Fin 2 β†’ Spin N, ψ (labeledCommonDepth n (Ξ± 0) (Ξ± 1)) βˆ‚_) = _
simp only [integral_const, probReal_univ, smul_eq_mul, one_mul]
lemma field_published_depth_test (hpub : PanchenkoTalagrandFieldPairInput)
(N : β„•) (hN : 0 < N) (h : FieldStep) (ψ : β„• β†’ ℝ)
{C : ℝ} (hψ : βˆ€ d, |ψ d| ≀ C) (z : Fin N β†’ ℝ) :
fieldVectorTiltedPairMean N h z (fun p => ψ p.1) =
∫ s, ψ (fieldLevelIndex h s).val βˆ‚pathMeasure := by
have hm : Measurable (fun p : β„• Γ— ((Fin N β†’ ℝ) Γ— (Fin N β†’ ℝ)) => ψ p.1) :=
(measurable_of_countable ψ).comp measurable_fst
rw [hpub N hN h z (fun p => ψ p.1) hm ⟨C, fun p => hψ p.1⟩]
simp only [integral_const, probReal_univ, smul_eq_mul, one_mul]
exact fieldCommonLevel_integral h (fun i => ψ i.val)
def fieldDepthPairIntegrand (N : β„•) (h : FieldStep) (z : Fin N β†’ ℝ)
(p : LabeledTree h.depth Γ— (ForestVertex h.depth β†’ Fin N β†’ ℝ)) (ψ : β„• β†’ ℝ) : ℝ :=
referenceReplicaMean
((uniformSpinPrior N : Measure (Spin N)).prod (labeledLeafLaw h.depth p.1))
(fun s : Spin N Γ— LabeledLeaf h.depth => fieldEnergy (fieldVectorEndpoint N h p z s.2) s.1)
(fun Οƒ : Fin 2 β†’ Spin N Γ— LabeledLeaf h.depth =>
ψ (labeledCommonDepth h.depth (Οƒ 0).2 (Οƒ 1).2))
def fieldVectorDepthPairMean (N : β„•) (h : FieldStep) (z : Fin N β†’ ℝ) (ψ : β„• β†’ ℝ) : ℝ :=
∫ p, fieldDepthPairIntegrand N h z p ψ βˆ‚fieldVectorCoordinateLaw N h
lemma measurable_fieldDepthPairIntegrand (N : β„•) (h : FieldStep) (ψ : β„• β†’ ℝ) :
Measurable (fun p : (Fin N β†’ ℝ) Γ—
(LabeledTree h.depth Γ— (ForestVertex h.depth β†’ Fin N β†’ ℝ)) =>
fieldDepthPairIntegrand N h p.1 p.2 ψ) := by
let D : (Fin 2 β†’ Spin N Γ— LabeledLeaf h.depth) β†’ ℝ := fun Οƒ =>
ψ (labeledCommonDepth h.depth (Οƒ 0).2 (Οƒ 1).2)
have hm := measurable_cascadeCoordinateReplicaMean h.depth
(uniformSpinPrior N : Measure (Spin N)) (measurable_fieldEnergy_map N) D
have hc : Measurable (fun p : (Fin N β†’ ℝ) Γ—
(LabeledTree h.depth Γ— (ForestVertex h.depth β†’ Fin N β†’ ℝ)) =>
(p.1, fieldEnergyCoordinates N h p.2)) :=
measurable_fst.prodMk ((measurable_fieldEnergyCoordinates N h).comp measurable_snd)
have he (z : Fin N β†’ ℝ)
(p : LabeledTree h.depth Γ— (ForestVertex h.depth β†’ Fin N β†’ ℝ)) :
cascadeCoordinateEnergy h.depth (fieldEnergy z) (fieldEnergyCoordinates N h p) =
fun s => fieldEnergy (fieldVectorEndpoint N h p z s.2) s.1 :=
funext (fieldEnergyCoordinates_energy N h p z)
have hh := hm.comp hc
simp only [Function.comp_def] at hh
simp_rw [he] at hh
simpa only [labeledSpinReference, fieldEnergyCoordinates, fieldDepthPairIntegrand, D] using hh
lemma measurable_fieldVectorDepthPairMean (N : β„•) (h : FieldStep) (ψ : β„• β†’ ℝ) :
Measurable (fun z => fieldVectorDepthPairMean N h z ψ) :=
(measurable_fieldDepthPairIntegrand N h ψ).stronglyMeasurable.integral_prod_right'.measurable
theorem field_vector_depth_pair_evaluation (hpub : PanchenkoTalagrandFieldPairInput)
(N : β„•) (hN : 0 < N) (h : FieldStep) (ψ : β„• β†’ ℝ)
{C : ℝ} (hψ : βˆ€ d, |ψ d| ≀ C) (z : Fin N β†’ ℝ) :
fieldVectorDepthPairMean N h z ψ = ∫ s, ψ (fieldLevelIndex h s).val βˆ‚pathMeasure := by
rw [← field_published_depth_test hpub N hN h ψ hψ z]
unfold fieldVectorDepthPairMean fieldVectorTiltedPairMean
apply integral_congr_ae
filter_upwards [field_vector_spin_exp_integrable N hN h z] with p hp
exact field_leaf_depth_pair_conditioning (labeledLeafLaw h.depth p.1)
(fieldVectorEndpoint N h p z) hp ψ hψ
end InvariantIsing
end
end OAI