Interactive Theorem Proving using Lean, Winter 2026/27

5. Organization🔗

What happens when, what the short tests are for, the slides, and the recordings. Winter term 2026/27, University of Freiburg.

Lecture Monday 16:15-17:45, lab Wednesday 16:15-17:45. The lecture starts on 19 October 2026 and ends on 10 February 2027, with a break from 23 December to 6 January.

5.1. Slides🔗

Most chapters have a deck, used in the lecture and readable on its own. The figures and claims are those of the text, so either can be used without the other.

A deck appears here when its chapter is taught.

Press s in a deck for the speaker notes, o for an overview of all slides, and ? for the remaining keys. Every slide carries a link in its upper right corner that leads back to this page.

5.2. Recordings🔗

The lectures and lab sessions are recorded and published on Formally proven, the course's YouTube channel. Each recording carries chapter marks that follow the slides, so a single topic can be found without watching the whole hour.

5.3. What comes when🔗

Sheets are named after the chapter they belong to, so 2.6-b is the second sheet on chapter 2.6. L-a to L-g are the logic block, which belongs to no chapter and runs alongside the first five weeks; A-a and A-b are the appendix, X-a an extra sheet. 2.0-a, on finding theorems in Mathlib, opens the mathematics part and has no chapter.

Each week has two rows: the lecture on Monday presents a chapter, the lab on Wednesday works on the sheets of that week. The short tests are written at the start of the lab.

W

Date

Session

Content

Chapter / sheets

1

Mon 19.10.

Lecture

Why formalize?

Introduction

1

Wed 21.10.

Lab

Installation, then sheets

L-a

2

Mon 26.10.

Lecture

Nat, Bool, reduction rules

1.1

2

Wed 28.10.

Lab

Sheets

L-b, L-c, 1.1-a

3

Mon 02.11.

Lecture

Universes, functions, inductive types, structures

1.2

3

Wed 04.11.

Lab

Sheets

L-d, 1.2-a, 1.1-b

4

Mon 09.11.

Lecture

Pattern matching and recursion

1.3

4

Wed 11.11.

Lab

Test 1 (practice tasks, PDF), then sheets

L-f, 1.1-c

5

Mon 16.11.

Lecture

Σ, subtypes, type families, quotients

1.4

5

Wed 18.11.

Lab

Sheets

L-e, L-g, 1.2-b, extra X-a

6

Mon 23.11.

Lecture

Rules for building types, Prop

1.5

6

Wed 25.11.

Lab

Sheets

1.3-a, 1.4-b, 1.5-a

7

Mon 30.11.

Lecture

Typeclasses: instances, resolution, Decidable, classical

1.6

7

Wed 02.12.

Lab

Test 2, then sheets

1.4-a, 1.4-c, 1.6-a

8

Mon 07.12.

Lecture

Typeclasses: functors and monads, coercions, hierarchies; notation

1.6, 1.7

8

Wed 09.12.

Lab

Sheets

1.6-b, 1.6-c, 1.7-a

9

Mon 14.12.

Lecture

Numbers; sets and types

2.1, 2.2

9

Wed 16.12.

Lab

Test 3, then sheets

2.0-a, 2.1-a, 2.2-a

10

Mon 21.12.

Lecture

Foundations: universes, axioms, well-foundedness

2.3

10

—

Lab

No lab; sheets over the break

2.2-b, 2.2-c, 2.3-a, 2.3-b

11

Mon 11.01.

Lecture

Proof engineering; conv

Appendix

11

Wed 13.01.

Lab

Sheets

A-a, A-b

12

Mon 18.01.

Lecture

Orders, the algebraic hierarchy

2.4, 2.5

12

Wed 20.01.

Lab

Sheets

2.4-a, 2.5-a

13

Mon 25.01.

Lecture

Filters

2.6

13

Wed 27.01.

Lab

Test 4, then sheets

2.6-a, 2.6-b

14

Mon 01.02.

Lecture

Topology

2.7

14

Wed 03.02.

Lab

Sheets

2.7-a

15

Mon 08.02.

Lecture

Monads and probability

2.9

15

Wed 10.02.

Lab

Test 5, then sheets

2.9-a, 2.9-b

Chapter 2.8 on measure theory is not lectured. It is there to read, and 2.8-a is an extra sheet.

