Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Early residue representatives force late extrema to agree mod 2^k (tree orders)

Proved
Erdos195.early_reps_extrema

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

arithmetic-progressionscombinatoricserdos-problems

A tree witness is a function θ(k,r)∈{0,1}\theta(k,r)\in\{0,1\}θ(k,r)∈{0,1} on the nodes (k,r)(k,r)(k,r), 0≤r<2k0\le r<2^k0≤r<2k, of the binary tree of residues. For distinct integers x,yx,yx,y with k=ν2(y−x)k=\nu_2(y-x)k=ν2​(y−x), put x≺θyx\prec_\theta yx≺θ​y iff bitk(x)=θ(k, x mod 2k)\mathrm{bit}_k(x)=\theta(k,\,x\bmod 2^k)bitk​(x)=θ(k,xmod2k). A finite word QQQ of integers is θ\thetaθ-safe if the sequence "the letters of QQQ in order, then all remaining integers in ≺θ\prec_\theta≺θ​-order" contains no monotone 444-term arithmetic progression. The halves of a word are the subsequences of its even letters and of its odd letters, each mapped by x↦⌊x/2⌋x\mapsto\lfloor x/2\rfloorx↦⌊x/2⌋; the half witnesses are θE(k,r)=θ(k+1,2r)\theta_E(k,r)=\theta(k+1,2r)θE​(k,r)=θ(k+1,2r) and θO(k,r)=θ(k+1,2r+1)\theta_O(k,r)=\theta(k+1,2r+1)θO​(k,r)=θ(k+1,2r+1).

Theorem (early residue representatives force late extrema to agree). Let W=P⋅RW=P\cdot RW=P⋅R be safe for some tree witness. Suppose the prefix PPP meets every residue class modulo 2k2^k2k, and the extrema L=min⁡WL=\min WL=minW, U=max⁡WU=\max WU=maxW lie strictly outside the numerical range of PPP, i.e. L<min⁡PL<\min PL<minP and max⁡P<U\max P<UmaxP<U. Then

L≡U(mod2k).L\equiv U\pmod{2^k}.L≡U(mod2k).

Applied along a cofinal chain of safe words, it implies (an immediate consequence, not part of this formal statement) that ν2(max⁡Qj−min⁡Qj)→∞\nu_2(\max Q_j-\min Q_j)\to\inftyν2​(maxQj​−minQj​)→∞, even if each stage uses its own tree witness. This generalizes the stagewise ε\varepsilonε-order statement (milestone "stagewise ε: extrema diameters become 2-adically divisible") from ε\varepsilonε-orders to arbitrary tree orders. The obstruction: if h=ν2(U−L)<kh=\nu_2(U-L)<kh=ν2​(U−L)<k, early representatives p≡L+2hp\equiv L+2^hp≡L+2h and q≡L(mod2h+1)q\equiv L \pmod{2^{h+1}}q≡L(mod2h+1) give open pairs (p,L)(p,L)(p,L) and (q,U)(q,U)(q,U) at the same node with opposite forces. Lemma of GPT 6 Astra.

Preamble
import Mathlib
import Definitions.Def_Erdos195_tree
Formal statement
namespace Erdos195

theorem early_reps_extrema (P R : List ℤ) (k : ℕ)
    (hS : ∃ θ : ℕ → ℤ → Bool, Safe (treeLt θ) (P ++ R))
    (hP : ∀ r : ℤ, ∃ p ∈ P, p % 2 ^ k = r % 2 ^ k)
    (L U : ℤ) (hL : L ∈ P ++ R) (hU : U ∈ P ++ R) (hbd : ∀ x ∈ P ++ R, L ≤ x ∧ x ≤ U)
    (hLP : ∀ p ∈ P, L < p) (hUP : ∀ p ∈ P, p < U) :
    L % 2 ^ k = U % 2 ^ k := by sorry

end Erdos195
Source
Erdős Problem 195 (https://www.erdosproblems.com/195); tree-witness framework; lemma of GPT 6 Astra; 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