Modular Schur numbers: a uniform closed form in the stable-colour regimeResearch Paper
Motivation
A set of integers is sum-free when no two of its members add up to a third. Schur's theorem (1916) says that for every there is a largest interval that can be split into sum-free classes, and the resulting Schur numbers are notoriously hard to compute: was settled only in 2018, by a SAT computation with a machine-checked proof certificate.
Replacing "adds up to" by "adds up to, modulo " gives a family that behaves very differently. Modular Schur numbers were introduced by Chappelon, Revuelta Marchena and Sanz Domínguez, who settled the moduli and proved the universal bound (Electron. J. Combin. 20(2) (2013) #P61). D'orville, Sim, Wong and Ho then closed by residue case analysis and posed the general modulus as an open problem (Integers 25 (2025) #A62, their Problem 1). Each additional modulus had cost a separate case analysis, and the case analysis grew with .
The timeline matters for reading what follows. The 2013 paper supplies the universal cap. The 2025 paper supplies a singleton criterion (its Theorem 4) and a divisibility obstruction (its Corollary 3), and applies the latter only in the coprime case (its Corollary 5). What remained was to optimise that obstruction over every residue rather than only in the coprime case, which is what collapses the whole family to one formula.
Setting
Fix integers , and . A set of integers is -sum-free modulo when there are no and , repetitions among the allowed, with
The repetition clause is not a technicality: a single element can make its whole class unsafe. The modular Schur number is the greatest such that the interval can be partitioned into at most classes, each -sum-free modulo . A partition into such classes is called valid.
Two derived quantities carry the whole story. Write
Then exactly, and by construction. All Lean statements in this mission use these same names.
Formalization targets
Goal: the closed form in the many-colours regime
Closed form here means something precise: the value is produced from and by one gcd, one division and one subtraction, with no search over colourings, no recursion, and no case split on . The statement fixes no constants and no modulus, so it is not invalidated by any later refinement of the threshold in .
The single-colour value
together with the complementary regime , where the value is if and otherwise. The two together give a value for every admissible pair at , and the tree carries that combined formula at the residue level and at the integer level.
Significance
What the results give. One expression replaces an open-ended sequence of per-modulus case analyses. The moduli of the 2013 paper and of the 2025 paper are specialisations, and every remaining modulus is covered at once in the stated range of .
The mechanism is a single self-defeating value. Take copies of : they sum back to modulo , so the lone class already breaks the rule, while every smaller value is safe. That one observation supplies a matching upper and lower bound.
- The upper bound is uniform in . Adding colours never raises the value past , which is what makes the formula stable.
- The lower bound costs colours, one per safe residue. Identifying the least sufficient number of colours is where the subject is still open.
Status of the tree, stated precisely. Everything listed under Formalization targets is both proved and machine-checked.
- 21 theorems and 3 definition bundles, each with a complete Lean proof verified by this platform.
- Axiom-clean: each closure is contained in
{propext, Classical.choice, Quot.sound}. - This mission therefore publishes a finished development rather than an open call on its stated goal.
- What is genuinely open is listed under Difficulty below, and is not part of the verified tree.
Relation to the accompanying paper. The paper states the single-colour value only under
. Three results in the tree go beyond it: the complementary regime
, and the combined formula covering every and , stated once at
the residue level and again at the integer level. Two further results, the coset-cardinality
bounds, are supporting work of the Lean development and are not numbered results of the paper.
Each theorem's source field records which of these it is.
Difficulty
The threshold in is not
The obvious attack on the general modulus is to guess that only singletons can be safe classes. The threshold in would then be exactly , and the problem would close for all at once. That guess is false.
Take and , so and . The two-element set is -sum-free modulo , and three colours then suffice where the singleton count would demand five.
So the least at which the closed form takes hold, written , is not in general. What is known about it:
- Prime moduli. for every with .
- Composite moduli. Bracketed above and below, but not determined.
A correction to the published prime-power formula
Theorem 8 of D'orville, Sim, Wong and Ho gives a three-branch formula at prime-power moduli. Its middle branch is false. The correction is stated here in full because it bears directly on the threshold.
- The counterexample. At , , and that branch gives , while the correct value is .
- Where the proof fails. In the supporting Lemma 2(2) of that paper. The pair , satisfies every hypothesis of that lemma at , , , yet is -sum-free modulo .
- The replacement result.
It is proved from a valuation-layer colouring that consumes classes, together with the universal cap. The hypothesis forces and , so the replacement reaches the goal theorem's value at in place of , and it contradicts the printed middle branch for infinitely many triples .
Status of that correction, stated precisely.
- It is a prose proof in a draft note, listed under Selected references below and readable in full there.
- It is not formalized, and it is not part of this mission's verified tree.
- Nothing in the verified tree depends on it.
- It is recorded here because a reader who compares this mission against the 2025 paper will otherwise meet the contradiction with no explanation. Formalizing it is the subject of a separate mission.
The intermediate regime
For the classes must be simultaneously large and -sum-free, and no formula is known. The value is empirically eventually periodic in for fixed , verified through .
None of these open directions is weakened by the goal theorem, which deliberately assumes enough colours to avoid the question.
Formalization scope
Two levels of statement
Two levels appear in the tree, and the distinction between them is the first thing to fix.
- At the integer level the objects are the integers themselves.
- At the residue level they are their classes modulo , which in Lean is the type
ZMod m: Mathlib's type of residues modulo , a commutative ring with exactly elements for , carrying the reduction map from and the arithmetic that map preserves.
Working in ZMod m turns "adds up to, modulo " into a plain equation instead of a
divisibility side condition, and it makes every colour class a subset of a finite type.
Conventions
The development works residue-by-residue in ZMod m and commits to the following conventions,
all of which are silent in the prose and load-bearing in Lean.
- -tuples are functions
Fin ℓ → ZMod mvalued in the class. This builds in "repetitions allowed" rather than leaving it to a side condition. - Classes are
Finsets, so finiteness is structural. - A valid partition is a structure with four fields: covering, pairwise disjointness, containment in the target set, and -sum-freeness of each class.
- Empty classes are permitted. This is what makes "at most " and "exactly " interchangeable once any colouring exists.
The two numbers, and the cap in their definition
Both a residue-level and an integer-level number are defined, and a reduction theorem proves them equal for every . Bounds are proved on the residue side and quoted on the integer side.
Both are defined with Nat.findGreatest against the bound . That cap is neither an
approximation nor a trivialising choice: a separate theorem shows any admitting a valid
partition satisfies with no hypothesis on , because admits no
valid partition at all. A reader checking for a vacuous formalization should also note that the
goal is an equality, not a bound, so it cannot be satisfied by weakening a hypothesis.
Reusable beyond this mission
- the residue-reduction bridge;
- the singleton criterion;
- the two coset-cardinality bounds, which are pure counting statements about subsets of a cyclic group whose differences lie in a proper subgroup.
Contributions welcome on the open directions named under Difficulty, in particular any lowering of the threshold in toward , and a closed form for at composite moduli.
Selected references
- J. Chappelon, M. P. Revuelta Marchena, M. I. Sanz Domínguez, Modular Schur numbers, Electron. J. Combin. 20(2) (2013) #P61. https://doi.org/10.37236/2374 (also arXiv:1306.5635)
- J. D'orville, K. A. Sim, K. B. Wong, C. K. Ho, Modular generalizations of Schur numbers, Integers 25 (2025) #A62. https://math.colgate.edu/~integers/z62/z62.pdf
- M. J. H. Heule, Schur number five, AAAI 2018. arXiv:1711.08076
- A. McKenna, A correction to a prime-power formula for modular Schur numbers, 2026. Draft note, not submitted for publication. Released in the repository below on 2026-09-20: PDF · Markdown source
- A. McKenna, Prime-power structure of the stable regime for modular Schur numbers, 2026. Lean development and paper: https://github.com/mysticflounder/modular-schur