Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Sumfree sets, the Schur degree sdeg⁡\operatorname{sdeg}sdeg, block sums A^\hat AA^ and the number L(n)L(n)L(n) of Eliahou–Revuelta

Definition
ClassicalSchurBasic

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

additive-combinatoricscombinatoricsramsey-theoryschur-degree-block-sumssum-free-sets

This bundle fixes the objects of Eliahou and Revuelta's study of the Schur degree of block-sum sets. It was written for the formalization of L(4)=16L(4) = 16L(4)=16 cited in the source field, whose main theorems use all of its definitions. Other theorems can use only some of them, for example only the sumfree sets and covers of items 1 and 2.

Throughout, N={0,1,2,… }\mathbb{N} = \{0, 1, 2, \dots\}N={0,1,2,…} and N+={1,2,3,… }\mathbb{N}^{+} = \{1, 2, 3, \dots\}N+={1,2,3,…}, and a sequence is a finite list A=(a1,…,aN)A = (a_1, \dots, a_N)A=(a1​,…,aN​) of natural numbers, of length ∣A∣=N|A| = N∣A∣=N.

  1. A set S⊆NS \subseteq \mathbb{N}S⊆N is sumfree (Lean SumFree) if x+y∉Sx + y \notin Sx+y∈/S for all x,y∈Sx, y \in Sx,y∈S. The case x=yx = yx=y is included, so the condition is (S+S)∩S=∅(S + S) \cap S = \emptyset(S+S)∩S=∅.
  2. A set X⊆NX \subseteq \mathbb{N}X⊆N is covered by nnn sumfree sets (Lean CoveredBySumFree X n) if there are sumfree sets C1,…,Cn⊆NC_1, \dots, C_n \subseteq \mathbb{N}C1​,…,Cn​⊆N with X⊆C1∪⋯∪CnX \subseteq C_1 \cup \dots \cup C_nX⊆C1​∪⋯∪Cn​. The sets CiC_iCi​ need not be disjoint and need not lie in XXX.
  3. The Schur degree sdeg⁡(X)\operatorname{sdeg}(X)sdeg(X) of X⊆NX \subseteq \mathbb{N}X⊆N (Lean sdeg) is the least n≥1n \ge 1n≥1 such that XXX is covered by nnn sumfree sets, and ∞\infty∞ if there is no such nnn.
  4. A block of AAA is a nonempty run (ai,ai+1,…,aj)(a_i, a_{i+1}, \dots, a_j)(ai​,ai+1​,…,aj​) of consecutive entries, 1≤i≤j≤N1 \le i \le j \le N1≤i≤j≤N. The set of block sums of AAA (Lean blockSums A) is A^={ ai+ai+1+⋯+aj:1≤i≤j≤N }\hat A = \{\, a_i + a_{i+1} + \dots + a_j : 1 \le i \le j \le N \,\}A^={ai​+ai+1​+⋯+aj​:1≤i≤j≤N}.
  5. The average of AAA (Lean average A) is the rational number μ(A)=(a1+⋯+aN)/N\mu(A) = (a_1 + \dots + a_N)/Nμ(A)=(a1​+⋯+aN​)/N.
  6. For n,L∈Nn, L \in \mathbb{N}n,L∈N, the property Pn(L)P_n(L)Pn​(L) (Lean ERProperty n L) states: every sequence AAA of positive integers with ∣A∣=L|A| = L∣A∣=L and μ(A)≤n\mu(A) \le nμ(A)≤n satisfies sdeg⁡(A^)≥n\operatorname{sdeg}(\hat A) \ge nsdeg(A^)≥n.
  7. The number L(n)L(n)L(n) (Lean erL n) is the least positive integer LLL such that Pn(L)P_n(L)Pn​(L) holds.

In display form, the two central quantities are

sdeg⁡(X)=min⁡{ n≥1:X⊆C1∪⋯∪Cn for some sumfree C1,…,Cn⊆N }∈N∪{∞},\operatorname{sdeg}(X) = \min\{\, n \ge 1 : X \subseteq C_1 \cup \dots \cup C_n \text{ for some sumfree } C_1, \dots, C_n \subseteq \mathbb{N} \,\} \in \mathbb{N} \cup \{\infty\},sdeg(X)=min{n≥1:X⊆C1​∪⋯∪Cn​ for some sumfree C1​,…,Cn​⊆N}∈N∪{∞},

with min⁡∅=∞\min \emptyset = \inftymin∅=∞, and

L(n)=min⁡{ L≥1:every A∈(N+)L with μ(A)≤n has sdeg⁡(A^)≥n }.L(n) = \min\{\, L \ge 1 : \text{every } A \in (\mathbb{N}^{+})^{L} \text{ with } \mu(A) \le n \text{ has } \operatorname{sdeg}(\hat A) \ge n \,\}.L(n)=min{L≥1:every A∈(N+)L with μ(A)≤n has sdeg(A^)≥n}.

