Each notebook is a worked example you can read here or download and run. Every Lean result on these pages was produced by the course’s pinned Lean + Mathlib; see Running the notebooks to run them yourself.

#NotebookWhat you doLecture
00Notebook 0: First proofsHow the Lean cells in these notebooks work, then a first #eval, a first theorem by term and by tactic, a first error and a first sorry.Lecture 0
01Notebook 1: Proofs are programsWrite proofs as terms, break them on purpose, draw proof terms as trees, and audit their axioms.Lecture 1
02Notebook 2: The kernel and definitional equalityFind out which rfl proofs the kernel accepts and why, build addition from the recursor by hand, and audit the axioms behind proofs by simp, omega, classical logic and native_decide.Lecture 2
04Notebook 4: InductionWatch the goals of induction proofs, find the lemma that list reversal needs, prove things about an inductive predicate, and meet a function Lean cannot prove terminating.Lecture 4
07Notebook 7: Qubits in LeanProve Pauli identities, find out what Lean can and cannot compute over the complex numbers, compare a numerical check with a proof, and use the no-cloning theorem.Lecture 7
08Notebook 8: Verified sortingWrite insertion sort, state what a sort must do, prove it, then break the code and watch the proof and the tests catch it.Lecture 8
10Notebook 10: Bit vectors and state machinesProve bit tricks for every 64-bit word with bv_decide, read its counterexamples, compare that with brute-force testing in Python, and check a protocol invariant two ways.Lecture 10
11Notebook 11: Write a tacticBuild macros and an elaborator step by step, print the Expr of real goals, break a tactic on purpose and watch the kernel catch it.Lecture 11
12Notebook 12: Proof searchA toy best-first proof search in Python with Lean as the judge: a fixed list of tactics, twenty small theorems, and how success grows with the budget.Lecture 12