Mathlib theorem · Existing formal mathematics

Existing in Mathlib · Combinatorics

Erdős–Ko–Rado Theorem

Choose many r-element subsets of an n-element ground set, requiring every two chosen subsets to share at least one element. When r is no more than half of n, Erdős–Ko–Rado gives the numerical ceiling binom(n−1,r−1) for the number of chosen subsets.

Exact theorem

Exact Mathlib statement

theorem Finset.erdos_ko_rado {n : ℕ} {𝒜 : Finset (Finset (Fin n))} {r : ℕ} (h𝒜 : (𝒜 : Set (Finset (Fin n))).Intersecting) (h₂ : (𝒜 : Set (Finset (Fin n))).Sized r) (h₃ : r ≤ n / 2) : #𝒜 ≤ (n - 1).choose (r - 1)

The theorem at a glance

Erdős–Ko–Rado at a glance

A visual guide to the theorem's hypotheses, structure, and conclusion; the exact statement gives the formal detail.

Complements and an iterated-shadow bound turn pairwise intersection into the cardinality obstruction behind Erdős–Ko–Rado. Explanatory diagram.
Detailed visual description

The poster makes the three hypotheses and upper bound primary, using a three-card example whose pairwise overlaps are different. Its source route takes complements, descends by an iterated shadow, uses disjointness from the original family, invokes the Lovász Kruskal–Katona bound, and finishes with Pascal’s binomial identity. The footer excludes equality classification.

Statement structure

Statement and scope

Statement map for Erdős–Ko–Rado TheoremA pairwise-intersecting family of r-element subsets of an n-element set, with r at most half of n, has at most binom(n−1,r−1) members. Claim boundary: This page indexes Mathlib’s finite-family theorem for 𝒜 : Finset (Finset (Fin n)). The family is pairwise intersecting, every member has exactly r elements, and the hypothesis is exactly r ≤ n / 2. The selected declaration proves only #𝒜 ≤ (n−1).choose (r−1); it does not construct a star family, prove a separate sharpness result, or classify equality cases. The pinned upstream declaration is Finset.erdos_ko_rado. The complete formal statement is available in the Exact Mathlib statement section.Mathematical readingA pairwise-intersectingfamily of r-elementsubsets of an n-elementset, with r at most halfof n, has at mostbinom(n−1,r−1) members.Claim boundaryThis page indexesMathlib’s finite-familytheorem for 𝒜 : Finset(Finset (Fin n)). Thefamily is pairwiseintersecting, everymember has exactly relements, and thehypothesis is exactly r≤ n / 2. The selecteddeclaration proves only#𝒜 ≤ (n−1).choose (r−1);it does not construct astar family, prove aseparate sharpnessresult, or classifyequality cases.Pinned declarationmathlib ·Finset.erdos_ko_radoStatement map for Erdős–Ko–Rado TheoremA pairwise-intersecting family of r-element subsets of an n-element set, with r at most half of n, has at most binom(n−1,r−1) members. Claim boundary: This page indexes Mathlib’s finite-family theorem for 𝒜 : Finset (Finset (Fin n)). The family is pairwise intersecting, every member has exactly r elements, and the hypothesis is exactly r ≤ n / 2. The selected declaration proves only #𝒜 ≤ (n−1).choose (r−1); it does not construct a star family, prove a separate sharpness result, or classify equality cases. The pinned upstream declaration is Finset.erdos_ko_rado. The complete formal statement is available in the Exact Mathlib statement section.Mathematical readingA pairwise-intersectingfamily of r-elementsubsets of an n-elementset, with r at most halfof n, has at mostbinom(n−1,r−1) members.Claim boundaryThis page indexesMathlib’s finite-familytheorem for 𝒜 : Finset(Finset (Fin n)). Thefamily is pairwiseintersecting, everymember has exactly relements, and thehypothesis is exactly r≤ n / 2. The selecteddeclaration proves only#𝒜 ≤ (n−1).choose (r−1);it does not construct astar family, prove aseparate sharpnessresult, or classifyequality cases.Pinned declarationmathlib ·Finset.erdos_ko_rado

Read the exact Mathlib declaration

This map summarizes the statement's structure; the exact Mathlib declaration remains authoritative.

A uniform family can be pairwise intersecting through different shared elements; pairwise intersection does not require one element common to every member. Explanatory scientific diagram.
Detailed visual description

The schematic uses three illustrative 3-subsets of a six-element ground set. Each row has exactly three filled incidence cells. Rows one and two share column three, rows one and three share column one, and rows two and three share column five. This local example illustrates uniformity and pairwise intersection without depicting the theorem’s upper bound, a star construction, sharpness, or an equality case.

Why it matters

A mathematical landmark

Erdős–Ko–Rado is a foundational extremal set theorem. Mathlib derives its upper bound through complements, an iterated shadow, disjointness, and the Lovász form of Kruskal–Katona, giving the page a theorem-specific checked proof architecture.

ProofAtlas record

What has been checked

Upstream indexedPinned source bytes verified locally
Locally reproducedExact upstream declaration replayed
Reviewed pageCurrent public presentation reviewed
Accepted Atlas resultNot recorded for the preferred artifact

Mathlib is the source of the theorem; the local Lean replay and page review are separate.

Claim boundary

No new theorem is claimed

This page indexes Mathlib’s finite-family theorem for 𝒜 : Finset (Finset (Fin n)). The family is pairwise intersecting, every member has exactly r elements, and the hypothesis is exactly r ≤ n / 2. The selected declaration proves only #𝒜 ≤ (n−1).choose (r−1); it does not construct a star family, prove a separate sharpness result, or classify equality cases.

Source and local evidence

Where the theorem comes from

Existing declaration
Finset.erdos_ko_rado in mathlib
Relationship
The checked artifact is the upstream declaration itself
Local Lean evidence
artifact.library.mathlib.erdos-ko-rado-theorem.v001
Source
Open the pinned upstream reference