Lean foundations
Meet Lean as a language, learn its core types, and build your first programs.
- 7 lessons
- 67 min
- 7 checked exercises
Work through 67 lessons covering the language, tactics, induction, verified programs and proof terms. The built-in editor shows Lean’s goals and errors as you work.
Syntax highlighting, tactic completion and Lean’s Unicode abbreviations in a focused editor.
Open goals, compiler errors and output stay beside the exercise that produced them.
Short explanations, worked examples, hints and questions connect each proof step to the idea behind it.
Follow the order or begin with the topic you need.
No experience needed. 3 full courses are free.
Meet Lean as a language, learn its core types, and build your first programs.
Read a goal, take a proof step, and let Lean check your reasoning.
Or, not, if-and-only-if: the connectives behind every argument.
Statements about every number and about some number.
The tactics and techniques used in real developments.
The everyday tactics that do most of the work in real developments.
Functions as values, structured data, recursion, termination, and type classes.
Prove facts about every natural number and every list.
Define functions and prove small, useful properties of their behavior.
Model your own data, then reason about every shape it can take.
See the terms behind the tactics.
Proofs are programs. Write them directly as terms.
No. The course editor runs in the browser and sends checks to Lean 4.30. You can install Lean locally later without changing the language or tactics you learned here.
The exercises use Lean’s core library so that they run fast and teach the language itself. Every tactic covered (rw, simp, omega, induction, obtain, calc …) is the same one you will use with Mathlib.
The proof must compile without errors or sorry. Completion is then saved to your account.
Its material now belongs to the Academy sequence. Lean foundations contains the free introduction; Functional programming patterns contains the later programming, recursion and type-class lessons.