math / data /lean /OAI /Probability /FreeIsing /Trees /BroadcastOutsideCone.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
3.65 kB
import OAI.Probability.FreeIsing.Trees.BroadcastLocality
namespace OAI
noncomputable section
open MeasureTheory
namespace Problem367.RootedBroadcast
abbrev OutsideConeVertex {d : β„•} (b : TreeVertex d) :=
{v : TreeVertex d // Β¬ b.1 <+: v.1}
abbrev OutsideConeNonroot {d : β„•} (b : TreeVertex d) :=
{v : TreeVertex d // v.1 β‰  [] ∧ Β¬ b.1 <+: v.1}
def outsideConeNoise {d : β„•} (theta : ℝ) (b : TreeVertex d)
(Y : OutsideConeNonroot b β†’ ℝ) (v : TreeVertex d) : IsingSpin :=
if hv : v.1 β‰  [] ∧ Β¬ b.1 <+: v.1 then edgeNoise theta (Y ⟨v, hv⟩)
else IsingSpin.pos
theorem measurable_outsideConeNoise {d : β„•} (theta : ℝ) (b : TreeVertex d) :
Measurable (outsideConeNoise theta b) := by
apply Measurable.of_eval
intro v
by_cases hv : v.1 β‰  [] ∧ Β¬ b.1 <+: v.1
Β· simpa only [outsideConeNoise, dite_eq_left hv, Function.comp_def] using
(measurable_edgeNoise theta).comp
(measurable_pi_apply (X := fun _ : OutsideConeNonroot b => ℝ) ⟨v, hv⟩)
Β· simpa only [outsideConeNoise, dite_eq_right hv] using
(measurable_const : Measurable (fun _ : OutsideConeNonroot b β†’ ℝ => IsingSpin.pos))
theorem outsideConeNoise_ofNoise_eq_rootless {d : β„•} (theta : ℝ)
(b : TreeVertex d) (U : TreeVertex d β†’ ℝ) (v : OutsideConeVertex b) :
ofNoise (outsideConeNoise theta b (fun w : OutsideConeNonroot b => U w.1)) v.1 =
rootlessFactor theta (fun w : NonrootVertex d => U w.1) v.1 := by
apply ofNoise_congr_prefix
intro w hw
have hb : Β¬ b.1 <+: w.1 := fun hbw => v.2 (hbw.trans hw)
by_cases hr : w = root d
Β· subst w
simp [outsideConeNoise, nonrootNoise]
Β· have hnil : w.1 β‰  [] := fun h => hr ((eq_root_iff w).mpr h)
simp [outsideConeNoise, nonrootNoise, hnil, hb, hr]
def outsideConeFactor {d : β„•} (theta : ℝ) (b : TreeVertex d)
(a : OutsideConeVertex b) (p : IsingSpin Γ— (OutsideConeNonroot b β†’ ℝ)) :
OutsideConeVertex b β†’ IsingSpin :=
fun v => spinMul p.1
(spinMul (ofNoise (outsideConeNoise theta b p.2) a.1)
(ofNoise (outsideConeNoise theta b p.2) v.1))
theorem measurable_outsideConeFactor {d : β„•} (theta : ℝ)
(b : TreeVertex d) (a : OutsideConeVertex b) :
Measurable (outsideConeFactor theta b a) := by
apply Measurable.of_eval
intro v
have ha : Measurable (fun p : IsingSpin Γ— (OutsideConeNonroot b β†’ ℝ) =>
ofNoise (outsideConeNoise theta b p.2) a.1) :=
(measurable_ofNoise_apply a.1).comp
((measurable_outsideConeNoise theta b).comp measurable_snd)
have hv : Measurable (fun p : IsingSpin Γ— (OutsideConeNonroot b β†’ ℝ) =>
ofNoise (outsideConeNoise theta b p.2) v.1) :=
(measurable_ofNoise_apply v.1).comp
((measurable_outsideConeNoise theta b).comp measurable_snd)
exact measurable_spinMul.comp
(measurable_fst.prodMk (measurable_spinMul.comp (ha.prodMk hv)))
theorem factor_outsideCone_representation {d : β„•} (theta : ℝ)
(b : TreeVertex d) (a : OutsideConeVertex b) (U : TreeVertex d β†’ ℝ) :
(fun v : OutsideConeVertex b => factor theta U v.1) =
outsideConeFactor theta b a (factor theta U a.1,
fun w : OutsideConeNonroot b => U w.1) := by
funext v
change factor theta U v.1 = spinMul (factor theta U a.1)
(spinMul (ofNoise (outsideConeNoise theta b _) a.1)
(ofNoise (outsideConeNoise theta b _) v.1))
rw [outsideConeNoise_ofNoise_eq_rootless theta b U a,
outsideConeNoise_ofNoise_eq_rootless theta b U v,
factor_root_decomposition theta U a.1, factor_root_decomposition theta U v.1]
simp only [spinMul_assoc, spinMul_cancel]
end Problem367.RootedBroadcast
end
end OAI