Download data/lean/OAI/Geometry/ProjectionVolume/BallBrightness.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 4.18 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/ProjectionVolume/BallBrightness.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/ProjectionVolume/BallBrightness.lean
-
curl -L -o BallBrightness.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/ProjectionVolume/BallBrightness.lean
4.18 kB
| import OAI.Geometry.ProjectionVolume.Brightness | |
| import Mathlib.MeasureTheory.Measure.Lebesgue.VolumeOfBalls | |
| import Mathlib.Analysis.Normed.Module.Ball.Pointwise | |
| namespace OAI | |
| open Set Metric MeasureTheory | |
| open scoped Pointwise RealInnerProductSpace | |
| namespace Paper092 | |
| noncomputable def euclideanUnitBallVolume (d : β) : β := | |
| (volume (closedBall (0 : Euclidean d) 1)).toReal | |
| theorem projection_image_closedBall {d : β} (u : Euclidean d) (R : β) : | |
| (normalHyperplane u).orthogonalProjectionOnto '' closedBall (0 : Euclidean d) R = | |
| closedBall (0 : normalHyperplane u) R := by | |
| ext y | |
| constructor | |
| Β· rintro β¨x, hx, rflβ© | |
| apply mem_closedBall_zero_iff.mpr | |
| exact ((normalHyperplane u).norm_orthogonalProjectionOnto_apply_le x).trans | |
| (mem_closedBall_zero_iff.mp hx) | |
| Β· intro hy | |
| refine β¨y.val, ?_, (normalHyperplane u).orthogonalProjectionOnto_mem_subspace_eq_self yβ© | |
| simpa only [mem_closedBall, dist_zero_right, Submodule.norm_coe] using hy | |
| theorem projectionVolume_closedBall_real {d : β} (hd : 2 β€ d) | |
| (u : Euclidean d) (hu : u β 0) (R : β) (hR : 0 β€ R) : | |
| (projectionVolume (closedBall (0 : Euclidean d) R) u).toReal = | |
| euclideanUnitBallVolume (d - 1) * R ^ (d - 1) := by | |
| let : Nontrivial (normalHyperplane u) := Module.nontrivial_of_finrank_pos (by | |
| rw [normalHyperplane_finrank u hu] | |
| omega) | |
| let : Nontrivial (Euclidean (d - 1)) := Module.nontrivial_of_finrank_pos (by | |
| rw [finrank_euclideanSpace_fin] | |
| omega) | |
| have hunit : (volume (closedBall (0 : normalHyperplane u) 1)) = | |
| volume (closedBall (0 : Euclidean (d - 1)) 1) := by | |
| rw [InnerProductSpace.volume_closedBall, InnerProductSpace.volume_closedBall, | |
| normalHyperplane_finrank u hu, finrank_euclideanSpace_fin] | |
| have hball : R β’ closedBall (0 : normalHyperplane u) 1 = closedBall 0 R := by | |
| rw [_root_.smul_closedBall _ _ zero_le_one, smul_zero, Real.norm_eq_abs, abs_of_nonneg hR, mul_one] | |
| unfold projectionVolume | |
| rw [projection_image_closedBall, β hball, Measure.addHaar_smul, | |
| normalHyperplane_finrank u hu, abs_pow, abs_of_nonneg hR, | |
| ENNReal.toReal_mul, ENNReal.toReal_ofReal (pow_nonneg hR _), hunit] | |
| exact mul_comm _ _ | |
| theorem brightness_closedBall {d : β} (hd : 2 β€ d) (R : β) (hR : 0 β€ R) | |
| (u : Euclidean d) : | |
| brightness (closedBall (0 : Euclidean d) R) u = | |
| βuβ * (euclideanUnitBallVolume (d - 1) * R ^ (d - 1)) := by | |
| by_cases hu : u = 0 | |
| Β· simp [hu, brightness] | |
| Β· unfold brightness | |
| rw [projectionVolume_closedBall_real hd u hu R hR] | |
| theorem brightness_le_ball_bound {d : β} (hd : 2 β€ d) {K : Set (Euclidean d)} | |
| {R : β} (hR : 0 β€ R) (hK : K β closedBall 0 R) (u : Euclidean d) : | |
| brightness K u β€ βuβ * (euclideanUnitBallVolume (d - 1) * R ^ (d - 1)) := by | |
| exact (brightness_mono hK (isCompact_closedBall _ _) u).trans_eq | |
| (brightness_closedBall hd R hR u) | |
| theorem ball_subset_projectionBody {d : β} (hd : 2 β€ d) {K : Set (Euclidean d)} | |
| (hK : IsCompact K) {a : β} (ha : 0 β€ a) (hball : closedBall 0 a β K) : | |
| closedBall (0 : Euclidean d) (euclideanUnitBallVolume (d - 1) * a ^ (d - 1)) β | |
| projectionBody K := by | |
| intro y hy u | |
| calc | |
| βͺu, yβ« β€ βuβ * βyβ := real_inner_le_norm _ _ | |
| _ β€ βuβ * (euclideanUnitBallVolume (d - 1) * a ^ (d - 1)) := | |
| mul_le_mul_of_nonneg_left (mem_closedBall_zero_iff.mp hy) (norm_nonneg u) | |
| _ = brightness (closedBall (0 : Euclidean d) a) u := (brightness_closedBall hd a ha u).symm | |
| _ β€ brightness K u := brightness_mono hball hK u | |
| theorem projectionBody_subset_ball {d : β} (hd : 2 β€ d) {K : Set (Euclidean d)} | |
| {R : β} (hR : 0 β€ R) (hK : K β closedBall 0 R) : | |
| projectionBody K β | |
| closedBall (0 : Euclidean d) (euclideanUnitBallVolume (d - 1) * R ^ (d - 1)) := by | |
| intro y hy | |
| have hc : 0 β€ euclideanUnitBallVolume (d - 1) * R ^ (d - 1) := by | |
| exact mul_nonneg ENNReal.toReal_nonneg (pow_nonneg hR _) | |
| have h := (hy y).trans (brightness_le_ball_bound hd hR hK y) | |
| rw [real_inner_self_eq_norm_sq] at h | |
| apply mem_closedBall_zero_iff.mpr | |
| nlinarith [norm_nonneg y] | |
| end Paper092 | |
| end OAI | |