1000+ theorems

Freek Wiedijk started the 1000+ theorems project tracking progress of theorem provers in formalizing named theorems on wikipedia, as a way of comparing prominent theorem provers. Currently 37 of them are formalized in Lean. We also have a page with the theorems from the list not yet in Lean.

To make updates to this list, please make a pull request to mathlib after editing the yaml source file. This can be done entirely on GitHub, see "Editing files in another user's repository".

: Pythagorean theorem #

Author: Joseph Myers

docs, source

: Binomial theorem #

Author: Chris Hughes

theorem add_pow {R : Type u_1} [CommSemiring R] (x y : R) (n : ) :
(x + y) ^ n = mFinset.range (n + 1), x ^ m * y ^ (n - m) * (n.choose m)

docs, source

: Mean value theorem #

Author: Yury G. Kudryashov

theorem exists_deriv_eq_slope (f : ) {a b : } (hab : a < b) (hfc : ContinuousOn f (Set.Icc a b)) (hfd : DifferentiableOn f (Set.Ioo a b)) :
cSet.Ioo a b, deriv f c = (f b - f a) / (b - a)

docs, source

: De Moivre's theorem #

Author: Abhimanyu Pallavi Sudhir

docs, source

: Gödel's incompleteness theorem #

Author: Shogo Saito

: Solutions of a general cubic equation #

Author: Jeoff Lee

theorem Theorems100.cubic_eq_zero_iff {K : Type u_1} [Field K] (a b c d : K) {ω p q r s t : K} [Invertible 2] [Invertible 3] (ha : a 0) (hω : IsPrimitiveRoot ω 3) (hp : p = (3 * a * c - b ^ 2) / (9 * a ^ 2)) (hp_nonzero : p 0) (hq : q = (9 * a * b * c - 2 * b ^ 3 - 27 * a ^ 2 * d) / (54 * a ^ 3)) (hr : r ^ 2 = q ^ 2 + p ^ 3) (hs3 : s ^ 3 = q + r) (ht : t * s = p) (x : K) :
a * x ^ 3 + b * x ^ 2 + c * x + d = 0 x = s - t - b / (3 * a) x = s * ω - t * ω ^ 2 - b / (3 * a) x = s * ω ^ 2 - t * ω - b / (3 * a)

docs, source

: Independence of the continuum hypothesis #

Authors: Floris van Doorn and Jesse Michael Han

: Intermediate value theorem #

Authors: Rob Lewis and Chris Hughes

theorem intermediate_value_Icc {α : Type u} [ConditionallyCompleteLinearOrder α] [TopologicalSpace α] [OrderTopology α] [DenselyOrdered α] {δ : Type u_1} [LinearOrder δ] [TopologicalSpace δ] [OrderClosedTopology δ] {a b : α} (hab : a b) {f : αδ} (hf : ContinuousOn f (Set.Icc a b)) :
Set.Icc (f a) (f b) f '' Set.Icc a b

docs, source

: Wilson's theorem #

Author: Chris Hughes

theorem ZMod.wilsons_lemma (p : ) [Fact (Nat.Prime p)] :
(p - 1).factorial = -1

docs, source

: Ptolemy's theorem #

Author: Manuel Candales

docs, source

: Stirling's theorem #

Authors: Moritz Firsching and Fabian Kruse and Nikolas Kuhn and Heather Macbeth

docs, source

: Quadratic reciprocity theorem #

Authors: Chris Hughes (first) and Michael Stoll (second)

theorem legendreSym.quadratic_reciprocity {p q : } [Fact (Nat.Prime p)] [Fact (Nat.Prime q)] (hp : p 2) (hq : q 2) (hpq : p q) :
legendreSym q p * legendreSym p q = (-1) ^ (p / 2 * (q / 2))

docs, source

theorem jacobiSym.quadratic_reciprocity {a b : } (ha : Odd a) (hb : Odd b) :
jacobiSym (↑a) b = (-1) ^ (a / 2 * (b / 2)) * jacobiSym (↑b) a

docs, source

: Cantor's theorem #

Authors: Johannes Hölzl and Mario Carneiro

theorem Function.cantor_surjective {α : Type u_4} (f : αSet α) :

docs, source

: Solutions of a general quartic equation #

Author: Thomas Zhu

