Integer-level -sum-freeness and
DefinitionModularSchurIntegerBridgeThis bundle gives the integer-level form of the definitions, which is how the modular Schur number is stated in the literature.
Fix and . A finite set is -sum-free modulo when no elements of , repetitions allowed, sum to an element of modulo . A family of subsets of is a valid -partition of when the cover , are pairwise disjoint, lie inside , and are each -sum-free modulo . The modular Schur number is
Stating the problem over the integers is what makes 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 ; the accompanying theorem ModularSchur.schurMod_is_greatest shows this cap loses no solutions.
-- 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