defequalApprox {d k m : ℕ} (base : BaseLaw) (n : ℕ)
(H : EqualSpace d k m →ℝ≥0∞) : ℝ≥0∞:=
body · 3
lines
∫⁻ A, ∫⁻ u : Tuple d m,
matrixNoiseDensity m k n (fun i => labels A (u i.succ) - labels A (u 0)) *
H (A, labels A (u 0), u) ∂Measure.pi (fun _ => base.measure d) ∂gaussianRows d k
defsmoothedTail {d k m : ℕ} (base : BaseLaw) (n : ℕ)
(H : EqualSpace d k m →ℝ≥0∞) (A : Rows d k) (p : Vec d) : ℝ≥0∞:=
body · 2
lines
∫⁻ v : Fin m →Vec d, matrixNoiseDensity m k n (fun i => labels A (v i) - labels A p) *
H (A, labels A p, Fin.cons p v) ∂Measure.pi (fun _ => base.measure d)
lemmaequalApprox_cons {d k m : ℕ} [NeZero d] (base : BaseLaw) (n : ℕ)
{H : EqualSpace d k m →ℝ≥0∞} (hH : MeasurableH) :
equalApprox base n H = ∫⁻ A, ∫⁻ p, smoothedTail base n HA p
∂base.measure d ∂gaussianRows d k :=by
proof · 5
lines
unfold equalApprox smoothedTail
apply lintegral_congr
intro A
rw [lintegral_pi_cons (base.measure d) (by fun_prop)]
simp only [Fin.cons_succ, Fin.cons_zero]
lemmasmoothedTail_representation {d k m : ℕ} {A : Rows d k}
(hA : LinearIndependentℝA) (hk : k < d) (base : BaseLaw) (n : ℕ)
{H : EqualSpace d k m →ℝ≥0∞} (hH : MeasurableH) (p : Vec d) :
smoothedTail base n HA p =
∫⁻ z, ∫⁻ R, (∏ i, baseDensity base A (labels A p + noiseScale n • z i)) *
H (A, labels A p, Fin.cons p
(fun i => basePoint base A (labels A p + noiseScale n • z i) (R i)))
∂gaussianRows d m ∂matrixNormal m k :=by
proof · 20
lines
unfold smoothedTail
rw [base_pi_lintegral hA hk base (by fun_prop)]
simp_rw [labels_basePoint hA]
have hrw (y : Fin m →Labels k) :
(∏ i, baseDensity base A (y i)) *
(∫⁻ R, matrixNoiseDensity m k n (fun i => y i - labels A p) *
H (A, labels A p, Fin.cons p (fun i => basePoint base A (y i) (R i)))
∂gaussianRows d m) =
matrixNoiseDensity m k n (y - fun _ => labels A p) *
((∏ i, baseDensity base A (y i)) *
∫⁻ R, H (A, labels A p, Fin.cons p (fun i => basePoint base A (y i) (R i)))
∂gaussianRows d m) :=by
rw [lintegral_const_mul _ (by fun_prop)]
ac_rfl
simp_rw [hrw]
rw [matrixNoise_convolution (fun _ => labels A p) (by fun_prop)]
apply lintegral_congr
intro z
rw [lintegral_const_mul _ (by fun_prop)]
rfl
lemmasmoothedTail_bound {d k m : ℕ} {A : Rows d k}
(hA : LinearIndependentℝA) (hk : k + 2 < d) (base : BaseLaw) (n : ℕ)
{H : EqualSpace d k m →ℝ≥0∞} (hH : MeasurableH)
(b : ℝ≥0∞) (hHb : ∀ x, H x ≤ b) (p : Vec d) :
smoothedTail base n HA p ≤ENNReal.ofReal (baseProjectionConstant base d k / Real.sqrt (rowGram A).det)^m * b :=by
proof · 13
lines
rw [smoothedTail_representation hA (by omega) base n hH p]
calc
_ ≤∫⁻ z, ∫⁻ R, ENNReal.ofReal
(baseProjectionConstant base d k / Real.sqrt (rowGram A).det)^m * b
∂gaussianRows d m ∂matrixNormal m k :=by
apply lintegral_mono
intro z
apply lintegral_mono
intro R
apply mul_le_mul' _ (hHb _)
simpa usingFinset.prod_le_prod (fun i (_ : i ∈ (Finset.univ : Finset (Fin m))) =>
baseDensity_le_sup (by omega) base A (labels A p + noiseScale n • z i))
_ = _ :=by simp
lemmasmoothedTail_limit {d k m : ℕ} {A : Rows d k}
(hA : LinearIndependentℝA) (hk : k + 2 < d) (base : BaseLaw)
{H : EqualSpace d k m →ℝ≥0∞} (hH : ContinuousH)
(b : ℝ≥0∞) (hb : b ≠∞) (hHb : ∀ x, H x ≤ b) (p : Vec d) :
Tendsto (fun n => smoothedTail base n HA p) atTop
(nhds (baseDensity base A (labels A p)^m *
∫⁻ R, H (A, labels A p, Fin.cons p
(fun i => basePoint base A (labels A p) (R i))) ∂gaussianRows d m)) :=by
proof · 53
lines
letB:=ENNReal.ofReal (baseProjectionConstant base d k / Real.sqrt (rowGram A).det)^m * b
havehfin : B≠∞:=ENNReal.mul_ne_top (by finiteness) hb
have hbound (n) (z : (Fin m →Labels k) ×Rows d m) :
(∏ i, baseDensity base A (labels A p + noiseScale n • z.1 i)) *
H (A, labels A p, Fin.cons p
(fun i => basePoint base A (labels A p + noiseScale n • z.1 i) (z.2 i))) ≤B:=by
apply mul_le_mul' _ (hHb _)
simpa usingFinset.prod_le_prod (fun i (_ : i ∈ (Finset.univ : Finset (Fin m))) =>
baseDensity_le_sup (by omega) base A (labels A p + noiseScale n • z.1 i))
have hlim := tendsto_lintegral_of_dominated_convergence
(μ := (matrixNormal m k).prod (gaussianRows d m)) (fun _ =>B)
(F:=fun n z => (∏ i, baseDensity base A (labels A p + noiseScale n • z.1 i)) *
H (A, labels A p, Fin.cons p
(fun i => basePoint base A (labels A p + noiseScale n • z.1 i) (z.2 i))))
(f :=fun z => baseDensity base A (labels A p)^m *
H (A, labels A p, Fin.cons p (fun i => basePoint base A (labels A p) (z.2 i))))
(fun _ =>by fun_prop)
(fun n =>Filter.Eventually.of_forall (hbound n))
(by simpa using hfin)
(by
apply Filter.Eventually.of_forall
intro z
have hy (i : Fin m) : Tendsto (fun n => labels A p + noiseScale n • z.1 i) atTop
(nhds (labels A p)) :=by
simpa using tendsto_const_nhds.add (tendsto_noiseScale.smul_const (z.1 i))
havehprod : Tendsto (fun n =>∏ i, baseDensity base A (labels A p + noiseScale n • z.1 i)) atTop
(nhds (baseDensity base A (labels A p)^m)) :=by
simpa usingENNReal.tendsto_finsetProd_of_ne_top Finset.univ
(fun i _ => (continuous_baseDensity hk base hA).tendsto (labels A p) |>.comp (hy i))
(fun i _ => (baseDensity_lt_top base A (labels A p)).ne)
apply ENNReal.Tendsto.mul hprod (Or.inr (ne_top_of_le_ne_top hb (hHb _)))
· apply hH.tendsto _ |>.comp
apply tendsto_const_nhds.prodMk_nhds
apply tendsto_const_nhds.prodMk_nhds
apply tendsto_const_nhds.finCons
apply tendsto_pi_nhds.mpr
intro i
exact (continuous_basePoint_label base A (z.2 i)).tendsto (labels A p) |>.comp (hy i)
· exact Or.inr (by finiteness [baseDensity_lt_top base A (labels A p)]))
have he (n) : smoothedTail base n HA p =
∫⁻ z : (Fin m →Labels k) ×Rows d m,
(∏ i, baseDensity base A (labels A p + noiseScale n • z.1 i)) *
H (A, labels A p, Fin.cons p
(fun i => basePoint base A (labels A p + noiseScale n • z.1 i) (z.2 i)))
∂(matrixNormal m k).prod (gaussianRows d m) :=by
rw [smoothedTail_representation hA (by omega) base n hH.measurable p,
lintegral_prod _ (by fun_prop)]
simp_rw [he]
convert hlim using1
rw [lintegral_prod _ (by fun_prop)]
simp only [lintegral_const, measure_univ, mul_one]
rw [lintegral_const_mul _ (showMeasurable (funR : Rows d m =>H (A, labels A p, Fin.cons p (fun i => basePoint base A (labels A p) (R i)))) by fun_prop)]
lemmaequalApprox_left_limit {d k m : ℕ} (hd : k + m + 2≤ d)
(hk : 1≤ k) (hm : 1≤ m) (base : BaseLaw)
{H : EqualSpace d k m →ℝ≥0∞} (hH : ContinuousH)
(b : ℝ≥0∞) (hb : b ≠∞) (hHb : ∀ x, H x ≤ b) :
Tendsto (fun n => equalApprox base n H) atTop
(nhds (∫⁻ z, H z ∂leftBaseMeasure d k m base)) :=by
proof · 30
lines
have : NeZero d := ⟨by omega⟩
havehAe : ∀ᵐ z ∂(gaussianRows d k).prod (base.measure d), LinearIndependentℝ z.1:=Measure.quasiMeasurePreserving_fst.ae (ae_gaussian_rows_full_rank (by omega) (by omega))
have he (n) : equalApprox base n H =
∫⁻ z : Rows d k ×Vec d, smoothedTail base n H z.1 z.2
∂(gaussianRows d k).prod (base.measure d) :=by
rw [equalApprox_cons base n hH.measurable, lintegral_prod _ (by unfold smoothedTail; fun_prop)]
simp_rw [he]
rw [leftBaseMeasure_lintegral base hH.measurable]
havehf_meas : Measurable (funz : Rows d k ×Vec d =>
baseDensity base z.1 (labels z.1 z.2)^m *
∫⁻ R, H (z.1, labels z.1 z.2,
Fin.cons z.2 (fun i => basePoint base z.1 (labels z.1 z.2) (R i)))
∂gaussianRows d m) :=by fun_prop
rw [← lintegral_prod _ hf_meas.aemeasurable]
apply tendsto_lintegral_of_dominated_convergence
(funz : Rows d k ×Vec d =>ENNReal.ofReal (baseProjectionConstant base d k / Real.sqrt (rowGram z.1).det)^m * b)
· intro n
unfold smoothedTail
fun_prop
· intro n
filter_upwards [hAe] with z hz
exact smoothedTail_bound hz (by omega) base n hH.measurable b hHb z.2
· rw [lintegral_prod _ (by fun_prop)]
simp only [lintegral_const, measure_univ, mul_one]
rw [lintegral_mul_const _ (by fun_prop)]
exact ENNReal.mul_ne_top (base_density_sup_moment_finite hd hk base).ne hb
· filter_upwards [hAe] with z hz
exact smoothedTail_limit hz (by omega) base hH b hb hHb z.2