lemmanoiseGibbsRegular_ae (n : ℕ) (b : ℕ→ℝ) (hb : CascadeExponents n b)
(μ : ℕ→ProbabilityMeasureA) {c : ℕ→S×A→ℝ} {u : ℕ→S×A→S}
(hc : ∀ i, Measurable (c i)) (hu : ∀ i, Measurable (u i))
(hcpos : ∀ i s a, 0 < c i (s,a))
(hm : ∀ i s, ∫⁻ a, ENNReal.ofReal (c i (s,a)^b i) ∂(μ i : MeasureA) = 1) (s : S) :
∀ᵐ ν ∂(noiseCascadeLaw An b μ : Measure (NoiseTreeA n)), NoiseGibbsRegular n b μ c u s ν :=by
proof · 37
lines
induction n generalizing b μ c u s with
| zero => exact ae_of_all _ (fun _ => trivial)
| succ n ih =>letI:= (powerIntensity (b 0)).prod ((μ 0 : MeasureA).prod
(noiseCascadeLaw A n (fun j => b (j+1)) (fun j => μ (j+1)) : Measure (NoiseTreeA n)))
have htot := noiseCascade_good A (n+1) b hb μ
havehkeep : ∀ᵐ ν ∂(noiseCascadeLaw A (n+1) b μ : Measure (NoiseTreeA (n+1))),
0 < noiseTreeTotal A (n+1) (noiseTreeKeep (n+1) b μ c u s ν) ∧
noiseTreeTotal A (n+1) (noiseTreeKeep (n+1) b μ c u s ν) < ∞:=by
simp_rw [noiseTreeTotal, noiseTreeKeep_forget (n+1) b μ hc hu]
apply ae_of_ae_map (μ := (noiseCascadeLaw A (n+1) b μ : Measure (NoiseTreeA (n+1))))
(p :=funT : RawTree (n+1) =>0 < rawTreeTotal (n+1) T∧ rawTreeTotal (n+1) T < ∞)
((measurable_noiseTreeDisplace (n+1) b μ hc hu).comp
(measurable_const.prodMk measurable_id)).aemeasurable
change ∀ᵐ y ∂(noiseCascadeLaw A (n+1) b μ : Measure (NoiseTreeA (n+1))).map
(noiseTreeDisplace (n+1) b μ c u s), 0 < rawTreeTotal (n+1) y ∧ rawTreeTotal (n+1) y < ∞
rw [noiseTreeDisplace_law (n+1) b μ hc hu hcpos hm s]
exact (rawCascade_total_moments (n+1) b hb).1letE:=funp : ℝ× (A×NoiseTreeA n) =>NoiseGibbsRegular n (fun j => b (j+1)) (fun j => μ (j+1))
(fun j => c (j+1)) (fun j => u (j+1)) (u 0 (s,p.2.1)) p.2.2havehE : MeasurableSet {p | E p} :=
(measurableSet_noiseGibbsRegular n _ _ (fun j => hc (j+1)) (fun j => hu (j+1))).preimage
(((hu 0).comp (measurable_const.prodMk (by fun_prop))).prodMk (by fun_prop))
haveha : ∀ᵐ p ∂I, E p :=by
apply (Measure.ae_prod_iff_ae_ae hE).mpr
apply ae_of_all
intro x
apply (Measure.ae_prod_iff_ae_ae (hE.preimage (measurable_const.prodMk measurable_id))).mpr
apply ae_of_all
intro a
exact ih _ hb.tail _ (fun j => hc (j+1)) (fun j => hu (j+1))
(fun j => hcpos (j+1)) (fun j => hm (j+1)) (u 0 (s,a))
have hd := poissonLaw_ae_intensity I hE ha
filter_upwards [htot,hkeep,Marked.poissonGood_ae I,hd] with ν hν hk hg hd
refine ⟨hν.1,hk,hg,?_⟩
rwa [Marked.sigmaPart_eq_of_good I hg]
theoremnoiseWeightedLeafMeasure_eq (n : ℕ) (b : ℕ→ℝ) (μ : ℕ→ProbabilityMeasureA)
{c : ℕ→S×A→ℝ} {u : ℕ→S×A→S}
(hc : ∀ i, Measurable (c i)) (hu : ∀ i, Measurable (u i))
(hcpos : ∀ i s a, 0 < c i (s,a)) (s : S) (ν : NoiseTreeA n)
(hν : NoiseGibbsRegular n b μ c u s ν) :
noiseWeightedLeafMeasure n c u s ν =
noiseTreeTotal A n (noiseTreeKeep n b μ c u s ν) •
noiseLeafKernel A n (noiseTreeKeep n b μ c u s ν) :=by
proof · 83
lines
induction n generalizing b μ c u s with
| zero =>
apply Measure.ext_of_lintegral
intro F hF
simp [noiseWeightedLeafMeasure_lintegral 0 hc hu s ν hF,
noiseTreeKeep, noiseTreeTotal, rawTreeTotal, noiseLeafProduct,
noiseLeafKeep, noiseLeafKernel, noiseLeafKernelData, Kernel.const_apply]
| succ n ih =>let bt :=fun j => b (j+1)
let μt :=fun j => μ (j+1)
let ct :=fun j => c (j+1)
let ut :=fun j => u (j+1)
letI:= (powerIntensity (b 0)).prod ((μ 0 : MeasureA).prod
(noiseCascadeLaw An bt μt : Measure (NoiseTreeA n)))
letT : ℝ× (A×NoiseTreeA n) →ℝ× (A×NoiseTreeA n) :=fun p =>
(c 0 (s,p.2.1)*p.1,(p.2.1,noiseTreeKeep n bt μt ct ut (u 0 (s,p.2.1)) p.2.2))
havehT : MeasurableT:=
(((hc 0).comp (measurable_const.prodMk (by fun_prop))).mul measurable_fst).prodMk
((byfun_prop : Measurable (funp : ℝ× (A×NoiseTreeA n) => p.2.1)).prodMk
((measurable_noiseTreeKeep n bt μt (fun j => hc (j+1)) (fun j => hu (j+1))).comp
(((hu 0).comp (measurable_const.prodMk (by fun_prop))).prodMk (by fun_prop))))
havehσ : sigmaPart I ν = ν :=Marked.sigmaPart_eq_of_good I hν.2.2.1havehd : ∀ᵐ p ∂ν, NoiseGibbsRegular n bt μt ct ut (u 0 (s,p.2.1)) p.2.2:=byhavehh : ∀ᵐ p ∂sigmaPart I ν, NoiseGibbsRegular n bt μt ct ut (u 0 (s,p.2.1)) p.2.2:= hν.2.2.2
rwa [hσ] at hh
havehkeep : noiseTreeKeep (n+1) b μ c u s ν = ν.map T:=by
change (sigmaPart I ν).map T = _
rw [hσ]
apply Measure.ext_of_lintegral
intro F hF
havehG : Measurable (funv : NoiseLeafA (n+1) =>
noiseLeafProduct (n+1) c u s v * F (noiseLeafKeep (n+1) c u s v)) :=
((measurable_noiseLeafProduct (n+1) hc hu).comp (measurable_const.prodMk measurable_id)).mul
(hF.comp ((measurable_noiseLeafKeep (n+1) hc hu).comp (measurable_const.prodMk measurable_id)))
rw [noiseWeightedLeafMeasure_lintegral (n+1) hc hu s ν hF,
noiseLeafKernel_unnormalized_lintegral n ν hν.1 hG,
lintegral_smul_measure, smul_eq_mul,
noiseLeafKernel_unnormalized_lintegral n _ hν.2.1 hF, hkeep]
havehmF : Measurable (funp : ℝ× (A×NoiseTreeA n) =>∫⁻ v, F (p.1,(p.2.1,v)) ∂noiseLeafKernel A n p.2.2) :=
(hF.comp (byfun_prop : Measurable (funp : (ℝ× (A×NoiseTreeA n)) ×NoiseLeafA n =>
(p.1.1,(p.1.2.1,p.2))))).lintegral_kernel_prod_right'
(κ := (noiseLeafKernel A n).comap (funp : ℝ× (A×NoiseTreeA n) => p.2.2) (by fun_prop))
rw [lintegral_map' (showAEMeasurable (funp : ℝ× (A×NoiseTreeA n) =>ENNReal.ofReal (max p.10) * noiseTreeTotal A n p.2.2 *
∫⁻ v, F (p.1,(p.2.1,v)) ∂noiseLeafKernel A n p.2.2) _ from
(((byfun_prop : Measurable (funp : ℝ× (A×NoiseTreeA n) =>ENNReal.ofReal (max p.10))).mul
((measurable_noiseTreeTotal A n).comp (by fun_prop))).mul hmF).aemeasurable) hT.aemeasurable]
apply lintegral_congr_ae
filter_upwards [hd] with p hp
havehFp : Measurable (funv : NoiseLeafA n =>F (c 0 (s,p.2.1)*p.1,(p.2.1,v))) :=
hF.comp (measurable_const.prodMk (measurable_const.prodMk measurable_id))
have he := congrArg (funη : Measure (NoiseLeafA n) =>∫⁻ v, F (c 0 (s,p.2.1)*p.1,(p.2.1,v)) ∂η)
(ih bt μt (fun j => hc (j+1)) (fun j => hu (j+1))
(fun j => hcpos (j+1)) (u 0 (s,p.2.1)) p.2.2 hp)
rw [noiseWeightedLeafMeasure_lintegral n (fun j => hc (j+1)) (fun j => hu (j+1)) _ _ hFp,
lintegral_smul_measure, smul_eq_mul] at he
change ENNReal.ofReal (max p.10) * noiseTreeTotal A n p.2.2 *
(∫⁻ v, (ENNReal.ofReal (c 0 (s,p.2.1)) * noiseLeafProduct n ct ut (u 0 (s,p.2.1)) v) *
F (c 0 (s,p.2.1)*p.1,(p.2.1,noiseLeafKeep n ct ut (u 0 (s,p.2.1)) v))
∂noiseLeafKernel A n p.2.2) =
ENNReal.ofReal (max (c 0 (s,p.2.1)*p.1) 0) *
noiseTreeTotal A n (noiseTreeKeep n bt μt ct ut (u 0 (s,p.2.1)) p.2.2) *
(∫⁻ v, F (c 0 (s,p.2.1)*p.1,(p.2.1,v))
∂noiseLeafKernel A n (noiseTreeKeep n bt μt ct ut (u 0 (s,p.2.1)) p.2.2))
havehcmax : max (c 0 (s,p.2.1)*p.1) 0 = c 0 (s,p.2.1)*max p.10:=by
rw [mul_max_of_nonneg _ _ (hcpos 0 s p.2.1).le, mul_zero]
rw [hcmax, ENNReal.ofReal_mul (hcpos 0 s p.2.1).le]
simp_rw [mul_assoc]
havehz : Measurable (funv : NoiseLeafA n => noiseLeafProduct n ct ut (u 0 (s,p.2.1)) v *
F (c 0 (s,p.2.1)*p.1,(p.2.1,noiseLeafKeep n ct ut (u 0 (s,p.2.1)) v))) :=
(((measurable_noiseLeafProduct n (fun j => hc (j+1)) (fun j => hu (j+1))).comp
(measurable_const.prodMk measurable_id)).mul
(hFp.comp ((measurable_noiseLeafKeep n (fun j => hc (j+1)) (fun j => hu (j+1))).comp
(measurable_const.prodMk measurable_id))))
rw [lintegral_const_mul _ hz]
calc
_ = ENNReal.ofReal (c 0 (s,p.2.1)) * ENNReal.ofReal (max p.10) *
(noiseTreeTotal A n p.2.2 * ∫⁻ v, noiseLeafProduct n ct ut (u 0 (s,p.2.1)) v *
F (c 0 (s,p.2.1)*p.1,(p.2.1,noiseLeafKeep n ct ut (u 0 (s,p.2.1)) v))
∂noiseLeafKernel A n p.2.2) :=by ring
_ = _ :=by rw [he]; ring
lemmaNoiseGibbsRegular.masses {n : ℕ} {b : ℕ→ℝ} {μ : ℕ→ProbabilityMeasureA}
{c : ℕ→S×A→ℝ} {u : ℕ→S×A→S} {s : S} {ν : NoiseTreeA n}
(hν : NoiseGibbsRegular n b μ c u s ν) :
(0 < noiseTreeTotal A n ν ∧ noiseTreeTotal A n ν < ∞) ∧
(0 < noiseTreeTotal A n (noiseTreeKeep n b μ c u s ν) ∧
noiseTreeTotal A n (noiseTreeKeep n b μ c u s ν) < ∞) :=by
proof · 3
lines
cases n with
| zero => simp [noiseTreeTotal, rawTreeTotal]
| succ n => exact ⟨hν.1,hν.2.1⟩
instancenoiseTiltedLeafLaw_probability (n : ℕ) (c : ℕ→S×A→ℝ) (u : ℕ→S×A→S)
(s : S) (ν : NoiseTreeA n) : IsProbabilityMeasure (noiseTiltedLeafLaw n c u s ν) :=
theoremnoiseTiltedLeafLaw_keep (n : ℕ) (b : ℕ→ℝ) (μ : ℕ→ProbabilityMeasureA)
{c : ℕ→S×A→ℝ} {u : ℕ→S×A→S}
(hc : ∀ i, Measurable (c i)) (hu : ∀ i, Measurable (u i))
(hcpos : ∀ i s a, 0 < c i (s,a)) (s : S) (ν : NoiseTreeA n)
(hν : NoiseGibbsRegular n b μ c u s ν) :
(noiseTiltedLeafLaw n c u s ν).map (noiseLeafKeep n c u s) =
noiseLeafKernel A n (noiseTreeKeep n b μ c u s ν) :=by
proof · 34
lines
let m := (noiseLeafKernel A n ν).withDensity (noiseLeafProduct n c u s)
havehp : Measurable (noiseLeafProduct n c u s) :=
(measurable_noiseLeafProduct n hc hu).comp (measurable_const.prodMk measurable_id)
havehk : Measurable (noiseLeafKeep n c u s) :=
(measurable_noiseLeafKeep n hc hu).comp (measurable_const.prodMk measurable_id)
havehe : (noiseTreeTotal A n ν • m).map (noiseLeafKeep n c u s) =
noiseTreeTotal A n (noiseTreeKeep n b μ c u s ν) •
noiseLeafKernel A n (noiseTreeKeep n b μ c u s ν) :=byhave hh := noiseWeightedLeafMeasure_eq n b μ hc hu hcpos s ν hν
unfold noiseWeightedLeafMeasure at hh
change Measure.map (noiseLeafKeep n c u s)
((noiseLeafKernel A n ν).withDensity (noiseTreeTotal A n ν • noiseLeafProduct n c u s)) = _ at hh
rwa [withDensity_smul _ hp] at hh
havehm : noiseTreeTotal A n ν * m univ = noiseTreeTotal A n (noiseTreeKeep n b μ c u s ν) :=byhave hh := congrArg (funη : Measure (NoiseLeafA n) => η univ) he
simpa only [Measure.map_apply hk MeasurableSet.univ, preimage_univ,
Measure.smul_apply, smul_eq_mul, measure_univ, mul_one] using hh
havehm0 : 0 < m univ :=by
by_contra hh
havehz : m univ = 0:= le_antisymm (le_of_not_gt hh) bot_le
rw [hz, mul_zero] at hm
exact hν.masses.2.1.ne' hm.symm
havehim : m univ < ∞:=byhavehlt : noiseTreeTotal A n ν * m univ < ∞:= hm ▸ hν.masses.2.2
rcases ENNReal.mul_lt_top_iff.mp hlt with h | h | h
· exact h.2
· exact (hν.masses.1.1.ne' h).elim
· exact (hm0.ne' h).elim
change (normalizeMass m).map _ = _
rw [← normalizeMass_smul m hν.masses.1 ⟨hm0,him⟩,
normalizeMass_map _ hk (by
simp only [Measure.smul_apply, smul_eq_mul, hm]
exact hν.masses.2), he,
normalizeMass_smul _ hν.masses.2 (by simp), normalizeMass_of_probability]
lemmanoiseLeafProduct_telescoping (n : ℕ) (X : ℕ→S→ℝ) (u : ℕ→S×A→S)
(s : S) (v : NoiseLeafA n) :
noiseLeafProduct n (fun i p =>Real.exp (X (i+1) (u i p) - X i p.1)) u s v =
ENNReal.ofReal (Real.exp (noiseLeafTerminal n X u s v - X0 s)) :=by
proof · 13
lines
induction n generalizing X u s with
| zero => simp [noiseLeafProduct, noiseLeafTerminal]
| succ n ih =>
rw [noiseLeafProduct]
have hi := ih (fun i =>X (i+1)) (fun i => u (i+1)) (u 0 (s,v.2.1)) v.2.2
rw [hi]
rw [←ENNReal.ofReal_mul (Real.exp_pos _).le, ←Real.exp_add]
congr 2
change X1 (u 0 (s,v.2.1)) - X0 s +
(noiseLeafTerminal n (fun i =>X (i+1)) (fun i => u (i+1)) (u 0 (s,v.2.1)) v.2.2 -
X1 (u 0 (s,v.2.1))) = _
change _ = noiseLeafTerminal n (fun i =>X (i+1)) (fun i => u (i+1)) (u 0 (s,v.2.1)) v.2.2 - X0 s
ring
lemmanoiseTerminalGibbsLaw_eq_tilted (n : ℕ) {X : ℕ→S→ℝ}
{u : ℕ→S×A→S} (hX : ∀ i, Measurable (X i))
(hu : ∀ i, Measurable (u i)) (s : S) (ν : NoiseTreeA n) :
noiseTerminalGibbsLaw n X u s ν = noiseTiltedLeafLaw n
(fun i p =>Real.exp (X (i+1) (u i p)-X i p.1)) u s ν :=by
proof · 15
lines
havehm : Measurable (noiseLeafProduct n
(fun i p =>Real.exp (X (i+1) (u i p)-X i p.1)) u s) :=
(measurable_noiseLeafProduct n (fun i => ((hX (i+1) |>.comp (hu i)).sub
((hX i).comp measurable_fst)).exp) hu).comp (measurable_const.prodMk measurable_id)
havehd : (fun v =>ENNReal.ofReal (Real.exp (noiseLeafTerminal n X u s v))) =
ENNReal.ofReal (Real.exp (X0 s)) • noiseLeafProduct n
(fun i p =>Real.exp (X (i+1) (u i p)-X i p.1)) u s :=by
funext v
simp only [Pi.smul_apply, smul_eq_mul, noiseLeafProduct_telescoping]
rw [←ENNReal.ofReal_mul (Real.exp_pos _).le, ←Real.exp_add]
congr 2
ring
unfold noiseTerminalGibbsLaw noiseTiltedLeafLaw
rw [hd, withDensity_smul _ hm, normalizeMass_smul_any _]
exact ⟨ENNReal.ofReal_pos.mpr (Real.exp_pos _), ENNReal.ofReal_lt_top⟩
theoremnoiseTerminalGibbsLaw_keep (n : ℕ) (b : ℕ→ℝ) (μ : ℕ→ProbabilityMeasureA)
{X : ℕ→S→ℝ} {u : ℕ→S×A→S}
(hX : ∀ i, Measurable (X i)) (hu : ∀ i, Measurable (u i))
(s : S) (ν : NoiseTreeA n)
(hν : NoiseGibbsRegular n b μ
(fun i p =>Real.exp (X (i+1) (u i p)-X i p.1)) u s ν) :
(noiseTerminalGibbsLaw n X u s ν).map (noiseLeafKeep n
(fun i p =>Real.exp (X (i+1) (u i p)-X i p.1)) u s) =
noiseLeafKernel A n (noiseTreeKeep n b μ
(fun i p =>Real.exp (X (i+1) (u i p)-X i p.1)) u s ν) :=by
proof · 3
lines
rw [noiseTerminalGibbsLaw_eq_tilted n hX hu]
exact noiseTiltedLeafLaw_keep n b μ (fun i => ((hX (i+1) |>.comp (hu i)).sub
((hX i).comp measurable_fst)).exp) hu (fun _ _ _ =>Real.exp_pos _) s ν hν