Learning seminar · University of Massachusetts Amherst · Fall 2026
Lean is a language for writing mathematical proofs that a computer checks line by line, and Mathlib is its library of formalized mathematics, from linear algebra to measure theory. In this seminar we learn to use them, and each participant formalizes problems from the department's qualifying exams. No prior Lean or type theory is needed.
There is no grading. The seminar ends with participants presenting their formalizations to each other.
We meet one hour a week, and most of the work happens at home. Each week has reading and exercises, listed in the schedule below; the exercise files are in the seminar's GitHub repository. The meetings are for live demos, getting unstuck, and looking at each other's proofs.
Why qualifying-exam problems? In recent tests, the best AI systems produced no valid Lean proof of any algebra problem at qualifying-exam level (FATE), and proved at most 1% of such problems in analysis (MA-ProofBench). A formalized qualifying-exam problem is something current AI systems cannot produce on their own.
git clone https://github.com/YOUR-GITHUB-NAME/lean-seminar.git cd lean-seminar lake exe cache getThe last command downloads Mathlib already compiled. Do not skip it: without it, Lean compiles all of Mathlib itself, which takes hours. Then open the
lean-seminar folder in VS Code. The repository's
README has the
details, including how to get each week's new exercises.
Exercises/Week00_Squeeze.lean. He proves the squeeze theorem, but the
video stops before the proof is finished. Finishing it is your first exercise.
by must be indented. Use spaces: Lean
rejects tab characters.
\R gives ℝ,
\N gives ℕ, \to gives →, \e gives
ε, \< gives ⟨. The code turns into the symbol when
you type a space after it.
x ^ 2; Lean does not understand x².h or n_gt_N, are labels you
choose. Lean never reads them; the meaning comes from the statement.
Exercises
folder each week.
MiL is Mathematics in Lean, a free online book with exercises built in.
| Week | In the meeting | At home |
|---|---|---|
| 0 | Before the first meeting | Install Lean; the Natural Number Game; the video and Week00_Squeeze.lean |
| 1 | Propositions as types; term and tactic mode; reading the Infoview | MiL chapters 1–2, with exercises |
| 2 | Logic and quantifiers: intro, apply, exact,
obtain, use, constructor, calc |
MiL chapter 3 |
| 3 | Structures, typeclasses and coercions: why Group G is written
[Group G] |
MiL chapters 6–7; build a small algebraic hierarchy by hand |
| 4 | Finding things in Mathlib: naming conventions, exact?,
apply?, rw?; Loogle, LeanSearch, Lean Finder |
Lemma hunt: twenty goals, find the lemma for each |
| 5 | Automation and its limits: simp, ring,
linarith, norm_num, omega,
positivity and others |
For each tactic, a goal it solves and a nearly identical one it cannot |
| 6 | Does the statement say what you mean? Junk values, vacuous hypotheses,
#print axioms |
The exercises in Seminar/Diagnostics.lean |
| 7 | Algebra in Mathlib: Sylow theorems, Galois theory, Noetherian rings, localization | Textbook algebra problems, then one graduate-level problem |
| 8 | Analysis in Mathlib: limits through filters, measure theory, complex analysis | Undergraduate analysis problems |
| 9 | AI assistants as tools: connecting one to Lean | Set one up; a timing experiment: four goals with the assistant, four without |
| 10 | Lean in AI research: benchmarks, and what their numbers mean | Two or three papers from the reading list below |
| 11 | Feasibility checks: which chosen problems need rescoping | Choose your problem; post its feasibility check; comment on others' |
| 12 | Organizing a larger proof; debugging clinic | Your project; open a draft pull request early |
| 13 | Presentations | Your project; rehearse your talk with another participant |
| 14 | Presentations |
From week 11 you formalize problems from the department's qualifying exams. What is hard on paper and what is hard in Lean are different things, so choosing a problem matters as much as solving it.
Before committing to a problem, work through five things:
sorry as its proof.
Start from Seminar/ProjectTemplate.lean; the repository's
Projects/README.md explains where to put your files. Then post the check
with the Feasibility check form under the repository's Issues. If a problem
fails one of the five, that is worth knowing early: we will help you rescope it or
choose another.
In weeks 13 and 14, each participant gives a talk of 20–25 minutes, including questions. A talk shows:
#print axioms for each main theorem;
Before your talk, add your project to the repository with a pull request.
scripts/check.sh in the repository tells you whether a proof is really
finished: Lean accepts a file containing sorry with only a warning.
To be announced.