5.4. The short tests🔗

Five tests, 20 minutes each, at the start of the lab, on paper. Three of the five must be passed for the Studienleistung. A test has six tasks with three parts each. Every part is worth one point and is either right or wrong; the test is passed with 10 of the 18 points. A test not taken counts as not passed.

Dates: 11.11., 02.12., 16.12., 27.01., 10.02.

What is tested is the proof state and understanding. Here are some typical questions:

  • The state is h : P ∧ Q, the goal ⊢ R. You write obtain ⟨hP, hQ⟩ := h. What does the state look like afterwards?

  • Is ¬(P ∧ Q) → (¬P ∨ ¬Q) provable constructively? If not, where does the excluded middle come in?

  • This proof fails with "no binders to introduce". Why?

For test 1 there are twelve practice tasks with answers (PDF) of the same kinds as the six in the test (there each task has three parts).

5.5. Goals🔗

The course is for mathematics students.

5.6. Getting Lean running🔗

Hardware. Lean memory-maps all of Mathlib while it works, and every exercise sheet begins with import Mathlib. A two-line sheet therefore needs as much memory as the hardest one in the course.

Resource

Minimum

Comfortable

RAM

16 GB

32 GB

Free disk space

20 GB

20 GB

Disk

SSD

NVMe SSD

Most of the RAM requirement comes from memory-mapped library data, which the system can drop and read back from disk, so less memory does not break anything, it only slows everything down by a large margin.

If your machine is below the minimum, talk to the teachers at the start of the course. A server with 128 GB of RAM is available and we can give you an account on it.

Run the git clone and lake exe cache get below at home: lake exe cache get downloads several gigabytes, and twenty people doing that at once on one network is slow for all of them.

  • Install VS Code.

  • Open VS Code, hit the extensions icon (fifth from the top) on the left, and install the Lean 4 language extension.

  • Install git, if you do not have it: open VS Code, hit the git icon (third from the top on the left), and follow the instructions.

  • The exercises repository. Go to where you want the course materials and run

git clone https://github.com/pfaffelh/leancourse_exercises
cd leancourse_exercises
lake exe cache get
code .

VS Code opens with the course materials. (These notes are generated from a second repository, pfaffelh/leancourse, which you do not need to clone.)

Another description of the installation is here.

After code . in the leancourse_exercises folder, open Exercises/0-Logic/a-Propositions.lean. It works once the orange and red bars disappear and moving the cursor on the left changes the infoview on the right. Then copy the Exercises directory to MyExercises and work there. To get updates, run git pull in leancourse_exercises. MyExercises is ignored by git, so an update never overwrites your files.

If the installation gives you trouble, talk to the teachers.

5.7. How these notes are organized🔗

The notes have six parts.

  • Lean and its type theory: the natural numbers and reduction; functions, inductive types and structures; pattern matching and recursion; pairs, subtypes, propositions as types and quotients; the rules of the type theory; typeclasses; notation.

  • Mathematics: numbers, sets and types, the foundations (universes, axioms, well-foundedness), then the areas of Mathlib listed above. Pointers into the API, not full formalizations.

  • Appendix: the glossary of tactics (a longer list is here), the structure of a Lean file, navigating Mathlib, common pitfalls, and small reference topics such as the diagnostic commands (#print axioms, #find_home, #lint).

  • Projects: seven topics for the individual formalization projects, each with a description, a sketch of an implementation, comments and references.

  • Bibliography: the works cited throughout, with links.

  • Organization: what comes when, the short tests, the slides and the recordings.

Tactics and theory are interleaved. You usually meet a tactic in a working example before you read its entry in the glossary, which is meant for looking things up, not for reading in order. The cheatsheet lists the tactics needed first.

The exercises carry the course (the Exercises folder of the exercises repository, see below). Feedback is immediate: error messages from the elaborator, and the proof state in the infoview, which shows what remains to be proved at every cursor position. Start with the first sheet; the sheets explain as they go.

In addition to the sheets, which run through the whole semester, you work on an individual project of about 90 hours, mostly self-chosen — an exercise from your first year, or a part of Mathlib you want to know; the Projects chapter has seven suggestions.

Before the first lab session, get Lean running on your own machine.