Ruler law for open paths: between two equal 2-adic levels of an open path lies a strictly lower one
ProvedErdos195.open_path_rulerA 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 ( 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
no third term in , and the fourth term of the last pair also absent from . Theorem (ruler law for open paths). If is -safe for some tree witness and contains such an open path, then for all with there is an index with and .
So the sequence of levels along an open path behaves like a ruler sequence: between two equal levels a strictly lower one occurs. In particular the minimal level is attained exactly once, and a path with distinct levels has length at most . The reason: every pair of the path has both its third and fourth term missing, so safety fixes its orientation at its node; the points satisfy , which forces two consecutive pairs of the same level (with only higher levels between) to sit at the same node with opposite orientation. This is the acyclic analogue of milestone 147 (open cycles are never tree-safe). It is a structural lemma about the tree-witness approach to Erdős #195, not a construction or an impossibility result.
Formalization note: words are List ℤ, positions via List.idxOf, pairs are a b : ℕ → ℤ on indices i < m, levels are padicValInt 2 (b i - a i); safety is ∃ θ, Safe (treeLt θ) T.
import Mathlib import Definitions.Def_Erdos195_tree
namespace Erdos195
theorem open_path_ruler (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)
(i j : ℕ) (hij : i < j) (hjm : j < m)
(hk : padicValInt 2 (b j - a j) = padicValInt 2 (b i - a i)) :
∃ l, i < l ∧ l < j ∧ padicValInt 2 (b l - a l) < padicValInt 2 (b i - a i) := by sorry
end Erdos195