Fixed-witness one-letter absorption criterion for tree-safe words
ProvedErdos195.conditional_absorption_iffA tree witness is a function on the nodes , , of the binary tree of residues. For distinct integers with , put iff (two's-complement digits). 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; it is tree-safe if it is -safe for some . An in-order pair of ( occurs before ) is open if and ; an open pair lies at the node , , and -safety requires there. Let be a -safe word and . Then is -safe (for the same ) if and only if
In particular (Astra's conditional absorption) if is not a third term of any in-order -AP of and every letter of already has or in , then can be appended without changing the witness. This is the fixed-witness one-letter extension criterion; it contains bottom insertion (all letters ) as the special case where (ii) is vacuous (Erdős Problem 195).
Formalization note: treeLt θ is from Definitions.Def_Erdos195_tree; Safe, bitOne are from Definitions.Def_Erdos195_defs. Positions in a word are List.idxOf; P ++ [c] appends c.
import Mathlib import Definitions.Def_Erdos195_tree
namespace Erdos195
theorem conditional_absorption_iff (θ : ℕ → ℤ → Bool) (R : List ℤ) (t : ℤ)
(hR : Safe (treeLt θ) R) (ht : t ∉ R) :
Safe (treeLt θ) (R ++ [t]) ↔
(∀ a b : ℤ, a ∈ R → b ∈ R → R.idxOf a < R.idxOf b → t = 2 * b - a → 3 * b - 2 * a ∈ R) ∧
(∀ x ∈ R, treeLt θ x t → 2 * t - x ∈ R ∨ 3 * t - 2 * x ∈ R) := by sorry
end Erdos195