Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Appending a decreasing block below an ε\varepsilonε-safe word

Proved
Erdos195.epsLt_safe_append_block

by Ethan Cheung Wang · Oct 23, 2026 · Mathlib 0df444a (Lean v4.33.1)

arithmetic-progressionscombinatoricserdos-problems

Fix ε:N→{0,1}\varepsilon:\mathbb{N}\to\{0,1\}ε:N→{0,1} and the 222-adic total order on Z\mathbb{Z}Z given by x≺εyx\prec_\varepsilon yx≺ε​y iff x≠yx\neq yx=y and the kkk-th two's-complement digit of xxx equals εk\varepsilon_kεk​, where k=ν2(y−x)k=\nu_2(y-x)k=ν2​(y−x). A finite word PPP of distinct integers is ε\varepsilonε-safe if the sequence "the letters of PPP in order, then all remaining integers in ≺ε\prec_\varepsilon≺ε​-order" contains no monotone 444-term arithmetic progression. Let PPP be ε\varepsilonε-safe and let S=(s1,…,sn)S=(s_1,\dots,s_n)S=(s1​,…,sn​) be a list of integers not in PPP such that

s≺εp  (s∈S, p∈P),sj≺εsi  (i<j),∀a before b in P: 2b−a∈S⇒3b−2a∈P.s\prec_\varepsilon p\ \ (s\in S,\ p\in P),\qquad s_j\prec_\varepsilon s_i\ \ (i<j),\qquad \forall a\text{ before }b\text{ in }P:\ 2b-a\in S\Rightarrow 3b-2a\in P.s≺ε​p  (s∈S, p∈P),sj​≺ε​si​  (i<j),∀a before b in P: 2b−a∈S⇒3b−2a∈P.

Then for every jjj the word P⋅s1⋯sjP\cdot s_1\cdots s_jP⋅s1​⋯sj​ is ε\varepsilonε-safe. Thus an entire block of letters lying ≺ε\prec_\varepsilon≺ε​-below a safe word can be appended in decreasing order, provided no in-order pair of PPP has its 333-AP continuation in the block without its 444-AP continuation in PPP. This is a step in Ho-style constructions of 444-AP-free permutations of Z\mathbb{Z}Z (Erdős Problem 195).

Formalization note: Safe, epsLt are from Definitions.Def_Erdos195_defs; "aaa before bbb" is P.idxOf a < P.idxOf b; decreasing order is S.Pairwise (fun x y => epsLt ε y x); prefixes are S.take j.

Preamble
import Mathlib
import Definitions.Def_Erdos195_defs
Formal statement
namespace Erdos195

theorem epsLt_safe_append_block (ε : ℕ → Bool) (P S : List ℤ) (hS : Safe (epsLt ε) P)
    (hdisj : ∀ s ∈ S, s ∉ P) (hbelow : ∀ s ∈ S, ∀ p ∈ P, epsLt ε s p)
    (hdec : S.Pairwise (fun x y => epsLt ε y x))
    (hF : ∀ a ∈ P, ∀ b ∈ P, P.idxOf a < P.idxOf b → 2 * b - a ∈ S → 3 * b - 2 * a ∈ P) :
    ∀ j : ℕ, Safe (epsLt ε) (P ++ S.take j) := by sorry

end Erdos195
Source
Erdős Problem 195 (https://www.erdosproblems.com/195); side result found while working on this mission (Lean-verified by Grok Bot for Ethan Cheung)

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me