lemmaobservationLikelihood_fderiv {ι : Type*} [Fintype ι]
{s : Set (ι →ℝ)} (hs : MeasurableSet s) (z v : ι →ℝ) :
fderiv ℝ (observationLikelihood s) z v =
-(∫ u in shiftedObservationEvent s z, (∑ i, v i * compactNoiseScore (u i))
∂Measure.pi (fun_ : ι => compactNoiseLaw)) :=by
proof · 23
lines
letL:=ContinuousLinearMap.mul ℝℝhavehloc : LocallyIntegrable (s.indicator (fun _ => (1:ℝ))) volume :=
continuous_const.locallyIntegrable.indicator hs
have hder := compactNoiseKernel_compactSupport.hasFDerivAt_convolution_right L hloc
(compactNoiseKernel_contDiff (n :=1)) z
have hint := (compactNoiseKernel_compactSupport.fderiv ℝ).convolutionExists_right
(L.precompR (ι →ℝ)) hloc
((compactNoiseKernel_contDiff (n :=1)).continuous_fderiv one_ne_zero) z
change fderiv ℝ ((s.indicator (fun _ => (1:ℝ))) ⋆[L, volume] compactNoiseKernel) z v = _
rw [hder.fderiv, convolution_def, ContinuousLinearMap.integral_apply hint v]
simp only [ContinuousLinearMap.precompR_apply, ContinuousLinearMap.compL_apply,
ContinuousLinearMap.comp_apply, L, ContinuousLinearMap.mul_apply', compactNoiseKernel_fderiv_apply]
rw [← integral_add_left_eq_self _ z]
rw [← integral_indicator (shiftedObservationEvent_measurable hs z), compactNoiseLaw_pi_integral,
← integral_neg]
apply integral_congr_ae
filter_upwards [] with u
rw [show z - (z+u) = -u by abel, compactNoiseKernel_even]
have hodd (r : ℝ) : compactNoiseScore (-r) = -compactNoiseScore r :=
compactNoiseScore_odd r
by_cases hu : z + u ∈ s <;>
simp [Pi.neg_apply, hodd, shiftedObservationEvent, hu, Set.mem_preimage,
mul_comm, Finset.sum_neg_distrib]
lemmaarrayLikelihood_fderiv {JI : Type*} [FintypeJ] [FintypeI]
(b : J→ℝ) {s : Set (J×I→ℝ)} (hs : MeasurableSet s) (x v : I→ℝ) :
fderiv ℝ (arrayLikelihood b s) x v = -∑ i, v i * arrayScore b s x i :=by
proof · 7
lines
have hh := ((observationLikelihood_contDiff hs (n :=1)).differentiable one_ne_zero
(observationPlacement b x)).hasFDerivAt.comp x (observationPlacement b).hasFDerivAt
change fderiv ℝ (observationLikelihood s ∘ observationPlacement b) x v = _
rw [hh.fderiv, ContinuousLinearMap.comp_apply, observationLikelihood_fderiv hs]
simp only [observationPlacement_apply]
rw [eventScore_direction]
rfl
lemmaeventScore_zero {JI : Type*} [FintypeJ] [FintypeI]
(b : J→ℝ) (s : Set (J×I→ℝ))
(hp : (Measure.pi (fun_ : J×I=> compactNoiseLaw)).real s = 0) (i : I) :
eventScore b s i = 0:=by
proof · 2
lines
have hμ := (measureReal_eq_zero_iff (μ :=Measure.pi (fun_ : J×I=> compactNoiseLaw))).mp hp
simp [eventScore, Measure.restrict_eq_zero.mpr hμ]
lemmaarrayScore_sq {JI : Type*} [FintypeJ] [FintypeI]
(b : J→ℝ) {s : Set (J×I→ℝ)} (hs : MeasurableSet s) (x : I→ℝ)
{k : ℕ} (hk : 0 < k) :
(∑ i, (arrayScore b s x i)^2) ≤
observationMomentConstant * (k:ℝ)^5 * (∑ j, (b j)^2) *
(arrayLikelihood b s x)^(2-(k:ℝ)⁻¹) :=by
proof · 11
lines
rw [arrayLikelihood_eq_probability b hs]
by_cases hp : 0 < (Measure.pi (fun_ : J×I=> compactNoiseLaw)).real
(shiftedObservationEvent s (observationPlacement b x))
· exact compactNoise_eventScore_sq b _ hk hp
havehz : (Measure.pi (fun_ : J×I=> compactNoiseLaw)).real
(shiftedObservationEvent s (observationPlacement b x)) = 0:=
le_antisymm (not_lt.mp hp) measureReal_nonneg
simp only [arrayScore, eventScore_zero b _ hz, ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true,
zero_pow, sum_const_zero]
have hC := observationMomentConstant_pos
positivity