alternating_path_vertex
def
The m-th vertex in the alternating path AP_n is m/2 if m is even, and n - 1 - m/2 if m is odd.
Statement
def alternating_path_vertex (n : ℕ) (m : ℕ) : ℕ- Defined in
- arXiv:2611.08375 "New results on cyclic and ordered Ramsey numbers", Section 1
- Verified
- 06 Nov 2026
- Axioms
- none listed
- Used by 4
- alternating_pathThe alternating path AP_n is the ordered simple graph on Fin n whose edges connect consecutive vertices in the alternating sequence 0,…
- ordered_ramsey_monotone_cycle_alternating_path_twoFor all integers k ≥ 3, the ordered Ramsey number of the monotone cycle MC_k and the alternating path AP_2 is equal to k.
- ordered_ramsey_monotone_cycle_three_alternating_path_threeThe ordered Ramsey number of the monotone cycle MC_3 and the alternating path AP_3 is equal to 5.
- alternating_path_two_adj_zero_oneIn the alternating path AP_2 on Fin 2, vertices 0 and 1 are adjacent.
Read back from the Lean
alternating_path_vertex is a function taking two natural numbers $n$ and $m$ that returns a natural number: if $m$ is even ($m \bmod 2 = 0$), it returns $m / 2$ (integer division); otherwise (if $m$ is odd), it returns $(n - 1) - (m / 2)$ (using truncated natural number subtraction and integer division).
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
Lean source view module on GitHub
/-- The m-th vertex in the alternating path AP_n on Fin n. -/ def alternating_path_vertex (n : ℕ) (m : ℕ) : ℕ := if m % 2 = 0 then m / 2 else n - 1 - m / 2