Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Odd uuu, target t≡0(mod4)t\equiv0\pmod 4t≡0(mod4): (0,u,2t−u,t)(0,u,2t-u,t)(0,u,2t−u,t) is ε\varepsilonε-safe when ε0=1\varepsilon_0=1ε0​=1, ε1≠u1\varepsilon_1\neq u_1ε1​=u1​, εν2t=1\varepsilon_{\nu_2 t}=1εν2​t​=1

Proved
Erdos195.odd_two_letter_mod4_target

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 QQQ of integers is ε\varepsilonε-safe if the sequence "the letters of QQQ in order, then all remaining integers in ≺ε\prec_\varepsilon≺ε​-order" contains no monotone 444-term arithmetic progression. Write uku_kuk​ for the kkk-th binary digit of uuu. Let uuu be odd and t≠0t\neq0t=0 with t≡0(mod4)t\equiv0\pmod 4t≡0(mod4). If ε0=1\varepsilon_0=1ε0​=1, ε1≠u1\varepsilon_1\neq u_1ε1​=u1​ and εν2(t)=1\varepsilon_{\nu_2(t)}=1εν2​(t)​=1, then

(0, u, 2t−u, t) is ε-safe.(0,\,u,\,2t-u,\,t)\ \text{is } \varepsilon\text{-safe}.(0,u,2t−u,t) is ε-safe.

In particular, the single order with ε0=1\varepsilon_0=1ε0​=1, ε1=1−u1\varepsilon_1=1-u_1ε1​=1−u1​ and εk=1\varepsilon_k=1εk​=1 for k≥2k\ge2k≥2 (which depends only on uuu) lets every target t≡0(mod4)t\equiv0\pmod4t≡0(mod4) be absorbed into (0,u)(0,u)(0,u) with one auxiliary letter, the reflection 2t−u2t-u2t−u of uuu through ttt.

Formalization note: Safe, epsLt, bitOne are from Definitions.Def_Erdos195_defs.

Preamble
import Mathlib
import Definitions.Def_Erdos195_defs
Formal statement
namespace Erdos195

theorem odd_two_letter_mod4_target (ε : ℕ → Bool) (u t : ℤ) (hu : u % 2 = 1) (ht : t % 4 = 0)
    (ht0 : t ≠ 0) (h0 : ε 0 = true) (h1 : ¬ (bitOne u 1 ↔ ε 1 = true))
    (hv : ε (padicValInt 2 t) = true) :
    Safe (epsLt ε) [0, u, 2 * t - u, t] := 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