Download data/lean/OAI/Geometry/CylinderCovering/Simplex/OverlapVolume.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.87 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/CylinderCovering/Simplex/OverlapVolume.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/CylinderCovering/Simplex/OverlapVolume.lean
-
curl -L -o OverlapVolume.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/CylinderCovering/Simplex/OverlapVolume.lean
3.87 kB
| import OAI.Geometry.CylinderCovering.Simplex.Projection | |
| namespace OAI | |
| noncomputable section | |
| open Set MeasureTheory | |
| namespace CylinderCovering | |
| theorem simplex_homothety_volume {d : β} (q : Euclidean d) {r : β} | |
| (hr : 0 β€ r) (S : Set (Euclidean d)) : | |
| volume.real (AffineMap.homothety q r '' S) = r ^ d * volume.real S := by | |
| change (volume (AffineMap.homothety q r '' S)).toReal = _ | |
| rw [Measure.addHaar_image_homothety] | |
| simp [ENNReal.toReal_mul, abs_of_nonneg (pow_nonneg hr d), | |
| ENNReal.toReal_ofReal (pow_nonneg hr d), Measure.real] | |
| theorem affine_simplex_overlap_volume {d : β} | |
| (p : AffineBasis (Fin (d + 1)) β (Euclidean d)) {u : Euclidean d} | |
| (hu : u β 0) {s : β} (hs : 0 β€ s) | |
| (hsm : s * (β i, max 0 (-(p.coord i).linear u)) < 1) : | |
| volume.real {x | x β convexHull β (range p) β§ | |
| x + s β’ u β convexHull β (range p)} = | |
| (1 - s * (β i, max 0 (-(p.coord i).linear u))) ^ d * | |
| volume.real (convexHull β (range p)) := by | |
| obtain β¨q, _, _, hhomβ© := SimplexChord.affine_intersection_homothety p hu | |
| rw [hhom s hs hsm] | |
| exact simplex_homothety_volume q (sub_nonneg.mpr hsm.le) _ | |
| theorem affine_simplex_overlap_volume_lt_reciprocal {d : β} | |
| (p : AffineBasis (Fin (d + 1)) β (Euclidean d)) {u : Euclidean d} | |
| (hu : u β 0) {s : β} (hs : 0 β€ s) | |
| (hsM : s < (β i, max 0 (-(p.coord i).linear u))β»ΒΉ) : | |
| volume.real {x | x β convexHull β (range p) β§ | |
| x + s β’ u β convexHull β (range p)} = | |
| (1 - s * (β i, max 0 (-(p.coord i).linear u))) ^ d * | |
| volume.real (convexHull β (range p)) := by | |
| have hM : 0 < β i, max 0 (-(p.coord i).linear u) := | |
| SimplexChord.negative_mass_pos _ (SimplexChord.sum_coord_linear_eq_zero p u) | |
| (SimplexChord.coord_linear_ne_zero p hu) | |
| apply affine_simplex_overlap_volume p hu hs | |
| exact (lt_div_iffβ hM).mp (by simpa only [one_div] using hsM) | |
| theorem translated_intersection_eq {d : β} (S : Set (Euclidean d)) | |
| (u : Euclidean d) (s : β) : | |
| {x | x β S β§ x + s β’ u β S} = S β© (fun y => y - s β’ u) '' S := by | |
| ext x | |
| constructor | |
| Β· rintro β¨hx, hxuβ© | |
| exact β¨hx, x + s β’ u, hxu, add_sub_cancel_right x (s β’ u)β© | |
| Β· rintro β¨hx, y, hy, hxyβ© | |
| refine β¨hx, ?_β© | |
| rw [β hxy] | |
| simpa using hy | |
| theorem simplex_overlap_volume {d : β} (v : Fin (d + 1) β Euclidean d) | |
| (hv : AffineIndependent β v) {u : Euclidean d} (hu : βuβ = 1) | |
| {s : β} (hs : 0 β€ s) (hsL : s < longestChord (simplexCarrier v) u) : | |
| volume.real {x | x β simplexCarrier v β§ x + s β’ u β simplexCarrier v} = | |
| (1 - s / longestChord (simplexCarrier v) u) ^ d * | |
| volume.real (simplexCarrier v) := by | |
| obtain β¨hL, _, _, _, hhomβ© := simplex_chord_data v hv hu | |
| rw [hhom s hs hsL] | |
| apply simplex_homothety_volume | |
| exact sub_nonneg.mpr ((div_le_one hL).mpr hsL.le) | |
| theorem tetrahedron_overlap_volume (v : Fin 4 β Euclidean 3) | |
| (hv : AffineIndependent β v) {u : Euclidean 3} (hu : βuβ = 1) | |
| {s : β} (hs : 0 β€ s) (hsL : s < longestChord (simplexCarrier v) u) : | |
| volume.real {x | x β simplexCarrier v β§ x + s β’ u β simplexCarrier v} = | |
| (1 - s / longestChord (simplexCarrier v) u) ^ 3 * | |
| volume.real (simplexCarrier v) := | |
| simplex_overlap_volume v hv hu hs hsL | |
| theorem tetrahedron_translated_overlap_volume (v : Fin 4 β Euclidean 3) | |
| (hv : AffineIndependent β v) {u : Euclidean 3} (hu : βuβ = 1) | |
| {s : β} (hs : 0 β€ s) (hsL : s < longestChord (simplexCarrier v) u) : | |
| volume.real (simplexCarrier v β© (fun y => y - s β’ u) '' simplexCarrier v) = | |
| (1 - s / longestChord (simplexCarrier v) u) ^ 3 * | |
| volume.real (simplexCarrier v) := by | |
| rw [β translated_intersection_eq] | |
| exact tetrahedron_overlap_volume v hv hu hs hsL | |
| end CylinderCovering | |
| end | |
| end OAI | |