Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Two inverted pairs sharing an odd letter: no-escape repairs force translates of the odd part

Proved
Erdos195.two_inversion_translate

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); its root bit θ(0,0)\theta(0,0)θ(0,0) decides the order between integers of different parity. 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. Theorem (two inverted pairs sharing the odd letter). Let θ(0,0)=1\theta(0,0)=1θ(0,0)=1. Let TTT be a word, b∈Tb\in Tb∈T odd, and c≠c′c\neq c'c=c′ even letters of TTT, both after bbb, such that t=2c−bt=2c-bt=2c−b, w=3c−2bw=3c-2bw=3c−2b, t′=2c′−bt'=2c'-bt′=2c′−b, w′=3c′−2bw'=3c'-2bw′=3c′−2b all lie outside TTT. Let T⋅RT\cdot RT⋅R be θ\thetaθ-safe. Suppose that no odd ooo before www (resp. w′w'w′) in T⋅RT\cdot RT⋅R has 3w−2o∈T⋅R3w-2o\in T\cdot R3w−2o∈T⋅R (resp. 3w′−2o∈T⋅R3w'-2o\in T\cdot R3w′−2o∈T⋅R). Then w,w′∈Rw,w'\in Rw,w′∈R. Moreover, if uuu is the earlier and u′u'u′ the later of w,w′w,w'w,w′ and δ=2(u′−u)\delta=2(u'-u)δ=2(u′−u), then

o∈T odd ⟹ o+δ∈T⋅R before u′,o\in T\ \text{odd}\ \Longrightarrow\ o+\delta\in T\cdot R\ \text{before}\ u',o∈T odd ⟹ o+δ∈T⋅R before u′,

and some odd letter of RRR lies strictly between uuu and u′u'u′.

The first step is w-forcing: with root bit 1, an odd bbb before an even ccc with 2c−b,3c−2b∉T2c-b,3c-2b\notin T2c−b,3c−2b∈/T forces 3c−2b3c-2b3c−2b into every safe end-extension. Consequently, a repair of a word with two inversions (b,c),(b,c′)(b,c),(b,c')(b,c),(b,c′) that avoids escape letters must contain a translate of the whole odd part of TTT by δ=6(c′−c)\delta=6(c'-c)δ=6(c′−c), and these translates come before the later forced letter. So the two-inversion problem does not factor into two independent single-inversion repairs (cf. the single-inversion criterion). It is a structural necessary condition, not a construction or an impossibility result for Erdős #195.

Formalization note: words are List ℤ, positions via List.idxOf, safety is Safe (treeLt θ).

Preamble
import Mathlib
import Definitions.Def_Erdos195_tree
Formal statement
namespace Erdos195

theorem two_inversion_translate (θ : ℕ → ℤ → Bool) (h00 : θ 0 0 = true) (T R : List ℤ)
    (hS : Safe (treeLt θ) (T ++ R)) (b c c' : ℤ) (hb : b ∈ T) (hc : c ∈ T) (hc' : c' ∈ T)
    (hbo : b % 2 = 1) (hce : c % 2 = 0) (hce' : c' % 2 = 0) (hcc : c ≠ c')
    (hi : T.idxOf b < T.idxOf c) (hi' : T.idxOf b < T.idxOf c')
    (ht : 2 * c - b ∉ T) (hw : 3 * c - 2 * b ∉ T) (ht' : 2 * c' - b ∉ T) (hw' : 3 * c' - 2 * b ∉ T)
    (hesc : ∀ o ∈ T ++ R, o % 2 = 1 →
      ((T ++ R).idxOf o < (T ++ R).idxOf (3 * c - 2 * b) → 3 * (3 * c - 2 * b) - 2 * o ∉ T ++ R) ∧
      ((T ++ R).idxOf o < (T ++ R).idxOf (3 * c' - 2 * b) → 3 * (3 * c' - 2 * b) - 2 * o ∉ T ++ R)) :
    3 * c - 2 * b ∈ R ∧ 3 * c' - 2 * b ∈ R ∧
    ∃ u u' : ℤ, ((u = 3 * c - 2 * b ∧ u' = 3 * c' - 2 * b) ∨ (u = 3 * c' - 2 * b ∧ u' = 3 * c - 2 * b)) ∧
      (T ++ R).idxOf u < (T ++ R).idxOf u' ∧
      (∀ o ∈ T, o % 2 = 1 → o + 2 * (u' - u) ∈ T ++ R ∧
        (T ++ R).idxOf (o + 2 * (u' - u)) < (T ++ R).idxOf u') ∧
      ∃ o ∈ R, o % 2 = 1 ∧ (T ++ R).idxOf u < (T ++ R).idxOf o ∧ (T ++ R).idxOf o < (T ++ R).idxOf u' := 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