math / data /lean /OAI /Geometry /CylinderCovering /Barycentric /MetricDefinitions.lean
introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
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