Valid -partitions and the residue-level
DefinitionModularSchurPartitionThis bundle defines the colouring problem for modular Schur numbers at the level of residues, together with the number it computes.
Fix , and . Given a target set , a family of subsets of is a valid -partition of when the cover , are pairwise disjoint, each lies inside , and each is -sum-free modulo . The residue set under consideration is
the image of the integer interval under reduction modulo . The residue-level modular Schur number is the greatest for which admits a valid -partition.
This is the object every bound in the mission is stated about. The cutoff at is not an approximation: the universal upper bound shows no larger can ever succeed, so searching past is provably pointless.
Formalization Note The greatest such is taken with Nat.findGreatest against the bound , which makes the number total without a separate non-emptiness argument; the definition is noncomputable because the partition predicate is classical.
-- Generated from lean/ModularSchur/Partition.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_ModularSchurBasic
import Mathlib
namespace ModularSchur
open Finset
variable {m : ℕ}
/-- A valid `k`-partition of a residue set `T ⊆ ZMod m` into `ℓ`-sum-free classes. -/
structure IsValidPartition (m ℓ k : ℕ) (T : Finset (ZMod m))
(P : Fin k → Finset (ZMod m)) : Prop where
covers : ∀ x ∈ T, ∃ i, x ∈ P i
disjoint : ∀ i j, i ≠ j → Disjoint (P i) (P j)
subset : ∀ i, P i ⊆ T
sumFree : ∀ i, IsEllSumFree m ℓ (P i)
/-- The residue set of `{1,…,N}` in `ZMod m`. -/
def stableResidues (m N : ℕ) : Finset (ZMod m) :=
(Finset.Ioc 0 N).image ((↑) : ℕ → ZMod m)
open Classical in
/-- `schurModResidue m k ℓ` = greatest `N` such that `stableResidues m N` admits
a valid `k`-partition, bounded above by `m - 1` per Lemma 2.2. -/
noncomputable def schurModResidue (m k ℓ : ℕ) : ℕ :=
Nat.findGreatest
(fun N => ∃ P : Fin k → Finset (ZMod m),
IsValidPartition m ℓ k (stableResidues m N) P) (m - 1)
end ModularSchur