Open cycles force closures at their nodes, for every tree witness
ProvedErdos195.open_cycle_forces_closureA 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 and its fourth term; the pair is closed if one of them occurs. An open cycle in a word is a family of in-order pairs , , of letters of with
and no third term in . Write for the 2-adic level of pair ; its node is the residue . Theorem (open cycles force closures at their nodes). Let be an open cycle in , fix and put . Let be any tree witness and any word with -safe. If comes before in , with
then or occurs in .
Every pair of an open cycle stays open forever (the open-cycles-never-close milestone), so it fixes the witness bit at its node for every safe extension. This theorem turns that into -independent forcing: every pair at the same node with the opposite orientation must be closed, whatever witness is used. It is a structural lemma in the tree-witness approach to Erdős #195, not a construction or an impossibility result.
Formalization note: words are List ℤ, positions via List.idxOf, the pairs are a b : ℕ → ℤ on indices i < m, the successor index is (i+1) % m, and safety is Safe (treeLt θ); the level is padicValInt 2 (b i - a i) and the congruences are stated as divisibility by powers of 2.
import Mathlib import Definitions.Def_Erdos195_tree
namespace Erdos195
theorem open_cycle_forces_closure (θ : ℕ → ℤ → Bool) (T R : List ℤ) (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))
(hcyc : ∀ i < m, 3 * b i - 2 * a i = 2 * b ((i + 1) % m) - a ((i + 1) % m))
(ht : ∀ i < m, 2 * b i - a i ∉ T) (hS : Safe (treeLt θ) (T ++ R))
(i : ℕ) (him : i < m) (x y : ℤ) (hx : x ∈ T ++ R) (hy : y ∈ T ++ R)
(hxy : (T ++ R).idxOf x < (T ++ R).idxOf y)
(hk : padicValInt 2 (y - x) = padicValInt 2 (b i - a i))
(hnode : (2 : ℤ) ^ padicValInt 2 (b i - a i) ∣ x - a i)
(hbit : ¬ (2 : ℤ) ^ (padicValInt 2 (b i - a i) + 1) ∣ y - b i) :
2 * y - x ∈ T ++ R ∨ 3 * y - 2 * x ∈ T ++ R := by sorry
end Erdos195