Polygonal Arc Interior Two Ray Sector Orientation Choice
ProvedPolygonalArcInteriorTwoRaySectorOrientationChoicecrossing-consequencestrellis-port
[Two-ray orientation choice] Let be nonzero vectors, and suppose that is not a positive scalar multiple of . Write
using the orthogonal frame , with
Then either this -frame already has the second ray in the upper or straight-through-opposite position,
or, after swapping the two rays and writing
one has .
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 PolygonalArcInteriorTwoRaySectorOrientationChoice.
Preamble
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 import Definitions.Def_PlanarRot90 open Classical noncomputable section
Formal statement
lemma PolygonalArcInteriorTwoRaySectorOrientationChoice {u v : EuclideanSpace ℝ (Fin 2)}
(hu : u ≠ 0) (hv : v ≠ 0)
(hnot_same : ¬ ∃ t : ℝ, 0 < t ∧ v = t • u) :
(let c : ℝ := inner ℝ v u / (‖u‖ ^ 2)
let s : ℝ := inner ℝ v (PlanarRot90 u) / (‖u‖ ^ 2)
v = c • u + s • PlanarRot90 u ∧ (0 < s ∨ s = 0 ∧ c < 0)) ∨
(let c : ℝ := inner ℝ u v / (‖v‖ ^ 2)
let s : ℝ := inner ℝ u (PlanarRot90 v) / (‖v‖ ^ 2)
u = c • v + s • PlanarRot90 v ∧ 0 < s) := by sorrySource