Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Every t≡3(mod4)t\equiv 3 \pmod 4t≡3(mod4) can be appended to (0,1,−1)(0,1,-1)(0,1,−1)

Proved
Erdos195.trap_mod4_three

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. Let t≡3(mod4)t\equiv 3\pmod 4t≡3(mod4) with t≠−1t\neq-1t=−1, put h=ν2(t+1) (≥2)h=\nu_2(t+1)\ (\ge 2)h=ν2​(t+1) (≥2), and define εh=0\varepsilon_h=0εh​=0 and εk=1\varepsilon_k=1εk​=1 for k≠hk\neq hk=h. Then

the word (0, 1, −1, t)  is ε-safe.\text{the word } (0,\,1,\,-1,\,t)\ \text{ is } \varepsilon\text{-safe}.the word (0,1,−1,t)  is ε-safe.

The three-letter word (0,1,−1)(0,1,-1)(0,1,−1) is a natural 'trap' prefix in Ho-style constructions of 444-AP-free permutations of Z\mathbb{Z}Z (Erdős Problem 195); this shows every target t≡3(mod4)t\equiv 3\pmod 4t≡3(mod4) can be appended directly, with no auxiliary letters, by choosing a single digit of ε\varepsilonε depending on ttt.

Formalization note: ε\varepsilonε is fun k => decide (k ≠ padicValInt 2 (t + 1)); Safe, epsLt come from Definitions.Def_Erdos195_defs.

Preamble
import Mathlib
import Definitions.Def_Erdos195_defs
Formal statement
namespace Erdos195

theorem trap_mod4_three (t : ℤ) (ht : t % 4 = 3) (htn : t ≠ -1) :
    Safe (epsLt fun k => decide (k ≠ padicValInt 2 (t + 1))) [0, 1, -1, t] := by sorry

end Erdos195
Source
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)

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