Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

No polynomial ranking function proves termination of the Erdős 261 greedy carry

Proved
Erdos261.no_polynomial_ranking

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

erdos-problemsnumber-theory

Consider the Borwein–Loring / Erdős 261 greedy map on states (N,R)(N,R)(N,R): (N,R)↦(N+1, 2R mod (N+1))(N,R)\mapsto(N+1,\,2R\bmod(N+1))(N,R)↦(N+1,2Rmod(N+1)).

Theorem. For every real polynomial P(N,R)P(N,R)P(N,R) and every N0N_0N0​, it is false that for all integers N≥max⁡(N0,2)N\ge\max(N_0,2)N≥max(N0​,2) and 1≤R<N1\le R<N1≤R<N:

  1. P(N,R)≥0P(N,R)\ge0P(N,R)≥0, and
  2. if R′=2R mod (N+1)>0R'=2R\bmod(N+1)>0R′=2Rmod(N+1)>0 then P(N+1,R′)<P(N,R)P(N+1,R')<P(N,R)P(N+1,R′)<P(N,R).

So no global (or eventually valid) polynomial ranking function can prove that greedy orbits terminate.

Proof (discrete, via exact cycles). For k≥2k\ge2k≥2 and M≥2M\ge2M≥2 the states ((2k−1)M−k+i, 2iM)((2^k-1)M-k+i,\,2^iM)((2k−1)M−k+i,2iM), i=0,…,ki=0,\dots,ki=0,…,k (last one ((2k−1)M,M)((2^k-1)M,M)((2k−1)M,M)) form a greedy segment (k−1k-1k−1 doublings, then one subtraction returning to R=MR=MR=M). Comparing MdM^dMd-coefficients (ddd the total degree) along the segment gives h(c,2)=h(c,1)h(c,2)=h(c,1)h(c,2)=h(c,1) for the top form hhh at every c=2k−1c=2^k-1c=2k−1; hence the top form is aNdaN^daNd, and a>0a>0a>0 by nonnegativity on (2M,M)(2M,M)(2M,M). The 2-cycle (3M−2,M)→(3M−1,2M)→(3M,M)(3M-2,M)\to(3M-1,2M)\to(3M,M)(3M−2,M)→(3M−1,2M)→(3M,M) then gives P(3M,M)<P(3M−2,M)P(3M,M)<P(3M-2,M)P(3M,M)<P(3M−2,M) for large MMM, but the Md−1M^{d-1}Md−1-coefficient of P(3M,M)−P(3M−2,M)P(3M,M)-P(3M-2,M)P(3M,M)−P(3M−2,M) is 2ad 3d−1>02ad\,3^{d-1}>02ad3d−1>0.

Formalization Note. PPP is an MvPolynomial (Fin 2) ℝ evaluated at ![N, R].

Preamble
import Mathlib
import Definitions.Def_Erdos261_defs
open Finset
Formal statement
namespace Erdos261

theorem no_polynomial_ranking (P : MvPolynomial (Fin 2) ℝ) (N0 : ℕ) :
    ¬ ∀ N R : ℕ, N0 ≤ N → 2 ≤ N → 1 ≤ R → R < N →
      0 ≤ MvPolynomial.eval ![(N : ℝ), (R : ℝ)] P ∧
      (0 < 2 * R % (N + 1) →
        MvPolynomial.eval ![((N + 1 : ℕ) : ℝ), ((2 * R % (N + 1) : ℕ) : ℝ)] P <
          MvPolynomial.eval ![(N : ℝ), (R : ℝ)] P) := by sorry

end Erdos261
Source
Erdős Problem 261 (https://www.erdosproblems.com/261); Borwein–Loring 1990 greedy map; claim A2 of claim from a GPT answer relayed by Ethan Cheung (third round, Oct 23 2026), Lean-verified by Grok Bot for Ethan Cheung (Oct 23 2026) (the integral/limit argument there is replaced by a discrete exact-cycle argument)

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