Download data/lean/OAI/Probability/GaussianReplacement/MixedGeometry.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 23.1 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/GaussianReplacement/MixedGeometry.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/GaussianReplacement/MixedGeometry.lean
-
curl -L -o MixedGeometry.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/GaussianReplacement/MixedGeometry.lean
23.1 kB
| import OAI.Probability.GaussianReplacement.Geometry | |
| namespace OAI | |
| open MeasureTheory ProbabilityTheory Set Filter | |
| open scoped ENNReal NNReal RealInnerProductSpace Topology | |
| noncomputable section | |
| namespace CurrentProjection | |
| section MixedGeometry | |
| variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace β E] | |
| [FiniteDimensional β E] [measurableSpaceE : MeasurableSpace E] [borelSpaceE : BorelSpace E] | |
| def AmbientGrowth (ΞΌ : Measure E) (a : β) (A : β) : Prop := | |
| β z : E, β t : β, 0 < t β ΞΌ (Metric.closedBall z t) β€ ENNReal.ofReal (A * t ^ a) | |
| omit [MeasurableSpace E] [BorelSpace E] in | |
| lemma infDist_eq_norm_sub_projection (V : Submodule β E) (v : E) : | |
| Metric.infDist v (V : Set E) = βv - V.starProjection vβ := by | |
| rw [Submodule.starProjection_minimal, Metric.infDist_eq_iInf] | |
| simp only [dist_eq_norm] | |
| rfl | |
| omit [MeasurableSpace E] [BorelSpace E] in | |
| lemma infDist_submodule_smul (V : Submodule β E) (v : E) (c : β) : | |
| Metric.infDist (c β’ v) (V : Set E) = |c| * Metric.infDist v (V : Set E) := by | |
| simp only [infDist_eq_norm_sub_projection, map_smul, β smul_sub, norm_smul, Real.norm_eq_abs] | |
| theorem exists_radial_tube_cover (V : Submodule β E) (s : E) | |
| {R Ξ· : β} (hR : 0 < R) (hΞ· : 0 < Ξ·) (hΞ·1 : Ξ· β€ 1) : | |
| β t : Finset V, (t.card : β) β€ (3 / Ξ·) ^ Module.finrank β V β§ | |
| β u : E, βu - sβ β€ R β Metric.infDist (u - s) (V : Set E) β€ Ξ· * R β | |
| β y β t, dist u (s + R β’ (y : E)) β€ 2 * (Ξ· * R) := by | |
| classical | |
| obtain β¨t, _, htcard, hnetβ© := exists_unit_ball_net (E := V) hΞ· hΞ·1 | |
| refine β¨t, htcard, ?_β© | |
| intro u hu huV | |
| let z : E := Rβ»ΒΉ β’ (u - s) | |
| have hz : βzβ β€ 1 := by | |
| dsimp [z] | |
| rw [norm_smul, Real.norm_eq_abs, abs_of_pos (inv_pos.mpr hR)] | |
| exact (inv_mul_le_iffβ hR).mpr (by simpa using hu) | |
| obtain β¨y, hyt, hzyβ© := hnet (V.orthogonalProjectionOnto z) | |
| ((V.norm_orthogonalProjectionOnto_apply_le z).trans hz) | |
| have hzV : βz - V.starProjection zβ β€ Ξ· := by | |
| rw [β infDist_eq_norm_sub_projection] | |
| dsimp [z] | |
| rw [infDist_submodule_smul, abs_of_pos (inv_pos.mpr hR)] | |
| exact (inv_mul_le_iffβ hR).mpr (by simpa [mul_comm] using huV) | |
| have hdist : dist z (y : E) β€ 2 * Ξ· := by | |
| calc | |
| dist z (y : E) β€ dist z (V.orthogonalProjectionOnto z : E) + | |
| dist (V.orthogonalProjectionOnto z : E) (y : E) := dist_triangle _ _ _ | |
| _ β€ Ξ· + Ξ· := add_le_add (by simpa [dist_eq_norm] using hzV) hzy | |
| _ = 2 * Ξ· := by ring | |
| refine β¨y, hyt, ?_β© | |
| have he : u = s + R β’ z := by | |
| dsimp [z] | |
| rw [smul_inv_smulβ hR.ne'] | |
| abel | |
| rw [he, dist_add_left, dist_smulβ, Real.norm_eq_abs, abs_of_pos hR] | |
| nlinarith | |
| theorem AmbientGrowth.radial_tube {ΞΌ : Measure E} {a : β} {A : β} | |
| (hΞΌ : AmbientGrowth ΞΌ a A) (V : Submodule β E) (s : E) | |
| {R Ξ· : β} (hR : 0 < R) (hΞ· : 0 < Ξ·) (hΞ·1 : Ξ· β€ 1) : | |
| ΞΌ {u | βu - sβ β€ R β§ Metric.infDist (u - s) (V : Set E) β€ Ξ· * R} β€ | |
| ENNReal.ofReal ((3 / Ξ·) ^ Module.finrank β V * (A * (2 * (Ξ· * R)) ^ a)) := by | |
| classical | |
| obtain β¨t, htcard, htcoverβ© := exists_radial_tube_cover V s hR hΞ· hΞ·1 | |
| calc | |
| ΞΌ {u | βu - sβ β€ R β§ Metric.infDist (u - s) (V : Set E) β€ Ξ· * R} β€ | |
| ΞΌ (β y β t, Metric.closedBall (s + R β’ (y : E)) (2 * (Ξ· * R))) := by | |
| apply measure_mono | |
| intro u hu | |
| obtain β¨y, hy, huyβ© := htcover u hu.1 hu.2 | |
| exact mem_iUnion.2 β¨y, mem_iUnion.2 β¨hy, huyβ©β© | |
| _ β€ β y β t, ΞΌ (Metric.closedBall (s + R β’ (y : E)) (2 * (Ξ· * R))) := | |
| measure_biUnion_finset_le _ _ | |
| _ β€ β _y β t, ENNReal.ofReal (A * (2 * (Ξ· * R)) ^ a) := by | |
| exact Finset.sum_le_sum fun y _ => hΞΌ _ _ (by positivity) | |
| _ = (t.card : ββ₯0β) * ENNReal.ofReal (A * (2 * (Ξ· * R)) ^ a) := by simp | |
| _ β€ ENNReal.ofReal ((3 / Ξ·) ^ Module.finrank β V) * | |
| ENNReal.ofReal (A * (2 * (Ξ· * R)) ^ a) := by | |
| gcongr | |
| exact_mod_cast ENNReal.ofReal_le_ofReal htcard | |
| _ = _ := (ENNReal.ofReal_mul (by positivity)).symm | |
| end MixedGeometry | |
| section MixedRadial | |
| variable {E : Type*} [NormedAddCommGroup E] [innerProductSpaceRealE : InnerProductSpace β E] | |
| [finiteDimensionalRealE : FiniteDimensional β E] [MeasurableSpace E] [BorelSpace E] | |
| lemma tube_radius_margin (h a k : β) (A R Ξ· : β) | |
| (hA : 0 β€ A) (hR : 0 β€ R) (hΞ· : 0 < Ξ·) (hΞ·1 : Ξ· β€ 1) (hmargin : h+k β€ a) : | |
| (3 / Ξ·) ^ h * (A * (2 * (Ξ· * R)) ^ a) β€ | |
| (3 ^ h * 2 ^ a * A * R ^ a) * Ξ· ^ k := by | |
| have he : Ξ· ^ a = Ξ· ^ h * Ξ· ^ (a-h) := by | |
| rw [β pow_add, Nat.add_sub_of_le (by omega : h β€ a)] | |
| calc | |
| (3 / Ξ·) ^ h * (A * (2 * (Ξ· * R)) ^ a) = | |
| (3 ^ h * 2 ^ a * A * R ^ a) * Ξ· ^ (a-h) := by | |
| simp only [div_pow, mul_pow] | |
| rw [he] | |
| field_simp | |
| _ β€ _ := mul_le_mul_of_nonneg_left | |
| (pow_le_pow_of_le_one hΞ·.le hΞ·1 (by omega)) (by positivity) | |
| lemma AmbientGrowth.radial_tube_pow {ΞΌ : Measure E} {a : β} {A : β} | |
| (hΞΌ : AmbientGrowth ΞΌ a A) (hA : 0 β€ A) (V : Submodule β E) (s : E) | |
| (k : β) (hmargin : Module.finrank β V + k β€ a) | |
| {R Ξ· : β} (hR : 0 < R) (hΞ· : 0 < Ξ·) (hΞ·1 : Ξ· β€ 1) : | |
| ΞΌ {u | βu - sβ β€ R β§ Metric.infDist (u - s) (V : Set E) β€ Ξ· * R} β€ | |
| ENNReal.ofReal (3 ^ Module.finrank β V * 2 ^ a * A * R ^ a) * | |
| ENNReal.ofReal (Ξ· ^ k) := by | |
| refine (hΞΌ.radial_tube V s hR hΞ· hΞ·1).trans ?_ | |
| rw [β ENNReal.ofReal_mul (by positivity)] | |
| exact ENNReal.ofReal_le_ofReal (tube_radius_margin _ _ k A R Ξ· hA hR.le hΞ· hΞ·1 hmargin) | |
| def radialShell (s : E) (R : β) : Set E := | |
| {u | R / 2 < βu - sβ β§ βu - sβ β€ R} | |
| omit [InnerProductSpace β E] [FiniteDimensional β E] in | |
| lemma measurableSet_radialShell (s : E) (R : β) : MeasurableSet (radialShell s R) := by | |
| have hf : Measurable (fun u : E => βu - sβ) := by fun_prop | |
| exact (measurableSet_lt measurable_const hf).inter (measurableSet_le hf measurable_const) | |
| theorem AmbientGrowth.shell_normalized_inverse {ΞΌ : Measure E} {a m : β} {A : β} | |
| (hΞΌ : AmbientGrowth ΞΌ a A) (hA : 0 β€ A) (V : Submodule β E) (s : E) | |
| (hmargin : Module.finrank β V + (m+1) β€ a) {R : β} (hR : 0 < R) : | |
| β«β» u in radialShell s R, | |
| ENNReal.ofReal (((Metric.infDist (u-s) (V : Set E) / R)β»ΒΉ) ^ m) βΞΌ β€ | |
| ENNReal.ofReal ((1 + 3 ^ Module.finrank β V * 2 ^ (a+m+1)) * A * R ^ a) := by | |
| let f : E β β := fun u => Metric.infDist (u-s) (V : Set E) / R | |
| have hf : Measurable f := by | |
| exact ((Metric.continuous_infDist_pt _).measurable.comp (by fun_prop)).div_const R | |
| have hnonneg : β u, 0 β€ f u := fun u => div_nonneg Metric.infDist_nonneg hR.le | |
| have htube (Ξ· : β) (hΞ· : 0 < Ξ·) (hΞ·1 : Ξ· β€ 1) : | |
| (ΞΌ.restrict (radialShell s R)) {u | f u β€ Ξ·} β€ | |
| ENNReal.ofReal (3 ^ Module.finrank β V * 2 ^ a * A * R ^ a) * | |
| ENNReal.ofReal (Ξ· ^ (m+1)) := by | |
| rw [Measure.restrict_apply (measurableSet_le hf measurable_const)] | |
| refine (measure_mono ?_).trans (hΞΌ.radial_tube_pow hA V s (m+1) hmargin hR hΞ· hΞ·1) | |
| intro u hu | |
| exact β¨hu.2.2, (div_le_iffβ hR).mp hu.1β© | |
| have hmass : ΞΌ (radialShell s R) β€ ENNReal.ofReal (A * R ^ a) := by | |
| refine (measure_mono ?_).trans (hΞΌ s R hR) | |
| intro u hu | |
| exact (Metric.mem_closedBall.mpr (by simpa [dist_eq_norm] using hu.2)) | |
| calc | |
| _ β€ ΞΌ (radialShell s R) + ENNReal.ofReal (3 ^ Module.finrank β V * 2 ^ a * A * R ^ a) * | |
| (2 : ββ₯0β) ^ (m+1) := by | |
| simpa only [f, Measure.restrict_apply_univ] using | |
| inverse_moment_of_tube_bound (ΞΌ.restrict (radialShell s R)) f m hf hnonneg _ htube | |
| _ β€ ENNReal.ofReal (A * R ^ a) + | |
| ENNReal.ofReal (3 ^ Module.finrank β V * 2 ^ a * A * R ^ a) * (2 : ββ₯0β)^(m+1) := | |
| add_le_add hmass le_rfl | |
| _ = _ := by | |
| rw [β ENNReal.ofReal_ofNat (n := 2), β ENNReal.ofReal_pow (by norm_num : (0 : β) β€ 2), | |
| β ENNReal.ofReal_mul (by positivity), β ENNReal.ofReal_add (by positivity) (by positivity)] | |
| congr 1 | |
| rw [show a+m+1 = a+(m+1) by omega, pow_add] | |
| ring | |
| def mixedInverse (s : E) (V : Submodule β E) (m r : β) (u : E) : ββ₯0β := | |
| ENNReal.ofReal (βu-sββ»ΒΉ ^ r * (Metric.infDist (u-s) (V : Set E))β»ΒΉ ^ m) | |
| omit [FiniteDimensional β E] in | |
| lemma measurable_mixedInverse (s : E) (V : Submodule β E) (m r : β) : | |
| Measurable (mixedInverse s V m r) := by | |
| have hf : Measurable (fun u : E => Metric.infDist (u-s) (V : Set E)) := | |
| (Metric.continuous_infDist_pt _).measurable.comp (by fun_prop) | |
| exact Measurable.ennreal_ofReal ((by fun_prop : Measurable (fun u : E => βu-sββ»ΒΉ ^ r)).mul | |
| (hf.inv.pow_const m)) | |
| def shellConstant (h a m r : β) : β := 2 ^ r * (1 + 3 ^ h * 2 ^ (a+m+1)) | |
| lemma inverse_div_factor (x R : β) (m : β) (hR : R β 0) : | |
| xβ»ΒΉ ^ m = Rβ»ΒΉ ^ m * (x / R)β»ΒΉ ^ m := by | |
| rw [β mul_pow, inv_div, div_eq_mul_inv] | |
| simp [hR] | |
| lemma radial_power_cancel (R : β) (a k : β) (hR : R β 0) (hk : k β€ a) : | |
| Rβ»ΒΉ ^ k * R ^ a = R ^ (a-k) := by | |
| have he : R ^ a = R ^ k * R ^ (a-k) := by rw [β pow_add, Nat.add_sub_of_le hk] | |
| rw [he, β mul_assoc, β mul_pow] | |
| simp [hR] | |
| theorem AmbientGrowth.shell_mixed_inverse {ΞΌ : Measure E} {a m r : β} {A : β} | |
| (hΞΌ : AmbientGrowth ΞΌ a A) (hA : 0 β€ A) (V : Submodule β E) (s : E) | |
| (hmargin : Module.finrank β V + (m+1) β€ a) (hdegree : m+r β€ a) | |
| {R : β} (hR : 0 < R) : | |
| β«β» u in radialShell s R, mixedInverse s V m r u βΞΌ β€ | |
| ENNReal.ofReal (shellConstant (Module.finrank β V) a m r * A * R ^ (a-(m+r))) := by | |
| let f : E β ββ₯0β := fun u => | |
| ENNReal.ofReal (((Metric.infDist (u-s) (V : Set E) / R)β»ΒΉ) ^ m) | |
| have hf : Measurable f := by | |
| have hh := (Metric.continuous_infDist_pt (V : Set E)).measurable.comp | |
| (show Measurable (fun u : E => u-s) by fun_prop) | |
| exact ((hh.div_const R).inv.pow_const m).ennreal_ofReal | |
| have hbound : β u β radialShell s R, | |
| mixedInverse s V m r u β€ ENNReal.ofReal (2 ^ r * Rβ»ΒΉ ^ (m+r)) * f u := by | |
| intro u hu | |
| have hu0 : 0 < βu-sβ := lt_trans (by positivity : 0 < R/2) hu.1 | |
| have hinv : βu-sββ»ΒΉ β€ 2 / R := by | |
| have h := (inv_le_invβ hu0 (by positivity : (0 : β) < R/2)).mpr hu.1.le | |
| simpa only [inv_div] using h | |
| have hpow : βu-sββ»ΒΉ ^ r β€ (2 / R) ^ r := | |
| pow_le_pow_leftβ (by positivity) hinv r | |
| rw [β ENNReal.ofReal_mul (by positivity)] | |
| apply ENNReal.ofReal_le_ofReal | |
| calc | |
| βu-sββ»ΒΉ ^ r * (Metric.infDist (u-s) (V : Set E))β»ΒΉ ^ m β€ | |
| (2/R)^r * (Metric.infDist (u-s) (V : Set E))β»ΒΉ ^ m := | |
| mul_le_mul_of_nonneg_right hpow (pow_nonneg (inv_nonneg.mpr Metric.infDist_nonneg) _) | |
| _ = _ := by | |
| rw [inverse_div_factor (Metric.infDist (u-s) (V : Set E)) R m hR.ne'] | |
| simp only [div_eq_mul_inv, inv_pow, pow_add] | |
| ring | |
| calc | |
| _ β€ β«β» u in radialShell s R, ENNReal.ofReal (2 ^ r * Rβ»ΒΉ ^ (m+r)) * f u βΞΌ := by | |
| apply lintegral_mono_ae | |
| filter_upwards [ae_restrict_mem (measurableSet_radialShell s R)] with u hu | |
| exact hbound u hu | |
| _ = ENNReal.ofReal (2 ^ r * Rβ»ΒΉ ^ (m+r)) * β«β» u in radialShell s R, f u βΞΌ := | |
| lintegral_const_mul _ hf | |
| _ β€ ENNReal.ofReal (2 ^ r * Rβ»ΒΉ ^ (m+r)) * | |
| ENNReal.ofReal ((1 + 3 ^ Module.finrank β V * 2 ^ (a+m+1)) * A * R ^ a) := by | |
| gcongr | |
| exact hΞΌ.shell_normalized_inverse hA V s hmargin hR | |
| _ = _ := by | |
| rw [β ENNReal.ofReal_mul (by positivity)] | |
| congr 1 | |
| calc | |
| _ = (2^r * (1 + 3 ^ Module.finrank β V * 2 ^ (a+m+1)) * A) * | |
| (Rβ»ΒΉ ^ (m+r) * R ^ a) := by ring | |
| _ = _ := by rw [radial_power_cancel R a (m+r) hR.ne' hdegree]; rfl | |
| end MixedRadial | |
| lemma dyadic_min_sum_le (B D : β) (hB : 0 < B) (hD : 0 < D) : | |
| (β' i : β, ENNReal.ofReal (min B (D * (1/2 : β)^i))) β€ | |
| ENNReal.ofReal (3 * B * (1 + max (Real.log (D/B)) 0)) := by | |
| let L : β := max (Real.log (D/B)) 0 | |
| let N : β := βL / Real.log 2ββ | |
| have hL : 0 β€ L := le_max_right _ _ | |
| have hlog : (1/2 : β) β€ Real.log 2 := by | |
| have := Real.one_sub_inv_le_log_of_pos (by norm_num : (0:β) < 2) | |
| norm_num at this β’ | |
| exact this | |
| have hlog0 : 0 < Real.log 2 := by linarith | |
| have hN : L β€ (N:β) * Real.log 2 := by | |
| exact (div_le_iffβ hlog0).mp (Nat.le_ceil _) | |
| have hDB : D / B β€ (2:β)^N := by | |
| apply (Real.log_le_log_iff (div_pos hD hB) (by positivity)).mp | |
| rw [Real.log_pow] | |
| exact (le_max_left _ _).trans hN | |
| have hcut : D * (1/2:β)^N β€ B := by | |
| have hh : D β€ (2:β)^N * B := (div_le_iffβ hB).mp hDB | |
| calc | |
| D * (1/2:β)^N β€ ((2:β)^N * B) * (1/2:β)^N := | |
| mul_le_mul_of_nonneg_right hh (by positivity) | |
| _ = B := by rw [mul_comm ((2:β)^N), mul_assoc, β mul_pow]; norm_num | |
| have hNupper : (N:β) β€ 2 * L + 1 := by | |
| have hh := (Nat.ceil_lt_add_one (div_nonneg hL hlog0.le)).le | |
| have hdiv : L / Real.log 2 β€ 2 * L := by | |
| apply (div_le_iffβ hlog0).mpr | |
| nlinarith | |
| dsimp [N] | |
| linarith | |
| let f : β β ββ₯0β := fun i => ENNReal.ofReal (min B (D * (1/2:β)^i)) | |
| calc | |
| β' i, f i = (β i β Finset.range N, f i) + β' i, f (i+N) := by | |
| exact ENNReal.summable.sum_add_tsum_nat_add'.symm | |
| _ β€ (N : ββ₯0β) * ENNReal.ofReal B + | |
| β' i : β, ENNReal.ofReal B * (1/2:ββ₯0β)^i := by | |
| apply add_le_add | |
| Β· calc | |
| β i β Finset.range N, f i β€ β _i β Finset.range N, ENNReal.ofReal B := by | |
| exact Finset.sum_le_sum fun i _ => ENNReal.ofReal_le_ofReal (min_le_left _ _) | |
| _ = _ := by simp | |
| Β· apply ENNReal.tsum_le_tsum | |
| intro i | |
| dsimp [f] | |
| rw [β (show ENNReal.ofReal (1/2:β) = (1/2:ββ₯0β) by | |
| rw [ENNReal.ofReal_div_of_pos (by norm_num)]; norm_num)] | |
| rw [β ENNReal.ofReal_pow (by norm_num : (0:β) β€ 1/2), | |
| β ENNReal.ofReal_mul hB.le] | |
| apply ENNReal.ofReal_le_ofReal | |
| refine (min_le_right _ _).trans ?_ | |
| calc | |
| D * (1/2:β)^(i+N) = (D * (1/2:β)^N) * (1/2:β)^i := by rw [pow_add]; ring | |
| _ β€ _ := mul_le_mul_of_nonneg_right hcut (by positivity) | |
| _ = ENNReal.ofReal ((N:β)*B + 2*B) := by | |
| rw [ENNReal.tsum_mul_left, ENNReal.tsum_geometric] | |
| norm_num | |
| rw [β ENNReal.ofReal_natCast, β ENNReal.ofReal_mul (by positivity), | |
| β ENNReal.ofReal_ofNat (n:=2), β ENNReal.ofReal_mul hB.le, | |
| β ENNReal.ofReal_add (by positivity) (by positivity)] | |
| congr 1; ring | |
| _ β€ ENNReal.ofReal (3 * B * (1+L)) := by | |
| apply ENNReal.ofReal_le_ofReal | |
| nlinarith | |
| lemma shellConstant_nonneg (h a m r : β) : 0 β€ shellConstant h a m r := by | |
| unfold shellConstant | |
| positivity | |
| lemma shellConstant_mono (h m r : β) {a b : β} (hab : a β€ b) : | |
| shellConstant h a m r β€ shellConstant h b m r := by | |
| unfold shellConstant | |
| gcongr | |
| norm_num | |
| section MixedRadialSum | |
| variable {E : Type*} [NormedAddCommGroup E] [innerProductSpaceRealE : InnerProductSpace β E] | |
| [finiteDimensionalRealE : FiniteDimensional β E] [measurableSpaceE : MeasurableSpace E] [borelSpaceE : BorelSpace E] | |
| omit [InnerProductSpace β E] [FiniteDimensional β E] [MeasurableSpace E] [BorelSpace E] in | |
| lemma mem_radialShell_dyadic {s u : E} (hu : 0 < βu-sβ) (hu2 : βu-sβ β€ 2) : | |
| β i : β, u β radialShell s (2 * (1/2:β)^i) := by | |
| obtain β¨i, hi, hjβ© := exists_nat_pow_near_of_lt_one (show 0 < βu-sβ/2 by positivity) | |
| (show βu-sβ/2 β€ 1 by linarith) (by norm_num : (0:β) < 1/2) (by norm_num : (1/2:β) < 1) | |
| refine β¨i, ?_, ?_β© | |
| Β· rw [pow_succ] at hi | |
| linarith | |
| Β· linarith | |
| theorem AmbientGrowth.mixed_inverse_le {ΞΌ : Measure E} {n m r : β} {B D : β} | |
| (hBΞΌ : AmbientGrowth ΞΌ (m+r) B) (hDΞΌ : AmbientGrowth ΞΌ n D) | |
| (hB : 0 < B) (hD : 0 < D) (hr : 1 β€ r) (hn : m+r < n) | |
| (V : Submodule β E) (s : E) (hmargin : Module.finrank β V + (m+1) β€ m+r) | |
| (hsupp : βα΅ u βΞΌ, βu-sβ β€ 2) : | |
| β«β» u, mixedInverse s V m r u βΞΌ β€ | |
| ENNReal.ofReal (4 * shellConstant (Module.finrank β V) n m r * | |
| B * (1 + max (Real.log (D/B)) 0)) := by | |
| let K : β := shellConstant (Module.finrank β V) n m r | |
| have hK : 0 β€ K := shellConstant_nonneg _ _ _ _ | |
| let S : β β Set E := fun i => radialShell s (2 * (1/2:β)^i) | |
| have hS : MeasurableSet (β i, S i) := MeasurableSet.iUnion fun i => measurableSet_radialShell _ _ | |
| have heq : (fun u => mixedInverse s V m r u) =α΅[ΞΌ] | |
| (β i, S i).indicator (mixedInverse s V m r) := by | |
| filter_upwards [hsupp] with u hu | |
| by_cases hz : u = s | |
| Β· subst u | |
| simp [mixedInverse, Set.indicator, Nat.ne_of_gt (show 0 < r by omega)] | |
| Β· have hpos : 0 < βu-sβ := norm_pos_iff.mpr (sub_ne_zero.mpr hz) | |
| obtain β¨i, hiβ© := mem_radialShell_dyadic hpos hu | |
| exact (Set.indicator_of_mem (mem_iUnion.mpr β¨i, hiβ©) _).symm | |
| have hzero : β«β» u in S 0, mixedInverse s V m r u βΞΌ β€ ENNReal.ofReal (K*B) := by | |
| have hh := hBΞΌ.shell_mixed_inverse hB.le V s hmargin le_rfl (by norm_num : (0:β) < 2) | |
| have hk := shellConstant_mono (Module.finrank β V) m r hn.le | |
| dsimp [S] | |
| simp only [pow_zero, mul_one, Nat.sub_self] at hh β’ | |
| refine hh.trans (ENNReal.ofReal_le_ofReal ?_) | |
| simpa [K] using mul_le_mul_of_nonneg_right hk hB.le | |
| have htail (i : β) : | |
| β«β» u in S (i+1), mixedInverse s V m r u βΞΌ β€ | |
| ENNReal.ofReal K * ENNReal.ofReal (min B (D*(1/2:β)^i)) := by | |
| have hR : 0 < (1/2:β)^i := by positivity | |
| have hR1 : (1/2:β)^i β€ 1 := pow_le_oneβ (by norm_num) (by norm_num) | |
| have hSi : S (i+1) = radialShell s ((1/2:β)^i) := by | |
| dsimp [S] | |
| congr 1 | |
| rw [pow_succ] | |
| ring | |
| rw [hSi, β ENNReal.ofReal_mul hK] | |
| rw [mul_min_of_nonneg _ _ hK, ENNReal.ofReal_min] | |
| apply le_min | |
| Β· have hh := hBΞΌ.shell_mixed_inverse hB.le V s hmargin le_rfl hR | |
| simp only [Nat.sub_self, pow_zero, mul_one] at hh | |
| refine hh.trans (ENNReal.ofReal_le_ofReal ?_) | |
| exact mul_le_mul_of_nonneg_right (shellConstant_mono _ _ _ hn.le) hB.le | |
| Β· have hh := hDΞΌ.shell_mixed_inverse hD.le V s (hmargin.trans hn.le) hn.le hR | |
| refine hh.trans (ENNReal.ofReal_le_ofReal ?_) | |
| have hrpow : ((1/2:β)^i)^(n-(m+r)) β€ (1/2:β)^i := by | |
| simpa using pow_le_pow_of_le_one hR.le hR1 (show 1 β€ n-(m+r) by omega) | |
| simpa only [mul_assoc] using mul_le_mul_of_nonneg_left hrpow (mul_nonneg hK hD.le) | |
| calc | |
| _ = β«β» u in β i, S i, mixedInverse s V m r u βΞΌ := by | |
| rw [β lintegral_indicator hS] | |
| exact lintegral_congr_ae heq | |
| _ β€ β' i, β«β» u in S i, mixedInverse s V m r u βΞΌ := lintegral_iUnion_le _ _ | |
| _ = (β«β» u in S 0, mixedInverse s V m r u βΞΌ) + | |
| β' i, β«β» u in S (i+1), mixedInverse s V m r u βΞΌ := tsum_eq_zero_add' ENNReal.summable | |
| _ β€ ENNReal.ofReal (K*B) + ENNReal.ofReal K * | |
| (β' i : β, ENNReal.ofReal (min B (D*(1/2:β)^i))) := by | |
| rw [β ENNReal.tsum_mul_left] | |
| exact add_le_add hzero (ENNReal.tsum_le_tsum htail) | |
| _ β€ ENNReal.ofReal (K*B) + ENNReal.ofReal K * | |
| ENNReal.ofReal (3 * B * (1+max (Real.log (D/B)) 0)) := by | |
| gcongr | |
| exact dyadic_min_sum_le B D hB hD | |
| _ β€ _ := by | |
| rw [β ENNReal.ofReal_mul hK, | |
| β ENNReal.ofReal_add (mul_nonneg hK hB.le) (by positivity)] | |
| apply ENNReal.ofReal_le_ofReal | |
| have hL : 0 β€ max (Real.log (D/B)) 0 := le_max_right _ _ | |
| have hh : 0 β€ K * B * max (Real.log (D/B)) 0 := by positivity | |
| dsimp [K] at * | |
| nlinarith | |
| end MixedRadialSum | |
| lemma two_pow_le_exp (k : β) : (2:β)^k β€ Real.exp (k:β) := by | |
| calc | |
| (2:β)^k β€ (Real.exp 1)^k := | |
| pow_le_pow_leftβ (by norm_num) (by have h := Real.add_one_le_exp (1:β); linarith) k | |
| _ = _ := by rw [β Real.exp_nat_mul]; simp | |
| lemma shellConstant_exp_bound (d h n m r : β) (hd : 1 β€ d) | |
| (hh : h β€ d) (hn : n β€ d) (hm : m β€ d) (hr : r β€ d) : | |
| 4 * shellConstant h n m r β€ Real.exp (9 * (d:β)) := by | |
| have hA : 1 β€ (3:β)^h * 2^(n+m+1) := | |
| one_le_mul_of_one_le_of_one_le (one_le_powβ (by norm_num)) (one_le_powβ (by norm_num)) | |
| have hpow : (3:β)^h β€ 4^h := pow_le_pow_leftβ (by norm_num) (by norm_num) h | |
| calc | |
| 4 * shellConstant h n m r β€ 8 * (2:β)^r * ((3:β)^h * 2^(n+m+1)) := by | |
| unfold shellConstant | |
| have hp : 0 β€ (2:β)^r := by positivity | |
| nlinarith | |
| _ β€ 8 * (2:β)^r * ((4:β)^h * 2^(n+m+1)) := by gcongr | |
| _ = (2:β)^(r+2*h+n+m+4) := by | |
| norm_num [pow_add, pow_mul] | |
| ring | |
| _ β€ (2:β)^(9*d) := pow_le_pow_rightβ (by norm_num) (by omega) | |
| _ β€ Real.exp (9 * (d:β)) := by simpa using two_pow_le_exp (9*d) | |
| def sphereLift {d : β} (Ο : Measure (Sphere d)) : Measure (Vector d) := | |
| Ο.map Subtype.val | |
| lemma LocalGrowth.sphereLift {d a : β} {Ο : Measure (Sphere d)} {A : β} | |
| (hΟ : LocalGrowth Ο a A) : AmbientGrowth (sphereLift Ο) a A := by | |
| intro z t ht | |
| rw [CurrentProjection.sphereLift, Measure.map_apply continuous_subtype_val.measurable Metric.isClosed_closedBall.measurableSet] | |
| exact hΟ z t ht | |
| lemma sphereLift_ae_norm_sub_le {d : β} (Ο : Measure (Sphere d)) (s : Sphere d) : | |
| βα΅ u βsphereLift Ο, βu-(s:Vector d)β β€ 2 := by | |
| apply (MeasurableEmbedding.ae_map_iff | |
| (MeasurableEmbedding.subtype_coe Metric.isClosed_sphere.measurableSet)).mpr | |
| apply Filter.Eventually.of_forall | |
| intro u | |
| have hu : β(u:Vector d)β = 1 := by simpa only [Metric.mem_sphere, dist_zero_right] using u.property | |
| have hs : β(s:Vector d)β = 1 := by simpa only [Metric.mem_sphere, dist_zero_right] using s.property | |
| exact (norm_sub_le _ _).trans (by rw [hu, hs]; norm_num) | |
| theorem localGrowth_mixed_inverse {d m r q : β} (hdim : AdmissibleDimensions d m r q) | |
| {Ο : Measure (Sphere d)} {B D : β} (hB : 0 < B) (hD : 0 < D) | |
| (hBΟ : LocalGrowth Ο (m+r) B) (hDΟ : LocalGrowth Ο (d-1) D) | |
| (s : Sphere d) (V : Submodule β (Vector d)) (hV : Module.finrank β V β€ q-1) : | |
| β«β» u, mixedInverse (s:Vector d) V m r (u:Vector d) βΟ β€ momentConstant 9 d B D := by | |
| rcases hdim with β¨hm, hr, hq, hmn, hmarginβ© | |
| have hdimV : Module.finrank β V + (m+1) β€ m+r := by omega | |
| have hh := hBΟ.sphereLift.mixed_inverse_le hDΟ.sphereLift hB hD hr hmn V (s:Vector d) | |
| hdimV (sphereLift_ae_norm_sub_le Ο s) | |
| rw [sphereLift, lintegral_map (measurable_mixedInverse _ _ _ _) continuous_subtype_val.measurable] at hh | |
| refine hh.trans (ENNReal.ofReal_le_ofReal ?_) | |
| change 4 * shellConstant (Module.finrank β V) (d-1) m r * B * | |
| (1 + max (Real.log (D/B)) 0) β€ Real.exp (9 * (d:β)) * B * (1 + max (Real.log (D/B)) 0) | |
| gcongr | |
| exact shellConstant_exp_bound d _ (d-1) m r (by omega) (by omega) (by omega) (by omega) (by omega) | |
| end CurrentProjection | |
| end | |
| end OAI | |