Download lean/OAI/Geometry/CylinderCovering/Barycentric/MetricDefinitions.lean from roseking/openAI-math-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.57 kB
-
https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/Geometry/CylinderCovering/Barycentric/MetricDefinitions.lean
- Command line
-
hf download hf://datasets/roseking/openAI-math-dataset/lean/OAI/Geometry/CylinderCovering/Barycentric/MetricDefinitions.lean
-
curl -L -o MetricDefinitions.lean https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/Geometry/CylinderCovering/Barycentric/MetricDefinitions.lean
1.57 kB
| import OAI.Geometry.CylinderCovering.Convexity.NormalFrameDefinitions | |
| import OAI.Geometry.TriangularCovering.Basic | |
| namespace OAI | |
| noncomputable section | |
| open Set MeasureTheory | |
| open scoped InnerProductSpace | |
| namespace CylinderBarycentricMetric | |
| abbrev Physical := EuclideanSpace ℝ (Fin 3) | |
| abbrev Barycentric := EuclideanSpace ℝ (Fin 4) | |
| def tetrahedron : Set Barycentric := | |
| {p | (∀ i, 0 ≤ p i) ∧ ∑ i : Fin 4, p i = 1} | |
| def projection (u p : Barycentric) : Barycentric := p - inner ℝ u p • u | |
| def shadowArea (u : Barycentric) : ℝ := | |
| (Measure.euclideanHausdorffMeasure 2 (projection u '' tetrahedron)).toReal | |
| def embedding : Physical →ₗ[ℝ] Barycentric where | |
| toFun z := !₂[z 0 / Real.sqrt 2 - z 2 / 2, | |
| -z 0 / Real.sqrt 2 - z 2 / 2, | |
| z 1 / Real.sqrt 2 + z 2 / 2, | |
| -z 1 / Real.sqrt 2 + z 2 / 2] | |
| map_add' z w := by | |
| ext i | |
| fin_cases i <;> simp <;> ring | |
| map_smul' r z := by | |
| ext i | |
| fin_cases i <;> simp <;> ring | |
| def inverse (p : Barycentric) : Physical := | |
| !₂[(p 0 - p 1) / Real.sqrt 2, | |
| (p 2 - p 3) / Real.sqrt 2, | |
| p 2 + p 3] | |
| def offset : Barycentric := !₂[1 / 2, 1 / 2, 0, 0] | |
| def fromPhysical (z : Physical) : Barycentric := | |
| offset + (1 / Real.sqrt 2) • embedding z | |
| def ProjectionStatement : Prop := | |
| (∀ u : Barycentric, ‖u‖ = 1 → (∑ i : Fin 4, u i = 0) → | |
| shadowArea u = (1 / 2 : ℝ) * ∑ i : Fin 4, |u i|) ∧ | |
| IsLeast {a : ℝ | ∃ u : Barycentric, | |
| ‖u‖ = 1 ∧ ∑ i : Fin 4, u i = 0 ∧ a = shadowArea u} (1 / Real.sqrt 2) | |
| end CylinderBarycentricMetric | |
| end | |
| end OAI | |