@[fun_prop]lemmameasurable_projectedDensity {d k : ℕ} (base : BaseLaw)
{f : Vec d →ℝ≥0∞} (hf : Measurable f) :
Measurable (funz : Rows d k ×Labels k => projectedDensity base f z.1 z.2) :=
proof · 1
line
(measurable_baseDensity base).mul (measurable_tiltMass base hf)
lemmabaseDensity_spherical {d k : ℕ} {A : Rows d k} (hA : LinearIndependentℝA)
(y : Labels k) : baseDensity .spherical A y = sphericalPairingsDensity A y :=by
proof · 3
lines
simp only [baseDensity, ite_eq_left hA, sphericalPairingsDensity,
finrank_euclideanSpace, Fintype.card_fin]
rfl
lemmabase_lintegral {d k : ℕ} {A : Rows d k} (hA : LinearIndependentℝA)
(hk : k < d) (base : BaseLaw) {g : Vec d →ℝ≥0∞} (hg : Measurable g) :
∫⁻ x, g x ∂base.measure d = ∫⁻ y, baseDensity base A y *
∫⁻ x, g x ∂baseFiber base A y :=by
proof · 25
lines
simp_rw [baseFiber_eq_map, lintegral_map hg (measurable_basePoint_fixed base A _)]
cases base
· change (∫⁻ x, g x ∂uniformDirection (Vec d)) = _
rw [sphere_fiber_integral hA (by simpa using hk) hg]
apply lintegral_congr
intro y
rw [baseDensity_spherical hA]
congr 1
apply lintegral_congr
intro x
congr 1
simp only [basePoint, kernelComponent_eq_starProjection hA, normalDirection,
smul_smul, div_eq_mul_inv]
rfl
· change (∫⁻ x, g x ∂stdGaussian (Vec d)) = _
rw [gaussian_fiber_integral hA hg]
apply lintegral_congr
intro y
rw [baseDensity, ite_eq_left hA]
congr 1
rw [lintegral_map (by fun_prop) (by fun_prop)]
apply lintegral_congr
intro x
rw [basePoint, kernelComponent_eq_starProjection hA]
rfl
lemmaweighted_base_lintegral {d k : ℕ} {A : Rows d k} (hA : LinearIndependentℝA)
(hk : k < d) (base : BaseLaw) {f g : Vec d →ℝ≥0∞} (hf : Measurable f)
(hg : Measurable g) :
∫⁻ x, g x ∂(base.measure d).withDensity f =
∫⁻ y, baseDensity base A y * ∫⁻ x, f x * g x ∂baseFiber base A y :=by
proof · 2
lines
rw [lintegral_withDensity_eq_lintegral_mul _ hf hg]
exact base_lintegral hA hk base (hf.mul hg)
lemmatiltMass_ne_top {d k : ℕ} (base : BaseLaw) {f : Vec d →ℝ≥0∞} {L : ℝ≥0∞}
(hL : L≠∞) (hfL : ∀ x, f x ≤L) (A : Rows d k) (y : Labels k) :
tiltMass base f A y ≠∞:= ne_top_of_le_ne_top hL (tiltMass_le base hfL A y)
lemmaprojectedDensity_ne_top {d k : ℕ} (base : BaseLaw) {f : Vec d →ℝ≥0∞}
{L : ℝ≥0∞} (hL : L≠∞) (hfL : ∀ x, f x ≤L) (A : Rows d k) (y : Labels k) :
projectedDensity base f A y ≠∞:=
proof · 1
line
ENNReal.mul_ne_top (baseDensity_lt_top base A y).ne (tiltMass_ne_top base hL hfL A y)
lemmaweighted_fiber_labels {d k : ℕ} {A : Rows d k} (hA : LinearIndependentℝA)
(base : BaseLaw) (y : Labels k) {f : Vec d →ℝ≥0∞} (hf : Measurable f)
{g : Labels k →ℝ≥0∞} (hg : Measurable g) :
∫⁻ x, f x * g (labels A x) ∂baseFiber base A y = tiltMass base f A y * g y :=by
proof · 7
lines
havehfg : Measurable (fun x => f x * g (labels A x)) :=by fun_prop
rw [baseFiber_eq_map, lintegral_map hfg (measurable_basePoint_fixed base A y)]
simp_rw [labels_basePoint hA]
rw [lintegral_mul_const _ (showMeasurable (fun x => f (basePoint base A y x)) from
hf.comp (measurable_basePoint_fixed base A y))]
congr 1
rw [tiltMass, baseFiber_eq_map, lintegral_map hf (measurable_basePoint_fixed base A y)]
lemmaprojected_measure {d k : ℕ} {A : Rows d k} (hA : LinearIndependentℝA)
(hk : k < d) (base : BaseLaw) {f : Vec d →ℝ≥0∞} (hf : Measurable f) :
((base.measure d).withDensity f).map (labels A) =
volume.withDensity (projectedDensity base f A) :=by
proof · 11
lines
havehl : Measurable (labels A) :=by unfold labels; fun_prop
have hp0 := (measurable_projectedDensity (d := d) (k := k) base hf).comp
(showMeasurable (funy : Labels k => (A,y)) from measurable_const.prodMk measurable_id)
simp only [Function.comp_def] at hp0
havehp : Measurable (projectedDensity base f A) := hp0
apply Measure.ext_of_lintegral
intro g hg
rw [lintegral_map hg hl]
rw [weighted_base_lintegral hA hk base hf (g :=fun x => g (labels A x)) (hg.comp hl)]
rw [lintegral_withDensity_eq_lintegral_mul _ hp hg]
simp only [Pi.mul_apply, weighted_fiber_labels hA base _ hf hg, projectedDensity, mul_assoc]