theorem Theorems100.quartic_eq_zero_iff {K : Type u_1} [Field K] (a b c d e : K) {p q r s u v w : K} [Invertible 2] (ha : a 0) (hp : p = (8 * a * c - 3 * b ^ 2) / (8 * a ^ 2)) (hq : q = (b ^ 3 - 4 * a * b * c + 8 * a ^ 2 * d) / (8 * a ^ 3)) (hq_nonzero : q 0) (hr : r = (16 * a * b ^ 2 * c + 256 * a ^ 3 * e - 3 * b ^ 4 - 64 * a ^ 2 * b * d) / (256 * a ^ 4)) (hu : u ^ 3 - p * u ^ 2 - 4 * r * u + 4 * p * r - q ^ 2 = 0) (hs : s ^ 2 = u - p) (hv : v ^ 2 = 4 * s ^ 2 - 8 * (u - q / s)) (hw : w ^ 2 = 4 * s ^ 2 - 8 * (u + q / s)) (x : K) :
a * x ^ 4 + b * x ^ 3 + c * x ^ 2 + d * x + e = 0 x = (-2 * s - v) / 4 - b / (4 * a) x = (-2 * s + v) / 4 - b / (4 * a) x = (2 * s - w) / 4 - b / (4 * a) x = (2 * s + w) / 4 - b / (4 * a)

docs, source

: Dirichlet's theorem on arithmetic progressions #

Author: David Loeffler, Michael Stoll

theorem Nat.setOf_prime_and_eq_mod_infinite {q : } [NeZero q] {a : ZMod q} (ha : IsUnit a) :
{p : | Nat.Prime p p = a}.Infinite

docs, source

: Bertrand's postulate #

Authors: Bolton Bailey and Patrick Stevens

theorem Nat.bertrand (n : ) (hn0 : n 0) :
∃ (p : ), Nat.Prime p n < p p 2 * n

docs, source

: Cayley–Hamilton theorem #

Author: Kim Morrison

theorem Matrix.aeval_self_charpoly {R : Type u_1} [CommRing R] {n : Type u_4} [DecidableEq n] [Fintype n] (M : Matrix n n R) :
(Polynomial.aeval M) M.charpoly = 0

docs, source

: Abel–Ruffini theorem #

Author: Thomas Browning

docs, source

: Fundamental theorem of arithmetic #

Author: Chris Hughes

theorem Nat.primeFactorsList_unique {n : } {l : List } (h₁ : l.prod = n) (h₂ : pl, Nat.Prime p) :
l.Perm n.primeFactorsList

docs, source

docs, source

docs, source

class UniqueFactorizationMonoid (α : Type u_2) [CancelCommMonoidWithZero α] extends IsWellFounded α DvdNotUnit :

docs, source

theorem UniqueFactorizationMonoid.factors_unique {α : Type u_1} [CancelCommMonoidWithZero α] [UniqueFactorizationMonoid α] {f g : Multiset α} (hf : xf, Irreducible x) (hg : xg, Irreducible x) (h : Associated f.prod g.prod) :
Multiset.Rel Associated f g

docs, source

it also has a generalized version, by showing that every Euclidean domain is a unique factorization domain, and showing that the integers form a Euclidean domain.

: Lagrange's four-square theorem #

Author: Chris Hughes

theorem Nat.sum_four_squares (n : ) :
∃ (a : ) (b : ) (c : ) (d : ), a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2 = n

docs, source

: Solutions to Pell's equation #

Author: Mario Carneiro (first), Michael Stoll (second)

theorem Pell.eq_pell {a : } (a1 : 1 < a) {x y : } (hp : x * x - Pell.d✝ a1 * y * y = 1) :
∃ (n : ), x = Pell.xn a1 n y = Pell.yn a1 n

docs, source

theorem Pell.exists_of_not_isSquare {d : } (h₀ : 0 < d) (hd : ¬IsSquare d) :
∃ (x : ) (y : ), x ^ 2 - d * y ^ 2 = 1 y 0

docs, source

In pell.eq_pell, d is defined to be a*a - 1 for an arbitrary a > 1.

: Fermat's theorem on sums of two squares #

Author: Chris Hughes

theorem Nat.Prime.sq_add_sq {p : } [Fact (Nat.Prime p)] (hp : p % 4 3) :
∃ (a : ) (b : ), a ^ 2 + b ^ 2 = p

docs, source

: Ramsey's theorem #

Author: Bhavik Mehta

: Stone–Weierstrass theorem #

Authors: Scott Morrison and Heather Macbeth

theorem ContinuousMap.subalgebra_topologicalClosure_eq_top_of_separatesPoints {X : Type u_1} [TopologicalSpace X] [CompactSpace X] (A : Subalgebra C(X, )) (w : A.SeparatesPoints) :
A.topologicalClosure =

docs, source

: Erdős–Szekeres theorem #

Author: Bhavik Mehta

theorem Theorems100.erdos_szekeres {α : Type u_1} [LinearOrder α] {r s n : } {f : Fin nα} (hn : r * s < n) (hf : Function.Injective f) :
(∃ (t : Finset (Fin n)), r < t.card StrictMonoOn f t) ∃ (t : Finset (Fin n)), s < t.card StrictAntiOn f t

docs, source

: Cantor–Bernstein–Schroeder theorem #

Author: Mario Carneiro

