Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Reverse-order safety for ε\varepsilonε-orders

Proved
Erdos195.epsLt_safe_of_reverse

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

arithmetic-progressionscombinatoricserdos-problems

Let P=(p1,…,pn)P=(p_1,\dots,p_n)P=(p1​,…,pn​) be a finite list of integers listed in strictly decreasing ≺ε\prec_\varepsilon≺ε​-order (pj≺εpip_j\prec_\varepsilon p_ipj​≺ε​pi​ whenever i<ji<ji<j). Then PPP is safe for ≺ε\prec_\varepsilon≺ε​: the completion order (first PPP in list order, then the remaining integers in ≺ε\prec_\varepsilon≺ε​-order) contains no monotone 444-term progression.

P listed in reverse ≺ε-order  ⟹  Safe≺ε(P).P \text{ listed in reverse } \prec_\varepsilon\text{-order} \implies \mathrm{Safe}_{\prec_\varepsilon}(P).P listed in reverse ≺ε​-order⟹Safe≺ε​​(P).

This is the Z\mathbb{Z}Z-version of Ho's Lemma 1, the base case of the extension procedure.

Formalization Note compLt R P x y holds when both lie in P with x at a smaller index, or x ∈ P and y ∉ P, or neither lies in P and R x y. Safe R P says there are no a and r ≠ 0 with compLt R P a (a+r), compLt R P (a+r) (a+2r) and compLt R P (a+2r) (a+3r). epsLt ε x y is x ≠ y ∧ (x / 2^k % 2 = 1 ↔ ε k = true) with k = padicValInt 2 (y - x), i.e. k=ν2(y−x)k=\nu_2(y-x)k=ν2​(y−x); integer division is floor division, so x / 2^k % 2 is the kkk-th two's-complement digit of xxx.

Preamble
import Mathlib
import Definitions.Def_Erdos195_defs
Formal statement
namespace Erdos195

theorem epsLt_safe_of_reverse (ε : ℕ → Bool) (P : List ℤ)
    (hP : P.Pairwise (fun x y => epsLt ε y x)) : Safe (epsLt ε) P := by sorry

end Erdos195
Source
B. S. Ho, arXiv:2609.12780, Lemma 1 ('Every finite set, listed in reverse ◁-order, is a safe word'); here over ℤ for all ε
Human review
  • Endorsed by Shuze Chen · Oct 23, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Ethan Cheung Wang · Oct 23, 2026

    Confirmed by the mission captain (proposal self-audit).

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