Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Tree-safe repair of Pn⋅TP_n\cdot TPn​⋅T needs at least nnn auxiliary letters

Proved
Erdos195.Pn_repair_lower_bound

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) (two's-complement digits). 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. Let n≥0n\ge0n≥0, N=2nN=2^nN=2n, T=4NT=4NT=4N. Let QQQ be a θ\thetaθ-safe word (any tree witness θ\thetaθ) with T∈QT\in QT∈Q and N∉QN\notin QN∈/Q, such that for every k<nk<nk<n the letters N−2k+1N-2^{k+1}N−2k+1, N−2kN-2^kN−2k, 2k2^k2k occur in QQQ, with N−2k+1N-2^{k+1}N−2k+1 before N−2kN-2^kN−2k and 2k2^k2k before TTT. Then for every k<nk<nk<n

Q∩{N+2k, 2T−2k, 3T−2k+1}≠∅,and#{x∈Q: x∉[0,N), x≠T} ≥ n.Q\cap\{N+2^k,\ 2T-2^k,\ 3T-2^{k+1}\}\neq\varnothing,\qquad\text{and}\qquad \#\{x\in Q:\ x\notin[0,N),\ x\neq T\}\ \ge\ n.Q∩{N+2k, 2T−2k, 3T−2k+1}=∅,and#{x∈Q: x∈/[0,N), x=T} ≥ n.

The hypotheses hold for every word that begins with Pn={0,1,…,N−1}P_n=\{0,1,\dots,N-1\}Pn​={0,1,…,N−1} listed in increasing ≺0\prec_0≺0​-order (the order with all digits preferred 000) and contains TTT but not NNN: the pairs (N−2k+1,N−2k)(N-2^{k+1},N-2^k)(N−2k+1,N−2k) and (2k,T)(2^k,T)(2k,T) sit at the same tree node (k,0)(k,0)(k,0) and force opposite values there. So absorbing the single new target TTT into PnP_nPn​ by tree-safe insertion needs at least nnn auxiliary letters: there is no uniform bound on the repair cost (Erdős Problem 195, tree-witness approach).

Formalization note: treeLt θ is from Definitions.Def_Erdos195_tree; Safe from Definitions.Def_Erdos195_defs; positions are List.idxOf; the count is the cardinality of Q.toFinset filtered by x∉[0,N)x\notin[0,N)x∈/[0,N), x≠Tx\ne Tx=T. The word PnP_nPn​ itself is not formalized; the theorem assumes only the order relations it uses.

Preamble
import Mathlib
import Definitions.Def_Erdos195_tree
Formal statement
namespace Erdos195

theorem Pn_repair_lower_bound (n : ℕ) (θ : ℕ → ℤ → Bool) (Q : List ℤ)
    (hS : Safe (treeLt θ) Q) (hT : 4 * (2 : ℤ) ^ n ∈ Q) (hN : (2 : ℤ) ^ n ∉ Q)
    (hord : ∀ k < n, (2 : ℤ) ^ n - 2 ^ (k + 1) ∈ Q ∧ (2 : ℤ) ^ n - 2 ^ k ∈ Q ∧ (2 : ℤ) ^ k ∈ Q ∧
      Q.idxOf ((2 : ℤ) ^ n - 2 ^ (k + 1)) < Q.idxOf ((2 : ℤ) ^ n - 2 ^ k) ∧
      Q.idxOf ((2 : ℤ) ^ k) < Q.idxOf (4 * (2 : ℤ) ^ n)) :
    (∀ k < n, (2 : ℤ) ^ n + 2 ^ k ∈ Q ∨ 2 * (4 * (2 : ℤ) ^ n) - 2 ^ k ∈ Q ∨
      3 * (4 * (2 : ℤ) ^ n) - 2 ^ (k + 1) ∈ Q) ∧
    n ≤ (Q.toFinset.filter (fun x => ¬ (0 ≤ x ∧ x < (2 : ℤ) ^ n) ∧ x ≠ 4 * (2 : ℤ) ^ n)).card := by sorry

end Erdos195
Source
Erdős Problem 195 (https://www.erdosproblems.com/195); statement from GPT 6 Astra (Oct 23 2026 'tree limits' answer, Thm 2), 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