Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Integer-level ℓ\ellℓ-sum-freeness and Sm(k,ℓ)S_m(k,\ell)Sm​(k,ℓ)

Definition
ModularSchurIntegerBridge

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

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

This bundle gives the integer-level form of the definitions, which is how the modular Schur number is stated in the literature.

Fix m≥2m \ge 2m≥2 and ℓ≥2\ell \ge 2ℓ≥2. A finite set S⊆NS \subseteq \mathbb{N}S⊆N is ℓ\ellℓ-sum-free modulo mmm when no ℓ\ellℓ elements of SSS, repetitions allowed, sum to an element of SSS modulo mmm. A family P0,…,Pk−1P_0, \dots, P_{k-1}P0​,…,Pk−1​ of subsets of N\mathbb{N}N is a valid kkk-partition of [1,N][1,N][1,N] when the PiP_iPi​ cover {1,…,N}\{1, \dots, N\}{1,…,N}, are pairwise disjoint, lie inside {1,…,N}\{1, \dots, N\}{1,…,N}, and are each ℓ\ellℓ-sum-free modulo mmm. The modular Schur number is

Sm(k,ℓ)=max⁡{ N≤m−1:[1,N] admits a valid k-partition }.S_m(k,\ell) = \max \{\, N \le m-1 : [1,N] \text{ admits a valid } k \text{-partition} \,\}.Sm​(k,ℓ)=max{N≤m−1:[1,N] admits a valid k-partition}.

Stating the problem over the integers is what makes Sm(k,ℓ)S_m(k,\ell)Sm​(k,ℓ) comparable with the classical Schur numbers and with the values tabulated in the literature, while the residue form is the one that is convenient to reason with. Keeping both, and proving them equal, is what lets a result proved about residues be quoted as a statement about integers.

Formalization Note As in the residue version the maximum is taken with Nat.findGreatest against m−1m-1m−1; the accompanying theorem ModularSchur.schurMod_is_greatest shows this cap loses no solutions.

Definition code
-- Generated from lean/ModularSchur/IntegerBridge.lean by skeleton
-- subtraction: every declaration except the def-material below is deleted,
-- and project imports are rewritten to their platform Definitions bundles.
import Definitions.Def_ModularSchurPartition
import Mathlib

namespace ModularSchur

open Finset
variable {m : ℕ}

/-- Integer-level `ℓ`-sum-freeness mod `m`: for `S ⊆ ℕ`, no `ℓ`-tuple from `S`
    has sum congruent mod `m` to any `y ∈ S`. -/
def IsSumFreeIntMod (m ℓ : ℕ) (S : Finset ℕ) : Prop :=
  ∀ f : Fin ℓ → ℕ, (∀ i, f i ∈ S) → ∀ y ∈ S, (∑ i, f i) % m ≠ y % m

/-- A valid `k`-partition of `{1,…,N} ⊆ ℕ` into `ℓ`-sum-free-mod-`m` classes. -/
structure IsValidPartitionNat (m ℓ k N : ℕ) (P : Fin k → Finset ℕ) : Prop where
  covers   : ∀ x ∈ Finset.Ioc 0 N, ∃ i, x ∈ P i
  disjoint : ∀ i j, i ≠ j → Disjoint (P i) (P j)
  subset   : ∀ i, P i ⊆ Finset.Ioc 0 N
  sumFree  : ∀ i, IsSumFreeIntMod m ℓ (P i)

open Classical in
/-- Integer-level modular Schur number: greatest `N ≤ m-1` such that `{1,…,N}`
    admits a valid `k`-partition into `ℓ`-sum-free-mod-`m` classes.  This is
    the paper's Definition 1.1, with the `N ≤ m-1` cap from Lemma 2.2 baked in. -/
noncomputable def schurMod (m k ℓ : ℕ) : ℕ :=
  Nat.findGreatest
    (fun N => ∃ P : Fin k → Finset ℕ, IsValidPartitionNat m ℓ k N P) (m - 1)

end ModularSchur
Source
McKenna 2026, "Prime-power structure of the stable regime for modular Schur numbers", docs/paper/modular-schur.pdf in the same repository, Definition 1.1 (integer form), with the N≤m−1N \le m-1N≤m−1 cap of Lemma 2.2. Lean source: https://github.com/mysticflounder/modular-schur/blob/eb6098890f05eff39190e6cd8e41fdea53fa81f9/lean/ModularSchur/IntegerBridge.lean#L39-L45

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