Proving TCS and Math Theorems in Lean

Course Logo

Instructor: Venkatesan Guruswami
Lecture time: Friday 13:00–15:00
Location: SODA 320
Guest Lecturer: Pritish Kamath
TA: Shilun (Allan) Li
Office hours:
Venkat: By Appointment
Shilun: Friday 15:00-16:00 (SODA 411)

Course Description

This course introduces the use of the Lean 4 proof assistant to formalize concepts and results from theoretical computer science and mathematics. The first part of the course covers the fundamentals of Lean 4, including its logical foundations, core syntax, and proof tactics, through guided exercises and examples.

Students will then form small groups and undertake a semester-long formalization project on a selected topic, such as automata theory, computability, complexity theory, or combinatorics. The course emphasizes hands-on engagement with Lean and aims to provide students with practical experience in mechanized reasoning and formal proof development.

Grading

Class Participation 10%
Homework 30%
Final Project 60%

Lectures

Final Projects

Here is the List of Final Projects.

Please see the project ideas list for suggested topics.

Groups

Form groups of 1–3 people. In general, choose a harder project if you have more people in your group.

Deadlines

Date Milestone
March 17 Project Proposal Due
March 20 Pre-Project Presentations
April 10 Project Presentations
April 17 Project Presentations
April 24 Project Presentations
May 1 Project Presentations

Project Proposal (Due March 17)

Submit a 1–2 page proposal describing what you plan to formalize and the proof strategy you intend to follow. Use the [proposal template] [Download].

Pre-Project Presentation (March 20)

An 8-minute short presentation covering:

  • What you are trying to formalize
  • The proof method or approach you plan to take

Problem Sets

Problem Set Mathlib Project Folder [Download]

AI policy

You are welcome to use any AI tool to ask general questions about Lean4 syntax, tactics, and mathlib theorem usage.

However, you may not copy homework problems into AI tools or ask AI to produce homework solutions, and you may not submit AI-generated homework answers as your own work.

For the final project, you are welcome to use any AI tool without restriction.

Additional References

Installing / running Lean4:

Books:

Other similar courses:

Miscellaneous:

  • Loogle!: Search engine for Lean 4.
  • mathlib4 documentation.
  • Lean community Zulip channel for questions and discussions.
  • ECClib Project by Venkatesan Guruswami, Shilun Li, Henry Li, Frederick Dehmel, Annie Yao et al.