Fully open paths are short: an open path of length m needs at least log2(m+1) distinct 2-adic levels
ProvedErdos195.open_path_length_boundA tree witness defines a strict total order on (milestone framework). A finite word of integers is -safe if the sequence "letters of in order, then all remaining integers in -order" has no monotone 4-term arithmetic progression; positions are first occurrences. For an in-order pair of a word ( before ), call its third term, its fourth term, and its level. An open path in is a family of in-order pairs , , of letters of with for and no third term in .
Theorem. Suppose is -safe for some tree witness and contains an open path of length whose last fourth term is also absent from . Let be the number of distinct levels on the path. Then
and the minimal level along the path is attained by exactly one pair (if is minimal and , then ).
So a fully open path of length uses at least distinct 2-adic levels. This is the quantitative form of the ruler law (milestone #148): the level sequence is a ruler sequence, and a ruler sequence with distinct values has length at most (split at the unique minimum and induct on ).
import Mathlib import Definitions.Def_Erdos195_tree
namespace Erdos195
theorem open_path_length_bound (T : List ℤ) (hS : ∃ θ : ℕ → ℤ → Bool, Safe (treeLt θ) T)
(m : ℕ) (a b : ℕ → ℤ)
(ha : ∀ i < m, a i ∈ T) (hb : ∀ i < m, b i ∈ T)
(hi : ∀ i < m, T.idxOf (a i) < T.idxOf (b i))
(hpath : ∀ i, i + 1 < m → 3 * b i - 2 * a i = 2 * b (i + 1) - a (i + 1))
(ht : ∀ i < m, 2 * b i - a i ∉ T)
(hw : 3 * b (m - 1) - 2 * a (m - 1) ∉ T) :
m + 1 ≤ 2 ^ ((Finset.range m).image (fun i => padicValInt 2 (b i - a i))).card ∧
∀ i j, i < m → j < m →
(∀ l < m, padicValInt 2 (b i - a i) ≤ padicValInt 2 (b l - a l)) →
padicValInt 2 (b j - a j) = padicValInt 2 (b i - a i) → j = i := by sorry
end Erdos195