theorem Function.Embedding.schroeder_bernstein {α : Type u} {β : Type v} {f : αβ} {g : βα} (hf : Function.Injective f) (hg : Function.Injective g) :
∃ (h : αβ), Function.Bijective h

docs, source

: Euler's partition theorem #

Authors: Bhavik Mehta and Aaron Anderson

docs, source

: Minkowski's theorem #

Authors: Alex J. Best and Yaël Dillies

theorem MeasureTheory.exists_ne_zero_mem_lattice_of_measure_mul_two_pow_lt_measure {E : Type u_1} [MeasurableSpace E] {μ : MeasureTheory.Measure E} {F s : Set E} [NormedAddCommGroup E] [NormedSpace E] [BorelSpace E] [FiniteDimensional E] [μ.IsAddHaarMeasure] {L : AddSubgroup E} [Countable L] (fund : MeasureTheory.IsAddFundamentalDomain (↥L) F μ) (h_symm : xs, -x s) (h_conv : Convex s) (h : μ F * 2 ^ Module.finrank E < μ s) :
∃ (x : L), x 0 x s

docs, source

: Taylor's theorem #

Author: Moritz Doll

theorem taylor_mean_remainder_lagrange {f : } {x x₀ : } {n : } (hx : x₀ < x) (hf : ContDiffOn (↑n) f (Set.Icc x₀ x)) (hf' : DifferentiableOn (iteratedDerivWithin n f (Set.Icc x₀ x)) (Set.Ioo x₀ x)) :
x'Set.Ioo x₀ x, f x - taylorWithinEval f n (Set.Icc x₀ x) x₀ x = iteratedDerivWithin (n + 1) f (Set.Icc x₀ x) x' * (x - x₀) ^ (n + 1) / (n + 1).factorial

docs, source

theorem taylor_mean_remainder_cauchy {f : } {x x₀ : } {n : } (hx : x₀ < x) (hf : ContDiffOn (↑n) f (Set.Icc x₀ x)) (hf' : DifferentiableOn (iteratedDerivWithin n f (Set.Icc x₀ x)) (Set.Ioo x₀ x)) :
x'Set.Ioo x₀ x, f x - taylorWithinEval f n (Set.Icc x₀ x) x₀ x = iteratedDerivWithin (n + 1) f (Set.Icc x₀ x) x' * (x - x') ^ n / n.factorial * (x - x₀)

docs, source

: Brouwer fixed-point theorem #

Author: Brendan Seamas Murphy

in Lean 3

: Fundamental theorem of calculus #

Authors: Yury G. Kudryashov (first) and Benjamin Davidson (second)

theorem intervalIntegral.integral_hasStrictDerivAt_of_tendsto_ae_right {E : Type u_3} [NormedAddCommGroup E] [NormedSpace E] [CompleteSpace E] {f : E} {c : E} {a b : } (hf : IntervalIntegrable f MeasureTheory.volume a b) (hmeas : StronglyMeasurableAtFilter f (nhds b) MeasureTheory.volume) (hb : Filter.Tendsto f (nhds b MeasureTheory.ae MeasureTheory.volume) (nhds c)) :
HasStrictDerivAt (fun (u : ) => ∫ (x : ) in a..u, f x) c b

docs, source

theorem intervalIntegral.integral_eq_sub_of_hasDeriv_right_of_le {E : Type u_3} [NormedAddCommGroup E] [NormedSpace E] {a b : } [CompleteSpace E] {f f' : E} (hab : a b) (hcont : ContinuousOn f (Set.Icc a b)) (hderiv : xSet.Ioo a b, HasDerivWithinAt f (f' x) (Set.Ioi x) x) (f'int : IntervalIntegrable f' MeasureTheory.volume a b) :
∫ (y : ) in a..b, f' y = f b - f a

docs, source

: Euclid's theorem #

Author: Jeremy Avigad

theorem Nat.exists_infinite_primes (n : ) :
∃ (p : ), n p Nat.Prime p

docs, source

: Bézout's theorem #

Author: mathlib

theorem Nat.gcd_eq_gcd_ab (x y : ) :
(x.gcd y) = x * x.gcdA y + y * x.gcdB y

docs, source

: Bertrand's ballot theorem #

Authors: Bhavik Mehta and Kexing Ying

theorem Ballot.ballot_problem (q p : ) :

docs, source

: Friendship theorem #

Authors: Aaron Anderson and Jalex Stark and Kyle Miller

docs, source

: Euclid–Euler theorem #

Author: Aaron Anderson

theorem Theorems100.Nat.eq_two_pow_mul_prime_mersenne_of_even_perfect {n : } (ev : Even n) (perf : n.Perfect) :
∃ (k : ), Nat.Prime (mersenne (k + 1)) n = 2 ^ k * mersenne (k + 1)

docs, source

: Uncountability of the continuum #

Author: Floris van Doorn

theorem Cardinal.not_countable_real :
¬Set.univ.Countable

docs, source