Localization: a safe extension inside one residue class lifts to the whole tree-safe word
ProvedErdos195.localizationA 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; is SAFE if it is -safe for some . For letters before in , the pair is OPEN if neither nor occurs in ; it sits at the node , , and forces the digit there.
Theorem (localization). Let be SAFE, fix a residue class , and let be a finite word of letters of none of which occurs in . Let be the subsequence of consisting of its letters in . Assume
- the local word is SAFE, and
- (ancestor compatibility) every OPEN pair of sitting at an ancestor node with forces .
Then
So a finite safe extension built locally inside one residue class transfers to the whole word, and no new conflict appears at a node shallower than . Combined with local absorption recipes (one or two local letters, or a one-grandchild block), it gives target-last absorption inside arbitrary larger safe words.
Formalization note: treeLt θ is from Definitions.Def_Erdos195_tree, and Safe is from Definitions.Def_Erdos195_defs. is Q.filter (fun x => decide (x % 2 ^ k = ρ % 2 ^ k)), and positions are List.idxOf.
import Mathlib import Definitions.Def_Erdos195_tree
namespace Erdos195
theorem localization (Q D : List ℤ) (k : ℕ) (ρ : ℤ)
(hQ : ∃ θ : ℕ → ℤ → Bool, Safe (treeLt θ) Q)
(hD : ∀ d ∈ D, d % 2 ^ k = ρ % 2 ^ k) (hDQ : ∀ d ∈ D, d ∉ Q)
(hloc : ∃ θ : ℕ → ℤ → Bool,
Safe (treeLt θ) (Q.filter (fun x => decide (x % 2 ^ k = ρ % 2 ^ k)) ++ D))
(hC : ∀ x z : ℤ, x ∈ Q → z ∈ Q → Q.idxOf x < Q.idxOf z → 2 * z - x ∉ Q → 3 * z - 2 * x ∉ Q →
padicValInt 2 (z - x) < k → x % 2 ^ padicValInt 2 (z - x) = ρ % 2 ^ padicValInt 2 (z - x) →
(bitOne z (padicValInt 2 (z - x)) ↔ bitOne ρ (padicValInt 2 (z - x)))) :
∃ θ : ℕ → ℤ → Bool, Safe (treeLt θ) (Q ++ D) := by sorry
end Erdos195