Exact finite characterization of -safety for tree orders
ProvedErdos195.treeLt_safe_iffarithmetic-progressionscombinatoricserdos-problems
A 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. Call before in an open pair if neither nor lies in . Then is -safe if and only if
This is the exact finite characterization of safety for tree orders (the tree analogue of condition (C)).
Formalization note: treeLt θ is from Definitions.Def_Erdos195_tree; Safe, bitOne, No3AP, Star, HasMonotoneAP are from Definitions.Def_Erdos195_defs. Positions in a word are List.idxOf; is padicValInt 2.
Preamble
import Mathlib import Definitions.Def_Erdos195_tree
Formal statement
namespace Erdos195
theorem treeLt_safe_iff (θ : ℕ → ℤ → Bool) (Q : List ℤ) :
Safe (treeLt θ) Q ↔
(∀ a b : ℤ, a ∈ Q → b ∈ Q → 2 * b - a ∈ Q → Q.idxOf a < Q.idxOf b →
Q.idxOf b < Q.idxOf (2 * b - a) →
3 * b - 2 * a ∈ Q ∧ Q.idxOf (3 * b - 2 * a) < Q.idxOf (2 * b - a)) ∧
(∀ a b : ℤ, a ∈ Q → b ∈ Q → Q.idxOf a < Q.idxOf b →
2 * b - a ∉ Q → 3 * b - 2 * a ∉ Q →
(θ (padicValInt 2 (b - a)) (a % 2 ^ padicValInt 2 (b - a)) = true ↔
bitOne b (padicValInt 2 (b - a)))) := by sorry
end Erdos195Source
Erdős Problem 195 (https://www.erdosproblems.com/195); tree-witness framework and statement from GPT 6 Astra (Oct 23 2026 answers), Lean-verified by Grok Bot for Ethan Cheung