FunctorialAcademySign in

Functorial Academy · Start here

Lean 4 for Mathematicians

Learn Lean 4 and Mathlib through the algebra you already know.

Every exercise is about mathematics you already know, so the only new thing is the Lean. You start by reading Mathlib's statements, then prove facts about groups, subgroups, homomorphisms, ideals and finite sums, with real Lean checking every step. The course is algebra only: no topology or analysis. It ends with the skill that stays yours when an AI writes the proofs: formalizing a statement so that it says exactly what you meant.

Start freeEnter your email and we send you a six-digit code. No password. A new address gets a new account.
  • 8 units
  • 96 exercises
  • Checked by real Lean 4
  • Free

The path

For people who know undergraduate abstract algebra (groups, rings, homomorphisms, a little number theory) and have never used a proof assistant.

  1. Statements and proofs. A statement is a type and a proof is a term of that type. Ask Lean what things are, read Mathlib's statements, and meet the number systems and their traps.
  2. Logic as you already use it. Every move in a written proof has a tactic: assume, split into cases, give a witness, argue by contradiction.
  3. Calculation. Rewrite with equations, chain steps with calc, and learn which tactic finishes which kind of identity.
  4. Structures and type classes. How Mathlib says "let G be a group", how it finds the group structure on ℤ, and how to build a group of your own.
  5. Subobjects and sets. Sets as predicates, subgroups as sets bundled with their closure proofs, and the first constructions: intersections, centralizers, normal subgroups.
  6. Homomorphisms. Bundled homomorphisms, kernels and the injectivity criterion, then ring homomorphisms, ideals and arithmetic in ZMod n.
  7. Induction and finite things. Induction on ℕ, finite sums, divisibility and primes, and orders of elements in groups small enough to check by exhaustion.
  8. Formalizing statements faithfully. An AI can find the proof. Only you know what you meant. Write the Lean statement for an informal one, and let Lean test it against examples and near-misses.
Start freeEnter your email and we send you a six-digit code. No password. A new address gets a new account.