Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Safe prefixes of a 444-AP-free enumeration are exactly the RRR-closed cuts

Proved
Erdos195.prefix_safe_iff_closed_cut

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

arithmetic-progressionscombinatoricserdos-problems

Let RRR be a binary relation on Z\mathbb{Z}Z with no monotone 333-term AP (there are no aaa and r≠0r\neq0r=0 with a R a+ra\,R\,a+raRa+r and a+r R a+2ra+r\,R\,a+2ra+rRa+2r) and with Ho's property (∗)(\ast)(∗): a R a+r  ⟺  a+2r R a+3ra\,R\,a+r \iff a+2r\,R\,a+3raRa+r⟺a+2rRa+3r for all aaa and r≠0r\ne0r=0. Let f:N→Zf:\mathbb{N}\to\mathbb{Z}f:N→Z be a bijection with no monotone 444-term AP, and let N∈NN\in\mathbb{N}N∈N. Then the prefix word PN=(f(0),…,f(N−1))P_N=(f(0),\dots,f(N-1))PN​=(f(0),…,f(N−1)) is safe for RRR (the completion "PNP_NPN​, then all other integers in RRR-order" contains no monotone 444-term AP) if and only if the cut at NNN is RRR-closed:

∀ i<j<N:f(i) R f(j)  and  f−1(2f(j)−f(i))≥N ⟹ f−1(3f(j)−2f(i))<N.\forall\, i<j<N:\quad f(i)\,R\,f(j)\ \text{ and }\ f^{-1}\bigl(2f(j)-f(i)\bigr)\ge N\ \Longrightarrow\ f^{-1}\bigl(3f(j)-2f(i)\bigr)<N .∀i<j<N:f(i)Rf(j)  and  f−1(2f(j)−f(i))≥N ⟹ f−1(3f(j)−2f(i))<N.

In words: for a 444-AP-free enumeration, safety of a prefix reduces to a single closure condition on the cut. Consequently a Ho-style construction over Z\mathbb{Z}Z with a fixed completion order RRR (a prefix-increasing chain of RRR-safe words exhausting Z\mathbb{Z}Z) is the same thing as a 444-AP-free enumeration of Z\mathbb{Z}Z having infinitely many RRR-closed cuts, which isolates exactly what the fixed-order method demands beyond 444-AP-freeness.

Preamble
import Mathlib
import Definitions.Def_Erdos195_defs
Formal statement
namespace Erdos195

theorem prefix_safe_iff_closed_cut (R : ℤ → ℤ → Prop) (hA : No3AP R) (hB : Star R)
    (f : ℕ ≃ ℤ) (hf : ¬ HasMonotoneAP f 4) (N : ℕ) :
    Safe R ((List.range N).map f) ↔
      ∀ i j : ℕ, i < j → j < N → R (f i) (f j) → N ≤ f.symm (2 * f j - f i) →
        f.symm (3 * f j - 2 * f i) < N := 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