Early residue representatives force late extrema to agree mod 2^k (tree orders)
ProvedErdos195.early_reps_extremaA tree witness is a function on the nodes , , of the binary tree of residues. For distinct integers with , put iff . A finite word of integers is -safe if the sequence "the letters of in order, then all remaining integers in -order" contains no monotone -term arithmetic progression. The halves of a word are the subsequences of its even letters and of its odd letters, each mapped by ; the half witnesses are and .
Theorem (early residue representatives force late extrema to agree). Let be safe for some tree witness. Suppose the prefix meets every residue class modulo , and the extrema , lie strictly outside the numerical range of , i.e. and . Then
Applied along a cofinal chain of safe words, it implies (an immediate consequence, not part of this formal statement) that , even if each stage uses its own tree witness. This generalizes the stagewise -order statement (milestone "stagewise ε: extrema diameters become 2-adically divisible") from -orders to arbitrary tree orders. The obstruction: if , early representatives and give open pairs and at the same node with opposite forces. Lemma of GPT 6 Astra.
import Mathlib import Definitions.Def_Erdos195_tree
namespace Erdos195
theorem early_reps_extrema (P R : List ℤ) (k : ℕ)
(hS : ∃ θ : ℕ → ℤ → Bool, Safe (treeLt θ) (P ++ R))
(hP : ∀ r : ℤ, ∃ p ∈ P, p % 2 ^ k = r % 2 ^ k)
(L U : ℤ) (hL : L ∈ P ++ R) (hU : U ∈ P ++ R) (hbd : ∀ x ∈ P ++ R, L ≤ x ∧ x ≤ U)
(hLP : ∀ p ∈ P, L < p) (hUP : ∀ p ∈ P, p < U) :
L % 2 ^ k = U % 2 ^ k := by sorry
end Erdos195