Download data/lean/OAI/Geometry/CylinderCovering/Simplex/DiameterBridge.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 6.37 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/CylinderCovering/Simplex/DiameterBridge.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/CylinderCovering/Simplex/DiameterBridge.lean
-
curl -L -o DiameterBridge.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/CylinderCovering/Simplex/DiameterBridge.lean
6.37 kB
| import OAI.Geometry.CylinderCovering.Simplex.ProjectionDefinitions | |
| import OAI.Geometry.CylinderCovering.Simplex.Diameter | |
| namespace OAI | |
| open Set Metric MeasureTheory | |
| namespace CylinderCovering | |
| lemma longestChord_eq_maxChord {d : β} (S : Set (Euclidean d)) (u : Euclidean d) : | |
| longestChord S u = SimplexDiameter.maxChord S u := rfl | |
| lemma simplexMinimumShadowArea_of_product {d : β} (hd : 2 β€ d) | |
| (v : Fin (d + 1) β Euclidean d) (hv : AffineIndependent β v) | |
| (hprod : β u, βuβ = 1 β simplexShadowArea v u * longestChord (simplexCarrier v) u = | |
| (d : β) * volume.real (simplexCarrier v)) : | |
| simplexMinimumShadowArea v = | |
| (d : β) * volume.real (simplexCarrier v) / diam (simplexCarrier v) := by | |
| have : Nontrivial (Fin (d + 1)) := Fin.nontrivial_iff_two_le.mpr (by omega) | |
| have hleast := SimplexDiameter.projection_minimum_of_chord_identity | |
| ((finite_range v).isCompact_convexHull β) | |
| ((range_nonempty v).mono (subset_convexHull β _)) | |
| (SimplexDiameter.affineIndependent_diameter_pos hv) | |
| (simplexShadowArea v) ((d : β) * volume.real (simplexCarrier v)) | |
| (fun _ _ => ENNReal.toReal_nonneg) hprod | |
| unfold simplexMinimumShadowArea | |
| convert hleast.csInf_eq using 1 <;> congr 1 | |
| ext a | |
| simp only [eq_comm] | |
| lemma tetrahedronEdgeMinimizer_of_simplexChordProjection | |
| (h : SimplexChordProjectionStatement) : TetrahedronEdgeMinimizerStatement := by | |
| intro v hv | |
| obtain β¨hdir, _, hminβ© := h 3 (by omega) v hv | |
| have hprod := fun u hu => (hdir u hu).2.2 | |
| obtain β¨i, j, hij, hu, hval, _β© := SimplexDiameter.finite_edge_projection_minimizer v | |
| (SimplexDiameter.affineIndependent_diameter_pos hv) | |
| (simplexShadowArea v) ((3 : β) * volume.real (simplexCarrier v)) | |
| (fun _ _ => ENNReal.toReal_nonneg) hprod | |
| refine β¨i, j, hij, ?_β© | |
| change simplexShadowArea v (NormedSpace.normalize (v j - v i)) = | |
| simplexMinimumShadowArea v | |
| exact hval.trans hmin.symm | |
| lemma simplexCarrier_isCompact {d : β} (v : Fin (d + 1) β Euclidean d) : | |
| IsCompact (simplexCarrier v) := (finite_range v).isCompact_convexHull β | |
| lemma simplexCarrier_interior_nonempty {d : β} | |
| (v : Fin (d + 1) β Euclidean d) (hv : AffineIndependent β v) : | |
| (interior (simplexCarrier v)).Nonempty := by | |
| apply (convex_convexHull β (range v)).interior_nonempty_iff_affineSpan_eq_top.mpr | |
| rw [affineSpan_convexHull] | |
| apply hv.affineSpan_eq_top_iff_card_eq_finrank_add_one.mpr | |
| simp | |
| lemma simplexCarrier_volume_pos {d : β} | |
| (v : Fin (d + 1) β Euclidean d) (hv : AffineIndependent β v) : | |
| 0 < volume.real (simplexCarrier v) := by | |
| apply ENNReal.toReal_pos | |
| Β· exact (Measure.measure_pos_of_nonempty_interior volume | |
| (simplexCarrier_interior_nonempty v hv)).ne' | |
| Β· exact (simplexCarrier_isCompact v).measure_ne_top | |
| lemma simplex_longestChord_pos {d : β} | |
| (v : Fin (d + 1) β Euclidean d) (hv : AffineIndependent β v) | |
| {u : Euclidean d} (hu : βuβ = 1) : | |
| 0 < longestChord (simplexCarrier v) u := | |
| SimplexDiameter.maxChord_pos_of_interior (simplexCarrier_isCompact v) | |
| (simplexCarrier_interior_nonempty v hv) hu | |
| lemma simplexMinimumShadowArea_attained_of_product {d : β} (hd : 2 β€ d) | |
| (v : Fin (d + 1) β Euclidean d) (hv : AffineIndependent β v) | |
| (hprod : β u, βuβ = 1 β simplexShadowArea v u * longestChord (simplexCarrier v) u = | |
| (d : β) * volume.real (simplexCarrier v)) : | |
| β u, βuβ = 1 β§ simplexShadowArea v u = simplexMinimumShadowArea v := by | |
| have : Nontrivial (Fin (d + 1)) := Fin.nontrivial_iff_two_le.mpr (by omega) | |
| obtain β¨u, hu, hmaxβ© := SimplexDiameter.exists_maxChord_eq_diam | |
| (simplexCarrier_isCompact v) ((range_nonempty v).mono (subset_convexHull β _)) | |
| (SimplexDiameter.affineIndependent_diameter_pos hv) | |
| simp only [simplexCarrier] at hmax | |
| refine β¨u, hu, ?_β© | |
| rw [simplexMinimumShadowArea_of_product hd v hv hprod] | |
| apply (eq_div_iff (SimplexDiameter.affineIndependent_diameter_pos hv).ne').mpr | |
| simpa only [longestChord_eq_maxChord, simplexCarrier, hmax] using hprod u hu | |
| lemma simplexChordProjection_of_products | |
| (hprod : β d : β, 2 β€ d β β v : Fin (d + 1) β Euclidean d, | |
| AffineIndependent β v β β u, βuβ = 1 β | |
| simplexShadowArea v u * longestChord (simplexCarrier v) u = | |
| (d : β) * volume.real (simplexCarrier v)) : | |
| SimplexChordProjectionStatement := by | |
| intro d hd v hv | |
| refine β¨?_, simplexMinimumShadowArea_attained_of_product hd v hv (hprod d hd v hv), | |
| simplexMinimumShadowArea_of_product hd v hv (hprod d hd v hv)β© | |
| intro u hu | |
| exact β¨simplex_longestChord_pos v hv hu, | |
| (SimplexDiameter.maxChord_attained (simplexCarrier_isCompact v) | |
| ((range_nonempty v).mono (subset_convexHull β _)) hu).2, | |
| hprod d hd v hv u huβ© | |
| lemma regular_edge_shadow_eq_minimum_of_simplexChordProjection | |
| (h : SimplexChordProjectionStatement) | |
| (v : Fin 4 β Space) (hv : AffineIndependent β v) | |
| {edge : β} (he : 0 < edge) | |
| (hvEdge : β i j : Fin 4, i β j β dist (v i) (v j) = edge) | |
| {i j : Fin 4} (hij : i β j) : | |
| shadowArea (convexHull β (range v)) (βv j - v iββ»ΒΉ β’ (v j - v i)) = | |
| minimumShadowArea (convexHull β (range v)) := by | |
| obtain β¨hu, hchordβ© := SimplexDiameter.regular_edge_maxChord v he hvEdge hij | |
| obtain β¨hdir, _, hminβ© := h 3 (by omega) v hv | |
| change simplexShadowArea v (NormedSpace.normalize (v j - v i)) = | |
| simplexMinimumShadowArea v | |
| have hprod := (hdir _ hu).2.2 | |
| have hd : diam (simplexCarrier v) = edge := | |
| SimplexDiameter.regular_convexHull_diameter v he.le hvEdge | |
| rw [hmin, hd] | |
| apply (eq_div_iff he.ne').mpr | |
| simpa only [longestChord_eq_maxChord, simplexCarrier, hchord] using hprod | |
| lemma regularProjectionNormalization_of_minimum | |
| (h : SimplexChordProjectionStatement) | |
| (hmin : β v : Fin 4 β Space, AffineIndependent β v β | |
| β edge : β, 0 < edge β | |
| (β i j : Fin 4, i β j β dist (v i) (v j) = edge) β | |
| minimumShadowArea (convexHull β (range v)) = edge ^ 2 / (2 * Real.sqrt 2)) : | |
| RegularProjectionNormalizationStatement := by | |
| intro v hv edge he hvEdge | |
| refine β¨hmin v hv edge he hvEdge, ?_β© | |
| intro i j hij | |
| exact (regular_edge_shadow_eq_minimum_of_simplexChordProjection h v hv he hvEdge hij).trans | |
| (hmin v hv edge he hvEdge) | |
| end CylinderCovering | |
| end OAI | |