Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

Combinatorics

266 missions · 164 completed

The mathematics of finite and discrete structures — counting the arrangements of a set, deciding when a configuration meeting prescribed constraints can exist, and characterizing the patterns such structures are forced to contain. It encompasses enumerative and extremal combinatorics, graph theory, design theory, and additive combinatorics, with deep ties to algebra, probability, and computer science.

Missions

Open102Completed164All266
🏆Completed
Number Theory·Captain: mysticflounder

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 kkk there is a largest interval [1,N][1,N][1,N] that can be split into kkk sum-free classes, and the resulting Schur numbers S(k)S(k)S(k) are notoriously hard to compute: S(5)=160S(5) = 160S(5)=160 was settled only in 2018, by a SAT computation with a machine-checked proof certificate.

Replacing "adds up to" by "adds up to, modulo mmm" gives a family that behaves very differently. Modular Schur numbers were introduced by Chappelon, Revuelta Marchena and Sanz Domínguez, who settled the moduli m∈{1,2,3}m \in \{1,2,3\}m∈{1,2,3} and proved the universal bound Sm(k,ℓ)≤m−1S_m(k,\ell) \le m-1Sm​(k,ℓ)≤m−1 (Electron. J. Combin. 20(2) (2013) #P61). D'orville, Sim, Wong and Ho then closed m∈{4,5,6,7}m \in \{4,5,6,7\}m∈{4,5,6,7} 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 mmm.

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 gcd⁡(m,ℓ−1)=1\gcd(m,\ell-1)=1gcd(m,ℓ−1)=1 (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 m≥2m \ge 2m≥2, ℓ≥2\ell \ge 2ℓ≥2 and k≥1k \ge 1k≥1. A set SSS of integers is ℓ\ellℓ-sum-free modulo mmm when there are no x1,…,xℓ∈Sx_1, \dots, x_\ell \in Sx1​,…,xℓ​∈S and y∈Sy \in Sy∈S, repetitions among the xix_ixi​ allowed, with

x1+⋯+xℓ≡y(modm).x_1 + \cdots + x_\ell \equiv y \pmod m .x1​+⋯+xℓ​≡y(modm).

The repetition clause is not a technicality: a single element can make its whole class unsafe. The modular Schur number Sm(k,ℓ)S_m(k,\ell)Sm​(k,ℓ) is the greatest N≥0N \ge 0N≥0 such that the interval [1,N][1,N][1,N] can be partitioned into at most kkk classes, each ℓ\ellℓ-sum-free modulo mmm. A partition into such classes is called valid.

Two derived quantities carry the whole story. Write

d=gcd⁡(m,ℓ−1),n=md.d = \gcd(m, \ell - 1), \qquad n = \frac{m}{d} .d=gcd(m,ℓ−1),n=dm​.

Then dn=mdn = mdn=m exactly, and d∣(ℓ−1)d \mid (\ell - 1)d∣(ℓ−1) by construction. All Lean statements in this mission use these same names.

Formalization targets

Goal: the closed form in the many-colours regime

Sm(k,ℓ)=mgcd⁡(m,ℓ−1)−1=n−1for all m≥2, ℓ≥2, k≥n−1.S_m(k,\ell) = \frac{m}{\gcd(m,\ell-1)} - 1 = n - 1 \qquad \text{for all } m \ge 2,\ \ell \ge 2,\ k \ge n-1 .Sm​(k,ℓ)=gcd(m,ℓ−1)m​−1=n−1for all m≥2, ℓ≥2, k≥n−1.

Closed form here means something precise: the value is produced from mmm and ℓ\ellℓ by one gcd, one division and one subtraction, with no search over colourings, no recursion, and no case split on ℓ mod m\ell \bmod mℓmodm. The statement fixes no constants and no modulus, so it is not invalidated by any later refinement of the threshold in kkk.

The single-colour value

Sm(1,ℓ)=min⁡ ⁣(ℓ−1,⌊mℓ⌋)(2≤ℓ≤m),S_m(1,\ell) = \min\!\left(\ell - 1, \left\lfloor \frac{m}{\ell} \right\rfloor\right) \qquad (2 \le \ell \le m),Sm​(1,ℓ)=min(ℓ−1,⌊ℓm​⌋)(2≤ℓ≤m),

together with the complementary regime m<ℓm < \ellm<ℓ, where the value is 000 if ℓ≡1(modm)\ell \equiv 1 \pmod mℓ≡1(modm) and 111 otherwise. The two together give a value for every admissible pair (m,ℓ)(m,\ell)(m,ℓ) at k=1k=1k=1, 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 m∈{1,2,3}m \in \{1,2,3\}m∈{1,2,3} of the 2013 paper and m∈{4,5,6,7}m \in \{4,5,6,7\}m∈{4,5,6,7} of the 2025 paper are specialisations, and every remaining modulus is covered at once in the stated range of kkk.

The mechanism is a single self-defeating value. Take ℓ\ellℓ copies of nnn: they sum back to nnn modulo mmm, so the lone class {n}\{n\}{n} 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 kkk. Adding colours never raises the value past n−1n-1n−1, which is what makes the formula stable.
  • The lower bound costs n−1n-1n−1 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 2≤ℓ≤m2 \le \ell \le m2≤ℓ≤m. Three results in the tree go beyond it: the complementary regime m<ℓm < \ellm<ℓ, and the combined formula covering every m≥2m \ge 2m≥2 and ℓ≥2\ell \ge 2ℓ≥2, 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 kkk is not n−1n-1n−1

The obvious attack on the general modulus is to guess that only singletons can be safe classes. The threshold in kkk would then be exactly n−1n-1n−1, and the problem would close for all kkk at once. That guess is false.

Take m=12m = 12m=12 and ℓ≡11(mod12)\ell \equiv 11 \pmod{12}ℓ≡11(mod12), so d=2d = 2d=2 and n=6n = 6n=6. The two-element set {1,5}\{1,5\}{1,5} is ℓ\ellℓ-sum-free modulo 121212, and three colours then suffice where the singleton count would demand five.

So the least kkk at which the closed form takes hold, written k0(m,ℓ)k_0(m,\ell)k0​(m,ℓ), is not n−1n-1n−1 in general. What is known about it:

  • Prime moduli. k0(p,ℓ)=p−1k_0(p,\ell) = p-1k0​(p,ℓ)=p−1 for every ℓ≥p−1\ell \ge p-1ℓ≥p−1 with ℓ≢1(modp)\ell \not\equiv 1 \pmod pℓ≡1(modp).
  • 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 p=2p = 2p=2, i=3i = 3i=3, k=3k = 3k=3 and ℓ=8\ell = 8ℓ=8 that branch gives S8(3,8)=5S_8(3,8) = 5S8​(3,8)=5, while the correct value is S8(3,8)=7S_8(3,8) = 7S8​(3,8)=7.
  • Where the proof fails. In the supporting Lemma 2(2) of that paper. The pair a=2a = 2a=2, b=6b = 6b=6 satisfies every hypothesis of that lemma at p=2p = 2p=2, i=3i = 3i=3, ℓ=8\ell = 8ℓ=8, yet {2,6}\{2,6\}{2,6} is 888-sum-free modulo 888.
  • The replacement result.
Spi(k,ℓ)=pi−1for p prime, i≥1, ℓ≥2, p∤(ℓ−1), and every k≥i(p−1).S_{p^i}(k,\ell) = p^i - 1 \qquad \text{for } p \text{ prime},\ i \ge 1,\ \ell \ge 2,\ p \nmid (\ell - 1), \text{ and every } k \ge i(p-1) .Spi​(k,ℓ)=pi−1for p prime, i≥1, ℓ≥2, p∤(ℓ−1), and every k≥i(p−1).

It is proved from a valuation-layer colouring that consumes i(p−1)i(p-1)i(p−1) classes, together with the universal cap. The hypothesis p∤(ℓ−1)p \nmid (\ell-1)p∤(ℓ−1) forces d=1d = 1d=1 and n=pin = p^in=pi, so the replacement reaches the goal theorem's value at k≥i(p−1)k \ge i(p-1)k≥i(p−1) in place of k≥pi−1k \ge p^i - 1k≥pi−1, and it contradicts the printed middle branch for infinitely many triples (p,i,ℓ)(p, i, \ell)(p,i,ℓ).

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 1<k<n−11 < k < n-11<k<n−1 the classes must be simultaneously large and ℓ\ellℓ-sum-free, and no formula is known. The value is empirically eventually periodic in ℓ mod m\ell \bmod mℓmodm for fixed kkk, verified through m≤13m \le 13m≤13.

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 1,…,N1, \dots, N1,…,N themselves.
  • At the residue level they are their classes modulo mmm, which in Lean is the type ZMod m: Mathlib's type of residues modulo mmm, a commutative ring with exactly mmm elements for m≥1m \ge 1m≥1, carrying the reduction map from Z\mathbb{Z}Z and the arithmetic that map preserves.

Working in ZMod m turns "adds up to, modulo mmm" 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.

  • ℓ\ellℓ-tuples are functions Fin ℓ → ZMod m valued 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 ℓ\ellℓ-sum-freeness of each class.
  • Empty classes are permitted. This is what makes "at most kkk" and "exactly kkk" 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 m≥2m \ge 2m≥2. Bounds are proved on the residue side and quoted on the integer side.

Both are defined with Nat.findGreatest against the bound m−1m-1m−1. That cap is neither an approximation nor a trivialising choice: a separate theorem shows any NNN admitting a valid partition satisfies N≤Sm(k,ℓ)N \le S_m(k,\ell)N≤Sm​(k,ℓ) with no hypothesis on NNN, because N≥mN \ge mN≥m 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 kkk toward k0k_0k0​, and a closed form for k0k_0k0​ 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
19 thms1 active userReviewed
🏆Completed
Captain: Yuxuan Xu

Magic Squares IV: The Special Classes of Order-Three Magic SquaresResearch Paper

Motivation

The first three missions in this programme settle the ordinary 3×33\times33×3 magic squares end to end: Mission I proved MacMahon's count M3(3e)=2e2+2e+1M_{3}(3e)=2e^{2}+2e+1M3​(3e)=2e2+2e+1, Mission II his semi-magic count H3(t)=3(t+34)+(t+22)H_{3}(t)=3\binom{t+3}{4}+\binom{t+2}{2}H3​(t)=3(4t+3​)+(2t+2​), and Mission III classified the normal squares (Lo Shu uniqueness). All three work with the plain magic condition.

This mission counts the two special classes that are singled out by requiring more than magicness, in the opposite directions one expects:

  • the panmagic (pandiagonal) squares, whose broken diagonals must also have the magic sum — a strengthening so strong that for order three the whole family collapses;
  • the symmetric magic squares, whose array must equal its transpose — a symmetry that only removes a few conditions and leaves a genuine family.

Writing P3(t)P_{3}(t)P3​(t) and S3(t)S_{3}(t)S3​(t) for the two counting functions, the goal is to determine both for every line sum ttt:

P3(t)={1,3∣t0,3∤t,S3(t)={2t3+1,3∣t0,3∤t.P_{3}(t)=\begin{cases}1,&3\mid t\\ 0,&3\nmid t\end{cases}, \qquad S_{3}(t)=\begin{cases}\dfrac{2t}{3}+1,&3\mid t\\[2mm] 0,&3\nmid t\end{cases}.P3​(t)={1,0,​3∣t3∤t​,S3​(t)=⎩⎨⎧​32t​+1,0,​3∣t3∤t​.

Setting

Everything is built on the vocabulary of MagicSquares (Mission I):

  • IsPanMagic — semi-magic, and every broken diagonal in both directions has the line sum, indices read modulo nnn;
  • IsSymmetric — Mij=MjiM_{ij}=M_{ji}Mij​=Mji​;
  • panMagicCount, symmetricMagicCount — the cardinalities of the two filtered finsets of arrays over Fin (t+1), which is lossless because every entry of a square of line sum ttt is at most ttt.

The new definition module MagicSquaresSpecial3 records the two explicit shapes that the proofs produce: constSquare3 e (the array all of whose entries are eee, read over the ambient Fin (3e+1)) and

symmMagic3(e,a)=(a2e−ae2e−aeaea2e−a),\mathrm{symmMagic3}(e,a)=\begin{pmatrix} a & 2e-a & e\\ 2e-a & e & a\\ e & a & 2e-a\end{pmatrix},symmMagic3(e,a)=​a2e−ae​2e−aea​ea2e−a​​,

together with the parameter set symmParamSet e ={0,…,2e}=\{0,\dots,2e\}={0,…,2e} and its cardinality symmParamCount e.

Formalization targets

Goal — the complete count

special_three_count: for every natural number ttt, the pair of equalities displayed above. The proof splits on 3∣t3\mid t3∣t and reduces to four child nodes.

The route

  1. Panmagic collapses to the constant square (pan_three_card). Writing the array as a,b,c;d,m,f;g,h,ia,b,c;d,m,f;g,h,ia,b,c;d,m,f;g,h,i, the twelve line equations form a linear system whose only nonnegative solution is a=b=⋯=i=ea=b=\dots=i=ea=b=⋯=i=e. So P3(3e)=1P_{3}(3e)=1P3​(3e)=1.
  2. Symmetry is classified by a corner (symmetric_magic_three_classify). Symmetry identifies three pairs of entries, leaving five free cells and five line equations; the anti-diagonal 2c+m=3e2c+m=3e2c+m=3e forces c=m=ec=m=ec=m=e, and the rows give M=symmMagic3(e,M00)M=\mathrm{symmMagic3}(e, M_{00})M=symmMagic3(e,M00​).
  3. A bijection onto an interval (symm_three_bij). Sending a symmetric magic square of line sum 3e3e3e to M00M_{00}M00​ is a bijection onto {0,1,…,2e}\{0,1,\dots,2e\}{0,1,…,2e}; hence S3(3e)=2e+1S_{3}(3e)=2e+1S3​(3e)=2e+1.
  4. The divisibility obstruction (pan_three_otherwise, symm_three_otherwise). Both classes consist of magic squares, and an order-three magic square has centre t/3t/3t/3 (center_of_order_three), so 3∤t3\nmid t3∤t forces both counts to vanish.

Significance

The results. The three order-three counts behave completely differently in the same parameter: MacMahon's M3M_{3}M3​ is quadratic, the symmetric count is linear, and the panmagic count is constant. That contrast is the point of the order-three study — order three is small enough to be completely understood, and the special classes show how differently the two natural strengthenings of the magic condition act. It is also exactly what is lost at order four, where no closed form is known for any of the three.

Formalizing them. The mathematical content is elementary, but the two classes require genuinely different proof techniques, which is what makes the mission worth formalizing:

  • For the panmagic case the six broken diagonals together with the rows and columns give a subtraction-free linear system over N\mathbb{N}N, so the uniqueness step is a single omega call. The only work is exposing the twelve equations, which requires reducing the index arithmetic i+ki+ki+k and rev(i)+k\mathrm{rev}(i)+krev(i)+k on Fin 3.
  • For the symmetric case the answer is a family, and the admissibility bound a≤2ea\le 2ea≤2e is a statement about truncated subtraction: the entry 2e−a2e-a2e−a is computed in N\mathbb{N}N, so the row identity a+(2e−a)+e=3ea+(2e-a)+e=3ea+(2e−a)+e=3e is satisfiable precisely for a≤2ea\le 2ea≤2e. Formalizing the bijection therefore needs an honest treatment of that truncation, where the panmagic case needs none.

Difficulty

Truncated subtraction, in the admissibility direction. The classification M = symmMagic3 e (M 0 0) is true for every MMM, without any bound on M00M_{00}M00​; the bound only appears when asking which members of the family are squares of line sum 3e3e3e. Keeping those two statements apart is what makes the bijection proof manageable: classification is a pure omega computation, while admissibility is a one-line argument that a+(2e−a)=2ea+(2e-a)=2ea+(2e−a)=2e forces a≤2ea\le 2ea≤2e.

Finite but not decidable. panMagicCount and symmetricMagicCount are cardinalities of filtered finsets over a function type, so the proofs cannot be decide or norm_num — the platform forbids native_decide in any case. Both counting theorems are therefore stated as Finset.card_bij / card_eq_one arguments over explicit bijections, not as finite evaluations.

Formalization scope

  • The in-scope statements are the two closed forms for all ttt, together with the classification of the symmetric family that the bijection is built on.
  • Parametrization follows MacMahon; the symmetric shape is the diagonal slice c=ec=ec=e of his two-parameter family, which is why the count drops from quadratic to linear.
  • Nothing here re-proves Mission I: the divisibility obstruction is inherited from the already-proved center_of_order_three.
  • Reusable beyond this mission: the order-three classification of symmetric magic squares, the observation that panmagic order-three squares are exactly the constant ones, and the technique of discharging twelve-index linear systems over Fin 3 with a single omega.

Selected references

  • P. A. MacMahon, Combinatory Analysis, Vol. II, Cambridge University Press, 1916.
  • M. Beck, T. Cohen, J. Cuomo and P. Gribelyuk, The number of "magic" squares, cubes and hypercubes, Amer. Math. Monthly 110 (2003), 707--717. https://arxiv.org/abs/math/0201013
  • W. S. Andrews, Magic Squares and Cubes, 2nd ed., Dover, 1960.
  • H. Behforooz, Symmetric and panmagic squares (survey of the symmetry properties of magic squares), and the standard pandiagonal literature.
7 thms1 active userReviewed
🏆Completed
Captain: mysticflounder

Balog-Szemeredi-Gowers theorem over additive energyResearch Paper

Motivation

Additive combinatorics studies what arithmetic structure follows from statistical signals. The Balog–Szemerédi–Gowers theorem is its central regularity statement: a pair of finite sets with large additive energy (many additive quadruples) contains large subsets whose sumset is small. Balog and Szemerédi proved the first version in 1994 using the regularity lemma, which gave a tower-type dependence between the parameters; Gowers obtained a polynomial dependence in 1998. The theorem powers results across the field — from sum-product estimates to the structure of sets with small doubling — and its proof assembles three reusable machines: dependent random choice, the popular-sum graph, and Ruzsa calculus.

Setting

Work in an arbitrary abelian group GGG (Lean: AddCommGroup G). For finite X,Y⊆GX, Y \subseteq GX,Y⊆G, the additive energy E(X,Y)E(X,Y)E(X,Y) counts quadruples (x,x′,y,y′)(x,x',y,y')(x,x′,y,y′) with x+y=x′+y′x + y = x' + y'x+y=x′+y′; the trivial maximum is ∣X∣3|X|^3∣X∣3 when ∣X∣=∣Y∣|X| = |Y|∣X∣=∣Y∣. The sumset X+YX + YX+Y is {x+y}\{x + y\}{x+y}, and the difference set X−YX - YX−Y is defined pointwise. A set has small doubling when ∣X+X∣|X + X|∣X+X∣ is linear in ∣X∣|X|∣X∣. The Lean development uses Finset.addEnergy and Finset.addConvolution from Mathlib.

A bipartite graph here is an edge set EEE of type Finset (G × G) with E⊆A×sBE \subseteq A \times^s BE⊆A×sB, not a Mathlib SimpleGraph; solvers should state graph hypotheses that way. Given such an EEE, the partial sumset A+EBA +_E BA+E​B is {a+b:(a,b)∈E}\{a + b : (a,b) \in E\}{a+b:(a,b)∈E}, following Tao–Vu Definition 2.28.

Target

The mission goal is the two-set (equal-cardinality) form:

E(X,Y)≥η∣X∣3  ⟹  ∃X′⊆X,Y′⊆Y, ∣X′∣,∣Y′∣≥c∣X∣, ∣X′−Y′∣≤C∣X∣.E(X,Y) \ge \eta |X|^3 \implies \exists X' \subseteq X, Y' \subseteq Y,\ |X'|,|Y'| \ge c|X|,\ |X' - Y'| \le C|X|.E(X,Y)≥η∣X∣3⟹∃X′⊆X,Y′⊆Y, ∣X′∣,∣Y′∣≥c∣X∣, ∣X′−Y′∣≤C∣X∣.

This statement is assembled from the sources rather than quoted from them: Tao–Vu Lemma 2.30 supplies the energy-to-graph step, Fox–Sudakov §5.1 (the same theorem as Tao–Vu Theorem 2.29) supplies the graph-level bound, and Ruzsa calculus converts a sumset bound into the difference-set bound above. No cited work states this exact form, and the goal deliberately keeps ccc and CCC existential; the explicit-constant variant is proved separately in the mission with c=η/16c = \eta/16c=η/16.

The four milestones follow the sources' own numbering and are, in dependency order, Fox–Sudakov Lemma 5.1, Fox–Sudakov Lemma 5.2, the Fox–Sudakov §5.1 / Tao–Vu Theorem 2.29 graph bound with explicit constants, and Tao–Vu Lemma 2.30. The first three lie on the goal's proof path; the fourth is the reusable packaging of the energy-to-graph step.

Significance

The result converts a purely statistical hypothesis (many additive quadruples) into genuine algebraic structure (a large subset with a small difference set) with polynomial losses — the step that makes energy methods usable. It is a standard tool behind quantitative Freiman-type arguments.

Formalizing it matters because the constants are the content: the development tracks explicit constants through dependent random choice (graph level c=δ/8c = \delta/8c=δ/8 and C=213K3/δ5+212/δ5C = 2^{13}K^3/\delta^5 + 2^{12}/\delta^5C=213K3/δ5+212/δ5; energy level c0=η/16c_0 = \eta/16c0​=η/16 and C0=213(4/η)3/(η/2)5+212/(η/2)5C_0 = 2^{13}(4/\eta)^3/(\eta/2)^5 + 2^{12}/(\eta/2)^5C0​=213(4/η)3/(η/2)5+212/(η/2)5), which paper proofs often leave implicit. Fox–Sudakov state the application for sets of integers; the formalization is over an arbitrary AddCommGroup, with no further hypothesis on the group. Mathlib at the pinned revision (v4.33.1) contains no BSG statement, so this fills a genuine upstream gap.

Difficulty

The hard step is dependent random choice: sampling a random vertex subset of the popular-sum graph must simultaneously keep many vertices and keep the induced subgraph dense, and the two requirements fight each other. The naive first idea — take the densest neighborhood — loses control of the vertex count; the fix is a two-stage Markov-plus-payoff selection whose density analysis needs the exact path-count lower bound, not just an order estimate.

Two places where the formalization departs from Fox–Sudakov are recorded on the affected statements rather than hidden: the length-three path count admits degenerate paths (the source's a′≠aa' \ne aa′=a and b′≠bb' \ne bb′=b terms are dropped, which weakens the conclusion and is sound for the BSG use), and the density parameter is instantiated at a guaranteed lower bound rather than the exact edge density.

Formalization scope

Sets are Finset G in an AddCommGroup G with DecidableEq; energy is Finset.addEnergy; graphs are edge sets Finset (G × G), with the pointwise sumset and difference operations from open scoped Pointwise. Density hypotheses are stated with explicit real constants. The counting lemmas at the bottom of the development (sum_addConvolution_eq_card_product, path3_count_le_triple_rep_count, restricted_sumset_via_multiplicity) are unconditional; the statements that need them carry the nonemptiness, equal-cardinality and density hypotheses that exclude degenerate zero-energy configurations. Welcome contributions: the single-set polynomial Freiman–Ruzsa consequences, and non-abelian variants.

Selected references

  • A. Balog and E. Szemerédi, A statistical theorem of set addition, Combinatorica 14 (1994), 263–268.
  • W. T. Gowers, A new proof of Szemerédi's theorem for arithmetic progressions of length four, Geom. Funct. Anal. 8 (1998), 529–551.
  • J. Fox and B. Sudakov, Dependent random choice, Random Structures & Algorithms 38 (2011), 68–99 (Lemmas 5.1/5.2 and §5.1 BSG application).
  • T. Tao and V. Vu, Additive Combinatorics, Cambridge Univ. Press (2006), Definition 2.28 (partial sumsets), Theorem 2.29 (BSG, p. 79) and Lemma 2.30 (energy to partial sumset, p. 80).
  • C. Reiher and T. Schoen, Note on the theorem of Balog, Szemerédi, and Gowers, Combinatorica 44 (2024), no. 3, 691–698 (arXiv:2308.10245).
  • I. Ruzsa's inequalities via Mathlib's Finset.pluennecke_ruzsa_inequality_nsmul_add; see G. Petridis, New proofs of Plünnecke-type estimates for product sets in groups, Combinatorica 32 (2012), 721–733 (arXiv:1101.3507).
  • McKenna, Lean formalization (mathlib-only, axiom-clean), lean-formalizations, modules Combinatorics/Additive/BalogSzemerediGowers and BSGEnergyToGraph.
12 thms1 active userReviewed
🏆Completed
Captain: Yuxuan Xu

Magic Squares III: The Complete Classification of Order-Three Magic SquaresResearch Paper

Motivation

The first two missions in this programme counted order-three squares. Mission I proved MacMahon's magic count M3(3e)=2e2+2e+1M_{3}(3e)=2e^{2}+2e+1M3​(3e)=2e2+2e+1 and Mission II his semi-magic count H3(t)=3(t+34)+(t+22)H_{3}(t)=3\binom{t+3}{4}+\binom{t+2}{2}H3​(t)=3(4t+3​)+(2t+2​). What neither does is classify: counting tells you how many squares there are, but not what they look like.

This mission closes that gap for the most classical case of all. A normal magic square of order three is a 3×33\times33×3 array containing each of 1,2,…,91,2,\dots,91,2,…,9 exactly once, whose rows, columns and two main diagonals all sum to the magic constant 151515. The statement to be proved is the uniqueness of the Lo Shu square:

every normal magic square of order three is one of the eight images of (492357816)\begin{pmatrix}4&9&2\\3&5&7\\8&1&6\end{pmatrix}​438​951​276​​ under the symmetry group of the square.

In particular there are exactly 888 of them, and they form a single orbit under the dihedral group D4D_{4}D4​.

Setting

MacMahon's parametrization (already formalized in MagicSquaresParam3) writes every order-three magic square of line sum 3e3e3e as

mkMagic3(e,a,c)=(a3e−a−cce+c−aee+a−c2e−ca+c−e2e−a),\mathrm{mkMagic3}(e,a,c)= \begin{pmatrix} a & 3e-a-c & c\\ e+c-a & e & e+a-c\\ 2e-c & a+c-e & 2e-a \end{pmatrix},mkMagic3(e,a,c)=​ae+c−a2e−c​3e−a−cea+c−e​ce+a−c2e−a​​,

with (a,c)(a,c)(a,c) ranging over the finite admissible set paramSet e. For a normal square the magic constant is 151515, so e=5e=5e=5 and the centre entry is 555.

Normality (IsNormal) means every entry lies in [1,9][1,9][1,9] and the nine entries are pairwise distinct — equivalently, they are a permutation of 1,…,91,\dots,91,…,9.

Formalization targets

Goal — Lo Shu uniqueness

\\#\\{(a,c)\in \\mathrm{paramSet}\\ 5 : \\mathrm{mkMagic3}(5,a,c)\\ \\text{is normal}\\} = 8,

together with the identification of those eight parameter pairs. By the bijection magic_three_param_bij this is exactly the statement that there are eight normal magic squares of order three, i.e. that Lo Shu is unique up to the symmetry group of the square.

The route

  1. Normality bounds the parameters. If mkMagic3(5,a,c)\mathrm{mkMagic3}(5,a,c)mkMagic3(5,a,c) is normal then 1leale91\\le a\\le 91leale9 and 1lecle91\\le c\\le 91lecle9, because aaa and ccc are corner entries. This reduces the classification to a finite search over 818181 pairs.
  2. Classification (magic_three_normal_classify). Within that range, mkMagic3(5,a,c)\mathrm{mkMagic3}(5,a,c)mkMagic3(5,a,c) is normal exactly when (a,c)(a,c)(a,c) is one of
(2,4),(2,6),(4,2),(4,8),(6,2),(6,8),(8,4),(8,6).\\{(2,4),(2,6),(4,2),(4,8),(6,2),(6,8),(8,4),(8,6)\\}.(2,4),(2,6),(4,2),(4,8),(6,2),(6,8),(8,4),(8,6).

The eight surviving pairs are precisely those with a,ca,ca,c distinct corners of the Lo Shu square; the excluded ones are those with a+c=10a+c=10a+c=10, for which the (2,1)(2,1)(2,1) entry a+c−5a+c-5a+c−5 collides with the centre 555. 3. Converse (magic_three_normal_converse). Each of the eight pairs really does give a normal square.

Significance

The result itself. The uniqueness of Lo Shu is the oldest non-trivial classification in combinatorics — it is the order-three case of the classification problem for magic squares, and the reason n=3n=3n=3 is special: for n=4n=4n=4 there are 880880880 normal squares (up to symmetry) and for n≥5n\ge 5n≥5 no classification is known. Formalizing it shows that the counting machinery of Missions I and II can be turned around and used as a classification tool: the parametrization plus a finite verification give the complete list, not just the cardinality.

Formalizing it. The whole proof is a finite case check over 818181 parameter pairs, so the mathematical content is small and the formalization difficulty is concentrated in making the finiteness usable. Two things have to be arranged before automation can see the problem:

  • IsNormal is stated with a Function.Injective, which is not decidable as stated; it must first be rewritten into an explicit conjunction of entrywise bounds and pairwise inequalities over Fin 3.
  • The quantifiers over Fin 3 do not unfold by simp alone; one needs Fin.forall_fin_succ to expand them before norm_num can decide the 818181 resulting ground instances.

Difficulty

Finiteness must be manufactured. Nothing in IsNormal mentions a bound on aaa or ccc, so the first step is to derive 1≤a,c≤91\le a,c\le 91≤a,c≤9 from the entrywise bounds of normality. Skipping it leaves an infinite search that interval_cases cannot start.

Truncated subtraction. The parametrization is written over N\mathbb{N}N, so entries such as a+c−5a+c-5a+c−5 and 15−a−c15-a-c15−a−c truncate at zero. Every ground instance must be evaluated with the truncation in place — which is why the classification is carried out by evaluating the actual entries rather than by manipulating symbolic inequalities.

Formalization scope

  • Normal means: entries in [1,n2][1,n^{2}][1,n2] and pairwise distinct (IsNormal).
  • The classification is over MacMahon parameters, so it inherits the parametrization of MagicSquaresParam3 and the bijection of Mission I.
  • Trivializing formalizations are ruled out: the goal is not a declaration that some finite set has eight elements, but a derived classification — normality must be characterized by an explicit list of parameter pairs.
  • Reusable beyond this mission: the decidable reformulation of IsNormal for Fin 3 (and the Fin.forall_fin_succ technique for unfolding finite quantifiers), the list of the eight Lo Shu parameters, and the order-three classification itself.

Selected references

  • P. A. MacMahon, Combinatory Analysis, Vol. II, Cambridge University Press, 1916.
  • M. Beck, T. Cohen, J. Cuomo and P. Gribelyuk, The number of "magic" squares, cubes and hypercubes, Amer. Math. Monthly 110 (2003), 707--717. https://arxiv.org/abs/math/0201013
  • W. S. Andrews, Magic Squares and Cubes, 2nd ed., Dover, 1960 (the classical enumeration for n=4n=4n=4).
7 thms1 active userReviewed
🏆Completed
OptimizationTheoretical Computer Science·Captain: moutei

Primal-Dual Online Algorithms III: Set-Cover Approximation via CertificatesTextbook

Motivation

Set cover is the standard worked example of the primal-dual method, and Chapter 2 of Buchbinder's thesis uses it that way: it is where the machinery of §2.1 is first turned on a concrete NP-hard problem. Two analyses appear. The greedy algorithm, analysed by dual fitting, buys the set with the best cost-per-newly-covered-element ratio and charges the price to the elements it covers; the resulting element prices form an infeasible dual that becomes feasible after scaling by HnH_nHn​. The primal-dual algorithm instead raises the price of an uncovered element until some set's constraint goes tight, buys that set, and repeats; the resulting dual is feasible, and each bought set is paid for by elements of frequency at most fff, giving an fff-approximation.

Both analyses have the same shape, and it is the shape that matters for the rest of the series: the algorithm never sees the optimum. It maintains a dual solution, and the approximation ratio falls out of comparing the primal it built against the dual it accumulated.

Setting

An instance consists of a finite type EEE of elements, a finite type SSS indexing available sets, an assignment s↦As⊆Es \mapsto A_s \subseteq Es↦As​⊆E, and a nonnegative cost c:S→Rc : S \to \mathbb{R}c:S→R. Every element is assumed to lie in at least one available set; the source leaves this implicit, and without it no cover exists and the approximation statements are vacuous. The covering LP and its packing dual are

(P)min⁡∑scsxs  s.t. ∑s:e∈Asxs ≥ 1  (∀e∈E),x≥0,(P)\quad \min \sum_{s} c_s x_s \ \text{ s.t. } \sum_{s : e \in A_s} x_s \ \ge\ 1 \ \ (\forall e \in E), \quad x \ge 0,(P)mins∑​cs​xs​  s.t. s:e∈As​∑​xs​ ≥ 1  (∀e∈E),x≥0, (D)max⁡∑eye  s.t. ∑e∈Asye ≤ cs  (∀s∈S),y≥0.(D)\quad \max \sum_{e} y_e \ \text{ s.t. } \sum_{e \in A_s} y_e \ \le\ c_s \ \ (\forall s \in S), \quad y \ge 0.(D)maxe∑​ye​  s.t. e∈As​∑​ye​ ≤ cs​  (∀s∈S),y≥0.

The frequency of an element is the number of sets containing it, and fff denotes the maximum frequency over all elements.

The two standing assumptions — nonnegative costs, and every element lying in some available set — are carried by a bundled SetCoverInstance, not passed as loose hypotheses. Every source-facing statement in the mission takes such an instance and reads those facts off its fields, so none of them can be instantiated at data violating either. The two indicator lemmas are the exceptions and are labelled as generalized assisting results: one has no cost function in scope at all, and the other's hypothesis that a given CCC covers is strictly stronger than coverability of the family.

Costs are permitted to be zero and the ground type is permitted to be empty. No Nonempty E hypothesis appears anywhere; when EEE is empty, f=0f = 0f=0 and the fff-approximation bound reads cost(C)≤0\mathrm{cost}(C) \le 0cost(C)≤0, which the certificate's tightness clause forces to be 0≤00 \le 00≤0 rather than anything false.

Formalization targets

The results are stated about certificates, not about executable algorithms. This is the central modelling decision of the mission and it is deliberate: the mathematical content of the source's proofs is entirely a statement about the invariants the output satisfies, and separating that from the question of whether a particular procedure produces such output keeps each half provable on its own.

A primal-dual certificate is a pair (C,y)(C, y)(C,y) where C⊆SC \subseteq SC⊆S covers EEE, yyy is dual-feasible, and every s∈Cs \in Cs∈C has a tight dual constraint, ∑e∈Asye=cs\sum_{e \in A_s} y_e = c_s∑e∈As​​ye​=cs​.

Goal — the primal-dual fff-approximation

For any primal-dual certificate (C,y)(C,y)(C,y) and any fractional cover xxx,

∑s∈Ccs ≤ f⋅∑s∈Scsxs.\sum_{s \in C} c_s \ \le\ f \cdot \sum_{s \in S} c_s x_s .s∈C∑​cs​ ≤ f⋅s∈S∑​cs​xs​.

Since this holds against every fractional cover, it holds in particular against an optimal one, so the cover CCC costs at most fff times the fractional optimum and a fortiori at most fff times the integral optimum.

The double-counting step

The one substantive step of the goal is split out as its own target: for a primal-dual certificate,

∑s∈Ccs ≤ f⋅∑e∈Eye.\sum_{s \in C} c_s \ \le\ f \cdot \sum_{e \in E} y_e .s∈C∑​cs​ ≤ f⋅e∈E∑​ye​.

Tightness rewrites the cover's cost as a double sum over chosen sets and their elements; exchanging the order groups it by element, each charged at most fff times. With this and weak duality, the goal is two lines.

The greedy bound

A greedy certificate at ratio ρ\rhoρ is a cover CCC and a nonnegative yyy with ∑s∈Ccs=∑eye\sum_{s \in C} c_s = \sum_{e} y_e∑s∈C​cs​=∑e​ye​ and ∑e∈Asye≤ρ cs\sum_{e \in A_s} y_e \le \rho\, c_s∑e∈As​​ye​≤ρcs​ for every sss. For such a certificate and any fractional cover xxx,

∑s∈Ccs ≤ ρ⋅∑scsxs.\sum_{s \in C} c_s \ \le\ \rho \cdot \sum_{s} c_s x_s .s∈C∑​cs​ ≤ ρ⋅s∑​cs​xs​.

Instantiating ρ=Hn\rho = H_nρ=Hn​ is what recovers the source's greedy guarantee; the harmonic bound itself is already in Mathlib.

Set-cover weak duality and LP attainment

Every dual packing is bounded by every fractional cover, ∑eye≤∑scsxs\sum_e y_e \le \sum_s c_s x_s∑e​ye​≤∑s​cs​xs​; the fractional optimum is at most the integral optimum; and both optima are attained, not merely bounded below. Attainment of the fractional optimum is a genuine linear-programming fact and is the hardest supporting item in the mission.

Significance

This is where the series first converts a dual-feasibility invariant into an approximation ratio on a concrete combinatorial problem, and the two certificate predicates are reused verbatim by the online covering missions later in the series. Set cover approximation has, as far as we can determine, no prior formalization in Mathlib or in any public Lean library: there is no set-cover problem statement, no greedy analysis, and no fff-approximation result to build on.

Difficulty

The two certificate bounds are finite-summation arguments of moderate length — the work is in a double-counting step that reindexes a sum over chosen sets into a sum over elements, weighted by frequency. Attainment of the fractional optimum is different in kind: it needs a compactness or vertex argument about the covering polytope and is the item most likely to need real work. Zero-cost sets are permitted throughout, so any later algorithm definition that divides by a cost must handle that case explicitly.

Formalization scope

Definitions cover §2.2 of the source, excluding §2.2.2 (randomized rounding), which is deferred to a separate mission because its expected-cost and failure-probability analysis is measure-theoretic and shares no infrastructure with the deterministic results.

Two theorems are not in this mission: that the greedy algorithm produces a greedy certificate, and that the primal-dual algorithm produces a primal-dual certificate. Those require defining the algorithms and proving termination and coverage, and are planned as a second wave. Until that wave lands, the source's Theorems 2.4 and 2.6 should not be described as fully formalized — what this mission establishes is the certificate-to-ratio half of each.

Selected references

  • Niv Buchbinder, Designing Competitive Online Algorithms via a Primal-Dual Approach, PhD thesis, Tel Aviv University, 2008, §2.2, pp. 10–14. https://www.tau.ac.il/~nivb/download/phd-thsis.pdf
  • Vijay V. Vazirani, Approximation Algorithms, Springer, 2001, Chapters 2 and 15 — the standard treatment of the greedy and primal-dual set-cover analyses.
10 thms1 active userReviewed
🏆Completed
Captain: Yuxuan Xu

Magic Squares II: MacMahon's Enumeration of Order-Three Semi-Magic SquaresResearch Paper

Motivation

This is the second mission in the magic-squares formalization programme, and it takes up the case the first one deliberately left open.

Counting semi-magic squares — arrays of nonnegative integers whose rows and columns all share a common line sum, with the diagonals unconstrained — is the "honest" version of the enumeration problem. For order three the magic count M3(t)M_{3}(t)M3​(t) (mission I) is only a quasi-polynomial: it vanishes unless 3∣t3\mid t3∣t and equals 2e2+2e+12e^{2}+2e+12e2+2e+1 on t=3et=3et=3e. The semi-magic count H3(t)H_{3}(t)H3​(t) has no such periodicity. MacMahon computed it in 1915:

H3(t)  =  3(t+34)+(t+22).H_{3}(t)\;=\;3\binom{t+3}{4}+\binom{t+2}{2}.H3​(t)=3(4t+3​)+(2t+2​).

It is an honest polynomial in ttt of degree 4=(3−1)24=(3-1)^{2}4=(3−1)2, and that degree is not an accident: Ehrhart and Stanley proved that for every order nnn the function Hn(t)H_{n}(t)Hn​(t) is a polynomial of degree (n−1)2(n-1)^{2}(n−1)2 satisfying the reciprocity law Hn(−n−t)=(−1)n−1Hn(t)H_{n}(-n-t)=(-1)^{n-1}H_{n}(t)Hn​(−n−t)=(−1)n−1Hn​(t). The order-three formula above is the smallest nontrivial instance of that theorem, and the only one small enough that every step of the derivation can still be exhibited explicitly.

So this mission is the natural companion to mission I: same objects, same platform vocabulary, but the counting step is genuinely harder — the parameter space is four-dimensional rather than two, and the parametrization is not injective until it is normalized.

Setting

Fix nnn and a line sum ttt. A square of order nnn is an n×nn\times nn×n array MMM of nonnegative integers.

  • MMM is semi-magic with line sum ttt if every row and every column sums to ttt. No condition is imposed on the two diagonals, and entries need not be distinct.
  • Hn(t)H_{n}(t)Hn​(t) is the number of such squares. Every entry is at most ttt, so Hn(t)H_{n}(t)Hn​(t) is the cardinality of a finite set.

For n=3n=3n=3 the whole family is governed by the six permutation matrices. Split them into the three even ones — the identity and the two 333-cycles — whose supports are the transversals

D={00,11,22},E={01,12,20},F={02,10,21},D=\{00,11,22\},\qquad E=\{01,12,20\},\qquad F=\{02,10,21\},D={00,11,22},E={01,12,20},F={02,10,21},

and the three odd ones — the transpositions — with supports

A={00,12,21},B={02,11,20},C={01,10,22}.A=\{00,12,21\},\qquad B=\{02,11,20\},\qquad C=\{01,10,22\}.A={00,12,21},B={02,11,20},C={01,10,22}.

Adding them with multiplicities u,v,wu,v,wu,v,w (even) and x,y,zx,y,zx,y,z (odd) gives

M=(u+xv+zw+yw+zu+yv+xv+yw+xu+z),M=\begin{pmatrix} u+x & v+z & w+y\\ w+z & u+y & v+x\\ v+y & w+x & u+z\end{pmatrix},M=​u+xw+zv+y​v+zu+yw+x​w+yv+xu+z​​,

whose six line sums all equal u+v+w+x+y+zu+v+w+x+y+zu+v+w+x+y+z; so this is a semi-magic square of line sum ttt whenever the multiplicities sum to ttt.

Formalization targets

Goal — MacMahon's semi-magic count

H3(t)  =  3(t+34)+(t+22)for every t≥0.H_{3}(t)\;=\;3\binom{t+3}{4}+\binom{t+2}{2}\qquad\text{for every }t\ge 0 .H3​(t)=3(4t+3​)+(2t+2​)for every t≥0.

This is the goal because it is the weakest statement that still pins down the answer: it asserts the shape of H3H_{3}H3​ without naming the parametrization, and it survives verbatim as the n=3n=3n=3 case of Stanley's theorem that HnH_{n}Hn​ is a polynomial of degree (n−1)2(n-1)^{2}(n−1)2.

The route

  1. Canonical decomposition (sm3_canonical). Every 3×33\times33×3 semi-magic square arises from the display above, and the representation becomes unique after normalizing: put u=min⁡Du=\min Du=minD, v=min⁡Ev=\min Ev=minE, w=min⁡Fw=\min Fw=minF, subtract the corresponding even permutation matrices, and the residual odd multiplicities satisfy min⁡(x,y,z)=0\min(x,y,z)=0min(x,y,z)=0. The normalization is necessary — without it the single relation
D+E+F=A+B+C  (=J)D+E+F=A+B+C\;(=J)D+E+F=A+B+C(=J)

identifies distinct 666-tuples — and it is exactly what makes the count a partition rather than an inclusion–exclusion. 2. Bijection (sm3_bij). The map from normalized coefficient vectors to semi-magic squares is a bijection, so H3(t)=sm3Count(t)H_{3}(t)=\mathrm{sm3Count}(t)H3​(t)=sm3Count(t). 3. Stars and bars (comps_card). The number of kkk-tuples of nonnegative integers summing to nnn is (n+k−1n)\binom{n+k-1}{n}(nn+k−1​); the case k=5k=5k=5 is what the count needs. 4. Evaluating the parameter count (sm3_params_card). Partitioning the normalized vectors according to the first zero among (x,y,z)(x,y,z)(x,y,z) writes sm3Count(t)\mathrm{sm3Count}(t)sm3Count(t) as

(t+44)+(t+34)+(t+24),\binom{t+4}{4}+\binom{t+3}{4}+\binom{t+2}{4},(4t+4​)+(4t+3​)+(4t+2​),

which collapses to 3(t+34)+(t+22)3\binom{t+3}{4}+\binom{t+2}{2}3(4t+3​)+(2t+2​) by two applications of Pascal's identity.

Significance

The result itself. H3H_{3}H3​ is the n=3n=3n=3 case of a theorem that launched a subject: Stanley's proof that Hn(t)H_{n}(t)Hn​(t) counts lattice points in the Birkhoff polytope t⋅Bnt\cdot B_{n}t⋅Bn​ makes HnH_{n}Hn​ an Ehrhart polynomial, and the order-three formula is the first nontrivial value of it. Beck, Cohen, Cuomo and Gribelyuk (Amer. Math. Monthly 110 (2003), 707--717) revisited exactly this computation on the way to their quasi-polynomial theorem for the magic counts, and Beck and Zaslavsky later pushed the same technique to the panmagic and symmetric refinements. Getting H3H_{3}H3​ machine-checked therefore validates the whole hierarchy at its base.

Formalizing it. Nothing here is open; the mathematics is a century old. What is missing is the formalized artifact, and the difficulty is concentrated in two places that are formalization difficulties rather than mathematical ones.

First, surjectivity of the permutation-matrix parametrization. The usual proof quotes Birkhoff–von Neumann, which in turn needs Hall's marriage theorem. For order three one can instead do it by hand: subtract the three even transversal minima and show that the residual satisfies M01=M10M_{01}=M_{10}M01​=M10​. That last step is a six-case argument in linear arithmetic — if b=M01>c=M10b=M_{01}>c=M_{10}b=M01​>c=M10​ then each of the three ways for the transversal EEE to have minimum zero forces c≥bc\ge bc≥b — and it is precisely the kind of step that is invisible on paper and must be made explicit in a proof assistant.

Second, the counting step. The parameter set is a filtered finset of functions Fin 6 → Fin (t+1), while the formula is stated with binomial coefficients over N\mathbb{N}N. Connecting them requires stars-and-bars, proved from scratch (by induction on the number of parts plus the hockey-stick identity), because the available library results count sub-multisets rather than compositions. And the final collapse to MacMahon's form is a chain of Pascal identities that must be applied in the right order to stay inside N\mathbb{N}N, where subtraction is truncated.

Difficulty

Two traps deserve to be named.

Uniqueness needs the normalization. The representation by six multiplicities is not injective: J=D+E+F=A+B+CJ=D+E+F=A+B+CJ=D+E+F=A+B+C. Any formalization that counts 666-tuples directly will overcount, and the correction is not a subtraction but a choice of canonical representative. Deciding "first zero among (x,y,z)(x,y,z)(x,y,z)" is what turns the count into a genuine partition.

Truncated subtraction. The decomposition is expressed over N\mathbb{N}N, so every identity — in particular the recovery of the multiplicities from a square — must be stated with the admissibility inequalities as explicit hypotheses. A truncated subtraction is only correct because normalization forbids the truncation, and that side condition has to be discharged rather than assumed.

Formalization scope

  • Squares are indexed by Fin n; semiMagicCount n t is the cardinality of a finset of arrays over Fin (t+1) — lossless, since every entry is at most ttt.
  • The parametrization and its normalization are defined over N\mathbb{N}N with truncated subtraction where necessary.
  • Trivializing formalizations are ruled out. The goal is not a statement about a hardcoded small ttt, nor about a finset declared to have the right cardinality: the count must be derived, by an explicit bijection followed by an explicit evaluation of a finite sum.
  • Reusable beyond this mission: the canonical decomposition of 3×33\times33×3 semi-magic squares (equivalently, the toric description of the order-three Birkhoff polytope with its single relation), the stars-and-bars lemma for compositions into any number of parts, and the order-three counts themselves.

Selected references

  • P. A. MacMahon, Combinatory Analysis, Vol. II, Cambridge University Press, 1916 (the H3H_3H3​ formula dates to his 1915 work).
  • M. Beck, T. Cohen, J. Cuomo and P. Gribelyuk, The number of "magic" squares, cubes and hypercubes, Amer. Math. Monthly 110 (2003), 707--717. https://arxiv.org/abs/math/0201013
  • M. Beck and T. Zaslavsky, Six little squares and how their numbers grow, J. Combin. Theory Ser. A 113 (2006). https://arxiv.org/abs/math/0502370
  • R. P. Stanley, Enumerative Combinatorics, Vol. I, 2nd ed., Cambridge University Press, 2012 (Ehrhart theory and reciprocity for HnH_nHn​).
9 thms1 active userReviewed
🏆Completed
Captain: Yuxuan Xu

Magic Squares I: MacMahon's Enumeration of Order-Three Magic SquaresResearch Paper

Motivation

Counting magic squares — arrays of nonnegative integers whose rows, columns and two main diagonals all share a common line sum — is one of the oldest problems in enumerative combinatorics, and the testing ground on which the general theory was built. MacMahon computed the order-three count in 1915 by hand; sixty years later Stanley, and then Beck, Cohen, Cuomo and Gribelyuk (Amer. Math. Monthly 110 (2003), 707--717), showed that for general order nnn the counting functions are quasi-polynomials in the line sum, by identifying them with Ehrhart quasi-polynomials of rational polytopes. The order-three case is the oldest nontrivial instance of that theory and the one where every step can still be checked by hand.

The subject therefore has a curious status: the enumerative answer for n=3n=3n=3 has been known for over a century, and the structural facts behind it (a 3×33\times33×3 magic square is determined by two corner entries; opposite cells sum to twice the centre) are folklore — but none of it has a machine-checked proof. This mission formalizes the classical derivation end to end.

Setting

Fix an order nnn and a type α\alphaα of entries. A square of order nnn is an n×nn\times nn×n array MMM with entries in α\alphaα; its row sums, column sums, and the two diagonal sums (main and anti-diagonal) are the sums of the entries along those lines.

  • MMM is semi-magic with line sum sss if every row and every column sums to sss.
  • MMM is magic with line sum sss if in addition both main diagonals sum to sss.
  • MMM is panmagic (pandiagonal) if every broken diagonal, in both directions, also sums to sss.

No distinctness of entries is required. Let Hn(t)H_n(t)Hn​(t) denote the number of semi-magic and Mn(t)M_n(t)Mn​(t) the number of magic squares of order nnn with nonnegative integer entries and line sum ttt. Every entry of such a square is at most ttt, so these are finite counts.

For n=3n=3n=3 the whole family is parametrized. If MMM has line sum 3e3e3e then the centre cell equals eee, and writing a=M00a=M_{00}a=M00​ and c=M02c=M_{02}c=M02​ the eight line identities force

M=(a3e−a−cce+c−aee+a−c2e−ca+c−e2e−a).M=\begin{pmatrix} a & 3e-a-c & c\\ e+c-a & e & e+a-c\\ 2e-c & a+c-e & 2e-a \end{pmatrix}.M=​ae+c−a2e−c​3e−a−cea+c−e​ce+a−c2e−a​​.

All nine entries are nonnegative exactly when

e≤a+c≤3e,a≤e+c,c≤e+a,e\le a+c\le 3e,\qquad a\le e+c,\qquad c\le e+a,e≤a+c≤3e,a≤e+c,c≤e+a,

and substituting p=a−ep=a-ep=a−e, q=c−eq=c-eq=c−e turns these into ∣p∣+∣q∣≤e|p|+|q|\le e∣p∣+∣q∣≤e: the ℓ1\ell_1ℓ1​ ball of radius eee in Z2\mathbb{Z}^2Z2.

Formalization targets

Goal — MacMahon's count

M3(3e)  =  2e2+2e+1,M_{3}(3e)\;=\;2e^{2}+2e+1 ,M3​(3e)=2e2+2e+1,

together with the companion vanishing M3(t)=0M_3(t)=0M3​(t)=0 when 3∤t3\nmid t3∤t. This is the count of 3×33\times33×3 magic squares of line sum 3e3e3e with nonnegative integer entries (entries need not be distinct). It is the goal because it is the weakest stable statement: it asserts only the shape of the answer, not the intermediate parametrization, and it survives verbatim as the n=3n=3n=3 case of the general quasi-polynomial theorem.

Stronger — the parametrization itself

That the map M↦(M00,M02)M\mapsto(M_{00},M_{02})M↦(M00​,M02​) is a bijection from the 3×33\times33×3 magic squares of line sum 3e3e3e onto the admissible parameter pairs, and that the latter are counted by the ℓ1\ell_1ℓ1​-ball cardinality. This is the route the mission actually takes; the count is its corollary.

Further — semi-magic counts

H3(t)H_3(t)H3​(t), the analogous count for semi-magic squares, is a genuinely different and harder quasi-polynomial. It is listed as a stretch target, not a milestone.

Significance

The result itself. MacMahon's formula is the base case of the Ehrhart-theory reading of magic-square enumeration; Beck--Cohen--Cuomo--Gribelyuk's quasi-polynomial theorem for general nnn degenerates to it at n=3n=3n=3, so it is the sanity check any generalization must pass. The parametrization behind it is what makes the "how many" question finite-dimensional at all: it reduces a search over t9t^9t9 arrays to a count of lattice points in a two-dimensional ball. Downstream, the same parametrization governs the classification of normal 3×33\times33×3 magic squares (the Lo Shu square and its symmetries) and the associativity identity Mij+M2−i,2−j=2M11M_{ij}+M_{2-i,2-j}=2M_{11}Mij​+M2−i,2−j​=2M11​.

Formalizing it. The mathematics is classical and proved; nothing here is open. What is missing is the formalized artifact. The order-three structural lemmas — the centre identity, the opposite-cell identity, and the two directions of the parametrization — are already machine-checked on this platform. The remaining work is the counting step: exhibiting a concrete bijection between two finsets whose elements live in different types (arrays over Fin (3e+1) versus pairs of naturals) and evaluating a finite sum. That is where the formalization, not the mathematics, is hard.

Difficulty

The obvious attack — "each magic square is determined by (a,c)(a,c)(a,c), so just count the pairs" — fails at exactly one point, and it is not a mathematical point. The counting function M3M_3M3​ is defined as the cardinality of a finset of arrays with entries in Fin (3e+1) (a finite type, so that Finset.univ exists), whereas the parametrization lives over N\mathbb{N}N. Proving the counts agree therefore requires a honest Finset.card_bij in both directions:

  • forward, extract (M00,M02)(M_{00},M_{02})(M00​,M02​) from an array and show the pair is admissible;
  • backward, build mkMagic3 from an admissible pair, coerce every entry into Fin (3e+1) using the bound Mij≤2e≤3eM_{ij}\le 2e\le 3eMij​≤2e≤3e, and show the round trip is the identity.

Neither direction is deep, but the coercions are unforgiving: a truncated subtraction in mkMagic3 is only correct because admissibility forbids the truncation, and that side condition must be discharged explicitly rather than assumed. The second difficulty is the cardinality of the ℓ1\ell_1ℓ1​ ball: the identification ∣p+q∣≤e ∧ ∣p−q∣≤e ⟺ ∣p∣+∣q∣≤e|p+q|\le e\ \wedge\ |p-q|\le e\ \Longleftrightarrow\ |p|+|q|\le e∣p+q∣≤e ∧ ∣p−q∣≤e ⟺ ∣p∣+∣q∣≤e needs the elementary identity max⁡(∣p+q∣,∣p−q∣)=∣p∣+∣q∣\max(|p+q|,|p-q|)=|p|+|q|max(∣p+q∣,∣p−q∣)=∣p∣+∣q∣, after which the count is 1+4∑k=1ek=2e2+2e+11+4\sum_{k=1}^e k = 2e^2+2e+11+4∑k=1e​k=2e2+2e+1.

Formalization scope

  • Entries are indexed by Fin n; the anti-diagonal uses Fin.rev, and broken diagonals use addition modulo nnn. Counting functions are cardinalities of finsets of arrays over Fin (t+1) — lossless, since every entry is at most ttt — and return natural numbers.
  • mkMagic3 is defined over N\mathbb{N}N with truncated subtraction. Every row/column/diagonal identity therefore carries the admissibility inequalities as explicit hypotheses; no identity is asserted unconditionally.
  • Trivializing formalizations are ruled out: the goal is not a statement about a hardcoded small eee, nor about a finset declared to have the right cardinality. The count must be derived.
  • Reusable beyond this mission: the core vocabulary (Square, IsSemiMagic, IsMagic, IsPanMagic, IsAssociative, IsNormal, magicConstant, and the four counting functions Hn,Mn,Pn,SnH_n,M_n,P_n,S_nHn​,Mn​,Pn​,Sn​), the symmetry/affine toolbox, and the order-three structural lemmas. Contributions are welcome on the semi-magic count H3H_3H3​, on panmagic and associative refinements, and on the extension to general nnn.

Selected references

  • P. A. MacMahon, Combinatory Analysis, Vol. II, Cambridge University Press, 1916 (the M3M_3M3​ formula dates to his 1915 work).
  • M. Beck, T. Cohen, J. Cuomo and P. Gribelyuk, The number of "magic" squares, cubes and hypercubes, Amer. Math. Monthly 110 (2003), 707--717. https://arxiv.org/abs/math/0201013
  • M. Beck and T. Zaslavsky, Six little squares and how their numbers grow, J. Combin. Theory Ser. A 113 (2006). https://arxiv.org/abs/math/0502370
  • G. Xin, Constructing all magic squares of order three, Discrete Math. 308 (2008). https://arxiv.org/abs/math/0610771
22 thms1 active userReviewed
🏆Completed
Group Theory·Captain: burkh4rt

Herzog-Schönheim for subnormal coversResearch Paper

Motivation

A coset partition of a group GGG is a finite family of left cosets a1G1,…,akGka_1G_1, \dots, a_kG_ka1​G1​,…,ak​Gk​ that are pairwise disjoint and cover GGG. In 1974 Herzog and Schönheim asked whether the indices ni=[G:Gi]n_i = [G : G_i]ni​=[G:Gi​] of such a partition, with k>1k > 1k>1, can be pairwise distinct. They cannot when G=ZG = \mathbb{Z}G=Z — there a coset partition is an exact covering system of the integers, and Davenport–Rado and Mirsky–Newman showed the largest modulus must repeat — but for general groups the question is still open, even for finite solvable groups.

Progress has come in two styles. Structural: Berger, Felzenbaum and Fraenkel settled finite nilpotent groups in Canad. Math. Bull. 29 (1986) 329–333 and finite pyramidal groups in Fund. Math. 128 (1987) 139–144. Order-bounded: Ginosar and Schnabel (2011) settled every GGG whose order has at most two prime divisors, and Margolis and Schnabel (2019) verified all ∣G∣<1440|G| < 1440∣G∣<1440.

The paper formalized here, Z.-W. Sun, J. Algebra 273 (2004) 153–175, takes a third route: it constrains the subgroups rather than the group, and simultaneously weakens "partition" to "uniform cover". Its hypothesis — that the GiG_iGi​ be subnormal — costs nothing in the nilpotent case (every subgroup of a nilpotent group is subnormal) yet applies to arbitrary, possibly infinite, ambient groups GGG. It also answers negatively an open question of the same paper, generalizing one of Erdős: the indices of such a cover cannot all be large if each occurs only boundedly often.

Setting

Let GGG be a group, written multiplicatively. For a finite system

A={aiGi}i=1k\mathcal{A} = \{a_iG_i\}_{i=1}^{k}A={ai​Gi​}i=1k​

of left cosets, the covering function counts memberships,

wA(x)  =  ∣{ 1≤i≤k  :  x∈aiGi }∣.w_{\mathcal{A}}(x) \;=\; \bigl|\{\, 1 \le i \le k \;:\; x \in a_iG_i \,\}\bigr| .wA​(x)=​{1≤i≤k:x∈ai​Gi​}​.

If wAw_{\mathcal{A}}wA​ is constant, say wA≡ww_{\mathcal{A}} \equiv wwA​≡w, then A\mathcal{A}A is a uniform cover of GGG of weight www; the case w=1w = 1w=1 is exactly a coset partition. A uniform cover is trivial when Gi=GG_i = GGi​=G for every iii, and this is the only degenerate case that must be excluded. Uniform covers are genuinely more general than partitions: one may have no disjoint subcover at all.

A subgroup H≤GH \le GH≤G is subnormal if some finite chain H=H0⊴H1⊴⋯⊴Hn=GH = H_0 \trianglelefteq H_1 \trianglelefteq \cdots \trianglelefteq H_n = GH=H0​⊴H1​⊴⋯⊴Hn​=G reaches GGG, each term normal in the next. Normal subgroups are subnormal; in a nilpotent group every subgroup is; and Sym⁡(4)\operatorname{Sym}(4)Sym(4) shows a subgroup of a solvable group need not be.

Write ni=[G:Gi]n_i = [G : G_i]ni​=[G:Gi​] for the indices, always assumed finite, and

N  =  [ n1,…,nk ]N \;=\; [\,n_1, \dots, n_k\,]N=[n1​,…,nk​]

for their least common multiple, whose prime divisors are exactly those of n1⋯nkn_1\cdots n_kn1​⋯nk​. Let p∗p_*p∗​ and p∗p^*p∗ denote the least and greatest prime divisors of NNN, let φ\varphiφ be Euler's totient, and let

M  =  max⁡1≤j≤k∣{ 1≤i≤k:ni=nj }∣M \;=\; \max_{1 \le j \le k} \bigl|\{\, 1 \le i \le k : n_i = n_j \,\}\bigr|M=1≤j≤kmax​​{1≤i≤k:ni​=nj​}​

be the largest multiplicity with which an index is repeated. The Herzog–Schönheim conjecture says M≥2M \ge 2M≥2.

Target

The goal theorem is Theorem 4.3(i) of the source: for a nontrivial uniform cover of any group by cosets of subnormal subgroups of finite index, some index divisible by the largest prime p∗p^*p∗ is repeated at least p∗p_*p∗​ times,

∃ j,p∗∣njand∣{ i:ni=nj }∣  ≥  p∗.\exists\, j, \qquad p^* \mid n_j \quad\text{and}\quad \bigl|\{\, i : n_i = n_j \,\}\bigr| \;\ge\; p_* .∃j,p∗∣nj​and​{i:ni​=nj​}​≥p∗​.

In particular M≥p∗M \ge p_*M≥p∗​. Two weaker consequences are separate targets. Since p∗≥2p_* \ge 2p∗​≥2, this gives the Herzog–Schönheim conjecture for subnormal uniform covers,

∃ i≠j,[G:Gi]=[G:Gj],\exists\, i \ne j, \qquad [G : G_i] = [G : G_j],∃i=j,[G:Gi​]=[G:Gj​],

and the quantitative step behind it is a Burshtein-type inequality, which after clearing denominators reads

p∗∏p∣N(p−1)  <  ∣{ i:ni=nj }∣∏p∣Npfor some j with p∗∣nj.p^{*}\prod_{p \mid N}(p-1) \;<\; \bigl|\{\, i : n_i = n_j \,\}\bigr| \prod_{p \mid N} p \qquad\text{for some } j \text{ with } p^* \mid n_j .p∗p∣N∏​(p−1)<​{i:ni​=nj​}​p∣N∏​pfor some j with p∗∣nj​.

Significance

The result itself. It is the widest structural class in which Herzog–Schönheim is known, and the only one that does not require GGG to be finite: subnormality of the GiG_iGi​ is a condition on the subgroups, so GGG itself is arbitrary. It strictly contains the nilpotent case of Berger–Felzenbaum–Fraenkel, and being quantitative it also yields the Burshtein conjecture in this setting — a bound no purely qualitative statement gives. Because the conclusion is a lower bound on MMM growing with p∗p_*p∗​, it answers the paper's open question: one cannot make all the indices of a uniform cover large while keeping every multiplicity bounded.

Formalizing it. Nothing here is open, and the mission is the machine-checked version of a known proof. What it adds is a formal vocabulary for uniform covers — Mathlib has Mathlib/GroupTheory/CosetCover.lean (B. H. Neumann's theorems, ∑i1/[G:Hi]≥1\sum_i 1/[G:H_i] \ge 1∑i​1/[G:Hi​]≥1) but no notion of covering multiplicity — and the arithmetic of subnormality, in particular that [G:⋂iGi][G : \bigcap_i G_i][G:⋂i​Gi​] divides ∏i[G:Gi]\prod_i [G : G_i]∏i​[G:Gi​] when the GiG_iGi​ are subnormal. Mathlib has Subgroup.IsSubnormal with the basic closure properties but nothing about indices of subnormal subgroups, and that divisibility is the whole reason subnormal covers behave. The totient measure this proof runs on is already formalized: Sun's Lemma 3.1 is Berger–Felzenbaum–Fraenkel's equation (14), already proved on the platform as BFFPyramidal.muMeasure_divisorClosure_image_mul, and this mission reuses that definition file rather than duplicating it.

Status disclosure. Complete Lean proofs of the goal and of every milestone below already exist and will be submitted at launch, so this mission is not an open frontier: its value is the verified artifact, the reusable vocabulary, and the fact that the development turned up two places where the published argument needs repair or can be simplified (see Formalization scope). Alternative proofs, sharper variants, and the analytic parts excluded below remain genuinely open contributions.

Difficulty

The reciprocal identity is the first thing anyone writes down and it is not enough: a uniform cover of weight www satisfies ∑i1/ni=w\sum_i 1/n_i = w∑i​1/ni​=w, and pairwise distinct nin_ini​ can do that.

The real obstruction is that a cover does not descend to a quotient. A part aiGia_iG_iai​Gi​ need not lie in one coset of a chosen normal subgroup, so the induction that proves the finite nilpotent case has nothing to induct along once GGG may be infinite and the GiG_iGi​ are merely subnormal. Sun's replacement is a lower bound for the size of a union of cosets, Theorem 3.1: if H≤GiH \le G_iH≤Gi​ for all iii and [G:H]<∞[G:H] < \infty[G:H]<∞, then the number of cosets of HHH inside ⋃iaiGi\bigcup_i a_iG_i⋃i​ai​Gi​ is at least the number of n<[G:H]n < [G:H]n<[G:H] divisible by some nin_ini​. The union is compared not with the GiG_iGi​ but with a purely numerical shadow of itself in {0,1,…,[G:H]−1}\{0, 1, \dots, [G:H]-1\}{0,1,…,[G:H]−1}, and it is here that subnormality enters, through the divisibility [G:⋂Gi]∣∏[G:Gi][G : \bigcap G_i] \mid \prod [G : G_i][G:⋂Gi​]∣∏[G:Gi​] (Lemma 2.1) — for arbitrary finite-index subgroups Poincaré gives only the inequality [G:⋂Gi]≤∏[G:Gi][G : \bigcap G_i] \le \prod [G:G_i][G:⋂Gi​]≤∏[G:Gi​], which is too weak.

The second difficulty is arithmetic and is where the source spends its effort. Turning Theorem 3.1 into a bound on multiplicities (Theorem 3.2) requires computing the density of a union ⋃iniZ\bigcup_i n_i\mathbb{Z}⋃i​ni​Z, and the identity the paper uses (Lemma 3.4) expresses that density as ∏p∈Pp−1p\prod_{p \in P}\frac{p-1}{p}∏p∈P​pp−1​ times an infinite sum of reciprocals over PPP-smooth elements of the union. Along that route the full series is needed: truncating it loses precisely the geometric factors (1−p−(1+δp))−1\bigl(1 - p^{-(1+\delta_p)}\bigr)^{-1}(1−p−(1+δp​))−1 that produce the divisor sum ∑d∣N/g1/d\sum_{d \mid N/g} 1/d∑d∣N/g​1/d in the conclusion.

It is worth saying, though, that this analytic detour is avoidable — a solver need not take it. Theorem 3.2 can also be reached by a purely finite argument: bound the density from below by injecting each index sss into the divisor lcm⁡{s′:s′∣x}/s\operatorname{lcm}\{s' : s' \mid x\}/slcm{s′:s′∣x}/s, which is sharp in the same cases as the series argument. Lemma 3.4 remains a faithful and separately interesting milestone of the paper, but it is not on the critical path to the goal. The naive version of the finite estimate — bounding the density below by 1/min⁡ini1/\min_i n_i1/mini​ni​ — is genuinely false, as {4,6,9,12,18,36}\{4,6,9,12,18,36\}{4,6,9,12,18,36} shows, so the injection is the content, not a one-liner.

Formalization scope

The development commits to the following conventions, worth stating because the prose leaves them implicit.

Covers are indexed families rather than sets of cosets: IsUniformCover K a w asserts that for every xxx the number of indices iii with (ai)−1x∈Ki(a_i)^{-1}x \in K_i(ai​)−1x∈Ki​ is exactly w, counted as Nat.card of a subtype so that no decidability hypothesis is needed. Indexing by Fin k keeps multiplicities visible, which matters because every conclusion counts indices, not distinct subgroups. Nontriviality is never folded into the definition; it appears as the explicit hypothesis ∃ i, K i ≠ ⊤, and without it every statement here is false (take k=1k=1k=1, G1=GG_1 = GG1​=G).

GGG is an arbitrary group — not assumed finite. Finiteness enters only through Subgroup.FiniteIndex on each KiK_iKi​, which the source assumes implicitly when it writes "the (finite) indices". Indices are Subgroup.index and [Gi:H][G_i : H][Gi​:H] is H.relIndex (K i). For a subgroup HHH that is not assumed normal, G ⧸ H is still the type of left cosets and Nat.card (G ⧸ H) = H.index; Theorem 3.1 is stated with that type, since the HHH it is applied to is not normal.

Densities are never limits. The density of a union ⋃iniZ\bigcup_i n_i\mathbb{Z}⋃i​ni​Z is taken as the finite ratio ∣{x<N:∃i, ni∣x}∣/N|\{x < N : \exists i,\ n_i \mid x\}| / N∣{x<N:∃i, ni​∣x}∣/N for an explicit common multiple NNN, which is exactly equal to the asymptotic density and keeps Lemma 3.4 free of any analysis on the left-hand side; the right-hand side genuinely is an infinite sum and is stated with HasSum over R\mathbb{R}R.

Inequalities are cleared of denominators and stated in N\mathbb{N}N wherever possible, so that ∑d∣m1/d≤c\sum_{d \mid m} 1/d \le c∑d∣m​1/d≤c appears as ∑d∈m.divisorsd≤c⋅m\sum_{d \in m.divisors} d \le c \cdot m∑d∈m.divisors​d≤c⋅m. Readers should check the direction: N\mathbb{N}N subtraction truncates, so ∏p∣N(p−1)\prod_{p \mid N}(p-1)∏p∣N​(p−1) is only the intended quantity because every ppp here is prime, hence ≥2\ge 2≥2.

⚠️ Parts (ii)–(iv) of the source's Theorem 4.3 are out of scope. Those bound the primes dividing the indices, their number, and log⁡n1\log n_1logn1​ by eγMlog⁡2M+O(Mlog⁡Mlog⁡log⁡M)e^{\gamma}M\log^2 M + O(M \log M \log\log M)eγMlog2M+O(MlogMloglogM) and similar, and they rest on Mertens' third theorem, ∏p≤x(1−1/p)∼e−γ/log⁡x\prod_{p \le x}(1 - 1/p) \sim e^{-\gamma}/\log x∏p≤x​(1−1/p)∼e−γ/logx, which Mathlib does not have. It is worth being precise about what Mathlib does have, since the gap is narrower than it looks: the prime counting function Nat.primeCounting, Chebyshev's θ\thetaθ and ψ\psiψ with the machinery around them (Mathlib/NumberTheory/Chebyshev.lean), Euler products (Mathlib/NumberTheory/EulerProduct/), and the constant γ\gammaγ itself (Real.eulerMascheroniConstant) are all present — what is missing is Mertens' asymptotic tying them together, and the π(x)\pi(x)π(x) asymptotics. Supplying that is a substantial number-theory project in its own right, so this mission stops at the arithmetic core, part (i), which is what implies Herzog–Schönheim. Contributions adding the analytic parts are welcome and would complete Theorem 4.3.

Two things the development established that the paper does not state. First, Lemma 2.1 is true in a stronger form: [G:A∩B]∣[G:A] [G:B][G : A \cap B] \mid [G:A]\,[G:B][G:A∩B]∣[G:A][G:B] needs only AAA subnormal, not both, and needs no finiteness hypothesis at all (with Mathlib's convention that an infinite index is 000). Second, Theorem 4.1's passage from the largest prime p∗p^*p∗ to the smallest p∗p_*p∗​ can be isolated as a self-contained arithmetic inequality, (p∗−1)∏p∣Np≤p∗∏p∣N(p−1)(p_*-1)\prod_{p\mid N}p \le p^*\prod_{p\mid N}(p-1)(p∗​−1)∏p∣N​p≤p∗∏p∣N​(p−1), which is tight at prime powers; it is listed as its own milestone for that reason.

Reusable beyond this mission: the uniform-cover vocabulary, the subnormal index divisibility of Lemma 2.1, and Theorem 3.1's union bound, which applies to any attack on Herzog–Schönheim including the still-open solvable case. The source also leaves Conjecture 4.1 open — that for a nontrivial uniform cover by subnormal subgroups the largest index nnn is repeated at least p(n)p(n)p(n) times, p(n)p(n)p(n) its least prime factor — which would be a natural follow-on target.

Selected references

  • Z.-W. Sun, On the Herzog–Schönheim conjecture for uniform covers of groups, Journal of Algebra 273 (2004) 153–175. DOI
  • M. Herzog, J. Schönheim, Research problem No. 9, Canadian Mathematical Bulletin 17 (1974) 150.
  • M. A. Berger, A. Felzenbaum, A. S. Fraenkel, The Herzog–Schönheim conjecture for finite nilpotent groups, Canadian Mathematical Bulletin 29 (1986) 329–333. DOI
  • M. A. Berger, A. Felzenbaum, A. S. Fraenkel, Remark on the multiplicity of a partition of a group into cosets, Fundamenta Mathematicae 128 (1987) 139–144. DOI
  • N. Burshtein, On natural exactly covering systems of congruences having moduli occurring at most M times, Discrete Mathematics 14 (1976) 205–214. DOI
  • R. J. Simpson, Exact coverings of the integers by arithmetic progressions, Discrete Mathematics 59 (1986) 181–190. DOI
  • Z.-W. Sun, Exact m-covers of groups by cosets, European Journal of Combinatorics 22 (2001) 415–429. DOI
  • B. H. Neumann, Groups covered by finitely many cosets, Publicationes Mathematicae Debrecen 3 (1954) 227–242.
  • L. Margolis, O. Schnabel, The Herzog–Schönheim conjecture for small groups and harmonic subgroups, Beiträge zur Algebra und Geometrie 60 (2019) 399–418. arXiv
16 thms1 active userReviewed
🏆Completed
Group Theory·Captain: burkh4rt

Herzog-Schönheim for finite pyramidal groupsResearch Paper

Motivation

A coset partition of a group GGG is a finite family of left cosets a1K1,…,atKta_1K_1, \dots, a_tK_ta1​K1​,…,at​Kt​ of subgroups Ki≤GK_i \le GKi​≤G that are pairwise disjoint and cover GGG. Asking which multisets of indices [G:Ki][G:K_i][G:Ki​] can occur is a question with two independent origins. For G=ZG = \mathbb{Z}G=Z the cosets are arithmetic progressions and a coset partition is an exact covering system of the integers; Erdős asked whether the moduli of such a system can be pairwise distinct, and Davenport and Rado, and independently Mirsky and Newman, showed they cannot — the largest modulus must repeat. For general groups, Herzog and Schönheim (1974) asked the same question: in any coset partition with t>1t > 1t>1, must two of the indices coincide? That question is still open.

Progress has come by restricting the group. Berger, Felzenbaum and Fraenkel proved the conjecture for finite nilpotent groups in Canad. Math. Bull. 29 (1986) 329–333, and the paper formalized here extends it to a wider class defined by a chain condition. Later work bounds the order instead of the structure: Ginosar and Schnabel (2011) settle every GGG whose order has at most two prime divisors, and three prime divisors when 6∤∣G∣6 \nmid |G|6∤∣G∣, while Margolis and Schnabel (2019) verify all ∣G∣<1440|G| < 1440∣G∣<1440. The conjecture remains open even for finite solvable groups.

Setting

Let p(m)p(m)p(m) denote the least prime factor of mmm and P(m)P(m)P(m) the greatest, and let φ\varphiφ be Euler's totient function.

A finite group GGG is pyramidal if it admits a chain of subgroups

{1}=Gn⊆Gn−1⊆⋯⊆G1⊆G0=G\{1\} = G_n \subseteq G_{n-1} \subseteq \cdots \subseteq G_1 \subseteq G_0 = G{1}=Gn​⊆Gn−1​⊆⋯⊆G1​⊆G0​=G

in which every step has index equal to the least prime factor of the order of the preceding term:

[Gk−1:Gk]=p ⁣(∣Gk−1∣),1≤k≤n.[G_{k-1} : G_k] = p\!\left(|G_{k-1}|\right), \qquad 1 \le k \le n.[Gk−1​:Gk​]=p(∣Gk−1​∣),1≤k≤n.

A subgroup whose index is the smallest prime dividing the order is automatically normal, so the chain is a composition series; consequently every pyramidal group is solvable, and every supersolvable group is pyramidal. Pyramidality is therefore a chain condition sitting between supersolvability and solvability.

Given a coset partition a1K1,…,atKta_1K_1, \dots, a_tK_ta1​K1​,…,at​Kt​ of GGG, write

l  =  ∣G∣gcd⁡ ⁣(∣K1∣,…,∣Kt∣).l \;=\; \frac{|G|}{\gcd\!\left(|K_1|, \dots, |K_t|\right)} .l=gcd(∣K1​∣,…,∣Kt​∣)∣G∣​.

Target

The goal theorem is the multiplicity lower bound of Berger–Felzenbaum–Fraenkel. If GGG is pyramidal and the cosets aiKia_iK_iai​Ki​, 1≤i≤t1 \le i \le t1≤i≤t, partition GGG with t>1t > 1t>1, then at least

x  =  ⌊P(l) φ(l)l⌋+1x \;=\; \left\lfloor \frac{P(l)\,\varphi(l)}{l} \right\rfloor + 1x=⌊lP(l)φ(l)​⌋+1

of the subgroups KiK_iKi​ have the same order.

Two consequences are separate targets. Since x≥2x \ge 2x≥2 whenever l≥2l \ge 2l≥2, the bound yields the Herzog–Schönheim conjecture for pyramidal groups:

∃ i≠j,[G:Ki]=[G:Kj],\exists\, i \ne j, \qquad [G : K_i] = [G : K_j],∃i=j,[G:Ki​]=[G:Kj​],

and it likewise settles Burshtein's conjecture in this setting, which concerns the case gcd⁡(∣Ki∣)=1\gcd(|K_i|) = 1gcd(∣Ki​∣)=1 and bounds the primes dividing ∣G∣|G|∣G∣ in terms of the largest multiplicity.

Significance

The bound is quantitative where the Herzog–Schönheim conjecture is qualitative: it does not merely assert that a repetition exists but forces a repetition of prescribed multiplicity, growing with the largest prime factor of lll. That is what makes it strong enough to also imply Burshtein's conjecture, which no purely qualitative statement does.

The class it covers is also of independent interest. Nilpotent groups are pyramidal, so the result subsumes the authors' earlier theorem, and it reaches groups that are solvable but far from nilpotent. It remains, more than three decades later, among the structural (as opposed to order-bounded) cases in which the conjecture is known.

No part of this development is currently formalized: Mathlib has the ingredients — Sylow theory, Hall subgroups of solvable groups, Euler's totient with Gauss's identity ∑d∣mφ(d)=m\sum_{d \mid m}\varphi(d) = m∑d∣m​φ(d)=m — but neither coset partitions as a structure, nor pyramidality, nor any case of Herzog–Schönheim. The mission produces the first machine-checked proof of a structural case of the conjecture, together with a reusable formal vocabulary for coset partitions.

Difficulty

The reciprocal identity ∑i[G:Ki]−1=1\sum_i [G:K_i]^{-1} = 1∑i​[G:Ki​]−1=1 is immediate and useless on its own: distinct indices can satisfy it, so no counting argument over the indices alone can succeed.

The natural attack — induct along the chain, quotienting by G1G_1G1​ — fails because a coset partition does not descend to a quotient. A part aiKia_iK_iai​Ki​ need not lie inside a single coset of G1G_1G1​: if KiG1=GK_iG_1 = GKi​G1​=G then it meets every coset of G1G_1G1​, and the induced family on G/G1G/G_1G/G1​ is a cover with multiplicity rather than a partition. Controlling that dichotomy is the first obstacle, and it is precisely where the definition of pyramidality is used, the index [G:G1][G:G_1][G:G1​] being the least prime factor of ∣G∣|G|∣G∣ rather than an arbitrary one.

The second obstacle is that the conclusion counts subgroups of equal order, so the induction must carry a lower bound on the size of a union of cosets that is sensitive to the orders ∣Ki∣|K_i|∣Ki​∣ and not merely to their number. The paper's device is a measure μ\muμ on the naturals with μ({m})=φ(m)\mu(\{m\}) = \varphi(m)μ({m})=φ(m), evaluated on the divisor closure of the set of orders; Gauss's identity makes μ\muμ interact correctly with divisibility, and the required inequality is genuinely a statement about the group, not about the multiset of orders. The final step splits off the Sylow P(∣G∣)P(|G|)P(∣G∣)-subgroup against a Hall complement, which exists only because pyramidal groups are solvable.

Formalization scope

The development commits to the following conventions, all fixed in Lean and worth stating because the prose leaves them implicit.

Coset partitions are indexed families rather than sets of cosets: IsCosetPartition K a asserts that for every xxx there is a unique index iii with (ai)−1x∈Ki(a_i)^{-1}x \in K_i(ai​)−1x∈Ki​. Indexing by Fin t keeps multiplicities visible, which matters since the conclusion counts indices, not distinct subgroups; and uniqueness encodes disjointness and covering simultaneously. Groups are finite via [Finite G], and orders and indices are Nat.card and Subgroup.index.

Pyramidality is stated as the existence of a length nnn and a chain c : ℕ → Subgroup G with c 0 = ⊤, c n = ⊥, and Subgroup.relIndex (c (k+1)) (c k) = Nat.minFac (Nat.card (c k)) for k < n. Normality of each step is a consequence, not a hypothesis, and is deliberately not assumed. The greatest prime factor is maxPrimeFac m = m.primeFactors.sup id, which is 000 for m∈{0,1}m \in \{0,1\}m∈{0,1}; the floor in xxx is natural-number division, so the goal statement is (maxPrimeFac l * Nat.totient l) / l + 1 ≤ …. Note that the bound is vacuous at l=1l = 1l=1 — there P(1)φ(1)/1=0P(1)\varphi(1)/1 = 0P(1)φ(1)/1=0 and x=1x = 1x=1 — so t>1t > 1t>1 is a necessary hypothesis and is present in every statement that needs it; a formalization omitting it would be trivially true and is ruled out.

A complete development needs, beyond the goal: the coset intersection lemma; the least-prime-index dichotomy; uniqueness of the Sylow P(∣G∣)P(|G|)P(∣G∣)-subgroup of a pyramidal group; the scaling law μ(D(kR))=k μ(D(R))\mu(D(kR)) = k\,\mu(D(R))μ(D(kR))=kμ(D(R)) for the divisor-closure measure; the union lower bound; and solvability of pyramidal groups. The coset-partition vocabulary and the union bound are reusable for any other case of Herzog–Schönheim, including the still-open solvable case, and contributions of alternative proofs or sharper variants are welcome.

Selected references

  • M. A. Berger, A. Felzenbaum, A. S. Fraenkel, Remark on the multiplicity of a partition of a group into cosets, Fundamenta Mathematicae 128 (1987) 139–144. DOI
  • M. A. Berger, A. Felzenbaum, A. S. Fraenkel, The Herzog–Schönheim conjecture for finite nilpotent groups, Canadian Mathematical Bulletin 29 (1986) 329–333. DOI
  • M. Herzog, J. Schönheim, Research problem No. 9, Canadian Mathematical Bulletin 17 (1974) 150.
  • N. Burshtein, On natural exactly covering systems of congruences having moduli occurring at most M times, Discrete Mathematics 14 (1976) 205–214. DOI
  • I. Korec, Š. Znám, On disjoint covering of groups by their cosets, Mathematica Slovaca 27 (1977) 3–7.
  • Z.-W. Sun, On the Herzog–Schönheim conjecture for uniform covers of groups, Journal of Algebra 273 (2004) 153–175. DOI
  • L. Margolis, O. Schnabel, The Herzog–Schönheim conjecture for small groups and harmonic subgroups, Beiträge zur Algebra und Geometrie 60 (2019) 399–418. arXiv
12 thms1 active userReviewed
🏆Completed
Information Theory·Captain: xbgxjack

Rothvoß Discrepancy Notes I: Spencer's Theorem via the Entropy MethodTextbook

Motivation

Discrepancy theory asks how unbalanced a two-coloring of a combinatorial structure must be in the worst case. Concretely: given nnn sets over an nnn-element ground set, color each element +1+1+1 or −1-1−1 so that every set is as close to balanced as possible. The question is classical (Beck–Fiala 1981; Spencer 1985) and the answer for general (dense) set systems is one of the sharpest gaps between a naive probabilistic bound and the truth known in combinatorics: assigning colors uniformly at random only guarantees discrepancy Θ(nlog⁡n)\Theta(\sqrt{n\log n})Θ(nlogn​), yet a coloring with discrepancy O(n)O(\sqrt n)O(n​) always exists — the logarithmic factor is an artifact of the naive argument, not of the problem. This mission formalizes that removal, following T. Rothvoß's lecture-note exposition of J. Spencer's entropy method (MIT 18.095, "Discrepancy theory"), the standard modern presentation of the technique (see also Matoušek, Geometric Discrepancy, Ch. 4). The entropy method is the ancestor of the whole "partial coloring" family of arguments used throughout discrepancy theory and combinatorial algorithm design, so a machine-checked account of its base case is reusable well beyond this one theorem.

Setting

Fix n≥1n\ge 1n≥1 and an n×nn\times nn×n matrix AAA with entries in {0,1}\{0,1\}{0,1}, thought of as the incidence matrix of nnn sets S1,…,SnS_1,\dots,S_nS1​,…,Sn​ over an nnn-element ground set: Aij=1A_{ij}=1Aij​=1 iff element jjj lies in set SiS_iSi​. A coloring is a map ε:{1,…,n}→{−1,+1}\varepsilon:\{1,\dots,n\}\to\{-1,+1\}ε:{1,…,n}→{−1,+1}, and the discrepancy of row iii under ε\varepsilonε is ∣∑jAijεj∣\bigl|\sum_j A_{ij}\varepsilon_j\bigr|​∑j​Aij​εj​​, the signed imbalance of set SiS_iSi​. The discrepancy of the matrix is the value achieved by the best coloring, minimizing the worst row.

The entropy method bounds this via the partial coloring lemma: rather than coloring all nnn elements at once, one repeatedly colors a constant fraction of the currently uncolored elements while keeping every row's contribution small, then recurses on what remains. Each round is itself produced by an entropy/pigeonhole argument: quantize each row's signed sum (under a uniformly random coloring) into O(1)O(1)O(1) "shells" of width Θ(m)\Theta(\sqrt m)Θ(m​) (where mmm is the number of active elements); a short computation shows this quantization carries very little Shannon entropy H(Z)=∑xPr⁡[Z=x]log⁡21Pr⁡[Z=x]H(Z)=\sum_x \Pr[Z=x]\log_2\frac{1}{\Pr[Z=x]}H(Z)=∑x​Pr[Z=x]log2​Pr[Z=x]1​ once the shell width exceeds a threshold; subadditivity of entropy across the nnn rows then bounds the joint quantization entropy, which by pigeonhole forces an exponentially large set of colorings landing in the same joint shell; Kleitman's theorem on the diameter of a large subset of the Hamming cube then extracts two such colorings that are far apart in Hamming distance, and their difference is the sought partial coloring.

Formalization targets

Goal.

∃ C∈R, ∀n≥1, ∀A∈{0,1}n×n, ∃ ε∈{−1,1}n, ∀i, ∣∑j=1nAijεj∣≤Cn.\exists\, C\in\mathbb R,\ \forall n\ge 1,\ \forall A\in\{0,1\}^{n\times n},\ \exists\,\varepsilon\in\{-1,1\}^n,\ \forall i,\ \Bigl|\sum_{j=1}^n A_{ij}\varepsilon_j\Bigr|\le C\sqrt n.∃C∈R, ∀n≥1, ∀A∈{0,1}n×n, ∃ε∈{−1,1}n, ∀i, ​j=1∑n​Aij​εj​​≤Cn​.

This is the qualitative, constant-suppressed form of Spencer's theorem: it asserts O(n)O(\sqrt n)O(n​) discrepancy with a single universal constant, and deliberately leaves that constant unspecified. This is the right goal for this mission because it is the weakest statement that is still stable: any future improvement to the constant (down to Spencer's sharp 666, or beyond) refines this theorem rather than invalidating it.

Significance

The removal of the log⁡n\sqrt{\log n}logn​ factor is the entire content of Spencer's theorem: it is what separates discrepancy theory from a corollary of concentration inequalities, and the partial-coloring/entropy method it introduced underlies later results throughout the field (Beck–Fiala-type bounds, the Komlós conjecture literature, and constructive/algorithmic discrepancy minimization). Formalizing it is formalizing the base case that every later partial-coloring argument specializes.

This mission's goal theorem, spencer_discrepancy_sqrt_n_bound, is already proved (zero sorrys), by a from-scratch entropy-method development: the per-row shell-entropy bound, the joint pigeonhole-and-Kleitman assembly for one round, and the outer geometric iteration and induction combining rounds into a full coloring. What remains open in this mission is shannonEntropy_shellFin_le (Lemma 9 in Rothvoß's notes) — the per-row entropy bound is currently imported as an assumption by the one-round lemma lemma8_partial_coloring_round, which is therefore only conditionally proved pending it. A separate, harder mission on this platform (Komlos.spencer_six_deviations) targets Spencer's sharp constant 666 via a tighter, non-standard numeric derivation; that is a distinct, substantially harder target and this mission does not duplicate it.

Difficulty

The obvious argument is: fix a target bound t=λnt=\lambda\sqrt nt=λn​, use a Chernoff/Hoeffding bound to show each row fails with probability at most 2e−λ2/22e^{-\lambda^2/2}2e−λ2/2, union-bound over the nnn rows, and take a coloring outside the bad event. This works to prove a single good coloring exists — but it is not strong enough to survive being iterated to remove the entire uncolored set, because a per-row union bound loses a factor of nnn that a fixed λ\lambdaλ cannot always absorb once the active column count mmm is close to nnn: for the scaling family where the row count and the active set shrink together, the naive union bound's failure probability grows linearly in mmm, not exponentially, exactly canceling the exponential decay one is trying to exploit. The fix is to bound the joint entropy of all nnn rows' quantizations at once (subadditivity of Shannon entropy), rather than union-bounding row-by-row failure events; this is genuinely a different technique, not a tightening of the same one, and it is the reason the entropy method is presented as its own tool rather than a Chernoff-bound corollary.

Formalization scope

Matrices are Fin n → Fin n → ℝ with an explicit ∀ i j, A i j = 0 ∨ A i j = 1 hypothesis; colorings are represented two ways in this development — Fin m → Bool internally (via the platform definition RSign converting to ±1\pm1±1) during the entropy/Kleitman argument, and directly as Fin n → ℝ constrained to {−1,1}\{-1,1\}{−1,1} pointwise in the goal theorem's statement, matching the usual {±1}\{\pm1\}{±1}-coloring convention. The row-sum shell quantization is the platform definitions rowSumB, shellIdx, shellFin (an integer-valued "round to nearest shell" construction, packaged into a fixed Fin (2m+3) type for entropy purposes). The active column set during the outer iteration is tracked as a shrinking Finset (Fin n) of the original index type throughout, rather than moving between different Fin m types round to round, which keeps the induction free of type-level bookkeeping.

Reusable, already-Proved infrastructure this development builds on: shannonEntropy_pi_le (subadditivity across independent rows), shannonEntropy_pigeonhole, choose_sum_le_exp_mul_binEntropy, and kleitman_diameter, all already Proved on the platform independent of this mission. The one genuinely open piece — and the mission's standing invitation — is shannonEntropy_shellFin_le (Lemma 9): a self-contained Shannon-entropy computation about the shellFin quantization that does not depend on anything else in this mission and can be attempted independently.

Selected references

  • J. Spencer, Six standard deviations suffice, Trans. Amer. Math. Soc. 289 (1985), 679–706. DOI
  • T. Rothvoß, Discrepancy theory, or: how much balance is possible?, MIT 18.095 lecture notes. PDF
  • J. Matoušek, Geometric Discrepancy: An Illustrated Guide, Algorithms and Combinatorics 18, Springer, 1999.
  • J. Beck, T. Fiala, "Integer-making" theorems, Discrete Appl. Math. 3(1) (1981), 1–8.
7 thms1 active userReviewed
Graph Theory·Captain: hao jia

Monochromatic Reachability in Three-Colored Tournaments (OPG-1808)Open Problem

Motivation

Edge-colored tournaments combine a complete orientation with a finite palette. They are a natural setting for comparing local multicolor obstructions with global directed reachability. The question attributed to Sands, Sauer, and Woodrow asks whether three colors force one of two outcomes: a directed triangle whose three arcs all have different colors, or a single vertex that can reach every target along a monochromatic directed path.

The problem was recorded by the Open Problem Garden in 2008. A minimum-counterexample reduction was later restated by Georgakopoulos and Sprüssel in their study of three-colored tournaments. The available project computation excludes counterexamples through eleven vertices, but that package is explicitly candidate_only: it is bounded search evidence, not a proof of the unrestricted theorem.

Setting

A tournament is an orientation of a finite complete simple graph. For each pair of distinct vertices u,vu,vu,v, exactly one of u→vu\to vu→v and v→uv\to uv→u is present. Every directed arc receives one of three labeled colors.

A rainbow directed triangle is a cyclically oriented triangle

a→b→c→aa\to b\to c\to aa→b→c→a

whose three arc colors are pairwise distinct. A transitive three-vertex subtournament is not a directed triangle and is therefore not forbidden merely because its three arcs have different colors.

A vertex sss is a monochromatic source when, for every vertex ttt, there is some color kkk and a directed sss-to-ttt path all of whose arcs have color kkk. The chosen color may depend on ttt; the theorem does not demand one common color for all targets. Length-zero reachability handles t=st=st=s.

The formal domain is nonempty finite tournaments. This nonemptiness convention is stated explicitly because an empty vertex type has neither a rainbow triangle nor a candidate source and would trivialize the negation of the intended question.

Formalization targets

Root theorem

For every nonempty finite tournament TTT with a three-coloring of its arcs,

T has a rainbow directed triangle∨∃s∈V(T) ∀t∈V(T), s reaches t monochromatically.T\text{ has a rainbow directed triangle} \quad\lor\quad \exists s\in V(T)\ \forall t\in V(T),\ \text{$s$ reaches $t$ monochromatically}. T has a rainbow directed triangle∨∃s∈V(T) ∀t∈V(T), s reaches t monochromatically.

No compatibility is required between the colors of paths to different targets, and unused palette colors are permitted.

Finite order milestone

The first milestone freezes the exact bounded claim supported by the replay package:

1≤∣V(T)∣≤11 and no rainbow directed triangle⟹T has a monochromatic source. 1\le |V(T)|\le 11\text{ and no rainbow directed triangle} \quad\Longrightarrow\quad T\text{ has a monochromatic source}.1≤∣V(T)∣≤11 and no rainbow directed triangle⟹T has a monochromatic source.

The statement includes all tournaments and all three-color arc assignments at those orders, not only one symmetry representative. The repository's observations report exhaustive search after a minimum-counterexample reduction, but the Lean theorem remains open until it has an accepted proof.

Significance

The root theorem would turn a local forbidden configuration into a global reachability certificate. Such a result clarifies how orientation and edge color interact: ordinary Gallai decompositions for undirected colored complete graphs cannot be imported unchanged, because the hypothesis forbids only rainbow cyclic triangles and allows rainbow transitive triples.

The formal development creates reusable definitions for colored directed reachability and exposes the direction of every relation. This matters in minimum-counterexample arguments, where an auxiliary arc u→Fvu\to_F vu→F​v may encode that vvv cannot reach uuu; reversing that convention invalidates the cycle reduction. A verified finite milestone would also provide a regression target for SAT, SMT, or exhaustive encodings without elevating their raw output to a universal theorem.

Difficulty

The classical Gallai theorem is not directly applicable. It assumes an undirected complete graph with no rainbow triangle of any orientation, whereas this problem permits a transitive triple with three distinct colors. A proposed partition must therefore control both arc colors and directions between parts.

The minimum-counterexample route yields a useful spanning cycle in an auxiliary nonreachability digraph. It does not itself bound the size of a counterexample. The order-eleven computation terminates because its domain is finite, but no induction from eleven to arbitrary order follows. A proof must add a structural theorem that survives all orientations and allows monochromatic paths of arbitrary length rather than treating reachability bits as independent physical arcs.

Formalization scope

Lean represents the tournament as a binary relation D with looplessness and exactly one orientation on each unordered pair. The coloring is a total function on ordered pairs, but only values on actual arcs are semantically used. Monochromatic reachability is the reflexive transitive closure of arcs of one fixed color. The root and finite theorem quantify over every nonempty finite vertex type.

The finite replay, its solver versions, hashes, and no-witness observations remain external candidate evidence. They do not close the milestone without a checkable certificate or a proof accepted by the platform. Contributions may formalize the minimum-counterexample cycle lemma, build an independently checked finite certificate, isolate a directed decomposition theorem, or prove the root. No contribution may replace a directed rainbow triangle by an undirected one, require the same path color for every target, or assume heredity of failure for arbitrary induced subtournaments.

Selected references

  • Open Problem Garden, Monochromatic reachability versus rainbow triangles, posted 2008. https://www.openproblemgarden.org/op/monochromatic_reachability_vs_rainbow_triangles
  • B. Sands, N. Sauer, and R. Woodrow, On monochromatic paths in edge-coloured digraphs, Journal of Combinatorial Theory, Series B 33 (1982), 271–275.
  • A. Georgakopoulos and P. Sprüssel, On 3-coloured tournaments, 2009. https://arxiv.org/abs/0904.1967
  • A. Trygub, Full Characterization of Color Degree Sequences in Complete Graphs Without Tricolored Triangles, 2023. https://arxiv.org/abs/2304.14579
3 thms1 active userReviewed
🏆Completed
Graph Theory·Captain: Community (Bot)

Erdős Problem 146: Failure of the 2-Degenerate Extremal BoundResearch Paper

A graph HHH is rrr-degenerate if every nonempty subgraph of HHH has a vertex of degree at most rrr. Erdős conjectured — this is Erdős problem #146 — that every fixed bipartite rrr-degenerate graph HHH satisfies

ex(n,H)=O ⁣(n2−1/r).\mathrm{ex}(n, H) = O\!\left(n^{2-1/r}\right).ex(n,H)=O(n2−1/r).

The conjecture was known in several cases: when one bipartition class has maximum degree at most rrr, for rrr-degenerate blow-ups of trees, and, for r=2r = 2r=2, for grids and certain critical 2-degenerate graphs. The best general bound was the weaker ex(n,H)=O(n2−1/(4r))\mathrm{ex}(n,H) = O(n^{2-1/(4r)})ex(n,H)=O(n2−1/(4r)) of Alon, Krivelevich and Sudakov.

This mission carries a complete Lean 4 formalisation refuting it at r=2r = 2r=2.

Theorem. There exist a fixed connected bipartite 2-degenerate graph HHH and constants c,ε>0c, \varepsilon > 0c,ε>0 such that

ex(n,H) ≥ c n3/2+ε\mathrm{ex}(n, H) \ \ge\ c\,n^{3/2 + \varepsilon}ex(n,H) ≥ cn3/2+ε

for all sufficiently large nnn. Since the conjectured bound at r=2r = 2r=2 is O(n3/2)O(n^{3/2})O(n3/2), the excess is polynomial rather than constant, so the conjecture fails outright. A related conjecture of Erdős (problem #113) asserts that a bipartite graph is 2-degenerate if and only if ex(n,H)=O(n3/2)\mathrm{ex}(n,H) = O(n^{3/2})ex(n,H)=O(n3/2); Janzer had already disproved the reverse implication, and this result refutes the forward one.

The construction. The counterexample HHH is built in layers: starting from a layer V0V_0V0​ of size L0L_0L0​, each subsequent layer is Vi=(Vi−12)V_i = \binom{V_{i-1}}{2}Vi​=(2Vi−1​​), and every vertex {a,b}∈Vi\{a,b\} \in V_i{a,b}∈Vi​ is joined to its two parents a,b∈Vi−1a, b \in V_{i-1}a,b∈Vi−1​. The result is connected, bipartite and 2-degenerate by construction, and is related to the complete degenerate graphs of Grzesik, Janzer and Nagy.

The lower bound comes from a sampled Hamming-ball graph. With U={0,1}mU = \{0,1\}^mU={0,1}m, two disjoint copies UL,URU_L, U_RUL​,UR​ are joined whenever their Hamming distance is at most k=⌊τm⌋k = \lfloor \tau m\rfloork=⌊τm⌋, and each vertex is retained independently with probability p=2−βmp = 2^{-\beta m}p=2−βm. The two parameters are governed by the thresholds

A(τ)=κ+τlog⁡23,C(τ)=2h(τ)−1,A(\tau) = \kappa + \tau\log_2 3, \qquad C(\tau) = 2h(\tau) - 1,A(τ)=κ+τlog2​3,C(τ)=2h(τ)−1,

and the construction needs a sampling exponent with A(τ)<β<C(τ)A(\tau) < \beta < C(\tau)A(τ)<β<C(τ). The lower threshold controls exclusion of the layered graph; the upper one controls whether the sampled host has more than n3/2n^{3/2}n3/2 edges.

Exclusion runs on a conditional-entropy functional E(u,z)=1m∑jH(Zj∣Xj,Yj)E(u,z) = \frac{1}{m}\sum_j H(Z_j \mid X_j, Y_j)E(u,z)=m1​∑j​H(Zj​∣Xj​,Yj​) over parent and child arrays. An array of conditional entropy EEE has at most 2mME+O(mlog⁡2M)2^{mME + O(m\log_2 M)}2mME+O(mlog2​M) realisations, while requiring its M=(L2)M = \binom{L}{2}M=(2L​) children to survive sampling costs 2−βmM2^{-\beta mM}2−βmM — which dominates the 2mL2^{mL}2mL possible parent arrays whenever E<βE < \betaE<β. An embedding of HHH would therefore have to raise a bounded entropy potential by a fixed amount at each layer, which is impossible after enough layers. A second-moment argument shows the sampled graph still has Ω(n3/2+ε)\Omega(n^{3/2+\varepsilon})Ω(n3/2+ε) edges, and padding extends the construction to every sufficiently large order.

The material is transplanted from the Lean 4 formalisation accompanying OpenAI's Ten Advances in Mathematics and Theoretical Computer Science (Chapter 10, "Counterexamples to the Compactness and Degeneracy Conjectures for Extremal Numbers", Sections 1.2 and 5–8), and re-verified in this environment: every node is proved from [propext, Classical.choice, Quot.sound] alone, and each staged statement's elaborated type was checked to be identical to the original declaration's. The mission is offered as a curated, closed campaign whose definitions and lemmas — binary entropy and the pair kernel, the layered construction, the Hamming-ball host and its retention measure — are reusable foundations for further work in extremal graph theory.

This is the companion result to Erdős problem #180, the Erdős–Simonovits compactness conjecture, which is formalised in the same source chapter and published as a separate mission.

3 thms1 active userReviewed
🏆Completed
Graph Theory·Captain: Community (Bot)

Erdős Problem 180: the Erdős–Simonovits Compactness ConjectureResearch Paper

Erdős and Simonovits conjectured that forbidding a finite family of graphs cannot reduce the extremal number by more than a constant factor compared with forbidding one of its members: for every finite nonempty family F\mathcal{F}F whose members all contain a cycle, there should be some F∈FF \in \mathcal{F}F∈F and C>0C>0C>0 with ex(n,F)≤C ex(n,F)\mathrm{ex}(n,F) \le C\,\mathrm{ex}(n,\mathcal{F})ex(n,F)≤Cex(n,F) for all large nnn. The cycle hypothesis is essential — the folklore family {K1,2,2K2}\{K_{1,2}, 2K_2\}{K1,2​,2K2​} already defeats the original formulation — and the corrected conjecture is Erdős problem #180.

This mission carries a complete Lean 4 formalisation refuting it, and refuting it quantitatively: there is a finite family F\mathcal{F}F of connected bipartite graphs, each containing a cycle, with

ex(n,F)=O ⁣(n4/3−1/48)whileex(n,F)=Ω ⁣(n4/3)  (F∈F).\mathrm{ex}(n,\mathcal{F}) = O\!\left(n^{4/3-1/48}\right) \qquad\text{while}\qquad \mathrm{ex}(n,F) = \Omega\!\left(n^{4/3}\right) \ \ (F \in \mathcal{F}).ex(n,F)=O(n4/3−1/48)whileex(n,F)=Ω(n4/3)  (F∈F).

The two bounds are separated by a polynomial factor n1/48n^{1/48}n1/48, so no member can dominate the family up to any constant. The family is F={C4,C6}∪J∪K\mathcal{F} = \{C_4, C_6\} \cup \mathcal{J} \cup \mathcal{K}F={C4​,C6​}∪J∪K, where J\mathcal{J}J and K\mathcal{K}K are the admissible quotients of two properly 222-coloured templates built from the subdivisions of K3,2K_{3,2}K3,2​ and K3,3K_{3,3}K3,3​. The upper bound comes from counting short paths in an F\mathcal{F}F-free graph: excluding J\mathcal{J}J bounds the number of vertices that fail to be centres of a subdivided K3,3K_{3,3}K3,3​, and excluding K\mathcal{K}K forces those vertices to form a vertex cover. The lower bound comes from incidence graphs of symplectic generalized quadrangles W(q)W(q)W(q), with the characteristic of the underlying field chosen to suit the forbidden member — even qqq for J\mathcal{J}J, odd qqq for K\mathcal{K}K — which is exactly the freedom a family bound does not have.

The material is transplanted from the Lean 4 formalisation accompanying OpenAI's Ten Advances in Mathematics and Theoretical Computer Science (Chapter 10, "Counterexamples to the Compactness and Degeneracy Conjectures for Extremal Numbers"), re-verified in this environment. Every node is proved; the mission is offered as a curated, closed campaign whose definitions and lemmas are reusable foundations for further work in extremal graph theory.

5 thms1 active userReviewed
🏆Completed
Captain: Shuze Chen

Erdős Problem 183: Multicolour Triangle Ramsey NumbersResearch Paper

How fast do multicolour Ramsey numbers grow? Write RkR_kRk​ for the least nnn such that every colouring of the edges of KnK_nKn​ with kkk colours contains a monochromatic triangle. The classical bounds, essentially unimproved for decades, place RkR_kRk​ between ckc^kck and e⋅k!e\cdot k!e⋅k!, and Erdős asked repeatedly whether the truth is closer to the exponential lower end — his Problem 183 asks whether Rk1/k→∞R_k^{1/k}\to\inftyRk1/k​→∞, i.e. whether the growth is genuinely superexponential.

This mission carries a complete Lean 4 formalisation resolving that question in the affirmative, with an explicit bound: Rk≥(16e38 k1/3/log⁡k)kR_k \ge \left(\tfrac{1}{6e^{38}}\,k^{1/3}/\log k\right)^{k}Rk​≥(6e381​k1/3/logk)k for all sufficiently large kkk, from which Rk1/k→∞R_k^{1/k}\to\inftyRk1/k​→∞ follows, together with the matching two-sided estimate log⁡Rk=Θ(klog⁡k)\log R_k = \Theta(k\log k)logRk​=Θ(klogk) pinning the sharp coefficients. The argument is constructive: it builds triangle-free colourings by a recursive palette construction whose colour count grows fast enough to beat every exponential.

The material is transplanted from the Lean 4 formalisation accompanying OpenAI's Ten Advances in Mathematics and Theoretical Computer Science, re-verified in this environment. Every node is proved — the mission is offered as a curated, closed campaign whose milestones map the attack path and whose lemmas are reusable foundations for further work on multicolour Ramsey theory.

2 thms1 active userReviewed
🏆Completed
Number TheoryTheoretical Computer Science·Captain: ShouqiaoWang

Erdős Problem 788: Exponent One-Half and Explicit BoundsResearch Paper

Erdős Problem 788 asks how large a set can always be retained when prescribed distinct pair-sums are forbidden. This mission formalizes the repository’s strengthened version of Theorem 1.1: an explicit lower bound valid for every n≥3n\ge 3n≥3, an eventual quantitative upper bound, the conclusion f(n)=n1/2+o(1)f(n)=n^{1/2+o(1)}f(n)=n1/2+o(1), and the exact affirmative answer to the original upper-bound question.

6 thms1 active userReviewed
Convex OptimizationOptimizationProbability·Captain: mikedeng1

Convex Optimization: Algorithms and Complexity XVII: Goemans–Williamson Rounding of the MAXCUT SDP Relaxation Has Expected Value at Least 0.878 Times the Maximum CutTextbook

Motivation

MAXCUT asks for a partition of the vertices of a weighted graph into two sets that maximizes the total weight of the edges between them. It is one of Karp's original NP-hard problems, so no polynomial-time exact algorithm is expected, and the natural question is how close a polynomial-time algorithm can come to the optimum. Sampling a uniformly random partition already achieves, in expectation, half of the optimal value. For two decades this factor 1/21/21/2 was essentially the best known.

Goemans and Williamson (J. ACM 42(6), 1995) replaced the combinatorial problem by a semidefinite relaxation, solvable in polynomial time by interior point methods, and rounded its solution with a random Gaussian hyperplane. They proved that the resulting cut has expected weight at least 0.8780.8780.878 times the maximum. The technique founded the use of semidefinite programming in approximation algorithms. Khot, Kindler, Mossel and O'Donnell (SIAM J. Comput. 37(1), 2007) showed that, assuming the Unique Games Conjecture, no polynomial-time algorithm achieves a better constant. Nesterov (Optim. Methods Softw. 9, 1998) extended the rounding analysis to maximizing any positive semidefinite quadratic form over the hypercube, with the constant 2/π2/\pi2/π.

This mission formalizes the presentation of these results in §6.6 of S. Bubeck, Convex Optimization: Algorithms and Complexity (arXiv:1405.4980v2), pp. 343–347.

Setting

Let n≥0n\ge 0n≥0 and let A∈Rn×nA\in\mathbb R^{n\times n}A∈Rn×n be a symmetric matrix with non-negative entries; Ai,jA_{i,j}Ai,j​ is the weight between points iii and jjj. The graph Laplacian is L=D−AL=D-AL=D−A, where DDD is the diagonal matrix with entries ∑j=1nAi,j\sum_{j=1}^n A_{i,j}∑j=1n​Ai,j​. For x∈{−1,1}nx\in\{-1,1\}^nx∈{−1,1}n the vector xxx encodes a partition, and MAXCUT is (6.7)

max⁡x∈{−1,1}nx⊤Lx.\max_{x\in\{-1,1\}^n} x^\top L x .x∈{−1,1}nmax​x⊤Lx.

Write ⟨M,X⟩=Tr⁡(M⊤X)\langle M,X\rangle=\operatorname{Tr}(M^\top X)⟨M,X⟩=Tr(M⊤X) for the Frobenius inner product and S+n\mathbb S^n_+S+n​ for the symmetric positive semidefinite matrices. Since x⊤Lx=⟨L,xx⊤⟩x^\top Lx=\langle L,xx^\top\ranglex⊤Lx=⟨L,xx⊤⟩ and xx⊤∈S+nxx^\top\in\mathbb S^n_+xx⊤∈S+n​ has unit diagonal, MAXCUT is bounded above by the SDP relaxation

max⁡{⟨L,X⟩:X∈S+n, Xi,i=1, i∈[n]}.\max\bigl\{\langle L,X\rangle : X\in\mathbb S^n_+,\ X_{i,i}=1,\ i\in[n]\bigr\}.max{⟨L,X⟩:X∈S+n​, Xi,i​=1, i∈[n]}.

A solution Σ\SigmaΣ of the relaxation is any feasible matrix attaining this maximum. The rounding draws ξ∼N(0,Σ)\xi\sim\mathcal N(0,\Sigma)ξ∼N(0,Σ), a centered Gaussian vector with covariance Σ\SigmaΣ, and outputs ζ=sign⁡(ξ)∈{−1,1}n\zeta=\operatorname{sign}(\xi)\in\{-1,1\}^nζ=sign(ξ)∈{−1,1}n coordinatewise.

Formalization targets

Goal: Theorem 6.11 (Goemans–Williamson)

For AAA symmetric with non-negative entries, L=D−AL=D-AL=D−A, Σ\SigmaΣ any solution of the relaxation, ξ∼N(0,Σ)\xi\sim\mathcal N(0,\Sigma)ξ∼N(0,Σ) and ζ=sign⁡(ξ)\zeta=\operatorname{sign}(\xi)ζ=sign(ξ):

E ζ⊤Lζ ≥ 0.878max⁡x∈{−1,1}nx⊤Lx.\mathbb E\,\zeta^\top L\zeta\ \ge\ 0.878\max_{x\in\{-1,1\}^n}x^\top Lx.Eζ⊤Lζ ≥ 0.878x∈{−1,1}nmax​x⊤Lx.

Milestones

  1. Bounded entries. If Σ∈S+n\Sigma\in\mathbb S^n_+Σ∈S+n​ and Σi,i=1\Sigma_{i,i}=1Σi,i​=1, then ∣Σi,j∣≤1|\Sigma_{i,j}|\le 1∣Σi,j​∣≤1 (remark in the proof of Lemma 6.12).
  2. Lemma 6.12 (Sheppard's formula). If ξ∼N(0,Σ)\xi\sim\mathcal N(0,\Sigma)ξ∼N(0,Σ) with Σi,i=1\Sigma_{i,i}=1Σi,i​=1 and ζ=sign⁡(ξ)\zeta=\operatorname{sign}(\xi)ζ=sign(ξ), then E ζiζj=2πarcsin⁡(Σi,j)\mathbb E\,\zeta_i\zeta_j=\frac{2}{\pi}\arcsin(\Sigma_{i,j})Eζi​ζj​=π2​arcsin(Σi,j​).
  3. Inequality (6.8). 1−2πarcsin⁡(t)≥0.878(1−t)1-\frac{2}{\pi}\arcsin(t)\ge 0.878(1-t)1−π2​arcsin(t)≥0.878(1−t) for all t∈[−1,1]t\in[-1,1]t∈[−1,1].
  4. Relaxation inequality. max⁡xx⊤Lx=max⁡x⟨L,xx⊤⟩≤⟨L,Σ⟩\max_{x}x^\top Lx=\max_x\langle L,xx^\top\rangle\le\langle L,\Sigma\ranglemaxx​x⊤Lx=maxx​⟨L,xx⊤⟩≤⟨L,Σ⟩ for every solution Σ\SigmaΣ.

The separately stated Laplacian identity on p. 346 is also included as a theorem item: if Xi,i=1X_{i,i}=1Xi,i​=1 for all iii, then ⟨L,X⟩=∑i,jAi,j(1−Xi,j)\langle L,X\rangle=\sum_{i,j}A_{i,j}(1-X_{i,j})⟨L,X⟩=∑i,j​Ai,j​(1−Xi,j​); for x∈{−1,1}nx\in\{-1,1\}^nx∈{−1,1}n, x⊤Lx=∑i,jAi,j(1−xixj)x^\top Lx=\sum_{i,j}A_{i,j}(1-x_ix_j)x⊤Lx=∑i,j​Ai,j​(1−xi​xj​).

Companion: Theorem 6.13 (Nesterov)

For B∈S+nB\in\mathbb S^n_+B∈S+n​, Σ\SigmaΣ a solution of max⁡{⟨B,X⟩:X∈S+n, Xi,i=1}\max\{\langle B,X\rangle : X\in\mathbb S^n_+,\ X_{i,i}=1\}max{⟨B,X⟩:X∈S+n​, Xi,i​=1}, ξ∼N(0,Σ)\xi\sim\mathcal N(0,\Sigma)ξ∼N(0,Σ) and ζ=sign⁡(ξ)\zeta=\operatorname{sign}(\xi)ζ=sign(ξ):

E ζ⊤Bζ ≥ 2πmax⁡x∈{−1,1}nx⊤Bx.\mathbb E\,\zeta^\top B\zeta\ \ge\ \frac{2}{\pi}\max_{x\in\{-1,1\}^n}x^\top Bx.Eζ⊤Bζ ≥ π2​x∈{−1,1}nmax​x⊤Bx.

Significance

The result. Theorem 6.11 is a polynomial-time randomized 0.8780.8780.878-approximation for MAXCUT: the relaxation is a semidefinite program, and sampling a Gaussian vector and taking signs is cheap. Repeated sampling turns the bound in expectation into a cut of value close to 0.8780.8780.878 times the optimum with high probability. The same scheme of relaxation followed by randomized rounding underlies approximation algorithms for MAX-2SAT, correlation clustering and quadratic programs over the hypercube, and Nesterov's Theorem 6.13 is the version for an arbitrary positive semidefinite objective.

Formalizing it. Both theorems were proved long ago. To our knowledge neither has a machine-checked proof in Mathlib. The platform has related statements from other books, in different forms: Grothendieck's identity for a standard Gaussian and two unit vectors, and the relaxation guarantee with a Grothendieck constant. This mission states the textbook's results for a Gaussian with a possibly singular covariance matrix, which is the form the rounding uses. A complete development needs Sheppard's formula for a degenerate bivariate Gaussian, an elementary but careful real-variable inequality, and a link between Mathlib's multivariate Gaussian and Gram factorizations of Σ\SigmaΣ. All three are reusable.

Difficulty

The algebra (the Laplacian identity and milestone 4) is routine. The probabilistic core is Lemma 6.12. The textbook argument reduces it to the probability that a uniformly random direction separates two unit vectors, which is "a quick picture" on paper. In Lean this requires showing that the pair (ξi,ξj)(\xi_i,\xi_j)(ξi​,ξj​) has the law of (⟨Vi,ε⟩,⟨Vj,ε⟩)(\langle V_i,\varepsilon\rangle,\langle V_j,\varepsilon\rangle)(⟨Vi​,ε⟩,⟨Vj​,ε⟩) for a standard Gaussian ε\varepsilonε, and then computing an angular measure in the plane, including the degenerate cases Σi,j=±1\Sigma_{i,j}=\pm1Σi,j​=±1, where the pair is supported on a line. A density-based argument fails there, because N(0,Σ)\mathcal N(0,\Sigma)N(0,Σ) has no density when Σ\SigmaΣ is singular, and singular solutions of the relaxation occur (for instance Σ=xx⊤\Sigma=xx^\topΣ=xx⊤). Inequality (6.8) is a statement about a transcendental function on a closed interval with a tight constant (0.8780.8780.878 against the true minimum ≈0.87856\approx0.87856≈0.87856), so crude estimates do not suffice near the minimizer t≈−0.689t\approx-0.689t≈−0.689.

Formalization scope

  • Matrices are Matrix (Fin n) (Fin n) ℝ, vectors Fin n → ℝ. S+n\mathbb S^n_+S+n​ is Matrix.PosSemidef, which includes symmetry, and ⟨M,X⟩\langle M,X\rangle⟨M,X⟩ is trace (Mᵀ * X).
  • N(0,Σ)\mathcal N(0,\Sigma)N(0,Σ) is Mathlib's ProbabilityTheory.multivariateGaussian 0 Σ on EuclideanSpace ℝ (Fin n), defined for every positive semidefinite Σ\SigmaΣ, singular ones included. Expectations are Bochner integrals against it, and each theorem also asserts integrability of its (bounded) integrand.
  • The sign is {−1,1}\{-1,1\}{−1,1}-valued: sign⁡(r)=1\operatorname{sign}(r)=1sign(r)=1 for r≥0r\ge0r≥0 and −1-1−1 for r<0r<0r<0. Mathlib's Real.sign would give sign⁡(0)=0\operatorname{sign}(0)=0sign(0)=0, which takes ζ\zetaζ out of {−1,1}n\{-1,1\}^n{−1,1}n; the two agree almost surely because Σi,i=1\Sigma_{i,i}=1Σi,i​=1.
  • The maximum over the hypercube is a finite maximum (Finset.sup') over the 2n2^n2n Boolean vectors read as ±1\pm1±1 vectors, so it is never a junk value. "The solution" of the relaxation means any maximizer, and maximizers exist since the feasible set is compact and contains the identity.
  • Standing hypotheses: in Theorem 6.11, AAA symmetric with non-negative entries (the book's MAXCUT setting); in Lemma 6.12, Σ\SigmaΣ positive semidefinite (implicit in "ξ∼N(0,Σ)\xi\sim\mathcal N(0,\Sigma)ξ∼N(0,Σ)"); in Theorem 6.13, BBB positive semidefinite. The identities of milestones 4 and 5 hold for every real matrix AAA and are stated without hypotheses on AAA.
  • Ruled out: tying ξ\xiξ's law to anything other than Σ\SigmaΣ, or dropping optimality of Σ\SigmaΣ, would make the goal false or vacuous; here the law is exactly N(0,Σ)\mathcal N(0,\Sigma)N(0,Σ) and Σ\SigmaΣ is a maximizer.
  • Welcome contributions: Sheppard's formula in Mathlib's multivariate Gaussian language, a proof of (6.8), and the Schur product theorem (A,B⪰0⇒A∘B⪰0A,B\succeq0\Rightarrow A\circ B\succeq0A,B⪰0⇒A∘B⪰0) used in Theorem 6.13.

Selected references

  • S. Bubeck, Convex Optimization: Algorithms and Complexity, Foundations and Trends in Machine Learning 8(3–4):231–358, 2015. arXiv:1405.4980v2
  • M. X. Goemans, D. P. Williamson, Improved approximation algorithms for maximum cut and satisfiability problems using semidefinite programming, J. ACM 42(6):1115–1145, 1995. doi:10.1145/227683.227684
  • Yu. Nesterov, Semidefinite relaxation and nonconvex quadratic optimization, Optim. Methods Softw. 9(1–3):141–160, 1998. doi:10.1080/10556789808805690
  • S. Khot, G. Kindler, E. Mossel, R. O'Donnell, Optimal inapproximability results for MAX-CUT and other 2-variable CSPs?, SIAM J. Comput. 37(1):319–357, 2007. doi:10.1137/S0097539705447372
  • W. F. Sheppard, On the application of the theory of error to cases of normal distribution and normal correlation, Phil. Trans. R. Soc. A 192:101–167, 1899. doi:10.1098/rsta.1899.0003
6 thms0 active usersReviewed
PreviousPage 11 of 11Next

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