Planar Normalized Angle Representation
ProvedPlanarNormalizedAngleRepresentationcrossing-consequencestrellis-port
Every nonzero vector has a normalized polar angle and a positive radius such that
The angle is obtained from the complex argument of , adding if the argument is negative.
Formalization Note This node is ported from the Trellis formalization of the crossing lemma and its consequences (wpegden/crossing-consequences, commit 8769d142, W. Pegden, Apache-2.0); the statement is the Trellis node PlanarNormalizedAngleRepresentation.
Preamble
import Mathlib.Tactic import Mathlib.Analysis.SpecialFunctions.Complex.Arg import Mathlib.Analysis.InnerProductSpace.PiL2 import Mathlib.Analysis.SpecialFunctions.Pow.Real import Mathlib.Combinatorics.SimpleGraph.Finite import Mathlib.Data.Finset.Prod import Mathlib.Data.Set.Finite.Basic import Mathlib.LinearAlgebra.AffineSpace.AffineSubspace.Basic open Classical noncomputable section
Formal statement
lemma PlanarNormalizedAngleRepresentation (v : EuclideanSpace ℝ (Fin 2)) (hv : v ≠ 0) :
let z : ℂ := (v 0 : ℂ) + (v 1 : ℂ) * Complex.I
let α : ℝ := let a := Complex.arg z
if 0 ≤ a then a else a + 2 * Real.pi
0 ≤ α ∧ α < 2 * Real.pi ∧
∃ r : ℝ, 0 < r ∧
v = r • WithLp.toLp 2
(fun k : Fin 2 => if k = 0 then Real.cos α else Real.sin α) := by sorrySource