Eliahou and Revuelta prove S(n−1)+1≤L(n)≤Rn−1(3)−1S(n-1) + 1 \le L(n) \le R_{n-1}(3) - 1S(n−1)+1≤L(n)≤Rn−1​(3)−1 for n≥2n \ge 2n≥2 (Proposition 5.3), where S(n)S(n)S(n) is the Schur number, the largest NNN such that {1,…,N}\{1, \dots, N\}{1,…,N} can be partitioned into nnn sumfree sets, and Rn(3)R_n(3)Rn​(3) is the multicolour Ramsey number of triangles, and they conjecture L(n)=S(n−1)+1L(n) = S(n-1) + 1L(n)=S(n−1)+1 (Conjecture 5.6).

Formalization Note (1) The ambient set is N\mathbb{N}N, while the paper works in an abelian group GGG (for L(n)L(n)L(n), in the integers). For X⊆NX \subseteq \mathbb{N}X⊆N the least number of sumfree sets that cover XXX does not depend on this choice: a sumfree subset of Z\mathbb{Z}Z meets N\mathbb{N}N in a sumfree set, and a sumfree subset of N\mathbb{N}N is sumfree in Z\mathbb{Z}Z. (2) sdeg⁡\operatorname{sdeg}sdeg takes values in the extended naturals ℕ∞, where ∞\infty∞ is ⊤; it is the infimum of the set of admissible n≥1n \ge 1n≥1, and the infimum of the empty set is ⊤. (3) Sequences are lists of natural numbers, and blocks are nonempty contiguous sublists (List.IsInfix); positivity of the entries is a hypothesis of Pn(L)P_n(L)Pn​(L), not part of the definition of A^\hat AA^. (4) The average is computed in Q\mathbb{Q}Q, and the empty sequence has average 000 by Lean's convention for division by zero; the paper does not define μ\muμ of the empty sequence, and L(n)L(n)L(n) only uses lengths L≥1L \ge 1L≥1. (5) L(n)L(n)L(n) is defined for every n∈Nn \in \mathbb{N}n∈N as an infimum in N\mathbb{N}N, where the empty infimum would be 000. For every n≥1n \ge 1n≥1 the set is nonempty (by the form of Theorem 4.1 of the paper proved in the formalization of L(4)=16L(4) = 16L(4)=16 cited in the source field), so L(n)L(n)L(n) is its least element, and for n≥2n \ge 2n≥2 it is the L(n)L(n)L(n) of the paper, which the paper defines only for n≥2n \ge 2n≥2.

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

namespace ClassicalSchur



/-- A set of naturals is sumfree when it has no `x, y, z` with `x + y = z`;
`x = y` is allowed (ER §2.3: `(S + S) ∩ S = ∅`). -/
def SumFree (S : Set ℕ) : Prop := ∀ x ∈ S, ∀ y ∈ S, x + y ∉ S

/-- `X` is covered by `n` sumfree sets (ER Definition 2.1). -/
def CoveredBySumFree (X : Set ℕ) (n : ℕ) : Prop :=
  ∃ C : Fin n → Set ℕ, (∀ i, SumFree (C i)) ∧ X ⊆ ⋃ i, C i

/-- The Schur degree (ER Definition 2.1): the least `n ≥ 1` such that `X` is
covered by `n` sumfree sets, and `⊤` when there is no such `n`. -/
noncomputable def sdeg (X : Set ℕ) : ℕ∞ :=
  sInf ((fun n : ℕ => (n : ℕ∞)) '' {n | 1 ≤ n ∧ CoveredBySumFree X n})

/-- The block sums `Â` of a sequence `A` (ER Notation 2.2): the sums of the
nonempty runs of consecutive entries of `A`. -/
def blockSums (A : List ℕ) : Set ℕ :=
  {s | ∃ B : List ℕ, B <:+: A ∧ B ≠ [] ∧ B.sum = s}

/-- The average `μ(A)` of a sequence. -/
def average (A : List ℕ) : ℚ := (A.sum : ℚ) / A.length

/-- The property of ER Definition 5.1 at length `L`: every sequence of
positive integers of length `L` and average at most `n` has
`sdeg(Â) ≥ n`. -/
def ERProperty (n L : ℕ) : Prop :=
  ∀ A : List ℕ, A.length = L → (∀ a ∈ A, 0 < a) → average A ≤ n →
    (n : ℕ∞) ≤ sdeg (blockSums A)

/-- `L(n)` of ER Definition 5.1: the least positive integer `L` with
`ERProperty n L`. -/
noncomputable def erL (n : ℕ) : ℕ := sInf {L | 0 < L ∧ ERProperty n L}

end ClassicalSchur
Source
S. Eliahou and M. P. Revuelta, "The Schur degree of additive sets", Discrete Math. 344(5) (2021) 112332, https://doi.org/10.1016/j.disc.2021.112332 (preprint arXiv:2006.01502), §1 and §2.3 (sumfree sets; (X + X) ∩ X = ∅), Definition 2.1 (cover by n sumfree subsets; the Schur degree sdeg), §2.1 and Notation 2.2 (blocks and the block-sum set Â), Definition 5.1 (the average μ(A) and the number L(n)). A. McKenna, "The Schur degree of block sums: L(4) = 16 and L(5) ≥ 49", Zenodo (2026), https://doi.org/10.5281/zenodo.22987189, §2. Lean source: https://github.com/mysticflounder/schur-degree-block-sums/blob/v1.0.1/lean/ClassicalSchur/Basic.lean#L29-L59 (release v1.0.1, doi:10.5281/zenodo.22987688).

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, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me