All repos
Lean Apache-2.0 3300 1400

leanprover-community/Mathlib

Mathlib is the main mathematics library for Lean 4, a proof assistant. In a proof assistant, each logical step is checked by the computer. Mathlib gives learners and researchers a large collection of definitions, theorems and proof patterns for building machine-verified mathematics.

Overview

Mathlib is the main mathematics library for Lean 4, a proof assistant. In a proof assistant, each logical step is checked by the computer. Mathlib gives learners and researchers a large collection of definitions, theorems and proof patterns for building machine-verified mathematics.

What you can do

  • Write formal proofs for algebra, analysis, topology, combinatorics and more.
  • Use theorem search and existing lemmas instead of rebuilding every argument.
  • Learn proof engineering: precise statements, reusable abstractions and verified results.

How to start

  1. Read the official documentation and introductory guide.
  2. Reproduce one small example before adapting it to your own problem.
  3. Keep the repository link nearby for issues, releases and contribution guidance.

Screenshot

Mathlib GitHub preview

Learning resources