Which letter may follow the shield: is tree-safe iff (mod 4) or
ProvedErdos195.shield_suffix_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 an integer with . Then the five-letter word is tree-safe if and only if
Here is the shield word (tree-safe, closing the root pair ). This classifies which single letter may follow the shield. (A relayed GPT answer claimed the safe set is exactly ; that is false — e.g. and are safe — and this theorem is the corrected statement.) Obstructions: odd conflicts with the root pair via ; , , gives a level- conflict between and ; complete an in-order -AP without its fourth term.
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 shield_suffix_iff (x : ℤ) (h0 : x ≠ 0) (h1 : x ≠ 1) (h3 : x ≠ 3) (h6 : x ≠ 6) :
(∃ θ : ℕ → ℤ → Bool, Safe (treeLt θ) [0, 1, 6, 3, x]) ↔ x % 4 = 2 ∨ x = 4 := by sorry
end Erdos195