File size: 4,368 Bytes
f61e547
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import OAI.Probability.FreeIsing.Conditioning.DiscreteConditioning
import OAI.Probability.FreeIsing.Trees.NoisyBranchIndependence

namespace OAI

noncomputable section

open MeasureTheory ProbabilityTheory

namespace Problem367

local instance noisyBranchConditionalLawMeasurableSingletonIsingSpin :
    MeasurableSingletonClass IsingSpin := ⟨fun _ => trivial⟩

theorem HasFreeIsingLaw.planted_spin_event_mass
    {d : ℕ} {theta : ℝ} {A : Type*} [MeasurableSpace A]
    {μ : Measure (TreeVertex d → IsingSpin)} (hμ : HasFreeIsingLaw theta μ)
    (ν : TreeVertex d → Measure A) [∀ v, IsProbabilityMeasure (ν v)]
    (v : TreeVertex d) (s : IsingSpin) :
    (μ.prod (Measure.infinitePi ν))
      {z : (TreeVertex d → IsingSpin) × (TreeVertex d → A) | z.1 v = s} = 1 / 2 := by
  let : IsProbabilityMeasure μ := hμ.isProbabilityMeasure
  have hset :
      {z : (TreeVertex d → IsingSpin) × (TreeVertex d → A) | z.1 v = s} =
        {x : TreeVertex d → IsingSpin | x v = s} ×ˢ Set.univ := by
    ext z
    simp
  rw [hset, Measure.prod_prod, measure_univ, mul_one, hμ.marginal]
  norm_num [ENNReal.ofReal_div_of_pos]

def plantedBranchObservations {d : ℕ} {A T : Type*}
    (a : T → ℝ) (B : TreeVertex d → T → A → ℝ) (c : Fin d)
    (z : (TreeVertex d → IsingSpin) × (TreeVertex d → A))
    (v : RootedBroadcast.BranchVertex c) (t : T) : ℝ :=
  a t * (z.1 v.val).toReal + B v.val t (z.2 v.val)

theorem measurable_plantedBranchObservations {d : ℕ} {A T : Type*}
    [MeasurableSpace A] (a : T → ℝ) (B : TreeVertex d → T → A → ℝ)
    (hB : ∀ v t, Measurable (B v t)) (c : Fin d) :
    Measurable (plantedBranchObservations a B c) := by
  apply Measurable.of_eval
  intro v
  apply Measurable.of_eval
  intro t
  exact ((measurable_spinToReal.comp ((measurable_pi_apply v.val).comp
    measurable_fst)).const_mul (a t)).add
      ((hB v.val t).comp ((measurable_pi_apply v.val).comp measurable_snd))

theorem HasFreeIsingLaw.iIndepFun_planted_branches_cond_root
    {d : ℕ} {theta : ℝ} {A T : Type*}
    [MeasurableSpace A] [StandardBorelSpace A]
    {μ : Measure (TreeVertex d → IsingSpin)} (hμ : HasFreeIsingLaw theta μ)
    (h0 : -1 ≤ theta) (h1 : theta ≤ 1)
    (ν : TreeVertex d → Measure A) [∀ v, IsProbabilityMeasure (ν v)]
    (a : T → ℝ) (B : TreeVertex d → T → A → ℝ)
    (hB : ∀ v t, Measurable (B v t)) (s : IsingSpin) :
    iIndepFun (plantedBranchObservations a B)
      (μ.prod (Measure.infinitePi ν))[|
        {z : (TreeVertex d → IsingSpin) × (TreeVertex d → A) |
          z.1 (RootedBroadcast.root d) = s}] := by
  let : IsProbabilityMeasure μ := hμ.isProbabilityMeasure
  have hroot : Measurable (fun z : (TreeVertex d → IsingSpin) × (TreeVertex d → A) =>
      z.1 (RootedBroadcast.root d)) :=
    (measurable_pi_apply (RootedBroadcast.root d)).comp measurable_fst
  apply iIndepFun_cond_fiber_of_iCondIndepFun hroot
    (measurable_plantedBranchObservations a B hB)
    (hμ.iCondIndepFun_planted_branch_observations h0 h1 ν a B hB) s
  change (μ.prod (Measure.infinitePi ν))
    {z : (TreeVertex d → IsingSpin) × (TreeVertex d → A) |
      z.1 (RootedBroadcast.root d) = s} ≠ 0
  rw [hμ.planted_spin_event_mass ν]
  norm_num

theorem HasFreeIsingLaw.map_planted_branches_cond_root
    {d : ℕ} {theta : ℝ} {A T : Type*}
    [MeasurableSpace A] [StandardBorelSpace A]
    {μ : Measure (TreeVertex d → IsingSpin)} (hμ : HasFreeIsingLaw theta μ)
    (h0 : -1 ≤ theta) (h1 : theta ≤ 1)
    (ν : TreeVertex d → Measure A) [∀ v, IsProbabilityMeasure (ν v)]
    (a : T → ℝ) (B : TreeVertex d → T → A → ℝ)
    (hB : ∀ v t, Measurable (B v t)) (s : IsingSpin) :
    ((μ.prod (Measure.infinitePi ν))[|
        {z : (TreeVertex d → IsingSpin) × (TreeVertex d → A) |
          z.1 (RootedBroadcast.root d) = s}]).map
      (fun z c => plantedBranchObservations a B c z) =
    Measure.infinitePi (fun c : Fin d =>
      ((μ.prod (Measure.infinitePi ν))[|
        {z : (TreeVertex d → IsingSpin) × (TreeVertex d → A) |
          z.1 (RootedBroadcast.root d) = s}]).map (plantedBranchObservations a B c)) := by
  exact (hμ.iIndepFun_planted_branches_cond_root h0 h1 ν a B hB s).map_fun_eq_infinitePi_map
    (measurable_plantedBranchObservations a B hB)

end Problem367

end

end OAI