openAI-math-dataset / lean /OAI /Geometry /CylinderCovering /Convexity /NormalFrameDefinitions.lean
roseking's picture
Add lean source and binary files (part 67)
785c727 verified
Raw History Blame Contribute Delete
764 Bytes
9
abbrev Space := EuclideanSpace ℝ (Fin 3)
10
abbrev BarycentricSpace := EuclideanSpace ℝ (Fin 4)
12
def normal (i : Fin 4) : Space :=
body · 4 lines
  (1 / Real.sqrt 3) • ![(!₂[0, Real.sqrt 2, -1] : Space),
    !₂[0, -Real.sqrt 2, -1],
    !₂[Real.sqrt 2, 0, 1],
    !₂[-Real.sqrt 2, 0, 1]] i
18
def frameCost (u : Space) : ℝ :=
body · 1 line
  Real.sqrt 3 / 2 * ∑ i : Fin 4, |inner ℝ u (normal i)|
21
def barycentricCost (u : BarycentricSpace) : ℝ :=
body · 1 line
  (1 / 2 : ℝ) * ∑ i : Fin 4, |u i|
24
def edgeDirection : Space := !₂[1, 0, 0]
26
def barycentricEdge : BarycentricSpace :=
body · 1 line
  !₂[1 / Real.sqrt 2, -(1 / Real.sqrt 2), 0, 0]