← Alexei Oblomkov

Lean in Mathematics and AI

Learning seminar · University of Massachusetts Amherst · Fall 2026

Meetings
Fridays, 11:15 AM–12:15 PM, LGRT 1681
Organizer
Alexei Oblomkov, LGRT 1234H
Email
oblomkov@math.umass.edu
Repository
github.com/oblomkov-math/lean-seminar
Questions
the seminar's Discussions board, any time

Overview

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.

Before the first meeting

  1. Install Lean. Install VS Code and its Lean 4 extension by following the official instructions. You need about 10 GB of free disk space; 16 GB of memory is comfortable. No suitable computer? You can work in the browser instead, with the Open in GitHub Codespaces button in the seminar repository.
  2. Get the seminar repository. With a GitHub account, make your own copy of the repository (the Fork button), then in a terminal:
    git clone https://github.com/YOUR-GITHUB-NAME/lean-seminar.git
    cd lean-seminar
    lake exe cache get
    The 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.
  3. Play the Natural Number Game through at least World 4. It runs in the browser.
  4. Watch and type along with Alex Kontorovich's How Mathematicians can Get Started with Lean (32 minutes), in the file Exercises/Week00_Squeeze.lean. He proves the squeeze theorem, but the video stops before the proof is finished. Finishing it is your first exercise.

Things that trip up beginners

How the seminar works

Schedule

MiL is Mathematics in Lean, a free online book with exercises built in.

WeekIn the meetingAt 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

Projects

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.

Choose a scope

The feasibility check, week 11

Before committing to a problem, work through five things:

  1. A Lean statement of the problem that compiles, with sorry as its proof.
  2. Each object in the statement, with its name in Mathlib. Note anything Mathlib does not have.
  3. An example that satisfies all the hypotheses, so the statement is not vacuous.
  4. For each partial operation in the statement, like division, subtraction of natural numbers or logarithms: one line on why Lean's convention at the boundary does not change the meaning. (In Lean, $x/0 = 0$ and $3 - 5 = 0$ in $\mathbb{N}$.)
  5. Three Mathlib lemmas you expect to use.

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.

Presentations

In weeks 13 and 14, each participant gives a talk of 20–25 minutes, including questions. A talk shows:

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.

Talks

To be announced.

Resources

Books

Finding lemmas

Problems and papers