Finite Cyclic Angle Successor
ProvedFiniteCyclicAngleSuccessorLet be a nonempty finite set, and let be an injective assignment of normalized angles to the elements of . For an angle , write
Then there is a permutation of and a clockwise turn function such that
Every is positive and at most , and
The element has minimal positive clockwise turn from ; more precisely, if , then
and if also , then the inequality is strict. Moreover
The open interval facts are also part of the conclusion: if
then no listed angle equals ; conversely, every which is not one of the listed angles lies in one of these open clockwise intervals, i.e. for some ,
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 FiniteCyclicAngleSuccessor.
import Mathlib.Tactic import Mathlib.Algebra.Group.Fin.Basic 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 open scoped Fin.NatCast noncomputable section
lemma FiniteCyclicAngleSuccessor {ι : Type*} [Fintype ι] [Nonempty ι]
[DecidableEq ι]
(θ : ι → ℝ)
(hθ_mem : ∀ i : ι, 0 ≤ θ i ∧ θ i < 2 * Real.pi)
(hθ_inj : Function.Injective θ) :
∃ clockwiseNext : Equiv.Perm ι,
∃ clockwiseTurn : ι → ι → ℝ,
(∀ i j : ι,
clockwiseTurn i j =
if j = i then 2 * Real.pi
else if θ j < θ i then θ i - θ j
else θ i - θ j + 2 * Real.pi) ∧
(∀ i j : ι, 0 < clockwiseTurn i j) ∧
(∀ i j : ι, clockwiseTurn i j ≤ 2 * Real.pi) ∧
(∀ i j : ι, clockwiseTurn i j = 2 * Real.pi ↔ j = i) ∧
(∀ i j : ι, j ≠ i →
clockwiseTurn i (clockwiseNext i) ≤ clockwiseTurn i j) ∧
(∀ i j : ι, j ≠ i → j ≠ clockwiseNext i →
clockwiseTurn i (clockwiseNext i) < clockwiseTurn i j) ∧
(∀ i : ι, clockwiseNext i = i ↔ ∀ j : ι, j = i) ∧
(∀ i : ι, ∀ α : ℝ,
0 ≤ α → α < 2 * Real.pi →
0 <
(if α = θ i then 2 * Real.pi
else if α < θ i then θ i - α
else θ i - α + 2 * Real.pi) →
(if α = θ i then 2 * Real.pi
else if α < θ i then θ i - α
else θ i - α + 2 * Real.pi) <
clockwiseTurn i (clockwiseNext i) →
∀ j : ι, θ j ≠ α) ∧
(∀ α : ℝ,
0 ≤ α → α < 2 * Real.pi →
(∀ j : ι, θ j ≠ α) →
∃ i : ι,
0 <
(if α = θ i then 2 * Real.pi
else if α < θ i then θ i - α
else θ i - α + 2 * Real.pi) ∧
(if α = θ i then 2 * Real.pi
else if α < θ i then θ i - α
else θ i - α + 2 * Real.pi) <
clockwiseTurn i (clockwiseNext i)) := by sorry