Lean for Mathematics

Peter Selinger · Dalhousie University · Fall 2026

This is a course on the Lean proof assistant that I am giving at Dalhousie University in Fall 2026. The course focuses on using Lean for mathematics. We start from the foundations — dependent type theory, propositions as types, and inductive types, developed from scratch — before moving on to tactics, Mathlib, and proofs of real theorems. Daniel Teixeira is the teaching assistant for this course, and he helped develop many of the materials, including the homeworks and projects.

If a “+” sign appears after a lecture below, you can click on it to see a list of Lean topics covered in the lecture, with links to the relevant documentation.

This is the public website for the course. For students taking the course, grades, assignments, and announcements stay on Brightspace.

Textbooks

We are using two online textbooks, both free.

Lecture Notes

These files use the Unicode character set and are UTF-8 encoded. If your browser does not display them correctly, download the files instead — Lean Web or VS Code will know what to do with them.

Reading Assignments

The reading assignments are from Theorem Proving in Lean 4 (TPIL) and Mathematics in Lean (MIL).

  • Sep 10 TPIL Chapters 1+2
  • Sep 15 TPIL Chapter 3
  • Oct 1 TPIL Chapters 4+7
  • Oct 15 TPIL Chapters 5, 8-10
  • Nov 2 MIL Chapters 1-3

Homework

Projects

Installing VS Code and Lean

  • Lean Web — run Lean and Mathlib right in your browser, no install required (needs an internet connection)
  • Download VS Code