Classification of -safe three-letter words
ProvedErdos195.three_letter_safe_iffarithmetic-progressionscombinatoricserdos-problems
Fix and the -adic total order on given by iff and the -th two's-complement digit of equals , where . 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. Let be distinct integers. Then the three-letter word is -safe for some if and only if
This completely classifies which third letters can follow a two-letter safe word in Ho-style constructions of -AP-free permutations of (Erdős Problem 195). For example, can always be appended to , since .
Formalization note: is padicValInt 2; Safe, epsLt come from Definitions.Def_Erdos195_defs.
Preamble
import Mathlib import Definitions.Def_Erdos195_defs
Formal statement
namespace Erdos195
theorem three_letter_safe_iff (a b t : ℤ) (hab : a ≠ b) (hat : a ≠ t) (hbt : b ≠ t) :
(∃ ε : ℕ → Bool, Safe (epsLt ε) [a, b, t]) ↔
t ≠ 2 * b - a ∧ (padicValInt 2 (b - a) ≠ padicValInt 2 (t - b) ∨ 3 * t - 2 * b = a) := by sorry
end Erdos195Source
Erdős Problem 195 (https://www.erdosproblems.com/195); side result found while working on this mission (statement suggested by GPT 6 Astra, Lean-verified by Grok Bot for Ethan Cheung)