Interlocked obstruction at every level: a, a+d before; a+5d before a+4d; middle terms absent
ProvedErdos195.interlocked_obstructionA tree witness defines a strict total order on (milestone framework); it satisfies Ho's identity : . 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. Theorem (interlocked obstruction, any level). Let be a finite word, , and suppose with before and before , while and . Then for every tree witness and every word , the extension is not -safe.
Why: the pairs and have swapped third/fourth terms (, ), so by the interlocked-pairs lemma neither term can ever be added. Then both pairs must be -decreasing. But by and totality exactly one of and holds, for any order with . This generalises the root-level obstruction (the case odd) to every 2-adic level and every residue node. It is a structural no-go lemma for Erdős #195, not a construction or an impossibility result.
Formalization note: words are List ℤ, positions via List.idxOf, safety is Safe (treeLt θ).
import Mathlib import Definitions.Def_Erdos195_tree
namespace Erdos195
theorem interlocked_obstruction (T R : List ℤ) (a d : ℤ) (hd : d ≠ 0)
(h0 : a ∈ T) (h1 : a + d ∈ T) (h4 : a + 4 * d ∈ T) (h5 : a + 5 * d ∈ T)
(hi : T.idxOf a < T.idxOf (a + d)) (hi' : T.idxOf (a + 5 * d) < T.idxOf (a + 4 * d))
(h2 : a + 2 * d ∉ T) (h3 : a + 3 * d ∉ T) :
¬ ∃ θ : ℕ → ℤ → Bool, Safe (treeLt θ) (T ++ R) := by sorry
end Erdos195