Ramsey theory asks for the smallest number such that every graph on vertices contains either a clique of size or an independent set of size . 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 . 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 in .
Timeline. Ramsey proved in 1928 that is finite; Erdős and Szekeres gave the first upper bounds in 1935; Erdős's 1947 paper supplied the exponential lower bound 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 is known today.
Fix an integer and put . A graph is a pair with an irreflexive symmetric relation on ; here vertices are labeled . A subset of size is a clique if every two distinct vertices of are adjacent, and an independent set if every two distinct vertices of are non-adjacent. A -set that is either a clique or an independent set is monochromatic: it is monochromatic in the two-coloring of the complete graph on 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 labeled vertices — equivalently, each of the possible edges is present independently with probability . This space has exactly elements.
A graph with no monochromatic -set is a graph with neither a -clique nor an independent -set. The mission's goal, "the Ramsey number satisfies ", is formalized as the bare existence of such a graph on vertices, without defining the Ramsey number itself.
i.e. there exists a graph on labeled vertices that contains no monochromatic -set.
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 graphs.
The result. The lower bound is exponential, matching (up to the constant in the exponent) the best known upper bound 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 .
The central difficulty is that the bad events — "the -set is monochromatic" — overlap heavily: a typical graph contains many monochromatic -sets, so the union bound must be crude enough to survive the overlap. Concretely, the estimate holds for but fails for ; 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 -set ( of them) and applying the union-bound principle, so no probability theory enters the formalization.
Representation. Graphs are SimpleGraph (Fin N): a relation on labeled vertices. A candidate set is a Finset (Fin N) of cardinality ; "monochromatic" is IsClique ∨ IsIndepSet on the graph; "no monochromatic -set" is the predicate NoMonoK. All counting is cardinality of finite sets; monoCount N k G is the number of monochromatic -sets of .
Conventions. uses natural-number division, so for odd the graph lives on vertices — the standard reading of . The hypothesis is explicit. The theorem quantifies existence over all graphs; it does not define the Ramsey number (a definition item for it, with the re-stated bound , is a natural follow-up contribution).
Reusability. The union-bound principle, the monochromatic--set machinery, and the pair-count bound are all reusable beyond this mission. Welcome contributions: defining ramseyNumber and restating the bound as ; the Erdős–Szekeres upper bound as a companion mission; applications of the same principle elsewhere.
This mission is not a duplicate of existing platform content, and the choice of target is deliberate:
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.Erdos183 mission concerns multicolour triangle Ramsey numbers 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.0df444a) asks, eventually in , for ; 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.namespace Erdos1947
/-- **Erdős (1947): the probabilistic Ramsey lower bound.** For every `k ≥ 3`
there exists a graph on `2^(k/2)` vertices containing no `k`-clique and no
independent set of size `k`. Equivalently, the Ramsey number satisfies
`R(k) > 2^(k/2)`. -/
theorem ramsey_lower_bound {k : ℕ} (hk : 3 ≤ k) :
∃ G : SimpleGraph (Fin (2 ^ (k / 2))), NoMonoK k G := by
sorry
end Erdos1947The main theorem of Erdős's 1947 paper. For every there exists a graph on labeled vertices that contains neither a clique of size nor an independent set of size :
equivalently the Ramsey number satisfies . This was the first exponential lower bound on Ramsey numbers and the founding application of the probabilistic method in combinatorics: the graph is shown to exist without being constructed. The mission's milestones isolate the three counting ingredients that the proof combines (the count estimate, the union-bound principle, and the pair-count bound).
No open leaves. Every sub-goal is proved or awaiting decomposition.