Download data/lean/OAI/Geometry/ProjectionVolume/ApproximationBounds.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 6.86 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/ProjectionVolume/ApproximationBounds.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/ProjectionVolume/ApproximationBounds.lean
-
curl -L -o ApproximationBounds.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/ProjectionVolume/ApproximationBounds.lean
6.86 kB
| import OAI.Geometry.ProjectionVolume.BallBrightness | |
| import OAI.Geometry.ProjectionVolume.SupportLimit | |
| import OAI.Geometry.ProjectionVolume.InnerSequence | |
| namespace OAI | |
| open Set Metric Filter MeasureTheory | |
| open scoped Pointwise Topology RealInnerProductSpace | |
| namespace Paper092 | |
| theorem volume_smul_real {d : β} (P : Set (Euclidean d)) {c : β} (hc : 0 β€ c) : | |
| (volume (c β’ P)).toReal = c ^ d * (volume P).toReal := by | |
| rw [Measure.addHaar_smul, finrank_euclideanSpace_fin, abs_pow, abs_of_nonneg hc, | |
| ENNReal.toReal_mul, ENNReal.toReal_ofReal (pow_nonneg hc _)] | |
| theorem volume_real_mono {d : β} {P K : Set (Euclidean d)} (hK : IsCompact K) (h : P β K) : | |
| (volume P).toReal β€ (volume K).toReal := | |
| ENNReal.toReal_mono hK.measure_lt_top.ne (measure_mono h) | |
| theorem approximation_brightness_bound {d : β} (hd : 2 β€ d) | |
| {P K : Set (Euclidean d)} (hP : IsCompact P) (hK : IsCompact K) | |
| {scale R : β} (hscale : 1 β€ scale) (hR : 0 β€ R) (hPK : P β K) (hKP : K β scale β’ P) | |
| (hKR : K β closedBall 0 R) (u : Euclidean d) (hu : βuβ = 1) : | |
| 0 β€ brightness K u - brightness P u β§ | |
| brightness K u - brightness P u β€ | |
| (scale ^ (d - 1) - 1) * (euclideanUnitBallVolume (d - 1) * R ^ (d - 1)) := by | |
| have hmono := brightness_mono hPK hK u | |
| have hupper : brightness K u β€ scale ^ (d - 1) * brightness P u := by | |
| have hh := brightness_mono hKP (hP.smul scale) u | |
| simpa only [brightness_body_smul, abs_of_nonneg (zero_le_one.trans hscale)] using hh | |
| have hbound : brightness P u β€ euclideanUnitBallVolume (d - 1) * R ^ (d - 1) := | |
| hmono.trans (by simpa only [hu, one_mul] using brightness_le_ball_bound hd hR hKR u) | |
| have hpow : 1 β€ scale ^ (d - 1) := one_le_powβ hscale | |
| refine β¨sub_nonneg.mpr hmono, ?_β© | |
| calc | |
| brightness K u - brightness P u β€ (scale ^ (d - 1) - 1) * brightness P u := by nlinarith | |
| _ β€ _ := mul_le_mul_of_nonneg_left hbound (sub_nonneg.mpr hpow) | |
| theorem approximation_projectionBody_sandwich {d : β} {P K : Set (Euclidean d)} | |
| (hP : IsCompact P) (hK : IsCompact K) {scale : β} (hscale : 0 < scale) | |
| (hPK : P β K) (hKP : K β scale β’ P) : | |
| projectionBody P β projectionBody K β§ | |
| projectionBody K β scale ^ (d - 1) β’ projectionBody P := by | |
| refine β¨projectionBody_mono hPK hK, ?_β© | |
| have hh := projectionBody_mono hKP (hP.smul scale) | |
| simpa only [projectionBody_body_smul P scale hscale.ne', abs_of_pos hscale] using hh | |
| theorem approximation_volume_sandwich {d : β} {P K : Set (Euclidean d)} | |
| (hP : IsCompact P) (hK : IsCompact K) {scale : β} (hscale : 0 β€ scale) | |
| (hPK : P β K) (hKP : K β scale β’ P) : | |
| (volume P).toReal β€ (volume K).toReal β§ | |
| (volume K).toReal β€ scale ^ d * (volume P).toReal := by | |
| refine β¨volume_real_mono hK hPK, ?_β© | |
| exact (volume_real_mono (hP.smul scale) hKP).trans_eq (volume_smul_real P hscale) | |
| theorem approximation_projectionBody_volume_sandwich {d : β} {P K : Set (Euclidean d)} | |
| (hP : IsCompact P) (hK : IsCompact K) {scale : β} (hscale : 0 < scale) | |
| (hPK : P β K) (hKP : K β scale β’ P) : | |
| (volume (projectionBody P)).toReal β€ (volume (projectionBody K)).toReal β§ | |
| (volume (projectionBody K)).toReal β€ | |
| scale ^ (d * (d - 1)) * (volume (projectionBody P)).toReal := by | |
| obtain β¨hPiPK, hPiKPβ© := approximation_projectionBody_sandwich hP hK hscale hPK hKP | |
| have hh := approximation_volume_sandwich (projectionBody_isCompact P) | |
| (projectionBody_isCompact K) (pow_nonneg hscale.le _) hPiPK hPiKP | |
| simpa only [β pow_mul, Nat.mul_comm (d - 1) d] using hh | |
| theorem approximation_brightness_uniform {d : β} (hd : 2 β€ d) | |
| {P : β β Set (Euclidean d)} {K : Set (Euclidean d)} | |
| (hP : β m, IsCompact (P m)) (hK : IsCompact K) | |
| {scale : β β β} (hscale : β m, 1 β€ scale m) (hscalelim : Tendsto scale atTop (π 1)) | |
| {R : β} (hR : 0 β€ R) (hKR : K β closedBall 0 R) | |
| (hPK : β m, P m β K) (hKP : β m, K β scale m β’ P m) : | |
| TendstoUniformlyOn (fun m u => brightness (P m) u) (brightness K) atTop (sphere 0 1) := by | |
| let C := euclideanUnitBallVolume (d - 1) * R ^ (d - 1) | |
| have hcont : Continuous (fun r : β => (r ^ (d - 1) - 1) * C) := by fun_prop | |
| have hlim : Tendsto (fun m => (scale m ^ (d - 1) - 1) * C) atTop (π 0) := by | |
| simpa only [Function.comp_def, one_pow, sub_self, zero_mul] using (hcont.tendsto 1).comp hscalelim | |
| apply Metric.tendstoUniformlyOn_iff.mpr | |
| intro Ξ΅ hΞ΅ | |
| filter_upwards [hlim.eventually (Iio_mem_nhds hΞ΅)] with m hm | |
| intro u hu | |
| have hunit : βuβ = 1 := mem_sphere_zero_iff_norm.mp hu | |
| have hb := approximation_brightness_bound hd (hP m) hK (hscale m) hR (hPK m) (hKP m) hKR u hunit | |
| rw [Real.dist_eq, abs_of_nonneg hb.1] | |
| exact hb.2.trans_lt hm | |
| theorem tendsto_of_multiplicative_sandwich {f q : β β β} {L : β} | |
| (hq : β m, 0 < q m) (hqlim : Tendsto q atTop (π 1)) | |
| (hupper : β m, f m β€ L) (hlower : β m, L β€ q m * f m) : | |
| Tendsto f atTop (π L) := by | |
| have hlim : Tendsto (fun m => L / q m) atTop (π L) := by | |
| have hcont : ContinuousAt (fun x : β => L / x) 1 := by fun_prop (disch := norm_num) | |
| simpa only [Function.comp_def, div_one] using hcont.tendsto.comp hqlim | |
| apply tendsto_of_tendsto_of_tendsto_of_le_of_le hlim tendsto_const_nhds | |
| Β· intro m | |
| exact (div_le_iffβ (hq m)).mpr (by simpa only [mul_comm] using hlower m) | |
| Β· exact hupper | |
| theorem approximation_volume_tendsto {d : β} | |
| {P : β β Set (Euclidean d)} {K : Set (Euclidean d)} | |
| (hP : β m, IsCompact (P m)) (hK : IsCompact K) | |
| {scale : β β β} (hscale : β m, 0 < scale m) (hscalelim : Tendsto scale atTop (π 1)) | |
| (hPK : β m, P m β K) (hKP : β m, K β scale m β’ P m) : | |
| Tendsto (fun m => (volume (P m)).toReal) atTop (π (volume K).toReal) β§ | |
| Tendsto (fun m => (volume (projectionBody (P m))).toReal) atTop | |
| (π (volume (projectionBody K)).toReal) := by | |
| have hq (k : β) : Tendsto (fun m => scale m ^ k) atTop (π 1) := by | |
| have hcont : Continuous (fun x : β => x ^ k) := by fun_prop | |
| simpa only [Function.comp_def, one_pow] using (hcont.tendsto 1).comp hscalelim | |
| constructor | |
| Β· apply tendsto_of_multiplicative_sandwich (fun m => pow_pos (hscale m) d) (hq d) | |
| Β· exact fun m => (approximation_volume_sandwich (hP m) hK (hscale m).le (hPK m) (hKP m)).1 | |
| Β· exact fun m => (approximation_volume_sandwich (hP m) hK (hscale m).le (hPK m) (hKP m)).2 | |
| Β· apply tendsto_of_multiplicative_sandwich (fun m => pow_pos (hscale m) (d * (d - 1))) | |
| (hq (d * (d - 1))) | |
| Β· exact fun m => (approximation_projectionBody_volume_sandwich (hP m) hK (hscale m) (hPK m) (hKP m)).1 | |
| Β· exact fun m => (approximation_projectionBody_volume_sandwich (hP m) hK (hscale m) (hPK m) (hKP m)).2 | |
| end Paper092 | |
| end OAI | |