The ImandraX 100 Theorems Project
The Top 100 Mathematical Theorems list, compiled by Paul Sally and popularized by Freek Wiedijk, is a benchmark for formal proof systems. It includes foundational results from number theory, algebra, geometry, analysis, and combinatorics.
ImandraX can also be used as an interactive theorem prover for mathematics. Its executable logic and its proof and counterexample automation carry over from program verification. The ImandraX 100 Theorems project is an ongoing effort by Grant Passmore to formalize these theorems in ImandraX, demonstrating the system's mathematical reasoning capabilities.
Status: 33 / 100
Progress
33 of the 100 theorems have been formally proved in ImandraX. The project is ongoing; contributions welcome!
Proved theorems
| # | Theorem | Source |
|---|---|---|
| 1 | Irrationality of √2 | sqrt2_irrational.iml |
| 3 | Denumerability of the Rationals | q_denum.iml |
| 4 | Pythagorean Theorem | pythagoras.iml |
| 10 | Euler's Generalization of Fermat's Little Theorem | euler.iml |
| 11 | Infinitude of Primes | inf_primes.iml |
| 19 | Lagrange's Four-Square Theorem | four_squares.iml |
| 20 | Fermat's Two-Square Theorem | two_squares.iml |
| 23 | Formula for Pythagorean Triples | pythagorean_triples.iml |
| 30 | The Ballot Problem | ballot.iml |
| 34 | Divergence of the Harmonic Series | harmonic.iml |
| 38 | Arithmetic Mean/Geometric Mean | am_gm.iml |
| 42 | Sum of Reciprocals of Triangular Numbers | triangular.iml |
| 44 | Binomial Theorem | binomial.iml |
| 51 | Wilson's Theorem | wilson.iml |
| 52 | Number of Subsets of a Set | num_subsets.iml |
| 54 | Konigsberg Bridges Problem | konigsberg.iml |
| 58 | Formula for Number of Combinations | combinations.iml |
| 60 | Bezout's Theorem | gcd.iml |
| 65 | Isosceles Triangle Theorem | isosceles.iml |
| 66 | Sum of a Geometric Series | geometric_series.iml |
| 68 | Sum of an Arithmetic Series | arithmetic_series.iml |
| 69 | Greatest Common Divisor Algorithm | gcd.iml |
| 73 | Ascending or Descending Sequences (Erdős–Szekeres) | ascending.iml |
| 74 | Principle of Mathematical Induction | math_induct.iml |
| 77 | Sum of Kth Powers (Faulhaber's Formula) | sum_kth_powers.iml |
| 78 | Cauchy-Schwarz Inequality | cauchy_schwarz.iml |
| 80 | Fundamental Theorem of Arithmetic | fta.iml |
| 85 | Divisibility by 3 Rule | div_by_3.iml |
| 88 | Derangements Formula | derangements.iml |
| 89 | Factor and Remainder Theorem | factor_remainder.iml |
| 91 | Triangle Inequality | tri_ineq.iml |
| 93 | The Birthday Problem | birthday.iml |
| 96 | Principle of Inclusion/Exclusion | inclusion_exclusion.iml |
Spotlight: Irrationality of √2
The proof that √2 is irrational is one of the most celebrated results in mathematics. The ImandraX formalization follows a proof by infinite descent:
- Assume √2 = p/q where p/q is in reduced form (gcd(p,q) = 1)
- Then p² = 2q²
- Therefore p² is even, so p is even (proved via modular arithmetic)
- Write p = 2k, then 4k² = 2q², so q² = 2k², and q is even
- But then both p and q are even, contradicting gcd(p,q) = 1
The formalization involves substantial development of modular arithmetic (mod properties), GCD theory, and careful reasoning about squares and parity. Key theorems include:
(* Squares preserve parity *)
theorem square_even_iff_even x =
((x * x) mod 2 = 0) = (x mod 2 = 0)
(* GCD absorbs common divisors *)
theorem gcd_absorbs_common_divisor d p q =
(d > 0 && p mod d = 0 && q mod d = 0)
==> (gcd p q) mod d = 0
(* No coprime solution to p² = 2q² *)
theorem no_coprime_solution_p2_eq_2q2 p q =
(gcd p q = 1 && p * p = 2 * (q * q))
==> false
(* The main result *)
theorem sqrt2_is_irrational (r : Rational.t) =
Rational.is_reduced r
==> Rational.square r <> Rational.of_int 2The full proof is approximately 200 lines of IML, including the modular arithmetic library and GCD theory. It demonstrates ImandraX's ability to handle deep, multi-step mathematical proofs with sophisticated tactic composition.
Mathematical areas covered
The proved theorems span a range of mathematical disciplines:
- Number theory: Irrationality of √2 (#1), Euler's generalization of Fermat's little theorem (#10), infinitude of primes (#11), four-square theorem (#19), two-square theorem (#20), Pythagorean triples (#23), Wilson's theorem (#51), Bezout's theorem (#60), GCD algorithm (#69), fundamental theorem of arithmetic (#80), divisibility by 3 (#85)
- Algebra: Binomial theorem (#44), Cauchy-Schwarz inequality (#78), factor and remainder theorem (#89)
- Analysis: Divergence of harmonic series (#34), AM-GM inequality (#38), geometric series (#66), arithmetic series (#68), sum of kth powers (#77)
- Combinatorics and probability: Ballot problem (#30), number of subsets (#52), combinations formula (#58), Erdős–Szekeres (#73), derangements (#88), birthday problem (#93), inclusion/exclusion (#96)
- Geometry: Pythagorean theorem (#4), isosceles triangle (#65), triangle inequality (#91)
- Set theory / logic: Denumerability of rationals (#3), mathematical induction (#74)
- Graph theory: Konigsberg bridges (#54)
How to explore the proofs
- Clone the repository:
git clone https://github.com/imandra-ai/imandra-100-theorems - Open any
.imlfile in VS Code with the ImandraX extension - Use the goal state viewer to step through the proofs interactively
- Try modifying proofs or proving the remaining 67 theorems!