Introduction to Formal Verification & Proof Assistants

A 10-Week Journey into Formal Verification with Lean4 (Spring 2026)

GDG @ AUB Software Team × AUB Math Society

PROOF101

Week 8: Metaprogramming in Lean and Decision Procedures (Guest Session)

Overview

Dr. Rob Lewis from Brown University will guide us through different strategic approaches to tactic design, from direct proof manipulation to sophisticated decision procedures, with a deep dive into how tactics like linarith work under the hood.

Guest Lecturer

Session Information

Core Concepts

In this lecture, we’ll talk about different strategies for designing tactics. Traditional tactics work by analyzing the proof state and (partially) assembling a proof term much like you could do by hand. We’ll implement the basic components of the interval_cases tactic in this way, following a tutorial by Heather Macbeth, with exercises for the interested participants. Following that, we’ll discuss two alternative strategies. Proof by certificate involves running unverified code to generate a witness of the truth of the goal, and then proving this certificate is correct; linarith is an example of such a tactic. Proof by reflection involves proving the correctness of an algorithm in the object language, and then transforming this algorithm into a tactic with a small wrapper of meta code.

Slides

Week 8 Materials (made by Dr. Lewis): Week 8 Materials GitHub Repository

Readings

  1. Metaprogramming in Lean 4
  2. Optional: The Hitchhiker’s Guide to Logical Verification (Chapters 7-8)
  3. Optional: Functional Programming in Lean 4 (Chapters 4-5-8)

Exercises & Extra Steps

As an exercise for the reader, Dr. Lewis left the following tasks to learn more about metaprogramming in Lean:


Questions? Reach out on the course Discord!