lemmalabelsGivenDigit_singleton (side : Bool) (r : ℕ) (κ m a b t : ℝ)
(d : Fin r) (l : Label) :
labelsGivenDigit side r κ m a b t d {l} =
digitWeight side r κ m a b t l d / ∑ k, digitWeight side r κ m a b t k d :=by
proof · 3
lines
classical
cases l <;> simp [labelsGivenDigit, FiniteKernelMixture.normalizedKernel_apply,
Kernel.const_apply, Pi.single_apply]
lemmaendpointLaw_isProbabilityMeasure (side : Bool) (l : Label) :
IsProbabilityMeasure (endpointLaw side m a b l) :=by
proof · 9
lines
havehm0 : 0 < m :=by linarith
have ha0 := width_pos hm0 ha
have hb0 := width_pos hm0 hb
cases l with
| none => exact baseLaw_isProbabilityMeasure
| some i =>
cases side
· exact leftLaw_isProbabilityMeasure (by linarith) ha0 ha' hb0 hb' i
· exact rightLaw_isProbabilityMeasure (by linarith) ha0 ha' hb0 hb' i
lemmalabelMass_sum : (∑ l, labelMass κ m a b t l) = 1:=by
proof · 16
lines
havehm0 : 0 < m :=by linarith
havehq0 : 0≤ diagonalMass κ m a b t :=
le_trans (by norm_num) (diagonalMass_bounds hκ0 hκ hm ha ha' hb hb' ht0 ht).1have hp0 := componentProbabilities_nonneg (a := a) (b := b) hκ0 hm0 ht0
rw [Fintype.sum_option]
change ENNReal.ofReal (diagonalMass κ m a b t) +
∑ i, ENNReal.ofReal (componentProbabilities κ m a b t i) = 1
rw [←ENNReal.ofReal_sum_of_nonneg (fun i _ => hp0 i),
←ENNReal.ofReal_add hq0 (Finset.sum_nonneg (fun i _ => hp0 i))]
haveheq : diagonalMass κ m a b t + ∑ i, componentProbabilities κ m a b t i = 1:=by
simp only [componentProbabilities, Fin.sum_univ_succ, Matrix.cons_val_zero,
Matrix.cons_val_succ, Fin.sum_univ_zero, add_zero]
unfold diagonalMass
ring
rw [heq]
norm_num
lemmarawLaw_isProbabilityMeasure : IsProbabilityMeasure (rawLaw κ m a b t) :=by
proof · 10
lines
havehm0 : 0 < m :=by linarith
have ha0 := width_pos hm0 ha
have hb0 := width_pos hm0 hb
have : ∀ i, IsProbabilityMeasure (leftLaw (2 * m) a b i) :=
leftLaw_isProbabilityMeasure (by linarith) ha0 ha' hb0 hb'
have : ∀ i, IsProbabilityMeasure (rightLaw (2 * m) a b i) :=
rightLaw_isProbabilityMeasure (by linarith) ha0 ha' hb0 hb'
apply labelledMixture_isProbabilityMeasure
have h := labelMass_sum hκ0 hκ hm ha ha' hb hb' ht0 ht
simpa only [Fintype.sum_option, labelMass] using h
lemmadigitWeight_total_ne_zero (side : Bool) (r : ℕ) [NeZero r] (d : Fin r) :
(∑ l, digitWeight side r κ m a b t l d) ≠0:=by
proof · 10
lines
havehq : 0 < diagonalMass κ m a b t :=byhave:= (diagonalMass_bounds hκ0 hκ hm ha ha' hb hb' ht0 ht).1
linarith
havehpos : digitWeight side r κ m a b t none d ≠0:=by
simp only [digitWeight, labelMass, endpointLaw, baseLaw_bin]
exact mul_ne_zero (ENNReal.ofReal_ne_zero_iff.mpr hq)
(ENNReal.inv_ne_zero.mpr (by simp))
intro h
apply hpos
exact (Finset.sum_eq_zero_iff.mp h) none (Finset.mem_univ none)
lemmadigitWeight_total_ne_top (side : Bool) (r : ℕ) (d : Fin r) :
(∑ l, digitWeight side r κ m a b t l d) ≠∞:=by
proof · 7
lines
have : ∀ l, IsProbabilityMeasure (endpointLaw side m a b l) :=
endpointLaw_isProbabilityMeasure hm ha ha' hb hb' side
apply ENNReal.sum_ne_top.mpr
intro l _
apply ENNReal.mul_ne_top
· cases l <;> exact ENNReal.ofReal_ne_top
· exact measure_ne_top _ _
lemmalabelsGivenDigit_isMarkov (side : Bool) (r : ℕ) [NeZero r] :
IsMarkovKernel (labelsGivenDigit side r κ m a b t) :=by
proof · 3
lines
apply FiniteKernelMixture.normalizedKernel_isMarkov
· exact digitWeight_total_ne_zero hκ0 hκ hm ha ha' hb hb' ht0 ht side r
· exact digitWeight_total_ne_top hm ha ha' hb hb' side r