Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Open cycle with a node conflict kills every extension (interlocked obstruction for cycles of any length)

Proved
Erdos195.open_cycle_node_conflict

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

arithmetic-progressionscombinatoricserdos-problems

A tree witness θ:N×Z→{0,1}\theta:\mathbb N\times\mathbb Z\to\{0,1\}θ:N×Z→{0,1} defines a strict total order ≺θ\prec_\theta≺θ​ on Z\mathbb ZZ (milestone framework). A finite word QQQ of integers is θ\thetaθ-safe if the sequence "letters of QQQ in order, then all remaining integers in ≺θ\prec_\theta≺θ​-order" has no monotone 4-term arithmetic progression; positions are first occurrences. For an in-order pair (a,b)(a,b)(a,b) of a word (aaa before bbb), call 2b−a2b-a2b−a its third term and 3b−2a3b-2a3b−2a its fourth term; the pair is closed if one of them occurs. An open cycle in a word TTT is a family of in-order pairs (ai,bi)(a_i,b_i)(ai​,bi​), 0≤i<m0\le i<m0≤i<m, of letters of TTT with

3bi−2ai  =  2bi+1−ai+1(indices mod m)3b_i-2a_i \;=\; 2b_{i+1}-a_{i+1}\qquad(\text{indices mod } m)3bi​−2ai​=2bi+1​−ai+1​(indices mod m)

and no third term 2bi−ai2b_i-a_i2bi​−ai​ in TTT. Write ki=ν2(bi−ai)k_i=\nu_2(b_i-a_i)ki​=ν2​(bi​−ai​) for the 2-adic level of pair iii; its node is the residue ai mod 2kia_i \bmod 2^{k_i}ai​mod2ki​. Theorem (open cycle with a node conflict). Let (ai,bi)i<m(a_i,b_i)_{i<m}(ai​,bi​)i<m​ be an open cycle in TTT, and suppose two of its pairs i,ji,ji,j lie at the same node but point in opposite directions:

kj=ki=k,aj≡ai(mod2k),bj≢bi(mod2k+1).k_j=k_i=k,\qquad a_j\equiv a_i \pmod{2^k},\qquad b_j\not\equiv b_i \pmod{2^{k+1}}.kj​=ki​=k,aj​≡ai​(mod2k),bj​≡bi​(mod2k+1).

Then no word T RT\,RTR is θ\thetaθ-safe, for any tree witness θ\thetaθ and any word RRR (in particular TTT itself is not safe).

This generalises the interlocked obstruction, which is the case m=2m=2m=2 with pairs (a,a+d)(a,a+d)(a,a+d), (a+5d,a+4d)(a+5d,a+4d)(a+5d,a+4d) and both middle terms absent, to open cycles of any length. For example, any word in which 000 precedes 111, −1-1−1 precedes 111, and 111111 precedes 888, while 2,3,52,3,52,3,5 are absent, has the 3-cycle (0,1),(−1,1),(11,8)(0,1),(-1,1),(11,8)(0,1),(−1,1),(11,8), with third terms 2,3,52,3,52,3,5 and fourth terms 3,5,23,5,23,5,2. Pairs (0,1)(0,1)(0,1) and (11,8)(11,8)(11,8) are both at level 000, and 8≢1(mod2)8\not\equiv 1 \pmod 28≡1(mod2), so such a word can never be extended safely. It is a forbidden configuration for any construction in the tree-witness approach to Erdős #195, not a construction or an impossibility result.

Formalization note: words are List ℤ, positions via List.idxOf, the pairs are a b : ℕ → ℤ on indices i < m, the successor index is (i+1) % m; the conclusion is ¬ ∃ θ, Safe (treeLt θ) (T ++ R).

Preamble
import Mathlib
import Definitions.Def_Erdos195_tree
Formal statement
namespace Erdos195

theorem open_cycle_node_conflict (T R : List ℤ) (m : ℕ) (a b : ℕ → ℤ)
    (ha : ∀ i < m, a i ∈ T) (hb : ∀ i < m, b i ∈ T)
    (hi : ∀ i < m, T.idxOf (a i) < T.idxOf (b i))
    (hcyc : ∀ i < m, 3 * b i - 2 * a i = 2 * b ((i + 1) % m) - a ((i + 1) % m))
    (ht : ∀ i < m, 2 * b i - a i ∉ T) (i j : ℕ) (him : i < m) (hjm : j < m)
    (hk : padicValInt 2 (b j - a j) = padicValInt 2 (b i - a i))
    (hnode : (2 : ℤ) ^ padicValInt 2 (b i - a i) ∣ a j - a i)
    (hbit : ¬ (2 : ℤ) ^ (padicValInt 2 (b i - a i) + 1) ∣ b j - b i) :
    ¬ ∃ θ : ℕ → ℤ → Bool, Safe (treeLt θ) (T ++ R) := by sorry

end Erdos195
Source
Erdős Problem 195 (https://www.erdosproblems.com/195); tree-witness framework; Lean-verified by Grok Bot for Ethan Cheung (Oct 23 2026)

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