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.
Fundamentals of Supply Chain Theory XII: The Vehicle Routing ProblemTextbook
Many vehicles, one depot
The vehicle routing problem asks for the cheapest set of delivery routes from a depot to a set
of customers when each vehicle can carry only so much. It generalizes the traveling salesman
problem, which is the case of a single vehicle of unlimited capacity, and it is the operational
problem behind every distribution fleet. Exact methods reach a few hundred customers; the
questions that shape fleet design are structural: how does the optimal routing cost compare with
the cost of a single grand tour, and how does it grow with the number of customers? Haimovich
and Rinnooy Kan (1985) answered both for unit demands
by bounding the optimal cost above and below in terms of the optimal TSP tour and the average
distance to the depot. Chapter 11 of Snyder and Shen's Fundamentals of Supply Chain Theory
(2019) presents that result with its full proof as
Theorem 11.6, and it is the goal of this mission.
Setting
Nodes are the depot 0 and customers 1,…,n, with distances cij that are symmetric,
nonnegative and satisfy the triangle inequality (VRPMetric). Every customer has demand 1 and
every vehicle capacity C, so a route is a sequence of at most C distinct customers,
served by one vehicle that leaves the depot, visits them in order and returns; its length is
routeCost c L. A solution is a family of routes visiting every customer exactly once
(IsVRPSolution), with total length solutionCost; the number of routes is free. The
optimal VRP valuez∗ (vrpOpt c C) is the least total length, the optimal TSP valuezT (tspOpt c) is the least length of a single route through all customers, and
cˉ (avgDepotDist) is the average distance from the depot to a customer.
Formalization targets
Goal: Theorem 11.6
For every metric instance with n≥1 customers and capacity C≥1,
max{2Cncˉ,zT}≤z∗≤2⌈Cn⌉cˉ+(1−C1)zT.
This is vrp_tsp_bounds.
Supporting targets
The three steps of the book's proof: the radial bound 2Cncˉ≤z∗, obtained
route by route from the triangle inequality and the capacity; the routing bound zT≤z∗;
and the iterated optimal tour partition bound (11.59), that for any tour Γ through all
customers some partition of its customer sequence into ⌈n/C⌉ consecutive routes
costs at most 2⌈n/C⌉cˉ+(1−⌈n/C⌉/n)z(Γ).
The chapter's other numbered results are not targets: Proposition 11.1 (state-space relaxation
of the routing dynamic program) and Theorem 11.2 (the capacitated comb inequality, proof
omitted, which needs the bin-packing function v(S)), and Theorems 11.3, 11.5, 11.7 and Lemma
11.4 (almost-sure asymptotics of random instances and the location-based heuristic), whose
proofs the book cites.
Significance
Theorem 11.6 is the quantitative link between routing and the two things a planner can estimate
without solving anything: the TSP length, which grows like n for random customers, and
the average depot distance. It says that the VRP cost is the TSP cost plus a radial term
2cˉ per vehicle, and that this decomposition is exact up to a factor bounded by the
capacity. The radial term explains Theorem 11.7, that the optimal cost grows linearly in n
for fixed capacity, and the tour partition heuristic in the proof is a practical
route-first-cluster-second method with a provable guarantee. The bounds are the basis of the
continuous approximation formulas used in strategic distribution design.
None of these results has a machine-checked proof. The book proves Theorem 11.6 in full. The
formal treatment of routes as lists and of the averaging argument over rotations of a tour is
reusable for the capacitated heuristics of Sect. 11.3.
Difficulty
The upper bound is an averaging argument that is easy to state and fiddly to formalize: for each
of the n rotations of the tour's customer sequence, the sequence is cut into blocks of C, and
one must count, across all rotations, how often each customer is the first or last of a block
and how often each tour edge is cut. The counts, ℓ=⌈n/C⌉ each, hold only after
the rotations are indexed carefully, and the passage from the average to the best rotation needs
the sum of the n solution costs computed exactly.
The lower bound has two parts with different flavors. The radial part needs, for each route,
that the closed route from the depot is at least twice the largest depot distance among its
customers, which is the triangle inequality applied along the route, followed by an averaging
step that uses the capacity. The routing part is a shortcutting argument: the routes of a
solution concatenate into a closed walk that revisits the depot, and removing the repeated depot
visits must not increase the length. The obvious idea, that a VRP solution is itself a tour, is
false, and the shortcut has to be constructed.
Formalization scope
Routes are lists of customers, solutions are lists of routes, and the feasibility predicate
requires nonempty routes of length at most C avoiding the depot, with the concatenation of
all routes a duplicate-free list containing every customer. Costs use the closed walk through
the depot followed by the route. The optimal values are infima of finite nonempty sets of reals,
nonempty because singleton routes are feasible when C≥1. The ceiling ⌈n/C⌉ is
Mathlib's Nat.ceil of the real quotient. The number of vehicles is unrestricted, as the
section assumes; the fixed-fleet version of the problem is not modeled.
The TSP value zT is defined as the least route cost over all orderings of the customers, so no
separate tour model is needed and the mission does not depend on the TSP mission of this series.
The definition module is shared by all five items. Problem 11.18 (tightness of both bounds) and
Theorem 11.7 for deterministic instance families are natural extensions on the same definitions.
M. Haimovich and A. H. G. Rinnooy Kan, Bounds and heuristics for capacitated routing problems, Mathematics of Operations Research 10(4), 1985. https://doi.org/10.1287/moor.10.4.527
Fundamentals of Supply Chain Theory XI: The Traveling Salesman ProblemTextbook
The problem every routing model contains
A salesman must visit n cities and return home by the shortest route. The traveling
salesman problem is the prototype of combinatorial optimization: easy to state, NP-hard
(Karp 1972), and solved to optimality on
instances with tens of thousands of nodes by branch-and-cut. In a supply chain it is the core of
every vehicle routing model and of the location-routing models of the chapters that follow.
Chapter 10 of Snyder and Shen's Fundamentals of Supply Chain Theory
(2019) covers the symmetric metric TSP, in which
distances satisfy the triangle inequality: the cutting planes of branch-and-cut (comb
inequalities), the construction heuristics with their worst-case guarantees, culminating in
Christofides' (1976) 3/2-approximation, and the
lower bounds of Little et al. and of Held and Karp
(1970). This mission formalizes those results, with
Christofides' theorem as its goal.
Setting
Nodes are N={1,…,n} with distances cij that are symmetric, nonnegative, zero on
the diagonal and satisfy the triangle inequality cij≤cik+ckj (IsMetric). A
tour is a visiting order τ of all the nodes, of length z(τ)=∑kc(τk,τk+1)
with indices mod n (tourLength); z∗ is the least tour length (optTourLength). A tour has
an edge set (tourEdges), and for a node set S the counts of tour edges inside S and leaving
S (edgesWithin, edgesLeaving) are the sums ∑i,j∈Sxij and ∑i∈S,j∈/Sxij
of the integer programming formulation. A comb is a handle H with an odd number s≥3 of
pairwise disjoint teeth, each meeting both H and its complement (IsComb); when every tooth
has exactly two nodes the comb is a 2-matching configuration.
The nearest neighbor heuristic always moves to a nearest unvisited node
(IsNearestNeighborTour); the nearest insertion heuristic grows a partial tour by inserting
the unvisited node nearest to it at the cheapest position (IsNearestInsertionRun, with
cycleLength and distToTour). The minimum spanning tree heuristic doubles an MST
(IsMST, graphWeight), takes an Eulerian tour of the doubled tree and shortcuts it,
visiting the nodes in order of first appearance (IsShortcut). Christofides' heuristic
instead adds to the MST a minimum-weight perfect matching on its odd-degree nodes
(oddNodes, IsMinMatchingOn) before taking the Eulerian tour. A 1-tree rooted at r is a
spanning tree on the other nodes plus two edges at r (Is1Tree); the revised distancescij′=cij+λi+λj (revisedCost) define the Held-Karp bound.
Formalization targets
Goal: Theorem 10.13
For every metric instance, every minimum spanning tree T∗, every minimum-weight perfect
matching M on the odd-degree nodes of T∗, every Eulerian tour of T∗+M and its shortcut
τ,
z(τ)≤23z∗.
This is christofides_bound.
Supporting targets
Theorem 10.1, the reduced-matrix bound ∑iρi+∑jκj≤z∗; Theorem 10.2,
Proposition 10.3 and Theorem 10.4, the 2-matching and comb inequalities valid for every tour;
Theorem 10.6, zNN≤21(⌈log2n⌉+1)z∗; Theorem 10.7, zNI≤2z∗;
Lemma 10.9, z(T∗)≤z∗; Theorem 10.10, Euler's theorem; Theorem 10.11, zMST≤2z∗;
Lemma 10.12, the handshaking lemma; Lemma 10.15, the 1-tree bound; Lemma 10.16, the revised
distance identities; Theorem 10.17, the Held-Karp bound. Theorem 10.5 (no constant-factor
approximation unless P = NP), Theorem 10.8 and the second part of Theorem 10.6 (tightness
instances), Lemma 10.14 (Euclidean tours do not cross), Lemma 10.18 (the integrality gap) and
Theorem 10.19 (the Beardwood-Halton-Hammersley asymptotics) are not targets.
Significance
Christofides' bound was the best approximation guarantee for the metric TSP for over forty
years, until the 3/2−10−36 of Karlin, Klein and Oveis Gharan
(2021), and it is the reference point against
which every heuristic in the chapter is measured: nearest neighbor has no constant bound,
nearest insertion and the MST heuristic achieve 2, Christofides 3/2. The comb inequalities
are the cuts that make branch-and-cut work, and the Held-Karp bound is the lower bound that
tells a practitioner how far a heuristic tour is from optimal. Theorem 10.1 is the historical
bounding rule of the first branch-and-bound algorithm.
None of these results has a machine-checked proof. The book proves Theorems 10.2, 10.11,
10.13 and 10.17 and Proposition 10.3 and Lemma 10.9, cites Theorems 10.6, 10.7 and 10.10, and
leaves Theorem 10.4 and Lemmas 10.12 and 10.16 as exercises. The formal infrastructure for
tours, shortcutting and Eulerian walks is reusable for the vehicle routing chapter.
Difficulty
Christofides' argument has three steps and each has a formal obstacle. The MST bound is a
spanning-path argument that needs the removal of an edge from a tour to yield a tree, in
Mathlib's terms a connected acyclic subgraph of the complete graph. The matching bound is the
subtle one: the optimal tour shortcut to the odd-degree nodes, of length at most z∗ by the
triangle inequality, is an even cycle whose alternate edges form two perfect matchings on those
nodes, the cheaper of which costs at most z∗/2; formalizing the decomposition of a cycle on an
even node set into two matchings, and the shortcut's length bound, is the bulk of the work. The
final step, that shortcutting an Eulerian walk does not lengthen it, is an induction along the
walk using the triangle inequality on the skipped stretches, and it needs the first-occurrence
order to be handled explicitly.
The obvious approach to the heuristic bounds, comparing the heuristic tour directly with the
optimal tour, fails; every proof goes through a spanning tree. For nearest insertion the tree is
Prim's, grown in the same order as the insertions, and the bound charges each insertion cost to
a tree edge; for nearest neighbor the argument of Rosenkrantz et al. bounds the sum of the k
largest steps by 2z∗ for each k and sums a geometric series, which is where the logarithm
comes from.
The comb inequalities are counting arguments on degrees, but the general comb of Theorem 10.4
needs the case analysis of how a tour enters and leaves each tooth. Euler's theorem in the
sufficiency direction is Hierholzer's construction, which is not in Mathlib.
Formalization scope
Tours are permutations of Fin n, so a tour is an ordering rather than an edge set, and every
tie-breaking of a heuristic is covered by a predicate on its output rather than by an algorithm.
Graphs are Mathlib SimpleGraphs on Fin n; the multigraphs of the two tree heuristics are
represented by closed walks with prescribed edge multisets, and shortcutting is the
first-occurrence order along the walk's node sequence. All degree and edge-set computations use
classical decidability. Theorems on tours assume n≥3 where a tour must have distinct
edges, n≥1 otherwise.
Theorem 10.1 is stated for the reduction of the full off-diagonal matrix, because the book's
upper-triangular version is false: a random metric instance violates it, since the last row and
first column of a triangular matrix are empty and the two edges at a node need not be one row
and one column entry. The full-matrix version is the statement of Little et al. It is stated for
n≥2, because a one-node "tour" is a self-loop that no off-diagonal entry constrains.
Theorem 10.4 is stated with the comb inequality's right-hand side corrected to
∣H∣+∑k(∣Tk∣−1)−21(s+1), the standard form. The book prints
+21(s−1), which contradicts its own 2-matching special case (10.15) and is weaker by
s. The corrected statement implies the printed one.
The 1-tree root is an explicit node r, the book's node 1. The nearest insertion run is a
sequence of lists indexed by iteration, and the theorem compares the n-th list's closed length
with z∗; a run always exists, so the hypothesis is satisfiable.
The definition module is shared by all fifteen items. Theorem 10.8 and Problem 10.12
(tightness of the bounds of 2), the second part of Theorem 10.6, and Lemma 10.18 on the
integrality gap are natural extensions on the same definitions.
N. Christofides, Worst-case analysis of a new heuristic for the travelling salesman problem, Report 388, GSIA, Carnegie Mellon University, 1976; reprinted in Operations Research Forum 3, 2022. https://doi.org/10.1007/s43069-021-00101-z
D. J. Rosenkrantz, R. E. Stearns and P. M. Lewis II, An analysis of several heuristics for the traveling salesman problem, SIAM Journal on Computing 6(3), 1977. https://doi.org/10.1137/0206041
M. Held and R. M. Karp, The traveling-salesman problem and minimum spanning trees, Operations Research 18(6), 1970. https://doi.org/10.1287/opre.18.6.1138
J. D. C. Little, K. G. Murty, D. W. Sweeney and C. Karel, An algorithm for the traveling salesman problem, Operations Research 11(6), 1963. https://doi.org/10.1287/opre.11.6.972
M. Grötschel and M. W. Padberg, On the symmetric travelling salesman problem I and II, Mathematical Programming 16, 1979. https://doi.org/10.1007/BF01582116
Complex Scheduling III: Interval Consistency Tests for the RCPSPTextbook
Motivation
Exact methods for the resource-constrained project scheduling problem — branch-and-bound over
activity lists or over start-time assignments, and the lower-bound computations inside them —
live or die by how much of the search space can be discarded before it is enumerated. The
standard tool is constraint propagation: deducing, from the precedence, resource and
time-window data, new precedence relations i→j that every feasible schedule must satisfy,
and tighter time windows for the activities. Brucker and Knust's Section 3.6
(doi:10.1007/978-3-642-23929-8) presents the
family of interval consistency tests — input, output, input-or-output and their negations —
that constraint-programming schedulers apply at every node of the search, following Carlier and
Pinson (An algorithm for solving the job-shop problem, Management Science 35, 1989,
doi:10.1287/mnsc.35.2.164) and Baptiste, Le Pape and
Nuijten (Constraint-Based Scheduling, Kluwer, 2001,
doi:10.1007/978-1-4615-1479-4). Every test is an
instance of one theorem, Theorem 3.7, and its cumulative-resource analogue, Theorem 3.8. Those
two theorems, and the tests as their corollaries, are this mission.
Setting
The instance is the RCPSP of mission I: activities 0,…,n−1 with integer processing times
pi, renewable resources k with capacities Rk and demands rik, and precedence arcs;
a schedule is an integer start-time vector S, feasible when it meets the precedences and never
exceeds a capacity. Section 3.6 adds three things.
Relations. A conjunctioni→j holds in S when Si+pi≤Sj. Two activities are
parallel, i∥j, when they overlap for at least one time unit, and a disjunctioni−j is the negation of that: i→j or j→i. The instance carries a set C of
conjunctions and a set D of disjunctions that every feasible schedule must satisfy; initially
C0 is the precedence relation and D0 the pairs whose combined demand exceeds some capacity,
and propagation adds to them.
Disjunctive sets. A set I of at least two activities is disjunctive when any two of its
members are related by a disjunction or a conjunction, so no two are ever processed together:
the activities of a unit-capacity resource, the jobs of a single machine, the operations of one
job in a shop. Its total processing time is P(I)=∑i∈Ipi.
Time windows. Each activity has a head ri and a deadline di, and a feasible schedule
has ri≤Si and Si+pi≤di. An activity starts first in a set J when no activity
of J starts earlier, and ends last when none completes later.
For a cumulative resource k the work of activity i is wi=rikpi and
W(J)=∑i∈Jwi.
Formalization targets
Goal — Theorem 3.7 (printed p. 169)
Let I be a disjunctive set, J⊆I, and J′,J′′ proper subsets of J with
J′∪J′′=∅. If
ν∈J∖J′,μ∈J∖J′′ν=μmax(dμ−rν)<P(J),
then in every feasible schedule an activity from J′ starts first in J or an activity from
J′′ ends last in J.
The first infeasibility test (printed p. 169)
If some nonempty J⊆I has maxμ∈Jdμ−minν∈Jrν<P(J), no
feasible schedule exists.
The input test (3.123) and the output test (3.124) (printed p. 171)
For Ω⊆I nonempty and i∈I∖Ω: if
maxμ∈Ω∪{i}dμ−minν∈Ωrν<P(Ω)+pi then i→j for all
j∈Ω; symmetrically, if maxμ∈Ωdμ−minν∈Ω∪{i}rν<P(Ω)+pi
then j→i for all j∈Ω.
The input-or-output test (printed p. 170)
For i,j∈J⊆I, ∣J∣≥2: if maxμ∈J∖{j}dμ−minν∈J∖{i}rν<P(J)
then i starts first in J or j ends last in J, and i→j when i=j.
Theorem 3.8 (printed p. 186)
For a cumulative resource k, J⊆Ik and proper subsets J′,J′′ of J: if
Rk(maxμ∈J∖J′′dμ−minν∈J∖J′rν)<W(J) then an
activity from J′ starts first in J or an activity from J′′ ends last in J.
Significance
Theorem 3.7 is the single statement behind a whole toolbox. Every interval consistency test in
the literature — the input and output tests that fix a new conjunction, the input-or-output
test, the negation tests that only shrink a window — is the theorem with a particular choice of
J′ and J′′, and the book's Section 3.6.4 derives them one by one. A propagation engine that
applies these tests to a fixpoint is what makes branch-and-bound for the job shop and the RCPSP
practical; Carlier and Pinson's solution of the 10×10 job-shop instance is the historical
demonstration. Theorem 3.8 extends the same reasoning from disjunctive to cumulative resources
by replacing "no overlap" with "at most Rk units per time unit", the energetic-reasoning
viewpoint that the rest of Section 3.6.5 develops.
The results are elementary and proved; formalizing them fixes, once, what "feasible" means in
the presence of the relation sets C and D and time windows, on top of the RCPSP model of
mission I. That layer is reusable: the start-start distance matrix of Section 3.6.2 and the
symmetric-triple rules of Section 3.6.3 are statements about the same schedules and the same
relations. Nothing here is on the platform or in Mathlib.
Difficulty
The obvious argument for Theorem 3.7 is the correct one, and its difficulty is in the
bookkeeping. If no activity of J′ starts first and none of J′′ ends last, the first starter
is some ν∈J∖J′ and the last finisher some μ∈J∖J′′, and every
activity of J is processed inside [Sν,Sμ+pμ]⊆[rν,dμ]. Since the
activities of a disjunctive set are pairwise non-overlapping, their total length P(J) fits in
that interval, contradicting (3.121). The formal work is the packing lemma: pairwise disjoint
integer intervals inside an interval of length L have total length at most L, which requires
ordering the activities by start time and an induction that Mathlib does not supply.
The subtle point is the restriction ν=μ in (3.121). The book allows it because "an
activity which starts first cannot complete also last" when there are at least two activities
with positive durations. The formal statement reads "starts first" and "ends last" with ≤,
which makes the theorem true without a positivity hypothesis: when the restriction empties the
index set, J∖J′=J∖J′′={x}, the conclusion holds because x cannot be both
the unique first starter and the unique last finisher of a disjunctive set with two or more
members. A solver should expect to handle that corner separately.
For the tests the extra step is turning "starts first" into a conjunction i→j, which uses
the disjunction between i and j together with positive processing times: with pj=0 an
activity could start at the same instant as i without violating the disjunction, so the tests
carry the positivity hypothesis that Theorem 3.7 itself does not need. Theorem 3.8 replaces the
packing lemma by a work-counting lemma: over an interval of length L a resource of capacity
Rk supplies at most RkL units, and every activity of J consumes rikpi of them.
Formalization scope
Schedules are integer start-time vectors on Fin n, as in missions I and II, and a feasible
schedule of this mission is one that is FeasibleSchedule for the RCPSP instance (mission I),
respects the arcs of C (RespectsArcs, mission II), satisfies the disjunctions of D and lies
within the time windows; these four hypotheses are the book's "feasible schedule" in Section 3.6
and are carried on every statement, although the arguments use only the last two, or, for
Theorem 3.8, the resource constraint and the windows. The sets C and D are parameters, not
derived from the instance, since propagation enlarges them.
Every inequality "max(⋅)−min(⋅)<P" is stated as the family of inequalities
dμ<rν+P over the same index pairs. This is equivalent, avoids natural-number
subtraction, and gives an empty index set the value the convention max∅=−∞
would: the hypothesis is then vacuous. "Starts first" and "ends last" use ≤. Proper-subset
hypotheses J′⊂J, J′′⊂J are the book's; the first infeasibility test needs J
nonempty, and the input-or-output test needs ∣J∣≥2.
A trivializing reading is ruled out on the disjunctive side by the nonemptiness hypotheses (an
empty J would make the infeasibility test's family vacuous and its conclusion false) and on the
cumulative side by the observation that Theorem 3.8 with J′=J′′=∅ asserts
infeasibility, which is the book's intended reading. Welcome contributions beyond the milestones:
the input-negation and output-negation tests, the window-tightening rules of Section 3.6.4, and
the SSD-matrix results of Section 3.6.2.
Selected references
Peter Brucker and Sigrid Knust, Complex Scheduling, 2nd ed., Springer, 2012, Section 3.6.
doi:10.1007/978-3-642-23929-8
Jacques Carlier and Eric Pinson, An algorithm for solving the job-shop problem, Management
Science 35 (1989). doi:10.1287/mnsc.35.2.164
Philippe Baptiste, Claude Le Pape and Wim Nuijten, Constraint-Based Scheduling, Kluwer, 2001.
doi:10.1007/978-1-4615-1479-4
Ulrich Dorndorf, Erwin Pesch and Toàn Phan-Huy, Constraint propagation techniques for the
disjunctive scheduling problem, Artificial Intelligence 122 (2000).
doi:10.1016/S0004-3702(00)00040-0
Scheduling Algorithms V: Preemptive Scheduling on Uniform MachinesTextbook
Motivation
When several processors share a workload, the first question is how long the workload takes if
it is spread out as well as possible. If a job may be interrupted and resumed later, possibly on
another processor — preemption, the setting of operating systems, of communication links and
of any resource that can be time-shared — the answer is a closed formula, and it is one of the
oldest results in scheduling: McNaughton's wrap-around rule of 1959 (Scheduling with deadlines
and loss functions, Management Science 6,
doi:10.1287/mnsc.6.1.1) shows that on identical machines
the optimal makespan is the larger of the longest job and the average load. Horvath, Lam and
Sethi (A level algorithm for preemptive scheduling, Journal of the ACM 24, 1977,
doi:10.1145/321992.321995) extended this to machines of
different speeds, and Gonzalez and Sahni (Preemptive scheduling of uniform processor systems,
Journal of the ACM 25, 1978, doi:10.1145/322047.322055)
gave the fast algorithm with few preemptions. Brucker's Chapter 5
(doi:10.1007/978-3-540-69516-5) presents the
level-algorithm version, and this mission formalizes the statements it proves about schedules.
Setting
There are njobs with processing requirements p1,…,pn>0 and muniform
machines with speeds s1,…,sm>0: running job i on machine j for a period of length
ℓ performs sjℓ units of its requirement, so the whole job would take pi/sj time
units there. Identical machines are the case s1=⋯=sm=1.
A preemptive schedule is a finite list of pieces, each a job, a machine, a start time and
a stop time. It is feasible for the data (s,p) when every piece lies in [0,∞), no
two pieces on the same machine overlap, no two pieces of the same job overlap (a job is on at
most one machine at any instant), and every job i receives total work exactly pi over its
pieces. Its makespanCmax is the largest stop time; the completion timeCi of
job i is the largest stop time of one of its pieces. A schedule is nonpreemptive when every
job consists of a single piece.
Following Section 5.1.2 the data are sorted, p1≥⋯≥pn and s1≥⋯≥sm,
with n≥m, and one writes Pj=∑i≤jpi, Sj=∑i≤jsi. For a set A of
jobs, h(A)=S∣A∣ if ∣A∣≤m and h(A)=Sm otherwise: the largest combined speed that
∣A∣ jobs can use at one instant.
Formalization targets
Goal — Theorem 5.8 (printed p. 127)
The optimal makespan of Q∣pmtn∣Cmax is the bound (5.5):
w=max{j=1maxm−1SjPj,SmPn},
in the sense that some feasible preemptive schedule has makespan exactly w and no feasible
preemptive schedule has a smaller makespan.
The lower bound (5.5) (printed p. 125)
Every feasible preemptive schedule has makespan at least w.
P∣pmtn∣Cmax (printed p. 108)
On identical machines, LB=max{maxipi,m1∑ipi} is a lower bound on the
makespan and is attained by some feasible preemptive schedule.
Condition (5.8) (printed p. 129)
The jobs can be scheduled preemptively within [0,T] if and only if
∑i∈Api≤Th(A) for every set A of jobs.
Theorem 5.7 (printed p. 121)
For P∣pmtn∣∑wiCi with nonnegative weights there is an optimal schedule without
preemption.
Significance
Theorem 5.8 turns an optimization over an infinite family of schedules into a formula in the
data, and the formula is tight in both directions: each of its terms is a resource bound that
some schedule meets exactly. That is what makes preemptive makespan minimization one of the few
parallel-machine problems that is solvable at all — its nonpreemptive counterpart
P2∥Cmax is NP-hard (p. 124) — and it is why the preemptive relaxation appears as a
bound inside branch-and-bound methods for the nonpreemptive problems.
Condition (5.8) is the form in which the result is reused. It is a Hall-type condition, one
inequality per set of jobs, and it is exactly what Section 5.1.2 needs to prove Theorem 5.9,
which decides Q∣pmtn;ri∣Lmax by a maximum flow in an expanded network. Theorem
5.7 is the complementary statement for the other classical objective: for total weighted
completion time preemption buys nothing, so the nonpreemptive solutions of Section 5.1.1 are
optimal in the larger class too.
On status: every statement here is classical and proved, and the formalization adds a checked
model of preemptive schedules. Mathlib has no scheduling material, and the platform's
SchedulingAlgorithms series so far models only single-machine sequences (missions I, II, IV)
and two-machine permutation flow shops (mission III), none of which allow a job to be split. The
piece-list model of this mission is the first reusable object for preemptive and parallel-machine
problems, and the later sections of Chapter 5 — Q∣pmtn;ri∣Lmax, P∣pmtn∣Lmax — are stated in it.
Difficulty
The obvious first idea for the goal is to run McNaughton's rule with the speeds ignored. It fails
on uniform machines: filling machines one after another does not respect the constraint that a
long job on a slow machine is not done when a short job on a fast one is. The correct idea is the
level algorithm — always process the jobs of highest remaining requirement on the fastest free
machines, sharing machines among tied jobs — and the difficulty is in the analysis rather than
the idea. The proof of Theorem 5.8 has to show that the schedule it produces ends exactly at one
of the terms of w: either no machine idles before the end, giving Pn/Sm, or the machines
finish in speed order with the first j jobs busy from time 0, giving Pj/Sj. Making that
case analysis rigorous requires tracking that the order of remaining requirements is preserved
over time (the invariant (5.6)) and that ties are broken consistently.
A second, formal difficulty is that the level algorithm's output is defined by continuous-time
events (the next completion, the next time two levels coincide), so producing an explicit
finite list of pieces with the required properties is itself a construction. Any proof must
build a concrete schedule; "the infimum of makespans equals w" is not the goal.
For the lower bound the trap is the opposite: it is tempting to argue only with total capacity
SmT, which gives Pn/Sm but not Pj/Sj. The latter needs the rule that a job is on at
most one machine at a time, so that j jobs run at combined speed at most Sj; a model that
let a job be split across machines simultaneously would make the theorem false, and the
definition of feasibility rules it out explicitly.
Formalization scope
A schedule is a List of Pieces over jobs Fin n and machines Fin m, with real start and
stop times. Feasibility is the three-part condition of the Setting, disjointness of two pieces
meaning one stops no later than the other starts. Work is measured with the machine's speed, so
the same definitions cover identical machines as the constant speed 1. Pieces of length zero
and unsorted lists are allowed; both are harmless.
The sorted orders are hypotheses Antitone p and Antitone s, the speeds and requirements are
positive, m≥1 and, where the book assumes it, n≥m. The book's normalization s1=1 is
not assumed: every statement here is invariant under scaling all speeds, and the book uses the
normalization only for a running-time estimate. The bound w is defined as the maximum of an
explicit nonempty finite set, so no supremum of an empty or unbounded set occurs; LB takes a
proof that n≥1 so that maxipi is meaningful.
Two things are deliberately not stated. The level algorithm itself is not transcribed: Theorem
5.8 is stated as the existence of an optimal schedule of makespan w, which is what its proof
establishes. And Theorem 5.9, the flow characterization for Q∣pmtn;ri∣Lmax, is
left for a later mission, since it needs release times and the expanded network on top of this
model.
A trivializing reading is excluded by the existential form of the goal and of Theorem 5.7: each
asserts that an optimal schedule exists, not merely that any optimal schedule has a property. A
proof of the goal has to construct a schedule; a proof of Theorem 5.7 has to construct a
nonpreemptive one that beats every preemptive competitor. Contributions welcome beyond the
milestones: a general lemma that a feasible schedule can be normalized to sorted, positive-length
pieces, and a proof that (5.8) for the sets {1,…,j} is equivalent to w≤T.
The NRL Plasma Formulary is a standard desk reference of the plasma-physics community: a compilation of the formulas, constants and unit conversions used in daily practice. Its opening section, "Numerical and Algebraic" (p. 3 of the 2013 edition), collects the few purely mathematical identities the rest of the handbook leans on. Two of them are exact summation formulas rather than approximations, and the first is the Rothe–Hagen identity, quoted there as valid "for all complex x, y, z except when singular" and attributed to H. W. Gould's work on binomial coefficient summations.
Unlike the handbook's numerical entries, this identity is a theorem with a precise hypothesis set, and it is exactly the kind of entry a reader takes on trust. It generalizes the Vandermonde convolution, it is the coefficient identity underlying the generalized binomial series, and it specializes to Abel's binomial theorem. Formalizing it turns one line of a reference handbook into a machine-checked statement and produces, as a by-product, a reusable Lean development of binomial coefficients with an arbitrary complex upper index.
Setting
For a complex number w and a natural number k, the generalized binomial coefficient is the falling factorial divided by a factorial,
(kw)=k!w(w−1)⋯(w−k+1)=k!1j=0∏k−1(w−j),
with the empty-product convention (0w)=1. It is a polynomial in w of degree k, and it agrees with the usual binomial coefficient when w is a natural number.
Fix complex parameters x, y, z and, for k∈N, consider the Rothe factor
Ak(x,z)=x+kzx(kx+kz),
which is defined whenever x+kz=0. The factor x+kz in the denominator cancels against the leading factor of the falling factorial, so Ak(x,z) extends to a polynomial in x and z: A0(x,z)=1 and, for k≥1,
Ak(x,z)=k!x(x+kz−1)(x+kz−2)⋯(x+kz−k+1).
Both forms occur in the literature; the mission carries both and asks for the comparison between them, because the quotient form is the one printed in the handbook while the polynomial form is the one that carries no side condition.
Formalization targets
Goal — the Rothe–Hagen identity, as printed
For complex x,y,z and n∈N, provided x+kz=0 and y+kz=0 for every 0≤k≤n, and x+y+nz=0,
This is the handbook's line, with its "except when singular" proviso made explicit as the three non-vanishing hypotheses.
Stronger — the identity with no side condition
k=0∑nAk(x,z)An−k(y,z)=An(x+y,z),
in terms of the polynomial form Ak above. This version holds for all complex x,y,z, with no exceptional locus, and implies the printed form wherever the latter's denominators are non-zero.
The first is Pascal's rule for a complex upper index; the second is the Vandermonde convolution over C, which is the case z=0 of the goal.
Significance
The identity is the convolution law of the generalized binomial series: the formal power series Bz(t) solving B=1+tBz satisfies Bz(t)x=∑n≥0An(x,z)tn, so the goal is the statement Bzx⋅Bzy=Bzx+y read off coefficientwise (Graham–Knuth–Patashnik, Concrete Mathematics, §5.4). Consequences include Abel's binomial theorem, the Lagrange-inversion count of z-ary trees, and ballot-type identities in lattice-path enumeration.
Mathlib provides the Vandermonde convolution for natural-number arguments (Nat.add_choose_eq), the ascending and descending Pochhammer polynomials, and Ring.choose for binomial rings; it does not contain the Rothe–Hagen identity in any form. The four statements of this mission are therefore new formal content, and the complex-upper-index binomial API they force is reusable well beyond the mission.
The identity is classical and has been proved many times since Rothe (1793) and Hagen (1891), with the modern treatment in Gould's papers; nothing here is open mathematics. What is missing is a machine-checked proof.
Difficulty
The obvious attack — induction on n using Pascal's rule — does not close as stated: the summand Ak(x,z) is not Pascal-stable, since shifting x by 1 moves x+kz for every k at once, and the induction hypothesis is about a different family. The standard proofs instead treat both sides as polynomials in x and y for fixed z and n, verify the identity on an infinite set of points where a combinatorial reading is available, and conclude by the identity theorem for polynomials; or they extract coefficients from the generalized binomial series via Lagrange inversion. Either route needs infrastructure: a two-variable polynomial-identity argument over C, or a formal-power-series compositional inverse.
A second, more prosaic difficulty is the singular locus. The printed identity divides by x+kz for every k≤n, and in Lean division by zero returns zero rather than failing, so a formalization that drops the non-vanishing hypotheses states a different — and in general false — claim.
Formalization scope
All statements are over C. The generalized binomial coefficient is defined as an explicit product over Finset.range k divided by (k ! : ℂ), so (0w)=1 holds definitionally and no Nat.choose coercion enters. Sums run over Finset.range (n+1), with the complementary index written as the truncated natural subtraction n - k; inside that range this is the ordinary n−k, so the truncation convention is never exercised.
The proviso "except when singular" is formalized as three explicit hypotheses — x+kz=0 for all k≤n, y+kz=0 for all k≤n, and x+y+nz=0 — rather than by relying on Lean's junk value for division by zero. These hypotheses are satisfiable (for instance z=0, x=y=1), so the goal is not vacuous, and they constrain only denominators, so they do not trivialize the sum.
The singularity-free milestone commits to a total function rotheA defined by cases on k, with value 1 at k=0; the comparison milestone pins that function to the quotient form under the non-vanishing hypothesis, so the mission cannot be satisfied by proving facts about a differently normalized object.
Contributions welcome beyond the milestones: complex-upper-index binomial API (symmetry, negation (k−w)=(−1)k(kw+k−1), polynomiality in the upper index), and any formal-power-series development supporting Lagrange inversion.
H. W. Gould, "Note on Some Binomial Coefficient Identities of Rosenbaum", Journal of Mathematical Physics10, 49 (1969). https://doi.org/10.1063/1.1664760
H. W. Gould and J. Kaucky, "Evaluation of a Class of Binomial Coefficient Summations", Journal of Combinatorial Theory1, 233–247 (1966). https://doi.org/10.1016/S0021-9800(66)80051-9
R. L. Graham, D. E. Knuth, O. Patashnik, Concrete Mathematics, 2nd ed., Addison-Wesley, 1994, §5.4 (generalized binomial series).
A convex combination expresses a point as a weighted average of other points. Such representations connect geometric sets with finite lists of coordinates and coefficients. A point in a convex hull may initially be described using many generators, even when the ambient space has small dimension. Carathéodory's theorem gives a bound depending only on that dimension. Grünbaum presents this result as a basic theorem of convexity in Convex Polytopes, §2.3, Theorem 5, printed page 15 (the supplied source PDF, page 33).
Sets, points, and weights
Fix a natural number d. Real d-space consists of vectors with d real coordinates. Let A be any subset of this space. A convex combination of points of A is a finite sum of those points multiplied by nonnegative real coefficients, with the coefficients adding to one. The convex hullconvA is the set of all such combinations; equivalently, it is the smallest convex set containing A.
The generating set A can be finite or infinite. It need not be closed, bounded, or convex. Membership of a point x in its convex hull is the sole geometric assumption. The theorem concerns exact equality of vectors, so the representation is not an approximation or a limiting expression.
A dimension bound for every hull point
For every x∈convA, find points v0,…,vd∈A and real numbers w0,…,wd satisfying
wi≥0(0≤i≤d),i=0∑dwi=1,x=i=0∑dwivi.
This is the complete target of Theorem 2.3.5. The witnesses may depend on d, A, and x. No single selection of points must work for every point of the hull. Repeated points are permitted, and some coefficients may be zero. Thus the fixed list of d+1 positions can express a combination that uses fewer distinct points.
What the representation provides
The result gives a finite certificate for membership in a convex hull whose length is controlled by dimension rather than by the size of the generating set. In the plane it gives three positions, and in three-dimensional space it gives four. Infinite generating sets remain within the same statement: once a particular hull point is chosen, only finitely many generators are needed for its certificate.
The mission asks for a formal proof of this known mathematical result in its fixed-length formulation. Its content is the existence of points and normalized coefficients together. Supplying coefficients without ensuring that their points lie in A, or supplying a finite representation without the dimension bound, would leave part of the target unestablished.
The constraint that must be met
The definition of the convex hull guarantees a finite representation but does not directly fix its length at d+1. The dimension bound must hold while preserving nonnegativity, normalization, membership in the original generating set, and exact equality with the selected point. None of these constraints can be replaced by a condition on nearby points or on the closure of A.
Scope and boundary conventions
The coordinate model is Fin d → ℝ. Both the point list and the coefficient list are indexed by Fin (d + 1), corresponding to the source indices from zero through d. The convex hull, finite sums, and real scalar multiplication have their standard mathematical meanings. No additional geometric definition is needed.
Dimension zero has one position in the representation. If A is empty, its convex hull is empty, so there is no hull point to represent. A singleton generating set and sets contained in a proper affine subspace are allowed. Neither strict positivity of the weights nor affine independence of the selected points is required. The target does not assert uniqueness of a representation.
Selected reference
Branko Grünbaum, Convex Polytopes, second edition, Springer, 2003, Chapter 2, §2.3, Theorem 5, printed page 15; supplied source.pdf, page 33.
Convex Polytopes III: Closed convex sets and recession geometryTextbook
A convex set contains the segment joining any two of its points. For a bounded closed convex set in finite-dimensional real space, extreme points describe the set through convex combinations. An extreme point cannot lie strictly between two distinct points of the set. Allowing unbounded sets introduces a second ingredient: directions in which one can move indefinitely while remaining in the set.
This mission concerns that second ingredient and its interaction with extreme points. A closed convex set is line-free if it contains no entire straight line. It may nevertheless contain rays and be unbounded. Its characteristic cone consists of directions v for which x + t v stays in the set whenever x belongs to the set and t is nonnegative. For a nonempty closed convex set, checking one basepoint gives the same cone as checking every basepoint. Thus the cone records the directions of recession without singling out an origin inside the set.
The goal is Grünbaum’s Theorem 2.5.6:
K=ccK+conv(extK)
for every line-free, closed convex set K in real d-dimensional space. The plus sign denotes Minkowski addition: all sums of one point from each set. The equation says that every point of K is a recession vector plus a finite convex combination of extreme points. Conversely, each such sum belongs to K. There is no topological closure around the convex hull in this equation.
A ray illustrates the two ingredients. Its endpoint is its only extreme point, while its characteristic cone supplies every nonnegative displacement along the ray. A singleton has only itself as an extreme point and has zero characteristic cone. A whole straight line shows why the line-free hypothesis matters: it has no extreme points and cannot be recovered from their convex hull by this formula.
The ambient dimension is arbitrary and finite; the set need not be full-dimensional or polyhedral. The characteristic cone is defined using all basepoints, so its value on the empty set is the whole ambient space. Since the empty set has no extreme points, its convex hull and the displayed Minkowski sum are empty, and the equation remains valid. This convention extends the formula without asserting that the book defines a characteristic cone at an absent basepoint.
The source is Branko Grünbaum, Convex Polytopes, second edition (2003), §2.5, Theorem 6, printed page 25 (PDF page 43). The characteristic cone and line-free condition appear on printed page 24 (PDF page 42); extreme points are defined in §2.4 on printed page 17 (PDF page 35). These definitions supply the vocabulary for the single representation goal.
Cannon-Floyd-Parry: tree diagrams and the normal form for Thompson's group FTextbook
Why tree diagrams
Thompson's group F is a finitely presented group of piecewise-linear homeomorphisms of the
unit interval that has served since the 1960s as a standard supply of counterexamples in
combinatorial group theory: its commutator subgroup is simple, every proper quotient of it is
abelian, it contains no free subgroup of rank two, it is not elementary amenable, and whether it
is amenable is a question Cannon, Floyd and Parry report as having been raised by Geoghegan in
1979 and still open when they wrote
(CFP96, §4 and p. 227).
Almost nothing about F is computed directly from that analytic definition. What makes the group
tractable is a combinatorial calculus: each element is encoded by a pair of finite binary trees,
and multiplication becomes a cancellation between trees. Cannon, Floyd and Parry credit the
device to Brown and devote §2 of their notes to it; everything later in those notes that requires
a computation — the two presentations of §3, the normal subgroup lattice of §4, the treatment of
Thompson's group T in §5 — runs through it.
This mission formalizes that calculus and the normal form it yields.
Setting
A real number is dyadic when it has the form m/2k with m an integer and k a
nonnegative integer. Thompson's group F consists of the increasing homeomorphisms of
[0,1] that are piecewise linear with finitely many breakpoints, all breakpoints dyadic and
every slope an integer power of 2, under composition. Two of its elements are
and from them come X0=A and Xn=A−(n−1)BAn−1 for n≥1, so that
X1=B.
A standard dyadic interval is one of the form [a/2n,(a+1)/2n] with a and n
nonnegative integers and a+1≤2n. A partition 0=x0<⋯<xm=1 of [0,1] is a
standard dyadic partition when every [xi−1,xi] is a standard dyadic interval.
An ordered rooted binary tree is a finite tree in which each vertex has either no children or
an ordered left child and right child. Its childless vertices are its leaves, which carry a
canonical left-to-right order; its right side is the path from the root always taking the
right child; a caret is a vertex with its two children. Assigning [0,1] to the root and
splitting each interval at its midpoint between the two children gives every vertex a standard
dyadic interval, and the leaves then cut out a standard dyadic partition — the sense in which
such a tree is a T-tree. The exponents of a T-tree are one
nonnegative integer per leaf, in order: the kth is the length of the longest arc of left edges
beginning at the kth leaf that does not reach the right side.
A tree diagram is an ordered pair (R,S) of T-trees with equally many leaves. An
element f of Fhas that diagram when f is affine on each interval cut out by the leaves
of R and carries those intervals, in order, onto the intervals cut out by the leaves of S.
Adjoining a caret to R and to S at the same leaf gives another diagram for the same f; a
diagram admitting no such reduction — no position where both trees carry a caret — is
reduced.
Formalization targets
Goal: the unique normal form
Every f=1 in F is
f=X0b0X1b1⋯XnbnXn−an⋯X1−a1X0−a0
for exactly one choice of nonnegative integers n, a0,…,an, b0,…,bn subject
to two conditions: exactly one of an and bn is nonzero, and if ak>0 and bk>0 for
some k<n then ak+1>0 or bk+1>0.
It fixes no bound on n and no normalization beyond those two conditions, so no later
refinement of how the exponents are presented can invalidate it.
Along the way
The milestone list follows §2 in order: the correspondence between standard dyadic partitions
and T-trees, the bijection between F and the reduced tree diagrams, the word read
off the exponents of (R,S), a criterion for a diagram to be reduced, generation by A and
B, and closure under multiplication of the positive elements — those of the form
X0b0⋯Xnbn with every exponent nonnegative.
What it gives
A normal form is a decision procedure: two words in the generators name the same element exactly
when their normal forms agree, so the word problem for F is solved by computing them. The
generation statement is what licenses treating F as a two-generator group, and it is the input
to both presentations in §3. The positive elements and their closure under multiplication are
used, with the normal form, throughout §5 on Thompson's group T.
The §2 results this mission targets — Lemma 2.2, the correspondence between F and the
reduced tree diagrams, Theorem 2.5, Corollary 2.6, Corollary-Definition 2.7 and Lemma 2.8 — are
proved mathematics: Cannon, Floyd and Parry are expounding material that goes back to
Thompson's unpublished notes. None of them has a machine-checked proof on this platform, and the
library contains no tree-diagram machinery to build on, so the definitions published here fix the
interface for anyone later formalizing Thompson's groups T and V, which occupy the same notes
and are built from the same trees.
There is also a concrete dependency. The companion mission on §4 of the same paper has eleven of
its fifteen milestones machine-checked, and all four that remain wait on this section: Cannon,
Floyd and Parry prove their Theorem 4.1 through Corollary 2.6 and their Theorem 4.3 through the
normal form. Corollary 2.6 appears in this milestone list as the same theorem object that is open
there, so closing it here closes it there.
Difficulty
The obvious way to attach a diagram to an element f is to use the partition given by its
breakpoints. That fails twice over: the breakpoints of f need not be the division points of any
T-tree, and even when they are, their images under f need not be either, since the
definition of F constrains the breakpoints and slopes of f and says nothing about where the
image partition sits. Both failures must be repaired by refining the partition before any tree
appears, which is why that refinement is a milestone rather than a preliminary.
Uniqueness of the reduced diagram is a difficulty of a different kind: two reduced diagrams for
the same element admit no a priori map between their trees, so they cannot be compared directly.
A third is not visible in the source. For trees with n+1 leaves the exponent lists always end
in 0, so the outermost factors of the word above vanish; but the normal form demands that
exactly one of an, bn be nonzero. The two indexings differ, and a re-indexing step sits
between the theorem producing the word and the corollary stating the normal form. The paper prints
them one under the other. That step is a milestone of its own, flagged as absent from the source,
so a solver working from the paper alone is not ambushed by it.
Formalization scope
Ordered rooted binary trees are an inductive type — a leaf, or a pair of subtrees — rather than
graphs with a root and valence conditions. Those conditions say exactly that every non-leaf vertex
has two distinguished children, so both descriptions pick out the same objects, but the inductive
type is a reformulation of the paper's definition and the definition bundle says so. The
infinite tree of all standard dyadic intervals is likewise never built: the subdivision of
[0,1] comes from a recursion halving at each node, which turns the paper's observation that the
leaves of a T-tree are the intervals of a standard dyadic partition from something
given into something proved.
F is imported rather than redefined, from the published definition bundle of the companion
mission, where it is the subgroup generated by the piecewise-linear maps described above;
membership in that subgroup is identified with the piecewise-linear description by a theorem
already machine-checked there. Exponent data is carried by finite lists, and the uniqueness in
the goal is uniqueness of that list data.
The goal is vacuous in neither direction: its hypothesis is met by A and B themselves, and a
separate milestone asserts that every choice of exponent data meeting the two conditions names an
element other than the identity.
The tree combinatorics — leaf counts, right sides, the subdivision map, the exponents,
carets — is published here as a separate definition node that mentions F nowhere and needs
nothing but Mathlib, so it is reusable as it stands; the diagram vocabulary is built on it. Any
milestone is open to contribution, as are routes other than the paper's.
Selected references
J. W. Cannon, W. J. Floyd, W. R. Parry, Introductory notes on Richard Thompson's groups,
L'Enseignement Mathématique (2) 42 (1996), 215–256.
doi:10.5169/seals-87877 — §2, pages 218–224, is the
source for this mission; §1, page 217, defines A, B and the Xn.
Within that paper tree diagrams are credited to Brown and the word-length algorithm to Fordham,
cited there as [Bro1] and [Fo].
Let G=(V,E) be a finite connected graph. In Bernoulli bond percolation each edge is independently retained with probability P and deleted otherwise, and one writes PP[u↔v] for the probability that vertices u and v lie in the same component of the resulting random subgraph. Comparing such connection probabilities is a basic and genuinely hard problem: computing them exactly is #P-hard.
The bunkbed graph is built from two copies of G, joined by vertical edges called posts above a chosen set T⊆V of transversal vertices. Percolation is performed on the two copies while every post is retained. Writing v for a vertex in the lower copy and v′ for its counterpart upstairs, Kasteleyn conjectured in 1985 that being connected within a level is always at least as likely as crossing between levels.
The conjecture is intuitively compelling — crossing levels appears to require "using up" a post — and it resisted proof for forty years. A short timeline:
1985 — Kasteleyn formulates the conjecture; it is recorded as Remark 5 of van den Berg–Kahn (2001), which is how the source cites it.
Positive results accumulate for special cases: wheels, complete graphs, complete bipartite graphs, graphs symmetric with respect to an automorphism exchanging u and v, one or two transversal vertices, and in the P↑1 limit.
2024 — Hollom refutes the 3-uniform hypergraph analogue. This alone does not settle the graph case: it is impossible to simulate a single 3-hyperedge by bond percolation on a gadget graph.
2025 — Gladkov, Pak and Zimin disprove the conjecture outright, with an explicit counterexample and without computer assistance.
Section 7 of the source is a candid account of a large-scale machine-learning-guided search that failed to find a counterexample, and of why the problem is unusually ill-suited to experimental testing.
Setting
Fix a finite graph with vertex set V and edge set E, and a retention function w:E→[0,1] (the uniform case is w≡P). A configuration is a subset S⊆E of open edges, occurring with probability
P(S)=e∈S∏w(e)e∈E∖S∏(1−w(e)),
and P[u↔v] is the total probability of those S for which u and v are connected in (V,S).
Given T⊆V, the bunkbed graph has vertex set V×{0,1}. Its edges are a copy of E in each level together with a post {(t,0),(t,1)} for every t∈T. In bunkbed percolation the two level-copies are percolated independently while all posts are retained; Pbb denotes the resulting connection probabilities.
The result itself. A forty-year-old conjecture in percolation theory is false, and prior positive results are thereby sharpened rather than superseded: it becomes interesting to delimit exactly which families of graphs do satisfy the inequality. The refutation also settles the Counting, Weighted, Alternative and Computational variants listed in §8.1, and shows the random-cluster analogue cannot be pushed from q=2 down to q=1.
Formalizing it. Nothing here is open; the mission produces machine-checked versions of published results, and as a by-product the first percolation theory in Lean. Mathlib currently contains no percolation of any kind — no connection probabilities, no bunkbed graph, no hypergraph percolation. That infrastructure is reusable far beyond this mission. The source itself notes (§8.2) that its central combinatorial lemma was independently verified by computer; a formal proof would replace that check with a certificate.
Difficulty
The obvious approach — exhibit a small graph and compute both probabilities — is hopeless, and the source explains why at length. A graph with m edges has 2m configurations; for the counterexample here the probability gap is on the order of 10−4331, so no sampling argument can detect it, and exact enumeration is out of reach. Section 7 records a substantial computational search that found nothing and, in hindsight, could not have.
The proof is instead structural, and its difficulty is concentrated in one place. Hollom's refutation of the hypergraph version cannot be transferred directly, because a single 3-hyperedge cannot be simulated by bond percolation on any gadget graph. The source's answer is to prove a robust version of Hollom's lemma (Lemma 3.3) which survives the inexact simulation that gadget graphs do provide, and this robustness is what Lemma 4.1's inequality quantifies. Lemma 3.3 is proved by constructing a weight-preserving involution on a refined configuration space — the technical heart, and the milestone a solver should expect to spend the most effort on.
Formalization scope
The development commits to the following conventions.
Everything is finite and rational-valued, hence computable: connection probabilities are ℚ and evaluate by #eval, and small instances close by decide.
A graph is given by an explicit edge Finset and realised through SimpleGraph.fromEdgeSet; connectivity is Mathlib's SimpleGraph.Reachable.
Percolation is a sum over the powerset of the edge set, weighted as displayed above, of a reachability indicator. Edge weights are per-edge (Sym2 V → ℚ), since the gadget Gn genuinely needs two different weights: its spokes are retained with probability 1−P and its path edges with probability P.
In the bunkbed, level 0 is the lower copy; posts over T are unconditionally present and are not percolated. The two levels are percolated independently.
⚠️ Planarity is omitted from the goal. Theorem 1.2 asserts the counterexample is planar, and Mathlib has no notion of a planar graph — no IsPlanar, no Euler formula, no Kuratowski. Building one is a larger project than this mission. The formalized statement of Theorem 1.2 is therefore strictly weaker than the published one, and the goal is instead the negation of the conjecture, which is exactly the source's own "In particular, the BBC is false." Contributions adding planarity are welcome and would strengthen the milestone.
Ruling out a trivializing reading: the conjecture must be negated as stated, over all connected graphs, transversal sets and 0<P<1. Weakening it to a fixed graph, or to P∈{0,1}, or dropping connectivity, would make the refutation vacuous.
Infrastructure. Mathlib supplies SimpleGraph, boxProd, Reachable with a DecidableRel instance, fromEdgeSet, edgeFinset and Finset.powerset. It supplies no percolation, so this mission ships two definition files: Bernoulli bond percolation with the bunkbed construction and the five triple-partition probabilities, and hypergraph percolation with Hollom's hypergraph and the Wierman–Ziff five-state model. One known gap: Mathlib's Reachable decision procedure enumerates walks and is far too slow to evaluate the 64-configuration check of Lemma 3.1 by decide. A solver will want a linear-time reachability procedure together with a proof that it agrees with Reachable; that is itself a worthwhile reusable contribution.
Selected references
J. van den Berg and J. Kahn, A correlation inequality for connection events in percolation, Ann. Probab. 29 (2001), 123–126 — Kasteleyn's conjecture appears as Remark 5.
T. Hollom, A new proof of the bunkbed conjecture in the p↑1 limit, Discrete Math. 347 (2024), 113711.
T. Hollom, The bunkbed conjecture is not robust to generalisation, arXiv:2406.01790 (2024).
T. Hutchcroft, P. Nizić-Nikolac, A. Kent, The bunkbed conjecture holds in the p↑1 limit, Comb. Probab. Comput. 32 (2023), 363–369.
N. Gladkov, I. Pak, A. Zimin, The bunkbed conjecture is false, Proc. Natl. Acad. Sci. USA 122 (2025), no. 24, e2420725122. doi:10.1073/pnas.2420725122; preprint arXiv:2410.02545.
J. C. Wierman and R. M. Ziff, Self-dual planar hypergraphs and exact bond percolation thresholds, Electron. J. Combin. 18 (2011).
G. R. Grimmett, Percolation, 2nd ed., Springer, 1999.
The Theory of Error-Correcting Codes I: The MacWilliams IdentityTextbook
Motivation
Error-correcting codes protect information against corruption by adding controlled redundancy. For a code, the distribution of Hamming weights records how its words are spread across possible distances from the zero word and determines basic quantities such as its minimum distance. Linear codes also carry an algebraic duality: every linear code C over a finite field has a dual code C⊥ consisting of the words orthogonal to all words of C under the standard coordinatewise bilinear form.
The MacWilliams identity states that the full Hamming-weight distribution of C⊥ is determined by that of C through one linear change of variables. It is the principal result of Chapter 5 of F. J. MacWilliams and N. J. A. Sloane's The Theory of Error-Correcting Codes. The binary identity appears there as Theorem 1, while the arbitrary-finite-field Hamming-weight-enumerator identity formalized here is Theorem 13 on p. 146. The surrounding chapter develops related transformations for complete, Lee, exact, joint, and split weight enumerators, nonlinear-code distance distributions, orthogonal arrays, and Krawtchouk polynomials.
This development isolates the arbitrary-q Hamming identity as a first reusable result. Its declarations are designed to support later formalizations drawn from the same chapter and, more broadly, from the book, without enlarging the present target beyond the MacWilliams identity.
Setting
Let F be a finite field of cardinality q, let ι be a finite coordinate type, and let a word be a function c:ι→F. A linear codeC is an F-linear subspace of the word space. The standard bilinear form is
⟨c,v⟩=i∈ι∑civi,
and the dual code is
C⊥={v:ι→F:⟨c,v⟩=0 for every c∈C}.
The Hamming weightwt(c) is the number of coordinates at which c is nonzero. Writing n=∣ι∣, the homogeneous Hamming weight enumerator of C is the integer-coefficient polynomial
WC(X,Y)=c∈C∑Xn−wt(c)Ywt(c).
Thus the coefficient of Xn−jYj is the number of codewords of weight j. The Lean development represents this object symbolically in MvPolynomial (Fin 2) ℤ; its complex-valued form is obtained by evaluation, so the symbolic and evaluated presentations share a single definition.
Formalization targets
Character orthogonality over a code
For a primitive complex additive character ψ of F, define
SC(v)=c∈C∑ψ(⟨c,v⟩).
The first milestone states that SC(v)=∣C∣ when v∈C⊥ and SC(v)=0 otherwise. The binary statement occurs as Problem 13 on p. 134 of MacWilliams--Sloane; Lemmas 9 and 11 on pp. 143--145 give the finite-field character and Fourier formulation.
Coordinatewise Hamming transform
For every word c and all X,Y∈C, the second milestone records the full character-weighted transform of the Hamming monomial:
This is a separately reusable formulation of the coordinate calculation appearing in the proofs of Theorems 10 and 13 on pp. 144--146.
MacWilliams identity
The capstone is the following equality of integer polynomials:
∣C∣WC⊥(X,Y)=WC(X+(q−1)Y,X−Y).
This is the denominator-free form of Chapter 5, Theorem 13. After evaluation over a characteristic-zero field it is equivalent to the normalized textbook formula
WC⊥(X,Y)=∣C∣1WC(X+(q−1)Y,X−Y).
Significance
The identity turns duality into an enumerative operation: knowing the weight enumerator of a linear code determines the weight enumerator of its dual. It supplies immediate consistency restrictions on possible weight distributions and is a basic input to the study of self-dual codes, Krawtchouk transforms, association schemes, invariant-theoretic properties of enumerators, and linear-programming bounds.
The formalization contributes a small common interface for finite-field words, linear codes, standard duals, and homogeneous Hamming weight enumerators. These declarations are absent from the selected Mathlib environment even though Mathlib already provides Hamming weight, finite-field algebra, additive characters, finite sums, bilinear-form orthogonals, and multivariate polynomials. Establishing the interface and its first central theorem makes those general libraries directly usable for subsequent coding-theory developments.
Difficulty
The paper statement is short, but its formal representations live in several different layers. Codes are submodules whose elements are subtypes; Hamming weight is a natural-number count; duality is expressed through a bilinear form; character identities take values in C; and the final result is most reusable as an equality of symbolic polynomials over Z. The central formalization burden is maintaining exact agreement while transporting the same enumerative data among these layers, including finite instances for codeword subtypes and the natural-number exponents of the homogeneous monomials.
The theorem must also retain the genuine finite-field statement. Replacing the code by an arbitrary finite set, hard-coding the binary field, defining the dual by its expected cardinality, or proving only equality at one chosen pair of evaluation points would not establish the target.
Formalization scope
The coordinate type is an arbitrary finite type rather than only Fin n; its cardinality plays the role of the code length. A word is CodingTheory.Word F ι := ι → F, and a linear code is a submodule of this common word space. This representation provides the linear structure and canonical orthogonal dual required here while leaving room for a future nonlinear-code type built from finite sets of the same words.
The polynomial CodingTheory.hammingWeightEnumeratorPolynomial has coefficients in Z and variables indexed by Fin 2. Variable 0 records zero coordinates and variable 1 records nonzero coordinates. Its name explicitly identifies the Hamming enumerator, leaving separate stable names available for future complete, Lee, exact, joint, and split weight enumerators. Those later enumerators should be added as new declarations and connected to this one by specialization theorems rather than replacing it.
The standard dual is bilinear, not Hermitian. The code alphabet may be any finite field. The zero code, full code, and empty coordinate type are included; in the empty-coordinate case there is one word of weight zero and the identity reduces to 1=1. The present mission does not formalize nonlinear codes, complete or other generalized enumerators, orthogonal arrays, or Krawtchouk-polynomial theory. It establishes only the definitions and two character-sum milestones required for the Hamming MacWilliams identity, with a namespace and module boundary intended for reuse by later missions in the textbook series.
Gross–Yellen Graph Theory I: Cayley's Tree FormulaTextbook
Motivation
Counting the trees on a fixed, labeled vertex set is one of the oldest enumeration
problems in graph theory. Cayley stated the count in 1889 while enumerating isomers of
saturated hydrocarbons — each tree corresponds to a possible carbon skeleton — and the
same number reappears throughout combinatorics as the number of spanning trees of the
complete graph Kn, a special case of Kirchhoff's Matrix–Tree Theorem, and as the base
case against which more refined tree-counting results (trees with a prescribed degree
sequence, forests, spanning trees of general graphs) are measured.
Several independent proofs of the count are known — a direct recursive argument, a
determinant computation via the Matrix–Tree Theorem, a double-counting argument on
increasing trees — and each exposes a different piece of structure. This mission
formalizes the proof via Prüfer sequences, due to Prüfer (1918): an explicit,
computable bijection between labeled trees and certain finite sequences, presented here
following Gross and Yellen, Graph Theory and Its Applications, 3rd ed. (CRC Press,
2018), Section 3.7, pp. 157–162.
Setting
Fix n≥2 and take the vertex set to be {1,…,n} (formalized as Fin n).
A labeled tree on n vertices is a simple graph T on this vertex set that is
connected and acyclic (Mathlib's SimpleGraph.IsTree). Two labeled trees are the same
exactly when their edge sets coincide — the two 4-vertex trees in Figure 3.7.1 of the
source are both paths but are different labeled trees, since the labels sit on
different vertices.
A Prüfer sequence of length n−2 is any sequence (s1,…,sn−2) of
labels drawn from {1,…,n}, repetitions allowed (so there are nn−2 of
them, by the rule of product).
The encoding of a tree T (Algorithm 3.7.1, p. 157) builds its Prüfer sequence by
repeating, n−2 times: find the leaf (degree-one vertex) with the smallest label among
those not yet removed, record the label of its neighbor, then delete that leaf. The
decoding of a sequence (Algorithm 3.7.3, p. 159) reverses this: it rebuilds the
tree edge by edge, at each step joining the smallest label not yet used and not
appearing later in the sequence to the next label in the sequence, finishing by joining
the two labels left over.
Formalization targets
Goal — Cayley's Tree Formula (Theorem 3.7.5, p. 162)
Nat.card{T:SimpleGraph(Fin n)∣T.IsTree}=nn−2,n≥2.
This is the weakest stable statement: it is exactly the count Cayley identified, phrased
without reference to any particular proof method, so it is not tied to properties of
Prüfer sequences beyond what is needed to establish the count.
Significance
The identity itself is foundational: it is the base case of Kirchhoff's Matrix–Tree
Theorem (which computes the analogous count for spanning trees of an arbitrary graph as
a cofactor of its Laplacian) and it appears as an ingredient in random graph theory
(counting spanning trees of Kn bounds the number of ways a random graph process can
build a tree) and in the analysis of algorithms on trees, where the Prüfer encoding
itself is used as a compact serialization of a labeled tree.
The result has been proved by hand for over a century, and its most classical proof (the
one formalized here) has not, to this project's knowledge, appeared as a
machine-checked Lean proof; Mathlib's Combinatorics.SimpleGraph library has the tree
and acyclicity infrastructure this mission builds on, but not the Prüfer bijection or
the count itself. Formalizing it here means constructing the encoding and decoding maps
explicitly as computable, total recursive functions, and proving they are mutually
inverse — the mission's four milestones below are exactly the four supporting results
the source uses for this.
Difficulty
The obvious first attempt is to define the encoding by structural recursion, peeling one
leaf per step, but this immediately runs into a dependent-typing obstacle: after
deleting a vertex, the "remaining graph" naturally lives on a smaller vertex type, so
a naive recursive definition changes type at every step and the final sequence's type
(length n−2) is not visible to the recursion by construction. The formalization here
sidesteps this by keeping the ambient vertex type fixed at Fin n throughout and
tracking the shrinking set of "active" vertices as an ordinary Finset (Fin n)
parameter, so the recursion is on a natural number step-counter rather than on the type
itself; the price is that every step's "leaf" and "neighbor" must be picked out by an
explicit Finset.filter/Finset.min computation whose well-definedness (there is
always a smallest active leaf, and it always has a unique active neighbor) is exactly
the content of Propositions 3.7.1 and 3.7.3 below, rather than something the type system
gives for free. The inverse direction has the dual issue in reverse: decoding recurses
structurally on the sequence while tracking a shrinking label set, and showing the two
recursions undo each other (Proposition 3.7.4) requires the same induction run in both
directions simultaneously.
Formalization scope
Trees are SimpleGraph (Fin n) satisfying Mathlib's SimpleGraph.IsTree; no alternate,
weaker notion of "tree" is used. Prüfer sequences are functions Fin (n - 2) → Fin n
(equivalently, by Fintype.card_fun, exactly the nn−2 count needed) rather than
List or Vector, so that the final counting step is immediate once the bijection is
established. The encoding and decoding functions (pruferEncode, pruferDecode) are
supplied as noncomputable definitions in Definitions.Def_GYGraphTheory — noncomputable
only because Prop-level decidability of a general SimpleGraph.Adj is classical, not
because the algorithm is non-constructive; every step is the literal Prüfer procedure,
junk-valued (defaulting to label 0) outside its intended domain in exactly the way a
hand proof would say "this step is meaningless once fewer than two active vertices
remain." The four milestones give the precise faithful statements of the source's
Propositions 3.7.1, Corollary 3.7.2, Proposition 3.7.3, and Proposition 3.7.4; the goal
theorem is the immediate corollary once all four are in hand, via Fintype.card_congr
and Fintype.card_fun. A trivializing formalization is not available here: IsTree is
Mathlib's standard, non-vacuous notion, and the milestones pin down pruferEncode
and pruferDecode to the source's specific algorithm rather than leaving the bijection's
existence as a free black box. Beyond the four milestones, a full development needs:
basic Finset/List manipulation lemmas relating pruferPeel's step-indexed recursion
to pruferDecodeAux's list-indexed recursion (reusable in any future mission touching
Prüfer-style encodings); and the final cardinality argument tying the bijection to
n ^ (n - 2). Contributions connecting this formula to Mathlib's general Matrix–Tree
machinery (if and when it exists) would be a natural, welcome extension but are out of
scope for this mission.
Selected references
A. Cayley, A theorem on trees, Quart. J. Math. 23 (1889), 376–378.
H. Prüfer, Neuer Beweis eines Satzes über Permutationen, Archiv der Mathematischen
Physik 27 (1918), 742–744.
J.L. Gross and J. Yellen, Graph Theory and Its Applications, 3rd ed., CRC Press,
2018, Section 3.7 "Counting Labeled Trees: Prüfer Encoding", pp. 157–162.
8 thms2 active usersReviewed
🏆Completed
Captain: wamlart
Discrete Mathematics—Lecture Notes I: Capacitated Hall MatchingTextbook
Assigning distinct resources under compatibility constraints
A finite allocation problem begins with a list of permitted choices. Each recipient may use some resources but not others, and a resource may be assigned at most once. Knowing that every recipient has an available resource is insufficient: several recipients may all depend on the same small pool. A useful theorem must decide whether the compatibility pattern permits all requirements to be met simultaneously.
This mission develops the matching results in the chapter on systems of distinct representatives in D. Yogeshwaran's Discrete Mathematics—Lecture Notes, §6.1. Its endpoint allows different recipients to require different numbers of resources. The classical one-resource problem, the regular-graph case, and the case in which a bounded number of assignments may remain unfilled are retained as separate source-numbered results. The project concerns established theorems, not a new conjecture about the existence of matchings.
Graphs, matchings, and demands
A finite simple graph consists of a finite set of vertices and unordered pairs of distinct vertices called edges. A bipartition is a pair of disjoint sets L,R whose union is the vertex set, such that every edge joins a vertex in L to a vertex in R. The left vertices represent recipients and the right vertices represent resources. An edge records that the resource is permitted for that recipient. These graph conventions follow Definition 1.1 of the notes.
For a vertex x, the neighbor setNG(x) contains the vertices joined to x. For a set S of vertices, write NG(S)=⋃x∈SNG(x). A matching is an edge set in which no vertex is used twice. It is complete on L if every left vertex is used, and perfect if every vertex is used. A subgraph may retain selected edges of the original graph. Its degree degH(x) counts the retained neighbors of x.
A demand is a natural number dx attached to each x∈L. Unlike a complete ordinary matching, the capstone may assign more than one resource to a recipient. Resources still have capacity one, and a demand may be zero.
The development also includes Exercise 6.3, asserting that a k-regular bipartite graph has a perfect matching when k>0. Proposition 6.4 states the quantitative deficit version:
This statement retains the entire demand function and does not fix a uniform demand, restrict demands to positive values, or replace integral selections by real weights.
The set-theoretic interface is Corollary 6.9. A finite family of arbitrary sets (Ai)i∈I has a system of distinct representatives, meaning an injective choice f(i)∈Ai, exactly when
∀J⊆I,∣J∣≤i∈J⋃Ai.
Only the index family is finite; the sets themselves may be infinite.
What the development provides
The demand criterion characterizes feasibility entirely in terms of the original compatibility graph and the requested multiplicities. Its necessity identifies an obstruction to any assignment, while its sufficiency asserts that no other obstruction exists. The deficit theorem gives a quantitative statement when complete coverage is unavailable. The regular case gives a distinct consequence for graphs described through their degrees, rather than through a separately supplied collection of neighborhood inequalities. These are the respective contents of Exercises 6.3 and 6.5 and Proposition 6.4.
Mathlib already provides finite-family and graph versions of Hall's theorem in its Hall development and graph interface. The source-aligned development therefore reuses established infrastructure. Its additional work consists of connecting exact graph degrees and edge counts to the source statements, retaining the deficit and zero-demand cases, and supplying an arbitrary-set representatives interface. Local proofs of the five theorem statements have been checked in Lean 4.29.0-rc3 with Mathlib 777aaa6.
Where exact formalization is delicate
Independent local choices do not guarantee a matching: different choices can collide at one resource. Replacing distinct selections by nonnegative real allocations would change the conclusion. Counting total demand alone also misses obstructions carried by proper subsets of recipients.
Several representation issues matter even after the mathematics is known. A left-saturating matching need not be perfect. A subgraph's vertex set may omit isolated ambient vertices. Cardinality conventions for infinite sets can turn a superficially plausible formula into a different assertion. Finally, a theorem that assumes all neighborhood inequalities has not established those inequalities merely because a graph is regular. The individual interfaces must distinguish these obligations rather than hide them inside a definition.
Formalization scope
The graph results use finite vertex types and native SimpleGraph and Subgraph objects. Both disjointness and coverage of the bipartition are explicit. Local-finiteness instances supply finite neighbor enumerations; they impose no further restriction on finite graphs. The complete-matching predicate combines the native matching condition with inclusion of the prescribed vertex set.
Degrees in the capstone are cardinalities of finite subgraph neighbor sets. The deficit conclusion counts unordered subgraph edges. Natural subtraction is truncated at zero, an equivalent convention for these nonnegative cardinality lower bounds. Empty graphs, empty index families, and zero demands remain admissible. In the representatives theorem, arbitrary sets are measured by extended cardinality; infinity is never replaced by zero.
The reusable outputs are the source-aligned graph statements, the complete-matching interface, the prescribed-degree equivalence, and the arbitrary-set representatives criterion. Equivalent proofs and clearer reusable interfaces are within scope. Placeholder conclusions, extra assumptions that exclude the difficult cases, and fractional substitutes for the integral capstone are not.
Selected references
D. Yogeshwaran, Discrete Mathematics—Lecture Notes, Indian Statistical Institute Bangalore, HTML edition generated 2025. Chapter 6.1; graph conventions.
Erdős (1947): The Probabilistic Ramsey Lower BoundResearch Paper
Motivation
Ramsey theory asks for the smallest number R(k) such that every graph on R(k) vertices contains either a clique of size k or an independent set of size k. Beyond being one of the oldest problems in extremal combinatorics, Ramsey numbers sit at the junction of combinatorics, probability, and computer science: the two-coloring of edges they quantify is exactly the distinction between a graph and its complement, and their growth controls constructions used in derandomization and in the theory of Boolean functions.
This mission formalizes the paper that started the probabilistic method as a systematic tool: Erdős's 1947 proof that R(k)>2k/2. It is also the natural companion to the platform's Sipser–Gács–Lautemann mission: the union-bound argument formalized here is the same counting technique that drives the Lautemann lemma used to place BPP in Σ2p.
Timeline. Ramsey proved in 1928 that R(k) is finite; Erdős and Szekeres gave the first upper bounds in 1935; Erdős's 1947 paper supplied the exponential lower bound R(k)>2k/2 by a one-page counting argument, introducing the probabilistic method. Better constants for specific regimes followed (Lovász local lemma 1975, Spencer 1977), but no general lower bound beyond 2(1+o(1))k/2 is known today.
Setting
Fix an integer k≥3 and put N=2⌊k/2⌋. A graph is a pair (V,E) with E an irreflexive symmetric relation on V; here vertices are labeled 0,…,N−1. A subset s⊆V of size k is a clique if every two distinct vertices of s are adjacent, and an independent set if every two distinct vertices of s are non-adjacent. A k-set that is either a clique or an independent set is monochromatic: it is monochromatic in the two-coloring of the complete graph on V in which an edge is colored by the graph (present) or its complement (absent).
The ambient probability space is the uniform distribution over all graphs on N labeled vertices — equivalently, each of the (2N) possible edges is present independently with probability 1/2. This space has exactly 2(2N) elements.
A graph with no monochromatic k-set is a graph with neither a k-clique nor an independent k-set. The mission's goal, "the Ramsey number satisfies R(k)>2k/2", is formalized as the bare existence of such a graph on N=2⌊k/2⌋ vertices, without defining the Ramsey number itself.
Formalization targets
Goal: the probabilistic lower bound
R(k)>2k/2,k≥3
i.e. there exists a graph on N=2⌊k/2⌋ labeled vertices that contains no monochromatic k-set.
Stronger: the three steps of the proof, as separate targets
Count estimate. For k≥3 and N=2⌊k/2⌋,
(kN)⋅21−(2k)<1,equivalently(kN)⋅2<2(2k).
Union-bound principle. In any finite outcome space, if the total number of outcomes ruled out by all bad events together is less than the number of outcomes, some outcome avoids every bad event:
i∑∣{ω:badiω}∣<∣Ω∣⟹∃ω,∀i,¬badiω.
Pair-count bound. Over all graphs on N vertices, the total number of pairs (G,s) with s a monochromatic k-set in G is at most
(kN)⋅21+(2N)−(2k).
The goal follows by combining the three steps: the pair count is the sum over bad events in the union-bound principle, and the count estimate makes that sum smaller than the 2(2N) graphs.
Significance
The result. The lower bound R(k)>2k/2 is exponential, matching (up to the constant in the exponent) the best known upper bound R(k)<4k from Erdős–Szekeres. It shows that the Ramsey function, despite being finite, grows genuinely fast — and the proof's method became more influential than the bound: the probabilistic method now permeates combinatorics, graph theory, and theoretical computer science (random graphs, discrepancy, property testing, derandomization).
Formalizing it. Mathlib currently contains no Ramsey theory at all: no definition of a Ramsey number and no lower bound. This mission closes that gap with the foundational result, in a way that is deliberately elementary — no measure theory, no randomness: the "probabilistic" argument is re-expressed as exact counting, which is why the statements are fully formalizable in Mathlib today. The union-bound principle (target 2) is a reusable lemma for future probabilistic-method formalizations, and the monochromatic-set infrastructure (targets 1 and 3) is the natural base layer for a future definition of the Ramsey number R(k).
Difficulty
The central difficulty is that the bad events — "the k-set s is monochromatic" — overlap heavily: a typical graph contains many monochromatic k-sets, so the union bound must be crude enough to survive the overlap. Concretely, the estimate (kN)⋅21−(2k)<1 holds for N=2⌊k/2⌋ but fails for N=2⌊k/2⌋+1; the naive "take one vertex more" step is where the argument breaks. A solver who tries to strengthen the bound will find the exponent is tight.
A second difficulty is purely formal: the uniform distribution over graphs has to be eliminated. The mission's statements do this by counting graphs with a fixed monochromatic k-set (21+(2N)−(2k) of them) and applying the union-bound principle, so no probability theory enters the formalization.
Formalization scope
Representation. Graphs are SimpleGraph (Fin N): a relation on N labeled vertices. A candidate set is a Finset (Fin N) of cardinality k; "monochromatic" is IsClique ∨ IsIndepSet on the graph; "no monochromatic k-set" is the predicate NoMonoK. All counting is cardinality of finite sets; monoCount N k G is the number of monochromatic k-sets of G.
Conventions.N=2⌊k/2⌋ uses natural-number division, so for odd k the graph lives on 2(k−1)/2 vertices — the standard reading of R(k)>2k/2. The hypothesis k≥3 is explicit. The theorem quantifies existence over all graphs; it does not define the Ramsey number R(k) (a definition item for it, with the re-stated bound R(k)>2k/2, is a natural follow-up contribution).
Reusability. The union-bound principle, the monochromatic-k-set machinery, and the pair-count bound are all reusable beyond this mission. Welcome contributions: defining ramseyNumber and restating the bound as R(k)>2⌊k/2⌋; the Erdős–Szekeres upper bound R(k)≤4k as a companion mission; applications of the same principle elsewhere.
Selected references
Paul Erdős, Some remarks on the theory of graphs, Bulletin of the American Mathematical Society 53(4), 1947, pp. 292–294. https://doi.org/10.1090/S0002-9904-1947-08785-X — the source paper: main construction proving R(k)>2k/2.
Noga Alon, Joel H. Spencer, The Probabilistic Method, 4th ed., Wiley, 2016 — Chapter 1 (the Erdős lower bound) and Chapter 3 (Lovász local lemma); standard exposition of the technique.
Stanisław Radziszowski, Small Ramsey Numbers, Electronic Journal of Combinatorics, Dynamic Survey DS1 — survey of Ramsey number bounds and history.
Context: where this sits in the formalization landscape
This mission is not a duplicate of existing platform content, and the choice of target is deliberate:
Mathlib gap. The pinned environment (mathlib 0df444a) contains no Ramsey-number theory at all — nothing in Combinatorics/SimpleGraph, no ramseyNumber-style definition. This mission seeds that subfield with reusable infrastructure: the monochromatic-set model, the finite union-bound (probabilistic-method) principle, and the double-counting bound are all general-purpose lemmas, not one-off steps.
Existing Ramsey content is a different quantity. The platform's fully-proved Erdos183 mission concerns multicolour triangle Ramsey numbers R(3,…,3) and is driven by recursive palette constructions — a different Ramsey parameter and a different technique. The classical 2-colour diagonal bound formalized here appears nowhere on the platform as a proved statement.
Directly load-bearing for a live open problem. The public open problem diagonal_ramsey_asymptotics (same environment 0df444a) asks, eventually in k, for 2⌊k/2⌋≤R(k,k)≤4k; its upper half is already proved as ramsey_theory_upper_bound. The lower half is exactly what this mission's goal supplies: once ramsey_lower_bound is proved, closing that open problem reduces to a translation between the graph formulation used here (SimpleGraph / NoMonoK) and the edge-colouring formulation (ramseyDiag) used there, plus the eventual-quantifier wrapper.
Formalization convention. The bound is stated on N=2⌊k/2⌋ vertices (natural-number division), matching the exponent convention of the existing platform open problem above. For even k this is exactly Erdős's 2k/2; for odd k it is the standard floor form, equivalent to the classical asymptotic reading R(k)1/k≥2.
5 thms2 active usersReviewed
🏆Completed
Captain: ShouqiaoWang
Cubic Congruence for the q-Secant Inversion EnumeratorResearch Paper
Motivation
Alternating permutations are a classical meeting point of enumerative combinatorics, permutation statistics, and special functions. An up--down permutation alternates between rises and falls, and their ordinary counts are the Euler secant and tangent numbers. Refining this count by the inversion statistic produces the q-secant polynomial E2n(q). Its values and congruences retain information that disappears after setting q=1: they distinguish how the alternating permutations are distributed by inversion number and reveal cancellation at roots such as q=−1. Ji-Cai Liu's article isolates the next nontrivial term in the (1+q)-adic expansion of this polynomial, strengthening an earlier Andrews--Foata congruence. The mission formalizes the article's main result, Theorem 1.1, as an exact polynomial-divisibility statement.
Setting
For n≥0, let A(2n) be the set of permutations σ=(σ1,…,σ2n) of {1,…,2n} satisfying
σ1<σ2>σ3<σ4>⋯<σ2n.
The empty permutation is the unique member of A(0). The inversion number is
inv(σ)=#{(i,j):1≤i<j≤2n,σi>σj}.
The q-secant inversion enumerator is the integer polynomial
E2n(q)=σ∈A(2n)∑qinv(σ)∈Z[q].
Congruence modulo (1+q)3 means divisibility in Z[q]: two polynomials F and G are congruent precisely when (1+q)3 divides F−G. This formulation avoids evaluation at a single number and records the first three orders of behavior at q=−1.
In Lean, a permutation is represented as an equivalence of Fin (2*n). The alternating inequalities and inversion number are finite predicates and counts on this zero-based type. The polynomial variable is the canonical indeterminate in Polynomial ℤ.
Formalization targets
Cubic congruence
For every integer n≥0, prove
E2n(q)≡q2n(n−1)−(2n)(1+q)2(mod(1+q)3).
Equivalently,
(1+q)3∣E2n(q)−(q2n(n−1)−(2n)(1+q)2)in Z[q].
The boundary value n=0 is included. With the empty-permutation convention and natural-number truncated subtraction in the exponent, both sides reduce correctly, so the formal target does not hide a separate exceptional case.
Significance
The theorem identifies the exact quadratic correction to the highest-inversion monomial near q=−1. It therefore explains why the prior congruence modulo (1+q)2 does not generally lift unchanged to the cubic modulus. Specializing at q=1 also yields the corresponding refinement modulo 8 for the ordinary secant numbers. More broadly, the statement is a compact test case for formal reasoning that combines finite permutations, order predicates, inversion statistics, generating polynomials, binomial coefficients, and divisibility in a polynomial ring.
A machine-checked proof would contribute reusable infrastructure for permutation enumerators and polynomial congruences. The published article supplies a human proof; the Prove2me goal is the formal reconstruction of its theorem in Lean. The mission does not encode a proof certificate, an orbit count, or the desired divisibility inside a definition. A successful submission must derive the divisibility from the concrete finite definitions.
The result also gives a useful interface between two styles of formal combinatorics. On one side, alternating permutations are finite objects that can be enumerated, mapped, and partitioned. On the other, their aggregate is an algebraic object in Z[q] whose divisibility can be studied without referring to individual permutations. Infrastructure connecting these levels can be reused for other q-Euler numbers, descent and major-index enumerators, and congruences obtained from finite weighted actions. The mission keeps that infrastructure general-purpose by making the final target an equality in a quotient of the polynomial ring rather than a specialized computational procedure.
Difficulty
Direct expansion of E2n(q) is factorial in n and gives no uniform explanation of divisibility by a third power. Divisibility by (1+q)3 is stronger than merely checking the value at q=−1: it simultaneously constrains the value and the first two formal orders there. A formal solution must control the entire finite family of alternating permutations while preserving exact inversion exponents and polynomial coefficients. Index conventions are also delicate, because the paper numbers positions and values from 1, whereas Lean uses Fin indices from 0.
The source argument introduces combinatorial structure beyond the bare statement. Formalizers may contribute reusable lemmas about switching consecutive values, invariance of alternation under permitted switches, inversion-number changes, finite group actions, and divisibility of orbit enumerators. Those are natural milestones, but the present root goal deliberately remains the stable polynomial congruence rather than committing to one decomposition.
Formalization scope
The mission fixes the coefficient ring to Z and uses exact polynomial divisibility. It does not replace congruence by coefficientwise arithmetic modulo 8, evaluation at q=−1, or a numerical check for bounded n. UpDown is defined directly on permutations of Fin (2*n), invNumber counts ordered index pairs with the required inequality, and qSecant is the finite sum of monomials qinv(σ).
The formal statement quantifies over every natural number. The conventions at n=0 and n=1 are part of the same theorem and have been audited explicitly. The uploaded definition bundle is transparent and sorry-free; the only admitted declaration is the mission theorem itself. Useful contributions include general lemmas about polynomial divisibility, finite involutions and orbit sums, or bridges between one-based paper notation and Lean's finite types.
Selected references
Ji-Cai Liu, A Combinatorial Proof of a Cubic Congruence for the q-Secant Inversion Enumerator, Electronic Journal of Combinatorics 33(3), P3.10, 2026. DOI
On the Abstract Properties of Linear Dependence 5: The Seven-Element Fano Matroid Corresponds to No Real MatrixResearch Paper
Motivation
Whitney's 1935 paper On the Abstract Properties of Linear Dependence introduced matroids: finite sets equipped with a rank function, or equivalently a family of independent sets, obeying a few postulates abstracted from the linear dependence of the columns of a matrix. The obvious first question about such an abstraction is whether it is genuinely more general than its model, that is, whether there are matroids that do not arise from any matrix. Section 16 of the paper answers it with a seven-element example, now called the Fano matroidF7, and proves that no real matrix corresponds to it.
The question has had a long life. Representability of matroids over a given field is a central theme of matroid theory: Tutte (1958) characterized the matroids representable over the field with two elements by a single excluded minor, the four-point line U2,4, and the regular matroids by three excluded minors, U2,4, F7 and its dual; and Seymour's decomposition of regular matroids (1980) rests on the same objects. Whitney's §16 is the starting point of this line: the first proof that the abstract postulates admit matroids outside linear algebra over R.
Timeline:
1935. Whitney defines matroids, the circuit matrix of a matrix, and proves (§16) that the seven-element matroid M′ corresponds to no real matrix; in a footnote he credits Saunders MacLane with finding that M′ corresponds to no matrix and identifying it with a finite projective geometry. On p. 533 he exhibits a matrix of integers mod 2 for M′.
1958. Tutte characterizes binary and regular matroids by excluded minors; F7 appears as an excluded minor for regularity (Tutte 1958).
Setting
Let M=(aij) be an m×n matrix with columns C1,…,Cn. For a set N of columns, let r(N) be the rank of the submatrix formed by those columns. Regarding the columns as abstract elements gives a matroid M on {C1,…,Cn} with rank function r: the matroid ofM. A matroid corresponds toM if it is the matroid of M, with elements matched to columns.
A circuit of a matroid is a minimal dependent set. For a circuit P={i1,…,ip} of the matroid of M, there are numbers b1,…,bn with ∑jaijbj=0 for every row i, and bj=0 exactly for j∈P; the set of such vectors is written Zi1⋯ip when only the support condition is meant. Stacking one such row per circuit gives the circuit matrixM′ of M, determined up to nonzero factors on its rows.
A fundamental set of circuits of a matroid M with nullity n(M)=ρ(M)−r(M) (ρ the number of elements) is a family of circuits P1,…,Pq with q=n(M) such that the elements can be ordered e1,…,en with en−q+i∈Pi and en−q+j∈/Pi for j>i; it is strict if en−q+j∈/Pi for every j=i.
The matroid M′ of §16 has elements 1,…,7; its bases (maximal independent sets) are all three-element sets except
124,135,167,236,257,347,456.(16.1)
Formalization targets
Goal: §16, pp. 529–530
∃M′and∀m∀M∈Rm×7:M′ is not the matroid of M.
The number of rows is arbitrary; the existence clause makes the non-existence statement non-vacuous.
Milestones
§12. Every real matrix has a matroid: the ranks of column submatrices satisfy the rank postulates.
§14, (14.1). Every real matrix has a circuit matrix.
Theorem 29. The rows of a fundamental set of circuits form a base for the rows of the circuit matrix, so r(M′)=q=n(M).
Lemma 10. The support of a vector in the row space H of a circuit matrix is a union of circuits.
Lemma 11. Two vectors of H with the same circuit as support are proportional.
Theorem 32. For a circuit matrix normalised along a strict fundamental set, a minor D vanishes iff an associated q×q minor D′ vanishes, iff some circuit avoids a prescribed set of columns.
§16, rank of M′. The rank of a k-set is k for k≤2, 3 for k≥4, and for k=3 it is 2 on (16.1) and 3 otherwise.
p. 533.M′ is the matroid of an explicit 3×7 matrix of integers mod 2.
Significance
The result. The theorem separates the abstract notion of matroid from linear dependence over R: some matroids are not real-representable. It also exhibits that representability depends on the field, because the same matroid is the matroid of a matrix over the integers mod 2 (milestone 8). Everything later written about representability over particular fields, excluded-minor characterizations, and the gap between abstract and linear matroids starts from this distinction. Theorem 32 is of independent interest: it translates statements about circuits of a represented matroid into the vanishing of minors of a normalised circuit matrix.
Formalizing it. The result is classical and its proof is short on paper, but it is not formalized in Mathlib, which has matroids (Matroid, circuits, ranks) but no column matroid of a matrix with a rank-of-submatrix characterization, no circuit matrix, and no Fano matroid. The mission produces those objects and the bridge lemmas (Theorem 29, Lemmas 10–11, Theorem 32) that connect matroid circuits with linear algebra of the circuit matrix. No machine-checked proof of the non-representability of the Fano matroid over R in Lean is known to the curators.
Difficulty
The obvious attempt is a direct search: suppose a real m×7 matrix has M′ as its matroid and derive a contradiction from the seven dependent triples. This does not work as stated. Each rank condition is a determinantal (nonlinear) condition on the entries, the number of rows m is unbounded, and a representation is determined only up to row operations and column scalings, so there is no finite case check and no single linear computation that settles the question. The contradiction has to come from an argument that is invariant under these symmetries, and the milestones (circuit vectors determined up to scaling, fundamental sets spanning, circuits detected by minors) are what such an argument needs to be stated in. The field also matters: the argument must use that 2=0 in R, since over a field of characteristic 2 the statement is false (milestone 8).
Formalization scope
Elements and matrices. Matroids are Mathlib Matroids whose ground set is the whole (finite) type. The Fano matroid lives on Fin 7, Whitney's element k being k - 1; the seven triples are written out literally. Matrices are Matrix (Fin m) ι K; "the matroid of M" means: ground set everything, and the rank M.eRk N of every finite set N of columns equals Matrix.rank of the column submatrix.
Field. The goal and Lemmas 10–11, Theorems 29 and 32 are stated over R, as in the paper; the predicate "matroid of a matrix" is stated over any field so that the mod-2 milestone uses the same notion.
Circuit matrix. Rows are determined up to nonzero factors, so "circuit matrix" is a predicate on a matrix together with a bijection between its rows and the circuits; every theorem holds for every such choice.
Nullity and indices.q=n(M) is written q+r(M)=ρ(M) in extended naturals, with no truncated subtraction. In Theorem 32, n=p+q, the complement of i1,…,is is given as an order embedding of Fin t with s+t=q, and determinants are of square submatrices in the paper's row and column order.
Ruling out trivial readings. The goal includes the existence of M′; without it "every matroid with these bases has no real matrix" could hold vacuously. The goal quantifies over every number of rows; fixing m=3 would be a weaker statement.
Reusable beyond this mission: the matroid of a matrix over a field, the circuit matrix, fundamental sets of circuits, and the Fano matroid. Contributions welcome: proofs of the milestones, and a proof of the goal by any route, including one that does not go through Theorem 32.
Selected references
H. Whitney, On the Abstract Properties of Linear Dependence, American Journal of Mathematics 57 (1935), 509–533. https://doi.org/10.2307/2371182
W. T. Tutte, A homotopy theorem for matroids, I, II, Transactions of the American Mathematical Society 88 (1958), 144–174. https://doi.org/10.2307/1993244
Periodic Multidimensional Costas Arrays (Rubio–Torres Conjecture 1)Open Problem
Motivation
A Costas array is a permutation matrix in which the difference vectors between distinct dots are pairwise distinct; such arrays are frequency-hopping patterns for sonar and radar (Costas, 1984). Rubio and Torres ask whether their m-dimensional version can stay Costas in every window of its periodic extension, and conjecture that this happens only in the smallest order.
Timeline. 1984: Taylor proves that 2D periodic Costas arrays have order ≤2. 2023: Rubio–Torres prove the odd-order and 3D cases, give 2×2×4 examples, and state Conjecture 1.
Setting
Let [n]={1,…,n}, X=[a1]×⋯×[ak], Y=[b1]×⋯×[bl] with all sides ≥2, and φ:X→Y a bijection; the dots are (x,φ(x))∈Zk+l. The array is Costas if the difference vectors between distinct dots are distinct, and periodic Costas if moreover, after repeating the dots periodically over Zk+l, the dots inside every translate t+X×Y have distinct difference vectors.
Formalization target
Conjecture 1: if k≥l≥1 and φ defines a periodic Costas array, then
i=1∏kai=2k,
equivalently every ai=2. The condition k≥l is a normalization (φ−1 swaps the boxes).
Significance
A proof would give the multidimensional analogue of Taylor's theorem; a counterexample would give periodic distinct-difference patterns of non-power-of-two order.
Difficulty
The Rubio–Torres counting argument needs a bound that is available only when Y is one-dimensional, which is why it stops at m=3. Computational evidence: an exhaustive window check reports that the 2×3×2×3 array with dots (1,1,1,1),(1,2,1,2),(1,3,2,1),(2,1,1,3),(2,2,2,3),(2,3,2,2) is periodic Costas, which would disprove the conjecture.
Formalization scope
A point of Zk+l is a pair (x,y); boxes are 1-based; φ is a total function Zk→Zl whose values off X are unused. Differences are plain integer vectors (not reduced modulo the sides), windows range over all t∈Zk+l, and k,l≥1 and sides ≥2 are part of the definition, so no degenerate case holds vacuously.
Selected references
I. Rubio, J. Torres, Multidimensional Costas Arrays and Their Periodicity, IEEE Trans. Inf. Theory 69(8), 2023, 5032–5040. arXiv:2208.02378, DOI
J. P. Costas, A study of a class of detection waveforms having nearly ideal range-Doppler ambiguity properties, Proc. IEEE 72(8), 1984, 996–1009.
S. W. Golomb, H. Taylor, Constructions and properties of Costas arrays, Proc. IEEE 72(9), 1984, 1143–1163.
2 thms1 active userReviewed
🏆Completed
Captain: mysticflounder
Six-colour Schur colourings of [1, 1801] under R₄(3) ≤ 61: balanced classes, nested saturation and forced reflectionResearch Paper
Motivation
The Schur numberS(n) is the largest N such that [1,N]={1,…,N} can be partitioned into nsumfree sets, sets with no x,y,z such that x+y=z (x=y allowed). Schur's argument gives S(n)≤Rn(3)−2, where the triangle Ramsey numberRn(3) is the least N such that every colouring of the edges of KN with n colours has a monochromatic triangle (Fredricksen–Sweet 2000, inequality (2)). Only S(1),…,S(5)=1,4,13,44,160 are known (Heule 2018). For six colours the published range is 536≤S(6)≤1836; the upper bound is R6(3)−2 with R6(3)≤1838 (DS1, rev. 18).
Timeline.
1955: Greenwood and Gleason prove R3(3)=17 and Rn+1(3)≤(n+1)(Rn(3)−1)+2 (Theorem 6) (doi).
1961: Baumert finds S(4)=44 by computer, as reported by Fredricksen and Sweet; they and Heule cite Golomb–Baumert 1965 for it.
1997: Wan bounds Rn(3) and, for even n≥6, states Sn<n!(e−e−1+3)/2−n+2 (zbMATH 0882.05095 summary; doi). If his Sn is the least N that forces a monochromatic solution, this is the centred bound below, applied to his own bound on Rn−1(3); if it is the largest N, it is 1 above it. His proof was not read.
2004: Fettes, Kramer and Radziszowski prove R4(3)≤62 (listed in DS1, which also lists R5(3)≤307).
2018: Heule proves S(5)=160 with a certified SAT computation (AAAI-18; preprint arXiv:1711.08076).
2026: a public repository of M. Tatarevic gives a computer-assisted argument for R4(3)≤61. Its Lean development assumes that a family of 56,830 SAT instances is unsatisfiable, and the repository records solver results for them. The project of this mission's author produced LRAT certificates for all 56,830 instances and checked them; the report is in the repository's issue tracker. This mission does not depend on it.
The first target is a centred-interval bound: if Rk(3)≤r, then S(k+1)≤2(k+1)⌊(r−1)/2⌋+1. With R4(3)≤61 the recursive bound gives R5(3)≤302, and the centred bound gives S(6)≤1801; with R5(3)≤307 it gives only 1837. The mission formalizes what a Schur colouring of [1,1801] with six colours would have to look like under R4(3)≤61.
Setting
All numbers are natural numbers, N={0,1,2,…}, and [a,b]={a,…,b}.
Schur colourings and covers. A colouring with n colours is a map c:N→Finn. It is a Schur colouring of [1,N] (SchurColoring N c) if there are no x,y≥1 with x+y≤N and c(x)=c(y)=c(x+y), the case x=y included. The cover form uses SumFree S and CoveredBySumFree X n (X lies in the union of n sumfree sets); for n≥1 the two bridge theorems pass between the two forms in both directions.
Triangle Ramsey property.TR(k,r) (TriangleRamsey k r): every colouring with at most k colours of the pairs x<y of a finite set of at least r naturals has a monochromatic triangle. For k≥1 it is the inequality Rk(3)≤r.
Neighbourhoods. The difference colouring gives a pair {x,y} the colour c(∣x−y∣). For a Schur colouring of [1,N] it has no monochromatic triangle on [0,N], since (y−x)+(z−y)=z−x. Write
Γi(V,v)={w∈V:w=v,c(∣v−w∣)=i} (colorNbhd c V v i);
Vm=Γc(m+1)([0,2m+1],m), the central neighbourhood (centralNbhd c m), which contains 2m+1;
Pi=Γi(Vm,2m+1), the endpoint neighbourhoods (endpointNbhd c m i).
The frontier. The frontier hypotheses are TR(k,u+1), 2t=(k+1)u, m=(k+2)t, and c a Schur colouring of [1,2m+1] with k+2 colours. From the first two, TR(k+1,2t+2) holds, and the centred bound excludes Schur colourings of [1,2m+2] with k+2 colours; [1,2m+1] is the frontier interval. Six colours: k=4, u=60, t=150, m=900, 2m+1=1801.
Example. For k=1, u=2, t=2, m=6 (and 13=S(3)), the classes {1,4,7,10,13}, {2,3,11,12}, {5,6,8,9} form a Schur colouring of [1,13], with V6={2,5,7,10,13} and endpoint neighbourhoods {2,10} and {5,7}, both closed under x↦12−x.
Formalization targets
Goal: six colours under R4(3)≤61
TR(4,61) and c a Schur colouring of [1,1801] with six colours⟹(1)–(5),
where q=c(901), V=V900 and Pi=Γi(V,1801):
each colour occurs 150 times in [1,900];
∣V∣=301;
∣Γi(V,v)∣=60 for every v∈V and every colour i=q;
c(901−d)=c(901+d) for every d∈[1,900] with c(d)=q;
for every colour i=q: ∣Pi∣=60; x↦1800−x maps Pi to itself without fixed points; and c(∣x−y∣)∈/{i,q} for distinct x,y∈Pi.
The goal is a structure theorem under the hypothesis R4(3)≤61. It does not prove S(6)≤1800, and it does not assert that a Schur colouring of [1,1801] with six colours exists; whether such a colouring, or the structure it would force, exists is open. The goal is the six-colour instance of the general theorems below.
Centred-interval bound
TR(k,r)⟹[1,2(k+1)⌊2r−1⌋+2] is not covered by k+1 sumfree sets.
Balanced colour classes
TR(k,2t+2),m=(k+1)t,c a Schur colouring of [1,2m+1] with k+1 colours⟹{d∈[1,m]:c(d)=j}=t for every colour j.
The result itself. Under R4(3)≤61, S(6)≤1801, and the goal constrains a six-colour Schur colouring of [1,1801] as listed above. In particular, each of its five endpoint neighbourhoods is a set of 30 pairs {900−d,900+d} whose difference colouring uses at most four colours, is invariant under x↦1800−x and, like that of every subset of [0,1801], has no monochromatic triangle. So such a colouring yields five colourings of K60 with at most four colours, no monochromatic triangle and a fixed-point-free colour-preserving involution. A proof that this configuration cannot occur would give S(6)≤1800 under the same hypothesis. Whether it can occur, and whether S(6)≤1800, are open.
Formalizing it. All 12 theorems of the tree, the goal included, are proved in Lean 4 with Mathlib over the bundles ClassicalSchurBasic, ClassicalSchurRamsey and ClassicalSchurColoring, with the axioms propext, Classical.choice and Quot.sound only. Independent Claude agents checked the Lean: one rebuilt the frontier theorems, re-ran their axiom audit and checked their statements against the argument; another checked every statement of the tree against the mathematics. The mathematics is in the paper S(6)≤1801 if R4(3)≤61: a centred Schur bound and the structure at the frontier (A. McKenna, Zenodo, 2026, doi:10.5281/zenodo.23156099), and the Lean code is in its repository; the paper has not been refereed. R4(3)≤61 is not formalized in the mission.
Difficulty
The centred bound counts, for one colour class, the points h±a around the centre of the interval. At the frontier every such count is tight: each colour has t elements in [1,m], and inside Vm each colour other than c(m+1) has degree u, the largest value that Rk(3)≤u+1 allows. So no single counting step gives a contradiction, and the theorems describe the tight case instead of excluding it. The first exclusion that the structure gives, parity, works only for odd u; at six colours u=60.
The reflection is not a property of Schur colourings in general: the colouring {1,4}, {2,3}, {5} of [1,5] has c(2)=c(3) but c(1)=c(5). At the frontier the theorem asserts it only for the d with c(d)=c(m+1), so an argument that assumes a fully symmetric colouring proves a different statement. A direct search is no substitute: S(5)=160 already needed a large certified SAT computation (Heule 2018), and [1,1801] with six colours is a much larger instance.
Formalization scope
Colourings are functions ℕ → Fin n on all of N; SchurColoring N c constrains only [1,N], with x=y allowed. Distances are Nat.dist.
Neighbourhoods are Finsets. Vm lies in range (2 * m + 2)=[0,2m+1], so the point 0 is a candidate member; the centre m never is.
TriangleRamsey k r takes colours from any Finset of at most k naturals; the pair colouring ℕ → ℕ → ℕ is constrained only on the pairs x<y of the vertex set, which is any finite set of naturals. TriangleRamsey k 0 and TriangleRamsey k 1 are false.
Covers.CoveredBySumFree X n uses Fin n → Set ℕ; the sets need not be disjoint or lie in X.
Subtraction is truncated. Under the hypotheses, none of r−1, N−1, m+1−d, 2m−x (with x∈Pi), 901−d and 1800−x truncates.
No trivialization. The frontier theorems are vacuous for u=0, and for k=0 (then [1,2m+1]⊇[1,5], while S(2)=4). For k=1 they are not: the Schur colourings of [1,13] meet the hypotheses, and every conclusion can be checked by hand. The goal holds vacuously if R4(3)>61 or if no six-colour Schur colouring of [1,1801] exists; it is a structure theorem, not a claim that such a colouring exists.
Bundles: ClassicalSchurBasic (SumFree, CoveredBySumFree) and ClassicalSchurRamsey (TriangleRamsey) are already public; ClassicalSchurColoring holds SchurColoring, colorNbhd, centralNbhd and endpointNbhd. Reusable: the colouring–cover bridges, the pigeonhole step, the centred bound for every k, and the automorphism-extension lemma (arbitrary types). Welcome beyond the targets: a formal proof of TriangleRamsey 4 61, and results on whether the configuration of five paired 60-point sets exists.
Provenance: the centred-interval argument was first written by an AI agent based on ChatGPT (OpenAI) in a project discussion on 2026-09-27, and a Claude (Anthropic) agent audited it. The balance, saturation and reflection argument was proposed by an AI agent based on ChatGPT (OpenAI) in a project discussion; Claude checked each step and restated it with explicit hypotheses. Claude wrote the Lean proofs of both parts; the independent checks are described under Formalizing it.
H. Fredricksen, M. M. Sweet, Symmetric sum-free partitions and lower bounds for Schur numbers, Electron. J. Combin. 7 (2000) #R32. https://doi.org/10.37236/1510
Eliahou–Revuelta Schur degree: L(4) = 16 and 49 ≤ L(5) ≤ 65Research Paper
Motivation
A set of integers is sumfree when no two of its elements, equal or distinct, add up to an element of the set. The Schur numberS(n) is the largest N such that {1,…,N} can be partitioned into n sumfree sets; only S(1),…,S(5)=1,4,13,44,160 are known. For n≥4 the best theoretical upper bound that Eliahou and Revuelta could cite in 2021 was S(n)≤Rn(3)−2, where the Ramsey numberRn(3) is the least N such that every n-colouring of the edges of the complete graph KN has a monochromatic triangle. The Ramsey numbers satisfy Rn(3)≤n(Rn−1(3)−1)+2 for n≥2 (Greenwood–Gleason 1955); for S(n) the paper knows no recursive upper bound.
Eliahou and Revuelta proposed a conjectural one. They defined a number L(n) through the Schur degree of block-sum sets, proved S(n)≤nL(n) (Theorem 5.4) and S(n−1)+1≤L(n)≤Rn−1(3)−1 (Proposition 5.3), and conjectured L(n)=S(n−1)+1 (Conjecture 5.6). This would give S(n)≤n(S(n−1)+1) (Conjecture 5.7) and S(6)≤966 (Conjecture 5.8), against the range 536≤S(6)≤1836 that they give. For n=4 they proved 14≤L(4)≤16, conjectured L(4)=14, and left the value open.
Timeline.
1955: Greenwood and Gleason prove R3(3)=17 and the recursive bound above.
1961: Baumert computes S(4)=44 (cited by Eliahou–Revuelta as reference [2]).
2004: Fettes, Kramer and Radziszowski prove R4(3)≤62 (listed in DS1, rev. 18).
2018: Heule proves S(5)=160 with a certified SAT computation (arXiv:1711.08076).
2020–2021: Eliahou and Revuelta, preprint arXiv:2006.01502 and refereed version, with the same numbering of the items used here.
2026: McKenna, The Schur degree of block sums: L(4) = 16 and L(5) ≥ 49 (Zenodo, doi:10.5281/zenodo.22987189), proves L(4)=16 and L(5)≥49; its Lean library ClassicalSchur formalizes both, with L(5)≤65.
Setting
All numbers are natural numbers, except in the group G below.
Sumfree sets. A set S is sumfree when the sum of two of its elements, equal or distinct, is never in S. A set X is covered by n sumfree sets when it lies in the union of n sumfree sets.
Schur degree. The Schur degreesdeg(X) is the least n≥1 such that n sumfree sets cover X. If there is no such n, it is ∞.
For example, sdeg({1,…,N})≤n holds for N≤S(n) and fails for N>S(n).
Block sums. Let A=(a1,…,aL) be a finite sequence of length ∣A∣=L. Its block sums are the sums of runs of consecutive entries:
ai+ai+1+⋯+aj(1≤i≤j≤L).
The set of these sums is A^. The average of A is the rational number μ(A)=(a1+⋯+aL)/L.
The number L(n). A length L has the ER property for n when every sequence A of L positive integers with μ(A)≤n has sdeg(A^)≥n.
For n≥2, the inequality sdeg(A^)≥n holds when no n−1 sumfree sets cover A^. It fails when some n−1 sumfree sets cover A^.
The number L(n) is the least L≥1 with the ER property for n.
The pigeonhole bound. Let ρ(0)=2 and ρ(k+1)=(k+1)(ρ(k)−1)+2. The first values are ρ(1)=3, ρ(2)=6, ρ(3)=17 and ρ(4)=66.
For k≥1, ρ(k) is an upper bound for the Ramsey number: Rk(3)≤ρ(k), with equality for k≤3.
The group G. Let G=Zm1×Zm2. A set C⊆G is sumfree in G when the sum in G of two of its elements, equal or distinct, is never in C.
The lifted sequence. Take m1≥1 and M≥m1. Write the m1m2 numbers u+Mj, with 0≤u<m1 and 0≤j<m2, in increasing order:
x0<x1<⋯<xm1m2−1.
The lifted sequence is the sequence of the m1m2−1 gaps between consecutive terms, x1−x0,…,xm1m2−1−xm1m2−2. Lemma 4.1 below uses it to turn a cover of G∖{0} into a sequence in ℕ.
Lean names.
SumFree S: S is sumfree.
CoveredBySumFree X n: X is covered by n sumfree sets.
sdeg X : ℕ∞: the Schur degree, with ⊤ for ∞.
blockSums A and average A, for A : List ℕ: A^ and μ(A).
ERProperty n L: the length L has the ER property for n.
erL n: L(n).
ramseyBound k: ρ(k).
GroupSumFree C: C is sumfree in G. The Lean definition takes any type with an addition; the targets use it for ZMod m₁ × ZMod m₂.
liftPrefix m₁ M L: xL, defined for all m1 and M by xL=(Lmodm1)+M⌊L/m1⌋.
liftSeq m₁ m₂ M: the lifted sequence, defined for all m1, m2 and M as the list of the m1m2−1 differences xk+1−xk.
Formalization targets
Goal
erL4=16
An exact value, so no later result changes the statement; it is the case Eliahou and Revuelta left open.
Theorem 4.1 of Eliahou–Revuelta, in ℕ, with ρ(k) for Rk(3)
ρ(k)≤∣A∣+1⟹k+1≤sdeg(A^)(k∈N,A a finite sequence in N).
Upper bound of Proposition 5.3, with ρ(k) for Rk(3)
erL(k+1)≤ρ(k)−1(k∈N).
No length below 16 has the property at n=4
¬ERProperty4L(1≤L≤15).
Lemma 4.1 (McKenna 2026): lift from a group
For m1,m2,q≥1, M≥3m1−2 and sets C1,…,Cq, sumfree in G, that cover G∖{0}, the sequence A=liftSeq m₁ m₂ M satisfies
Corollary 4.2 (McKenna 2026): group coverings bound L(n) from below
For n≥3, m1,m2≥1 and n−1 sets, sumfree in G, that cover G∖{0}:
m1m2≤erLn.
Theorem 1.2 (McKenna 2026), with the Lean upper bound: bounds for L(5)
49≤erL5≤65.
Significance
L(4)=16. At n=4, Conjecture 5.6 predicts L(4)=S(3)+1=14. So L(4)=16 refutes the conjecture at n=4. Here L(n) equals the upper bound Rn−1(3)−1 of Proposition 5.3.
The two bounds of Proposition 5.3 coincide at n=2,3, where the paper gives L(2)=2 and L(3)=5. So n=4 is the first case in which the conjecture says more than Proposition 5.3.
L(5)≥49. At n=5, Conjecture 5.6 predicts L(5)=S(4)+1=45. So L(5)≥49 refutes the conjecture at n=5.
What remains open. Conjectures 5.7 and 5.8 remain open.
The paper derives Conjecture 5.7 at each n from Conjecture 5.6 at the same n, with Theorem 5.4. At n=4,5 that derivation is not available. But Conjecture 5.7 holds there by the known values: 44≤4⋅14 and 160≤5⋅45.
Conjecture 5.8 follows from Conjecture 5.6 at n=6 (that is, L(6)=161) with Theorem 5.4. Nothing here decides that case.
With L(4)=16, Theorem 5.4 gives only S(4)≤64. This is weaker than S(4)≤R4(3)−2≤60.
Status. Every target is proved and formalized.
Theorem 4.1 and Proposition 5.3 are proved in the refereed paper.
L(4)=16 (Theorem 1.1), Lemma 4.1, Corollary 4.2 and L(5)≥49 (Theorem 1.2) are proved in McKenna 2026 (doi:10.5281/zenodo.22987189). Before publication, separate agents, with their own code, checked the proofs in two rounds of adversarial audit.
At launch, all 12 theorems of the tree, the goal included, are Proved in Lean over 4 definition bundles. Their only axioms are propext, Classical.choice and Quot.sound.
An independent verifier checked the definitions and the six headline statements against Eliahou–Revuelta and McKenna 2026. The six statements are the goal, Theorem 4.1, Proposition 5.3, Lemma 4.1, Corollary 4.2 and Theorem 1.2.
Literature. The literature search for McKenna 2026 found no result on L(4), L(5) or Conjectures 5.6–5.8. One citing text, in Jungić 2023, was not read. This records the search; it is not a claim of priority.
Open work, not targets.
The exact L(5): 49≤L(5)≤61 on paper (with R4(3)≤62), and 49≤L(5)≤65 in Lean.
The case n=6: 161≤L(6)≤R5(3)−1≤306 (DS1: R5(3)≤307). Here Conjecture 5.6 is the open step toward S(6)≤966.
Difficulty
Two kinds of bound. The two sides of an exact value of L(n) are statements of different kinds.
An upper bound L(n)≤m needs one length. It follows from sdeg(A^)≥n for every sequence A of positive integers of one length L, with 1≤L≤m and average at most n.
A lower bound L(n)≥m needs every shorter length. For every L with 1≤L<m, it needs a sequence of L positive integers, with average at most n, whose block sums are covered by n−1 sumfree sets.
One counterexample at length m−1 is not enough. A sequence of length L+1 and average at most n need not contain L consecutive entries of average at most n. So monotonicity in L does not follow directly from the definition.
The average bound. The lower bound S(n−1)+1 of Proposition 5.3 comes from the constant sequence (1,…,1), with A^={1,…,L}. Conjecture 5.6 states that at length S(n−1)+1, no sequence of average at most n has sdeg(A^)≤n−1.
Without the bound on the average, this fails. The paper gives a sequence of length 14 with sdeg(A^)=3, found by semi-random search. Its average is 114, and the authors remark that such examples "are hard to come by".
The gap for L(5). The gap from 49 to 61 is open. By McKenna 2026 (§5), the construction of Corollary 4.2 gives nothing above 49 at n=5:
S(4)=44 excludes the cyclic groups of order at least 46.
Solver runs exclude the non-cyclic groups of order 50 to 60. Their unsatisfiability proofs (in the DRAT format) were checked.
L(5)≤61 excludes the orders of 62 or more.
McKenna 2026 knows no sequence of length 49 with average at most 5 and sdeg(A^)≤4; such a sequence would give L(5)≥50.
Formalization scope
Ambient ℕ. The paper works in an abelian group; here sets are Set ℕ and sequences List ℕ. For X⊆N the Schur degree is the same in ℕ and in ℤ. Theorem 4.1 is formalized for sequences in ℕ only.
sdeg is sInf in ℕ∞, so it is ⊤ when no cover exists, and sdeg(∅)=1. Covers are Fin n → Set ℕ; the sets need not be disjoint or inside X. Each lower bound on sdeg must exclude every cover.
blockSums A uses B <:+: A with B ≠ []; average [] = 0 is never used, since erL requires L>0.
erL n is sInf {L | 0 < L ∧ ERProperty n L} in ℕ, defined for every n (the paper: n≥2). As sInf ∅ = 0, an upper bound on erL alone would hold if no length had the property; the Theorem 4.1 target excludes this, giving ERProperty (k+1) at length ρ(k)−1≥1, and 0 satisfies neither the goal nor the lower bounds.
Ramsey bound.ρ(k) replaces Rk(3). TriangleRamsey k N says every colouring of the pairs x<y of at least N naturals with at most k colours has a monochromatic triangle; the tree proves it for N=ρ(k). As ρ(4)=66>62≥R4(3), the Lean upper bound for L(5) is 65, not 61.
Lemma 4.1, Corollary 4.2. As in McKenna 2026, the sets need only cover G∖{0}, and Lemma 4.1 requires q≥1: for q=0, m1=m2=1 the sequence is empty and sdeg(∅)=1. The prefix sums are exact: xL.
Subtraction is truncated; with m1,m2≥1 and ρ(k)≥2, none of 3 * m₁ - 2, m₁ * m₂ - 1, ramseyBound k - 1 and n - 1 in Fin (n - 1) (n≥3) truncates, and the differences in liftSeq do not truncate when M≥m1≥1.
Finite checks use kernel decide; no native_decide, no external certificate.
Bundles: ClassicalSchurBasic (the objects of the Setting), ClassicalSchurRamsey (TriangleRamsey, ramseyBound), ClassicalSchurLift (GroupSumFree, liftPrefix, liftSeq), ClassicalSchurValues (the finite data of the two value theorems). As a check, the definitions give the paper's values erL 2 = 2 and erL 3 = 5 (checked in Lean by an independent verifier in a scratch file; not in the tree). Reusable: the definitions of ClassicalSchurBasic (the interface lemmas are inlined in the proofs, not separate nodes), TriangleRamsey k (ramseyBound k), and the lift from group coverings. Welcome beyond the targets: a formal TriangleRamsey 4 62, which with not_coveredBySumFree_blockSums gives L(5)≤61 in Lean; the exact L(5); the case n=6.
H. Fredricksen, M. M. Sweet, Symmetric sum-free partitions and lower bounds for Schur numbers, Electron. J. Combin. 7 (2000) #R32. https://doi.org/10.37236/1510
Every seven-point Steiner triple system is the Fano plane — so the role postulates force the Fano planeTextbook
Motivation
The Shape Zero model reaches the Fano plane — the seven-point, seven-line configuration behind the seven imaginary units of the octonions — by a combinatorial route: C1 Formal Proofs, §3, Theorem 3.6 ("Roles Force Fano") states that any Steiner triple system admitting a role colouring is the Fano plane. Its proof derives only that there are 7 points, and takes the last step on trust: C1 §3 asserts "the unique STS(7) (the Fano plane PG(2, 2))" in Theorem 3.3 and justifies it with one sentence, "Uniqueness of STS(7) is classical."
The companion mission The role postulates force exactly seven points proved the point count and deliberately stopped there. This mission supplies the missing step and completes the chain:
Goal: every Steiner triple system on 7 points is the Fano plane, up to a relabelling of its points.
Capstone: every nonempty Steiner triple system that admits a role colouring is the Fano plane, up to relabelling — C1 Theorem 3.6 in full.
The attack path is the standard textbook proof of the uniqueness of STS(7), supplying the step C1 §3 calls classical. The proof goes through three milestones: a normal form around one point, exactly two completions of it, and an explicit relabelling of each completion onto the Fano plane. The line count (seven lines, three through each point) and the meeting property (any two lines meet in exactly one point) then follow as corollaries of the goal. C1 gives no argument for this step; the milestones below are that classical argument, not C1's.
What this mission does NOT prove.
Not the premise. Why lines have three points and why there are three roles is an input of the model, not derived here.
Not the octonions. The Fano plane is the incidence structure behind the octonion multiplication table, but choosing an orientation and building the multiplication (C1 §4–5: the 16 valid orientations, the 48 role colourings) is a separate step, not covered here.
Up to relabelling only. "Is the Fano plane" means: some bijection of points carries the system's lines exactly onto the Fano plane's lines.
Setting
A Steiner triple system on the points {0,…,n−1} is a family of 3-point subsets, called lines, such that every pair of distinct points lies on exactly one line. A role colouring gives each point of each line one of three roles so that the three points of a line get different roles and every point takes every role exactly once.
The Fano plane is the Steiner triple system on {0,…,6} with lines {i,i+1,i+3} modulo 7:
This is the companion mission's published definition RolesForceSeven.fano, labelled 0,…,6. (C1 §5 writes the same lines on e1,…,e7; this mission uses the companion mission's labelling.)
The definitions RolesForceSeven.STS, RolesForceSeven.RoleColouring and RolesForceSeven.fano are imported from the companion mission, not restated, so both missions refer to the same objects. The one new definition is FanoUnique.IsFano S: there is a bijection e from the points of S to {0,…,6} with {e(ℓ):ℓ a line of S}= the Fano lines.
Formalization targets
Goal: every STS(7) is the Fano plane
S a Steiner triple system on 7 points⟹∃e bijective,e(lines of S)=Fano lines.
This is FanoUnique.sts7_is_fano.
Milestones — the attack path
M1 (normal form). Every STS on 7 points can be relabelled so that the lines through point 0 are {0,1,2}, {0,3,4} and {0,5,6}.
M2 (two completions). If an STS on 7 points contains {0,1,2}, {0,3,4}, {0,5,6}, its lines are exactly one of
A: those three and {1,3,6},{1,4,5},{2,3,5},{2,4,6};
B: those three and {1,3,5},{1,4,6},{2,3,6},{2,4,5}.
M3 (both completions are the Fano plane). Explicit relabellings carry A and B onto the Fano lines.
The goal follows from M1, M2 and M3. (These are M3, M4 and M5 in the draft's original numbering.)
Corollaries of the goal
A — seven lines, three through each point. An STS on 7 points has exactly 7 lines, and every point lies on exactly 3 of them.
B — two lines meet once. Any two distinct lines share exactly one point.
Both hold in the Fano plane and are preserved by relabelling, so they follow from the goal.
Capstone
For n≥1, a Steiner triple system on n points with a role colouring is the Fano plane up to relabelling (FanoUnique.roles_force_fano). The companion mission's goal gives n=7; the goal of this mission does the rest. The hypothesis n≥1 is kept, following the erratum to C1 §3: the empty system satisfies every other condition and is not the Fano plane.
Significance
The result itself. Together with the companion mission, it makes C1 Theorem 3.6 fully machine-verified: the role postulates force not only seven points but the Fano plane itself, up to relabelling.
Formalizing it. C1 cites the uniqueness of STS(7) as classical. It was checked numerically — exhaustively over labelled systems — but never proved in the C1 package; this mission proves it.
Numerical cross-check (exhaustive)
check
result
Steiner triple systems on 7 labelled points
30 (classical count 7!/168=30)
of those, isomorphic to the Fano plane
30 of 30
any two distinct lines meet in exactly one point
true in all 30
completions of {0,1,2},{0,3,4},{0,5,6}
exactly 2 (A and B)
swapping points 1 and 2 carries A to B
true
Difficulty
Moderate. M3 is a finite computation. The work is in M1 — building the relabelling bijection from the three lines through a point — and M2, the case analysis on the line through points 1 and 3, which forces the remaining lines. Corollaries A and B follow from the goal by relabelling. Exhaustive search over all line families (235) is not feasible, so the structured proof is needed.
Formalization scope
Points are Fin n; lines are Finset (Fin n); the definitions are the companion mission's, imported unchanged.
"Is the Fano plane" is an equality of line families after relabelling by an equivalence Fin n ≃ Fin 7; it forces n=7 and exactly 7 lines.
The capstone keeps 0<n and the companion mission's role colouring unchanged.
Reversible Binary 2D Cellular Automata: Disproof of R = 18 and Lower Bound R >= 33,076,358Open Problem
Reversible Binary 2D Cellular Automata: Disproof of R=18 and Lower Bound R≥33,076,358
Problem Statement & Context
A two-dimensional binary cellular automaton (CA) on the infinite grid Z2 with the standard 3×3 Moore neighborhood M={−1,0,1}2 updates configurations c:Z2→{0,1} via a local rule f:{0,1}M→{0,1} according to:
Ff(c)(z)=f((c(z+u))u∈M)
A local rule f is reversible (or bijective) if its global map Ff is a bijection of the configuration space {0,1}Z2.
Let R denote the exact number of reversible binary local rules on the 3×3 Moore neighborhood. A longstanding open conjecture asserted that R=18, corresponding solely to the 18 trivial single-cell shifts and complemented shifts:
f(c)=c(z+u)orf(c)=1−c(z+u)(u∈M)
In this mission, we formally disprove R=18 by constructing an explicit non-trivial conserved-landscape rule f⋆ whose global map Ff⋆ is an involution on Z2, proving 19≤R. We further extend this result to establish R≥33,076,358.
Ladder of Proven Bounds
Bound Level
Proven Bound
Description / Mathematical Mechanism
L0
R≥18
Trivial single-cell shifts and complemented shifts (2×9=18).
L1
R≥19
Disproof of R=18 via explicit non-trivial conserved-landscape rule f⋆.
L2
R≥33,070,982
Conserved-landscape marker rule family (24,576 centered rules).
L3
R≥33,076,358
Incorporation of 5,376 off-centre marker rules reading center cell x0.
Symmetry
Rrot90=74
Exactly 74 rules invariant under 90∘ spatial rotations.
Torus
$
\mathcal{R}_{2,3}
Upper Limit
R≤2511
Derived from constant divergence condition f(0)=f(1).
Key Milestone Theorems
Theorem 1 (Trivial Rule Reversibility): All 18 single-cell shift and negated-shift rules are bijective global maps.
Theorem 2 (Conserved-Landscape Involution f⋆): The rule f⋆ complements a cell iff its W and SE neighbors are 1 and the other six are 0. Ff⋆∘Ff⋆=id.
Theorem 3 (Non-Triviality & 19≤R): f⋆ differs from every trivial rule, establishing 19≤R and disproving R=18.
Theorem 4 (Constant Divergence Condition): Every reversible rule satisfies f(0)=f(1).
Erdős #131: the ELRSS bound F(N) < 3·sqrt(N) + 1 (the open problem itself is NOT settled)Open Problem
What this mission proves, and what it does not. The goal theorem is the explicit upper bound F(N)<3N+1 of Erdős, Lev, Rauzy, Sándor and Sárközy (1999) — a published result, now formally verified here. Erdős problem #131 itself is NOT solved by this mission. Erdős asked for the order of growth of F(N), which is known only to lie between N1/5 and N1/4+o(1) and remains open. A goal theorem reading Proved therefore means the 1999 bound is formalized, nothing more.
Motivation
Call a finite set of positive integers non-dividing if no element of it divides the sum of any nonempty collection of the other elements. The condition is easy to state and immediately restrictive: taking the collection to be a single element already forbids a∣b, so a non-dividing set is primitive, and taking larger collections forbids a great deal more. Paul Erdős asked, with Lev, Rauzy, Sándor and Sárközy, how large such a set can be inside {1,…,N}. Writing F(N) for that maximum, the question is to determine the order of growth of F(N). It remains unanswered, and the gap between what is known from above and from below is a full factor of N1/20.
The problem sits at the meeting point of divisibility and additive combinatorics. Its upper bounds come from the theory of non-averaging sets, since every non-dividing set is non-averaging; its lower bounds come from explicit constructions. The two sides have been improved independently for twenty-five years without meeting.
Setting
Work inside N. For a finite A⊆N and a∈A, write A∖{a} for A with a removed. Say that A is non-dividing when
∀a∈A,∀S⊆A∖{a} with S=∅:a∤x∈S∑x.
Two conventions are forced. First, S ranges over all nonempty subsets, singletons included, so primitivity is part of the property rather than an extra assumption. Second, S must be nonempty: the empty sum is 0 and every a divides 0, so admitting S=∅ would leave no non-dividing sets at all.
Define the extremal function
F(N)=max{∣A∣:A⊆{1,…,N},A non-dividing}.
A set is non-averaging if no element equals the average of some nonempty collection of the others. Every non-dividing set is non-averaging, which is the link through which the strongest upper bounds arrive.
Target
The goal is the explicit upper bound of Erdős, Lev, Rauzy, Sándor and Sárközy:
F(N)<3N1/2+1.
The question Erdős actually posed is stronger and remains open:
Determine the order of growth of F(N).
Significance
The bound above is the sharpest explicit constant in the literature, and it is the natural formalization target: it is a clean closed-form inequality valid for every N, with a self-contained combinatorial proof, and nothing about it is asymptotic.
Beyond it lies the open question. What is known:
F(N)>exp((2/log2+o(1))logN), due to Straus, which refuted Erdős's own initial guess that F(N)<(logN)O(1).
F(N)≫N1/5, from a construction Erdős credits to Csaba.
F(N)<3N1/2+1, the target above.
F(N)≤N1/4+o(1), from Pham and Zakharov's theorem on non-averaging sets. This settles Erdős's specific sub-question — whether F(N)>N1/2−o(1) — in the negative.
So the truth lies between N1/5 and N1/4+o(1), and which end is right is unknown.
Difficulty
The obvious argument gives almost nothing. Pigeonhole on partial sums shows ∣A∣≤minA: order the other elements arbitrarily, form the running sums, and if there are more of them than residues modulo minA then two agree, making a contiguous block sum divisible by minA. That is genuinely all the elementary argument yields, and it is compatible with ∣A∣ as large as N.
The difficulty is that the constraint is a statement about exponentially many subset sums, while the conclusion is about a single cardinality. Every strong bound known proceeds by discarding almost all of that information and keeping a structured fragment — contiguous blocks, or the averaging condition — and the loss at that step is exactly what separates N1/5 from N1/4. Improving either side appears to require using the divisibility conditions for several elements a simultaneously, which no current argument does.
Formalization scope
Sets are Finset ℕ. The forbidden subsets are drawn from A.erase a, so the tested element never appears in the sum it is tested against, and they are quantified as members of (A.erase a).powerset rather than by the subset relation, which makes the property decidable — this is what allows an explicit finite witness to be checked by the kernel rather than asserted. F(N) is a Finset.sup of cardinalities over the filtered powerset of Finset.Icc 1 N, so it is a total function with no junk-value caveats and lower bounds on it follow from exhibiting a single set.
The target inequality is stated over ℝ with Real.sqrt, matching the source's 3N1/2+1 rather than any integer rounding of it.
Timeline
1980s–1998. Erdős poses the problem repeatedly, initially conjecturing F(N)<(logN)O(1).
Straus. Disproves that guess, with F(N)>exp(clogN).
Csaba. A construction giving F(N)≫N1/5, credited by Erdős in 1997.
1999. Erdős, Lev, Rauzy, Sándor and Sárközy name the property non-dividing and prove F(N)<3N1/2+1.
2024. Pham and Zakharov bound non-averaging sets, yielding F(N)≤N1/4+o(1) and answering Erdős's sub-question negatively.
Open. The order of growth of F(N), anywhere between N1/5 and N1/4+o(1).
Selected references
P. Erdős, V. Lev, G. Rauzy, C. Sándor, A. Sárközy, Greedy algorithm, arithmetic progressions, subset sums and divisibility, Discrete Mathematics 200 (1999), 119–135.
H. T. Pham, D. Zakharov, Sharp bound for the Erdős–Straus non-averaging set problem, arXiv:2410.14624; Geom. Funct. Anal. (2025). Theorem 1: a non-averaging A⊆[n] has ∣A∣≤n1/4+o(1).
R. K. Guy, Unsolved Problems in Number Theory, 3rd ed., Springer (2004), problem C16.
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 k there is a largest interval [1,N] that can be split
into k sum-free classes, and the resulting Schur numbersS(k) are notoriously hard to
compute: S(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 m" 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} and proved the universal bound
Sm(k,ℓ)≤m−1 (Electron. J. Combin. 20(2) (2013) #P61).
D'orville, Sim, Wong and Ho then closed 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
m.
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 (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≥2, ℓ≥2 and k≥1. A set S of integers is
ℓ-sum-free modulo m when there are no x1,…,xℓ∈S and y∈S,
repetitions among the xi allowed, with
x1+⋯+xℓ≡y(modm).
The repetition clause is not a technicality: a single element can make its whole class
unsafe. The modular Schur numberSm(k,ℓ) is the greatest N≥0 such that the
interval [1,N] can be partitioned into at most k classes, each ℓ-sum-free modulo
m. A partition into such classes is called valid.
Two derived quantities carry the whole story. Write
d=gcd(m,ℓ−1),n=dm.
Then dn=m exactly, and 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,ℓ)=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 m and ℓ by one
gcd, one division and one subtraction, with no search over colourings, no recursion, and no
case split on ℓmodm. The statement fixes no constants and no modulus, so it is not
invalidated by any later refinement of the threshold in k.
The single-colour value
Sm(1,ℓ)=min(ℓ−1,⌊ℓm⌋)(2≤ℓ≤m),
together with the complementary regime m<ℓ, where the value is 0 if
ℓ≡1(modm) and 1 otherwise. The two together give a value for every
admissible pair (m,ℓ) at k=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} of the 2013 paper and m∈{4,5,6,7} of the 2025
paper are specialisations, and every remaining modulus is covered at once in the stated range
of k.
The mechanism is a single self-defeating value. Take ℓ copies of n: they sum back to
n modulo m, so the lone class {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 k. Adding colours never raises the value past n−1, which
is what makes the formula stable.
The lower bound costs n−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≤ℓ≤m. Three results in the tree go beyond it: the complementary regime
m<ℓ, and the combined formula covering every m≥2 and ℓ≥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 k is not n−1
The obvious attack on the general modulus is to guess that only singletons can be safe classes.
The threshold in k would then be exactly n−1, and the problem would close for all k at
once. That guess is false.
Take m=12 and ℓ≡11(mod12), so d=2 and n=6. The two-element set
{1,5} is ℓ-sum-free modulo 12, and three colours then suffice where the singleton
count would demand five.
So the least k at which the closed form takes hold, written k0(m,ℓ), is not n−1 in
general. What is known about it:
Prime moduli.k0(p,ℓ)=p−1 for every ℓ≥p−1 with
ℓ≡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=2, i=3, k=3 and ℓ=8 that branch gives
S8(3,8)=5, while the correct value is S8(3,8)=7.
Where the proof fails. In the supporting Lemma 2(2) of that paper. The pair a=2,
b=6 satisfies every hypothesis of that lemma at p=2, i=3, ℓ=8, yet
{2,6} is 8-sum-free modulo 8.
The replacement result.
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) classes, together with the
universal cap. The hypothesis p∤(ℓ−1) forces d=1 and n=pi, so the
replacement reaches the goal theorem's value at k≥i(p−1) in place of k≥pi−1, and
it contradicts the printed middle branch for infinitely many triples (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−1 the classes must be simultaneously large and ℓ-sum-free, and no formula
is known. The value is empirically eventually periodic in ℓmodm for fixed k,
verified through m≤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,…,N themselves.
At the residue level they are their classes modulo m, which in Lean is the type
ZMod m: Mathlib's type of residues modulo m, a commutative ring with exactly m elements
for m≥1, carrying the reduction map from Z and the arithmetic that map
preserves.
Working in ZMod m turns "adds up to, modulo m" 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.
ℓ-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 ℓ-sum-freeness of each class.
Empty classes are permitted. This is what makes "at most k" and "exactly k"
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≥2. Bounds are proved on the residue side and quoted on the integer
side.
Both are defined with Nat.findGreatest against the bound m−1. That cap is neither an
approximation nor a trivialising choice: a separate theorem shows any N admitting a valid
partition satisfies N≤Sm(k,ℓ) with no hypothesis on N, because N≥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 k toward k0, and a closed form for k0 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)
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
Magic Squares IV: The Special Classes of Order-Three Magic SquaresResearch Paper
Motivation
The first three missions in this programme settle the ordinary 3×3 magic squares end to end:
Mission I proved MacMahon's count M3(3e)=2e2+2e+1, Mission II his
semi-magic count 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) and S3(t) for the two counting functions, the goal is to
determine both for every line sum t:
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 n;
IsSymmetric — 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 t is at most t.
The new definition module MagicSquaresSpecial3 records the two explicit shapes
that the proofs produce: constSquare3 e (the array all of whose entries are
e, read over the ambient Fin (3e+1)) and
symmMagic3(e,a)=a2e−ae2e−aeaea2e−a,
together with the parameter set symmParamSet e={0,…,2e} and its
cardinality symmParamCount e.
Formalization targets
Goal — the complete count
special_three_count: for every natural number t, the pair of equalities
displayed above. The proof splits on 3∣t and reduces to four child nodes.
The route
Panmagic collapses to the constant square (pan_three_card). Writing the
array as a,b,c;d,m,f;g,h,i, the twelve line equations form a linear system
whose only nonnegative solution is a=b=⋯=i=e. So P3(3e)=1.
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=3e forces c=m=e, and the rows give
M=symmMagic3(e,M00).
A bijection onto an interval (symm_three_bij). Sending a symmetric magic
square of line sum 3e to M00 is a bijection onto
{0,1,…,2e}; hence S3(3e)=2e+1.
The divisibility obstruction (pan_three_otherwise,
symm_three_otherwise). Both classes consist of magic squares, and an
order-three magic square has centre t/3 (center_of_order_three), so
3∤t forces both counts to vanish.
Significance
The results. The three order-three counts behave completely differently in the
same parameter: MacMahon's 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, so the
uniqueness step is a single omega call. The only work is exposing the twelve
equations, which requires reducing the index arithmetic i+k and
rev(i)+k on Fin 3.
For the symmetric case the answer is a family, and the admissibility bound
a≤2e is a statement about truncated subtraction: the entry 2e−a is
computed in N, so the row identity a+(2e−a)+e=3e is satisfiable
precisely for a≤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 M, without any bound on M00;
the bound only appears when asking which members of the family are squares of
line sum 3e. 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)=2e forces a≤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 t, 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=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 G (Lean: AddCommGroup G). For finite
X,Y⊆G, the additive energyE(X,Y) counts quadruples
(x,x′,y,y′) with x+y=x′+y′; the trivial maximum is ∣X∣3 when
∣X∣=∣Y∣. The sumsetX+Y is {x+y}, and the difference set
X−Y is defined pointwise. A set has small doubling when ∣X+X∣ is
linear in ∣X∣. The Lean development uses Finset.addEnergy and
Finset.addConvolution from Mathlib.
A bipartite graph here is an edge set E of type Finset (G × G) with
E⊆A×sB, not a Mathlib SimpleGraph; solvers should state
graph hypotheses that way. Given such an E, the partial sumsetA+EB
is {a+b:(a,b)∈E}, following Tao–Vu Definition 2.28.
Target
The mission goal is the two-set (equal-cardinality) form:
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 c and C
existential; the explicit-constant variant is proved separately in the mission
with c=η/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=δ/8 and C=213K3/δ5+212/δ5; energy level
c0=η/16 and C0=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′=a and b′=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+1 and Mission II
his semi-magic count 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×3 array containing each of
1,2,…,9 exactly once, whose rows, columns and two main diagonals all sum
to the magic constant 15. 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
438951276 under the symmetry group of
the square.
In particular there are exactly 8 of them, and they form a single orbit under
the dihedral group D4.
Setting
MacMahon's parametrization (already formalized in MagicSquaresParam3) writes
every order-three magic square of line sum 3e as
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
Normality bounds the parameters. If mkMagic3(5,a,c) is normal
then 1leale9 and 1lecle9, because a and c are corner
entries. This reduces the classification to a finite search over
81 pairs.
Classification (magic_three_normal_classify). Within that range,
mkMagic3(5,a,c) is normal exactly when (a,c) is one of
(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,c distinct corners of
the Lo Shu square; the excluded ones are those with a+c=10, for which the
(2,1) entry a+c−5 collides with the centre 5.
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=3 is special: for
n=4 there are 880 normal squares (up to symmetry) and for n≥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 81 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
81 resulting ground instances.
Difficulty
Finiteness must be manufactured. Nothing in IsNormal mentions a bound on
a or c, so the first step is to derive 1≤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, so
entries such as a+c−5 and 15−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] 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=4).