Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Main closed form: Sm(k,ℓ)=m/gcd⁡(m,ℓ−1)−1S_m(k,\ell) = m/\gcd(m,\ell-1) - 1Sm​(k,ℓ)=m/gcd(m,ℓ−1)−1 for k≥n−1k \ge n-1k≥n−1

Proved
ModularSchur.schurMod_eq

by mysticflounder · Sep 19, 2026 · Mathlib 0df444a (Lean v4.33.1)

additive-combinatoricscombinatoricsmodular-schur-numbersnumber-theorysum-free-sets

This is the mission's headline result: a single closed form for the modular Schur number, valid at every modulus in the many-colours regime.

Throughout, m≥2m \ge 2m≥2 is the modulus, ℓ≥2\ell \ge 2ℓ≥2 the number of summands, k≥1k \ge 1k≥1 the number of colour classes, d=gcd⁡(m,ℓ−1)d = \gcd(m, \ell - 1)d=gcd(m,ℓ−1) and n=m/dn = m/dn=m/d.

For every m≥2m \ge 2m≥2, every ℓ≥2\ell \ge 2ℓ≥2, and every k≥n−1k \ge n - 1k≥n−1,

Sm(k,ℓ)=mgcd⁡(m,ℓ−1)−1.S_m(k,\ell) = \frac{m}{\gcd(m, \ell - 1)} - 1.Sm​(k,ℓ)=gcd(m,ℓ−1)m​−1.

Here the number counts colourings of an actual integer interval: it is the largest NNN for which [1,N][1,N][1,N] splits into at most kkk classes, none of which contains ℓ\ellℓ elements summing to a member of the same class modulo mmm.

The formula is closed in a strong sense: it produces the value from mmm and ℓ\ellℓ in a fixed number of elementary steps, one gcd, one division and one subtraction, with no search over colourings, no recursion, and no case split on ℓ mod m\ell \bmod mℓmodm. Earlier work in the literature settled individual small moduli by case analysis; this single identity covers every modulus at once in the stated range of kkk.

Preamble
import Definitions.Def_ModularSchurIntegerBridge
import Definitions.Def_ModularSchurPartition
import Mathlib

open ModularSchur
open Finset
variable {m : ℕ}
Formal statement
theorem ModularSchur.schurMod_eq (m k ℓ : ℕ) (hm : 2 ≤ m) (hℓ : 2 ≤ ℓ)
    (hk : m / Nat.gcd m (ℓ - 1) - 1 ≤ k) :
    schurMod m k ℓ = m / Nat.gcd m (ℓ - 1) - 1 := by sorry
Source
McKenna 2026, "Prime-power structure of the stable regime for modular Schur numbers", docs/paper/modular-schur.pdf in the same repository, Theorem 1.2 (main closed form), integer level. Prior art: the paper states that the formula follows from [DSWH2025, Theorem 4 + Corollary 3] by choosing the optimal singleton, extending their coprime case (their Corollary 5) to every gcd and settling the large-kkk regime of their Problem 1, part 5; see D'orville, Sim, Wong and Ho, "Modular generalizations of Schur numbers", Integers 25 (2025) #A62, https://math.colgate.edu/~integers/z62/z62.pdf. Lean source: https://github.com/mysticflounder/modular-schur/blob/eb6098890f05eff39190e6cd8e41fdea53fa81f9/lean/ModularSchur/IntegerBridge.lean#L189-L193
Human review
  • Endorsed by Shuze Chen · Sep 20, 2026

  • Endorsed by mysticflounder · Sep 20, 2026

    Confirmed by the mission captain (proposal self-audit).

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, licensed under Apache 2.0.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTermsJoin SlackJoin Zulip© 2026 Prove2Me