is tree-safe for every odd
ProvedErdos195.zero_one_x_three_safeA 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 odd integer with . Then the word is tree-safe; moreover is tree-safe.
Appending closes the root pair after any odd entry. This does not release the root node: the open pairs and (unless ) still force .
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 zero_one_x_three_safe (x : ℤ) (hx : x % 2 = 1) (h1 : x ≠ 1) (h3 : x ≠ 3) :
(∃ θ : ℕ → ℤ → Bool, Safe (treeLt θ) [0, 1, x, 3]) ∧
(∃ θ : ℕ → ℤ → Bool, Safe (treeLt θ) [0, 1, 3]) := by sorry
end Erdos195