cfahlgren1's picture
download
raw
22.1 kB
import Mathlib
import OAI.Probability.Subsphere.Regression.Gram
namespace OAI
noncomputable section
open MeasureTheory ProbabilityTheory Set Filter
open scoped ENNReal NNReal RealInnerProductSpace
universe u
namespace SubsphereRegression
open scoped Topology
open InnerProductSpace
section GaussianDomination
variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
[FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]
/-- Orthonormal coordinates of a standard Gaussian are independent standard normal variables. -/
lemma orthonormal_gaussian_map {n : ℕ} {u : Fin n → E} (hu : Orthonormal ℝ u) :
(stdGaussian E).map (fun x => fun i => ⟪u i, x⟫) =
Measure.pi (fun _ : Fin n => gaussianReal 0 1) := by
let f : E → EuclideanSpace ℝ (Fin n) := fun x => WithLp.toLp 2 (fun i => ⟪u i, x⟫)
have hf : Measurable f := by dsimp [f]; fun_prop
have he : (stdGaussian E).map f = stdGaussian (EuclideanSpace ℝ (Fin n)) := by
apply Measure.ext_of_charFun
ext t
have hi (x : E) : ⟪f x, t⟫ = ⟪x, ∑ i, t i • u i⟫ := by
simp [f, PiLp.inner_apply, inner_sum, inner_smul_right, real_inner_comm x]
have hn : ‖∑ i, t i • u i‖ ^ 2 = ‖t‖ ^ 2 := by
rw [← real_inner_self_eq_norm_sq, hu.inner_sum, EuclideanSpace.real_norm_sq_eq]
simp [pow_two]
rw [charFun_apply, integral_map hf.aemeasurable (by fun_prop)]
simp_rw [hi]
change charFun (stdGaussian E) (∑ i, t i • u i) = _
rw [charFun_stdGaussian, charFun_stdGaussian]
congr 2
exact_mod_cast congrArg Neg.neg hn
have h := congrArg (Measure.map (WithLp.ofLp : EuclideanSpace ℝ (Fin n) → (Fin n → ℝ))) he
rw [← map_pi_eq_stdGaussian] at h
simpa [Measure.map_map (WithLp.measurable_ofLp _ _) hf,
Measure.map_map (WithLp.measurable_ofLp _ _) (WithLp.measurable_toLp _ _),
Function.comp_def, f, WithLp.ofLp_toLp, Measure.map_id] using h
lemma gaussianReal_le_volume : gaussianReal 0 1 ≤ (volume : Measure ℝ) := by
rw [gaussianReal_of_var_ne_zero _ (by norm_num)]
conv_rhs => rw [← withDensity_one (μ := (volume : Measure ℝ))]
apply withDensity_mono
filter_upwards [] with x
change ENNReal.ofReal (gaussianPDFReal 0 1 x) ≤ 1
rw [← ENNReal.ofReal_one]
apply ENNReal.ofReal_le_ofReal
unfold gaussianPDFReal
have hs : 1 ≤ Real.sqrt (2 * Real.pi * (1 : ℝ≥0)) := by
norm_num only [NNReal.coe_one, mul_one]
apply (Real.le_sqrt (by norm_num) (by positivity)).mpr
nlinarith [Real.pi_gt_three]
have he : Real.exp (-(x - 0)^2 / (2 * (1 : ℝ≥0))) ≤ 1 := by
apply Real.exp_le_one_iff.mpr
exact div_nonpos_of_nonpos_of_nonneg (neg_nonpos.mpr (sq_nonneg _)) (by positivity)
exact (mul_le_of_le_one_left (by positivity) (inv_le_one_of_one_le₀ hs)).trans he
lemma measure_pi_mono {ι : Type*} [Fintype ι] {X : ι → Type*}
[∀ i, MeasurableSpace (X i)] {μ ν : ∀ i, Measure (X i)}
(h : ∀ i, μ i ≤ ν i) : Measure.pi μ ≤ Measure.pi ν := by
have ho : OuterMeasure.pi (fun i => (μ i).toOuterMeasure) ≤
OuterMeasure.pi (fun i => (ν i).toOuterMeasure) := by
apply OuterMeasure.le_pi.mpr
intro s _
exact (OuterMeasure.pi_pi_le _ s).trans (Finset.prod_le_prod fun i _ => h i (s i))
apply Measure.le_iff.mpr
intro s hs
rw [Measure.pi_def, Measure.pi_def, toMeasure_apply _ _ hs, toMeasure_apply _ _ hs]
exact ho s
lemma pi_gaussianReal_le_volume (n : ℕ) :
Measure.pi (fun _ : Fin n => gaussianReal 0 1) ≤ (volume : Measure (Fin n → ℝ)) :=
measure_pi_mono (fun _ => gaussianReal_le_volume)
lemma gaussian_pairings_le {n : ℕ} (v : Fin n → E) (hv : LinearIndependent ℝ v) :
(stdGaussian E).map (fun x => fun i => ⟪v i, x⟫) ≤
ENNReal.ofReal ((∏ i, ‖gramSchmidt ℝ v i‖)⁻¹) •
(volume : Measure (Fin n → ℝ)) := by
let u := gramSchmidtNormed ℝ v
let R : Matrix (Fin n) (Fin n) ℝ :=
Matrix.diagonal (fun i => ‖gramSchmidt ℝ v i‖) * gsUpper n v
have hu : Orthonormal ℝ u := gramSchmidtNormed_orthonormal hv
have hn (i : Fin n) : ‖gramSchmidt ℝ v i‖ ≠ 0 :=
norm_ne_zero_iff.mpr (gramSchmidt_ne_zero i hv)
have hexp (j : Fin n) : ∑ i, R i j • u i = v j := by
rw [← gsUpper_expansion n v j]
apply Finset.sum_congr rfl
intro i _
simp only [R, u, Matrix.diagonal_mul, gramSchmidtNormed, smul_smul]
congr 1
simp [hn i, mul_comm]
have hdet : R.transpose.det = ∏ i, ‖gramSchmidt ℝ v i‖ := by
dsimp only [R]
rw [Matrix.det_transpose, Matrix.det_mul, Matrix.det_diagonal, gsUpper_det, mul_one]
have hd : R.transpose.det ≠ 0 := by
rw [hdet]
exact Finset.prod_ne_zero_iff.mpr (fun i _ => hn i)
have hpos : 0 ≤ R.transpose.det := by rw [hdet]; positivity
have hf : Measurable (Matrix.toLin' R.transpose) :=
(Matrix.toLin' R.transpose).continuous_of_finiteDimensional.measurable
have heq : (fun x : E => fun j => ⟪v j, x⟫) =
(Matrix.toLin' R.transpose) ∘ (fun x => fun i => ⟪u i, x⟫) := by
funext x j
rw [← hexp j]
simp [Matrix.toLin'_apply, Matrix.mulVec, dotProduct, sum_inner,
inner_smul_left]
rw [heq, ← Measure.map_map hf (by fun_prop), orthonormal_gaussian_map hu]
calc
_ ≤ (volume : Measure (Fin n → ℝ)).map (Matrix.toLin' R.transpose) :=
Measure.map_mono (pi_gaussianReal_le_volume n) hf
_ = _ := by
rw [Real.map_matrix_volume_pi_eq_smul_volume_pi hd,
abs_of_nonneg (inv_nonneg.mpr hpos), hdet]
lemma measure_pi_smul {ι : Type*} [Fintype ι] {X : ι → Type*}
[∀ i, MeasurableSpace (X i)] (μ : ∀ i, Measure (X i)) [∀ i, SigmaFinite (μ i)]
(c : ℝ≥0∞) (hc : c ≠ ∞) :
Measure.pi (fun i => c • μ i) = c ^ Fintype.card ι • Measure.pi μ := by
lift c to ℝ≥0 using hc
simp_rw [Measure.coe_nnreal_smul]
apply Measure.pi_eq
intro s _
simp only [Measure.smul_apply, Measure.pi_pi, ENNReal.smul_def, smul_eq_mul, Finset.prod_mul_distrib,
Finset.prod_const, Finset.card_univ]
/-- Joint domination for an arbitrary number of independent Gaussian rows. -/
lemma gaussian_rows_pairings_le {n : ℕ} (v : Fin n → E) (hv : LinearIndependent ℝ v)
(m : ℕ) :
(Measure.pi (fun _ : Fin m => stdGaussian E)).map
(fun A => fun j i => ⟪v i, A j⟫) ≤
ENNReal.ofReal ((∏ i, ‖gramSchmidt ℝ v i‖)⁻¹ ^ m) •
(volume : Measure (Fin m → Fin n → ℝ)) := by
rw [Measure.pi_map_pi (fun _ => (by fun_prop : Measurable
(fun x : E => fun i => ⟪v i, x⟫)).aemeasurable)]
have h := measure_pi_mono (fun _ : Fin m => gaussian_pairings_le v hv)
rw [measure_pi_smul _ _ ENNReal.ofReal_ne_top] at h
rw [ENNReal.ofReal_pow (by positivity)]
simpa only [Fintype.card_fin, volume_pi] using h
end GaussianDomination
section ReplicaKernel
variable {X : Type*} [MeasurableSpace X] (μ : Measure X) [SigmaFinite μ]
lemma lintegral_fin_prod (n : ℕ) (f : Fin n → X → ℝ≥0∞) (hf : ∀ i, Measurable (f i)) :
∫⁻ x : Fin n → X, ∏ i, f i (x i) ∂Measure.pi (fun _ => μ) =
∏ i, ∫⁻ x, f i x ∂μ := by
induction n with
| zero => simp
| succ n ih =>
rw [lintegral_pi_snoc μ _ (by fun_prop)]
simp_rw [Fin.prod_univ_castSucc, Fin.snoc_castSucc, Fin.snoc_last]
simp_rw [lintegral_const_mul _ (hf (Fin.last n))]
rw [lintegral_mul_const _ (by fun_prop), ih _ (fun i => hf i.castSucc)]
lemma lintegral_pow_pi (f : X → ℝ≥0∞) (hf : Measurable f) (n : ℕ) :
(∫⁻ x, f x ∂μ)^n =
∫⁻ x : Fin n → X, ∏ i, f (x i) ∂Measure.pi (fun _ => μ) := by
rw [lintegral_fin_prod μ n _ (fun _ => hf)]
simp
/-- Separation of all coordinates in a normalized product mollifier. -/
lemma lintegral_product_differences (φ : ℝ → ℝ≥0∞) (hφ : Measurable φ)
(hφ1 : ∫⁻ x, φ x = 1) (m n : ℕ) (y : Fin m → ℝ) :
∫⁻ z : Fin m → Fin n → ℝ,
∏ j, φ (y j) * ∏ i, φ (y j - z j i) = ∏ j, φ (y j) := by
rw [volume_pi, lintegral_fin_prod (volume : Measure (Fin n → ℝ)) m
(fun j z => φ (y j) * ∏ i, φ (y j - z i)) (by intro i; fun_prop)]
apply Finset.prod_congr rfl
intro j _
rw [lintegral_const_mul _ (by fun_prop), volume_pi,
lintegral_fin_prod (volume : Measure ℝ) n
(fun _ z => φ (y j - z)) (by intro i; fun_prop)]
simp_rw [lintegral_sub_left_eq_self φ (y j), hφ1]
simp
end ReplicaKernel
section GaussianKernel
variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
[FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]
lemma gaussian_rows_kernel_bound {n : ℕ} (v : Fin n → E) (hv : LinearIndependent ℝ v)
(φ : ℝ → ℝ≥0∞) (hφ : Measurable φ) (hφ1 : ∫⁻ z, φ z = 1)
(m : ℕ) (y : Fin m → ℝ) :
∫⁻ A : Fin m → E, (∏ j, φ (y j)) * ∏ i, ∏ j, φ (y j - ⟪v i, A j⟫)
∂Measure.pi (fun _ => stdGaussian E) ≤
ENNReal.ofReal ((∏ i, ‖gramSchmidt ℝ v i‖)⁻¹ ^ m) * ∏ j, φ (y j) := by
let H : (Fin m → Fin n → ℝ) → ℝ≥0∞ :=
fun z => ∏ j, φ (y j) * ∏ i, φ (y j - z j i)
have hH : Measurable H := by dsimp [H]; fun_prop
have heq (A : Fin m → E) :
(∏ j, φ (y j)) * ∏ i, ∏ j, φ (y j - ⟪v i, A j⟫) =
H (fun j i => ⟪v i, A j⟫) := by
dsimp [H]
rw [Finset.prod_mul_distrib, Finset.prod_comm]
simp_rw [heq]
rw [← lintegral_map hH (by fun_prop)]
calc
_ ≤ ∫⁻ z, H z ∂(ENNReal.ofReal ((∏ i, ‖gramSchmidt ℝ v i‖)⁻¹ ^ m) •
(volume : Measure (Fin m → Fin n → ℝ))) :=
lintegral_mono' (gaussian_rows_pairings_le v hv m) (fun _ => le_rfl)
_ = _ := by
rw [lintegral_smul_measure]
change _ * (∫⁻ z : Fin m → Fin n → ℝ, ∏ j, φ (y j) * ∏ i, φ (y j - z j i)) = _
rw [lintegral_product_differences φ hφ hφ1]
lemma gaussian_replica_kernel_bound {n : ℕ} (p : E) (v : Fin n → E)
(hv : LinearIndependent ℝ (fun i => v i - p))
(φ : ℝ → ℝ≥0∞) (hφ : Measurable φ) (hφ1 : ∫⁻ z, φ z = 1) (m : ℕ) :
∫⁻ A : Fin m → E, ∫⁻ y : Fin m → ℝ,
(∏ j, φ (y j - ⟪p, A j⟫)) * ∏ i, ∏ j, φ (y j - ⟪v i, A j⟫)
∂volume ∂Measure.pi (fun _ => stdGaussian E) ≤
ENNReal.ofReal ((∏ i, ‖gramSchmidt ℝ (fun i => v i - p) i‖)⁻¹ ^ m) := by
have ht (A : Fin m → E) :
(∫⁻ y : Fin m → ℝ, (∏ j, φ (y j - ⟪p, A j⟫)) *
∏ i, ∏ j, φ (y j - ⟪v i, A j⟫)) =
∫⁻ y : Fin m → ℝ, (∏ j, φ (y j)) * ∏ i, ∏ j, φ (y j - ⟪v i - p, A j⟫) := by
have he (y : Fin m → ℝ) (i : Fin n) (j : Fin m) :
y j - ⟪p, A j⟫ - ⟪v i - p, A j⟫ = y j - ⟪v i, A j⟫ := by
rw [inner_sub_left]
ring
simpa only [Pi.sub_apply, he] using
lintegral_sub_right_eq_self
(fun y : Fin m → ℝ => (∏ j, φ (y j)) * ∏ i, ∏ j, φ (y j - ⟪v i - p, A j⟫))
(fun j => ⟪p, A j⟫)
simp_rw [ht]
rw [lintegral_lintegral_swap (by fun_prop)]
calc
_ ≤ ∫⁻ y : Fin m → ℝ,
ENNReal.ofReal ((∏ i, ‖gramSchmidt ℝ (fun i => v i - p) i‖)⁻¹ ^ m) *
∏ j, φ (y j) := lintegral_mono fun y =>
gaussian_rows_kernel_bound (fun i => v i - p) hv φ hφ hφ1 m y
_ = _ := by
rw [lintegral_const_mul _ (by fun_prop), volume_pi,
lintegral_fin_prod volume m (fun _ => φ) (fun _ => hφ)]
simp [hφ1]
end GaussianKernel
section SmoothingMoments
variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
[FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]
/-- Product scalar smoothing of the joint matrix--label observation law. -/
def projectionSmoothing (ν : Measure E) (φ : ℝ → ℝ≥0∞) (m : ℕ)
(z : (Fin m → E) × (Fin m → ℝ)) : ℝ≥0∞ :=
∫⁻ t, ∏ j, φ (z.2 j - ⟪t, z.1 j⟫) ∂ν
lemma measurable_projectionSmoothing (ν : Measure E) [SFinite ν]
(φ : ℝ → ℝ≥0∞) (hφ : Measurable φ) (m : ℕ) :
Measurable (projectionSmoothing ν φ m) := by
apply Measurable.lintegral_prod_right
fun_prop
lemma projectionSmoothing_pow (ν : Measure E) [SigmaFinite ν]
(φ : ℝ → ℝ≥0∞) (hφ : Measurable φ) (m n : ℕ)
(z : (Fin m → E) × (Fin m → ℝ)) :
(projectionSmoothing ν φ m z)^(n+1) =
∫⁻ w : E × (Fin n → E),
(∏ j, φ (z.2 j - ⟪w.1, z.1 j⟫)) *
∏ i, ∏ j, φ (z.2 j - ⟪w.2 i, z.1 j⟫)
∂ν.prod (Measure.pi (fun _ => ν)) := by
rw [lintegral_prod _ (by fun_prop)]
have hG : Measurable (fun v : Fin n → E =>
∏ i, ∏ j, φ (z.2 j - ⟪v i, z.1 j⟫)) := by fun_prop
simp_rw [lintegral_const_mul _ hG]
rw [lintegral_mul_const _ (by fun_prop), ← lintegral_pow_pi ν
(fun t : E => ∏ j, φ (z.2 j - ⟪t, z.1 j⟫)) (by fun_prop) n]
exact pow_succ' _ _
/-- Uniform integer moment bound for EVERY normalized nonnegative product
mollifier. In particular the constant does not depend on Gaussian noise scale. -/
theorem projectionSmoothing_moment {ν : Measure E} [IsFiniteMeasure ν]
{a : ℝ} (hν : HasLocalMassBound ν a)
(hsupport : ν.support ⊆ Metric.closedBall 0 1)
(φ : ℝ → ℝ≥0∞) (hφ : Measurable φ) (hφ1 : ∫⁻ z, φ z = 1)
(m n : ℕ) (hmargin : (n : ℝ) + m ≤ a) :
∫⁻ z : (Fin m → E) × (Fin m → ℝ),
(projectionSmoothing ν φ m z)^(n+1)
∂(Measure.pi (fun _ => stdGaussian E)).prod volume ≤
ν Set.univ * (replicaConstant ν a m)^n := by
simp_rw [projectionSmoothing_pow ν φ hφ m n]
rw [lintegral_lintegral_swap (by fun_prop), lintegral_prod _ (by fun_prop)]
calc
_ ≤ ∫⁻ p, ∫⁻ v : Fin n → E, replicaWeight m p v
∂Measure.pi (fun _ => ν) ∂ν := by
apply lintegral_mono
intro p
apply lintegral_mono_ae
filter_upwards [ae_replica_linearIndependent hν hsupport p n
(le_trans (le_add_of_nonneg_right (Nat.cast_nonneg m)) hmargin)] with v hv
rw [lintegral_prod _ (by fun_prop), replicaWeight_eq_det, sqrt_det_gram]
exact gaussian_replica_kernel_bound p v hv φ hφ hφ1 m
_ ≤ ∫⁻ _p, (replicaConstant ν a m)^n ∂ν :=
lintegral_mono fun p => replica_integral_bound hν hsupport m p n hmargin
_ = _ := by rw [lintegral_const, mul_comm]
end SmoothingMoments
section ProductDensity
variable {X : Type*} [MeasurableSpace X] (μ : Measure X) [SigmaFinite μ]
lemma measure_pi_withDensity (n : ℕ) (f : Fin n → X → ℝ≥0∞)
(hf : ∀ i, Measurable (f i)) [∀ i, SigmaFinite (μ.withDensity (f i))] :
Measure.pi (fun i => μ.withDensity (f i)) =
(Measure.pi (fun _ : Fin n => μ)).withDensity (fun x => ∏ i, f i (x i)) := by
classical
apply Measure.pi_eq
intro s hs
rw [withDensity_apply _ (MeasurableSet.univ_pi hs), ← lintegral_indicator (MeasurableSet.univ_pi hs)]
have he (x : Fin n → X) :
(Set.univ.pi s).indicator (fun x => ∏ i, f i (x i)) x =
∏ i, (s i).indicator (f i) (x i) := by
by_cases hx : x ∈ Set.univ.pi s
· rw [Set.indicator_of_mem hx]
exact Finset.prod_congr rfl fun i _ =>
(Set.indicator_of_mem (hx i (Set.mem_univ i)) _).symm
· rw [Set.indicator_of_notMem hx]
have : ∃ i, x i ∉ s i := by simpa only [Set.mem_univ_pi, not_forall] using hx
obtain ⟨i, hi⟩ := this
exact (Finset.prod_eq_zero (Finset.mem_univ i) (Set.indicator_of_notMem hi _)).symm
simp_rw [he]
rw [lintegral_fin_prod μ n _ (fun i => (hf i).indicator (hs i))]
apply Finset.prod_congr rfl
intro i _
rw [lintegral_indicator (hs i), withDensity_apply _ (hs i)]
end ProductDensity
section GaussianNoise
lemma pi_gaussian_map_scale (m : ℕ) (δ : ℝ) :
(Measure.pi (fun _ : Fin m => gaussianReal 0 1)).map
(fun u => fun j => δ * u j) =
Measure.pi (fun _ : Fin m => gaussianReal 0 (NNReal.mk (δ^2) (sq_nonneg δ))) := by
rw [Measure.pi_map_pi (f := fun _ : Fin m => fun x : ℝ => δ * x)
(fun _ => (by fun_prop : Measurable (fun x : ℝ => δ * x)).aemeasurable)]
simp_rw [gaussianReal_map_const_mul, mul_zero, mul_one]
lemma pi_gaussian_withDensity (m : ℕ) (v : ℝ≥0) (hv : v ≠ 0) :
Measure.pi (fun _ : Fin m => gaussianReal 0 v) =
(volume : Measure (Fin m → ℝ)).withDensity (fun y => ∏ j, gaussianPDF 0 v (y j)) := by
simp_rw [gaussianReal_of_var_ne_zero _ hv]
have : SigmaFinite ((volume : Measure ℝ).withDensity (gaussianPDF 0 v)) := by
rw [← gaussianReal_of_var_ne_zero 0 hv]
infer_instance
rw [measure_pi_withDensity (volume : Measure ℝ) m
(fun _ => gaussianPDF 0 v) (fun _ => measurable_gaussianPDF 0 v)]
rfl
lemma lintegral_gaussian_shift_scale (m : ℕ) (δ : ℝ) (hδ : δ ≠ 0)
(a : Fin m → ℝ) (f : (Fin m → ℝ) → ℝ≥0∞) (hf : Measurable f) :
∫⁻ u : Fin m → ℝ, f (fun j => a j + δ * u j)
∂Measure.pi (fun _ => gaussianReal 0 1) =
∫⁻ y : Fin m → ℝ, (∏ j, gaussianPDF 0 (NNReal.mk (δ^2) (sq_nonneg δ)) (y j - a j)) * f y := by
let v : ℝ≥0 := NNReal.mk (δ^2) (sq_nonneg δ)
have hv : v ≠ 0 := by
rw [← NNReal.coe_ne_zero]
exact pow_ne_zero 2 hδ
have he :
(∫⁻ u : Fin m → ℝ, f (fun j => a j + δ * u j)
∂Measure.pi (fun _ => gaussianReal 0 1)) =
∫⁻ y : Fin m → ℝ, f (a + y) ∂Measure.pi (fun _ => gaussianReal 0 v) := by
rw [← pi_gaussian_map_scale m δ, lintegral_map (by fun_prop) (by fun_prop)]
rfl
rw [he, pi_gaussian_withDensity m v hv,
lintegral_withDensity_eq_lintegral_mul _ (by fun_prop) (by fun_prop)]
have hh (y : Fin m → ℝ) :
(∏ j, gaussianPDF 0 v (y j)) * f (a + y) =
(fun z : Fin m → ℝ => (∏ j, gaussianPDF 0 v (z j - a j)) * f z) (a + y) := by
simp only [Pi.add_apply, add_sub_cancel_left]
exact (lintegral_congr (μ := volume) hh).trans (lintegral_add_left_eq_self
(μ := volume) (fun z : Fin m → ℝ => (∏ j, gaussianPDF 0 v (z j - a j)) * f z) a)
end GaussianNoise
section HolderSet
variable {X : Type*} [MeasurableSpace X] (μ : Measure X)
lemma withDensity_apply_le_moment (f : X → ℝ≥0∞) (hf : Measurable f)
{p : ℝ} (hp : 1 < p) {C : ℝ≥0∞}
(hC : ∫⁻ x, f x ^ p ∂μ ≤ C) (S : Set X) (hS : MeasurableSet S) :
μ.withDensity f S ≤ C^(1/p) * (μ S)^(1 - 1/p) := by
have hpq := Real.HolderConjugate.conjExponent hp
have h := ENNReal.lintegral_mul_le_Lp_mul_Lq (μ.restrict S) hpq
hf.aemeasurable (aemeasurable_const (b := (1 : ℝ≥0∞)))
have he : 1 / (Real.conjExponent p) = 1 - 1/p := by
have hh := hpq.inv_add_inv_eq_one
simpa only [one_div] using (eq_sub_of_add_eq' hh)
simp only [Pi.mul_apply, mul_one, ENNReal.one_rpow, lintegral_const,
Measure.restrict_apply_univ, one_mul, he] at h
rw [withDensity_apply _ hS]
exact h.trans (mul_le_mul' (ENNReal.rpow_le_rpow
((lintegral_mono' Measure.restrict_le_self (fun _ => le_rfl)).trans hC) (by positivity)) le_rfl)
end HolderSet
section LimitSet
variable {X Y : Type*} [MeasurableSpace X] [MeasurableSpace Y]
[TopologicalSpace Y] [BorelSpace Y]
(ρ : Measure X) (τ : Measure Y)
/-- Portmanteau's open-set direction, proved directly from Fatou for this coupling. -/
lemma map_apply_open_le_of_tendsto (F : X → Y) (Fₖ : ℕ → X → Y)
(hF : Measurable F) (hFₖ : ∀ k, Measurable (Fₖ k))
(ht : ∀ x, Tendsto (fun k => Fₖ k x) atTop (𝓝 (F x)))
(C : ℝ≥0∞) (α : ℝ)
(hbound : ∀ k U, IsOpen U → (ρ.map (Fₖ k)) U ≤ C * (τ U)^α)
(U : Set Y) (hU : IsOpen U) :
(ρ.map F) U ≤ C * (τ U)^α := by
let f : ℕ → X → ℝ≥0∞ := fun k => (Fₖ k ⁻¹' U).indicator (fun _ => 1)
have hf : ∀ k, Measurable (f k) := fun k =>
measurable_const.indicator (hU.measurableSet.preimage (hFₖ k))
have hind : ∀ x, (F ⁻¹' U).indicator (fun _ => (1 : ℝ≥0∞)) x ≤
atTop.liminf (fun k => f k x) := by
intro x
by_cases hx : F x ∈ U
· rw [Set.indicator_of_mem (show x ∈ F ⁻¹' U from hx)]
apply le_liminf_of_le (by isBoundedDefault)
filter_upwards [(ht x).eventually (hU.mem_nhds hx)] with k hk
change 1 ≤ (Fₖ k ⁻¹' U).indicator (fun _ => (1 : ℝ≥0∞)) x
rw [Set.indicator_of_mem (show x ∈ Fₖ k ⁻¹' U from hk)]
· rw [Set.indicator_of_notMem (show x ∉ F ⁻¹' U from hx)]
exact zero_le
calc
(ρ.map F) U = ∫⁻ x, (F ⁻¹' U).indicator (fun _ => (1 : ℝ≥0∞)) x ∂ρ := by
rw [Measure.map_apply hF hU.measurableSet,
lintegral_indicator (hU.measurableSet.preimage hF)]
simp
_ ≤ ∫⁻ x, atTop.liminf (fun k => f k x) ∂ρ := lintegral_mono hind
_ ≤ atTop.liminf (fun k => ∫⁻ x, f k x ∂ρ) := lintegral_liminf_le hf
_ ≤ _ := by
apply liminf_le_of_frequently_le (hu_le := by isBoundedDefault)
apply Filter.Eventually.frequently
filter_upwards [] with k
have hk := hbound k U hU
simpa [f, lintegral_indicator (hU.measurableSet.preimage (hFₖ k)),
Measure.map_apply (hFₖ k) hU.measurableSet] using hk
end LimitSet
variable {Y : Type*} [MeasurableSpace Y] [TopologicalSpace Y]
lemma ennreal_rpow_iInf {ι : Sort*} (f : ι → ℝ≥0∞) {α : ℝ} (hα : 0 < α) :
(⨅ i, f i)^α = ⨅ i, (f i)^α :=
(ENNReal.orderIsoRpow α hα).map_iInf f
lemma measure_apply_le_of_isOpen (μ τ : Measure Y) [τ.OuterRegular]
{C : ℝ≥0∞} (hC : C ≠ ∞) {α : ℝ} (hα : 0 < α)
(hbound : ∀ U, IsOpen U → μ U ≤ C * (τ U)^α) (S : Set Y) :
μ S ≤ C * (τ S)^α := by
by_cases hC0 : C = 0
· simp only [hC0, zero_mul] at hbound ⊢
exact (measure_mono (Set.subset_univ S)).trans (hbound Set.univ isOpen_univ)
rw [S.measure_eq_iInf_isOpen τ]
simp_rw [ennreal_rpow_iInf _ hα, ENNReal.mul_iInf_of_ne hC0 hC]
exact le_iInf fun U => le_iInf fun hSU => le_iInf fun hU =>
(measure_mono hSU).trans (hbound U hU)
end SubsphereRegression
end
end OAI

Xet Storage Details

Size:
22.1 kB
·
Xet hash:
fbab27c12960c435b56008d32ae9277aca73cde0eb18d3a0d8c7399c77ebecef

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.