File size: 5,228 Bytes
4a56cd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
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