Skip to content

Latest commit

 

History

History
249 lines (192 loc) · 6.84 KB

File metadata and controls

249 lines (192 loc) · 6.84 KB

Lean 4 Learning Resources

Official Resources

Primary Learning Paths

Functional Programming in Lean (FPIL)

Theorem Proving in Lean 4 (TPIL)

Mathematics in Lean (MIL)

Logic and Proof

Metaprogramming in Lean 4

Interactive Games & Tutorials

Lean Game Server

URL: https://adam.math.hhu.de/

Available games:

  • Natural Number Game (NNG4) - Prove 2+2=4 and beyond (Terence Tao endorsed!)
  • Set Theory Game
  • Logic Game
  • Robo - A story about undergrad mathematics
  • Complex Number Game

Play NNG4: https://adam.math.hhu.de/#/g/leanprover-community/NNG4

Glimpse of Lean

Tutorials4 (Hands-On Exercises)

Verbose Lean 4

University Courses (2025-2026)

An Introduction to Lean 4 (Valencia)

The Mechanics of Proof (Fordham)

Formalising Mathematics 2024 (Imperial)

Upcoming Events (2025-2026)

EventLocationDates
MPS Workshop on LeanNew YorkJune 16-20, 2025
Summer School Formalizing MathUtrechtJuly 21-25, 2025
Formalizing Class Field TheoryOxfordJuly 21-25, 2025
Lean Together 2026VirtualJan 19-23, 2026

Blog Tutorials

Beginner-Friendly

A Beginner’s Companion to TPIL

Brandon Rozek’s Lean 4 Tutorial

Getting Started with Lean 4

Programming-Focused

Learning Lean 4 via Project Euler

Quick References

Learn X in Y Minutes

Tactic Cheatsheet

  • PDF available from leanprover-community
  • Common tactics reference

Editor Setup

VS Code (Recommended)

Install the lean4 extension from marketplace.

Emacs (lean4-mode)

;; Doom Emacs
;; In packages.el:
(package! lean4-mode
  :recipe (:host github
           :repo "leanprover-community/lean4-mode"
           :files ("*.el" "data")))

;; Standard use-package with straight.el
(use-package lean4-mode
  :commands lean4-mode
  :straight (lean4-mode
             :type git
             :host github
             :repo "leanprover-community/lean4-mode"
             :files ("*.el" "data")))

Key bindings:

  • C-c C-i : Toggle info view (proof state)

Community

Zulip Chat (Primary)

Discord

GitHub Organizations

Video Content

Kevin Buzzard’s Course

  • Formalising Mathematics 2022 playlist on YouTube
  • Imperial College London lectures

Lean Prover Community Channel

  • Conference recordings (Lean Together 2021-2026)
  • Tutorial videos

Metaprogramming Tutorial

  • 2021 video tutorial available

Research & Advanced

Lean Workbook (ML/Autoformalization)

  • URL: HuggingFace datasets
  • Content: 57K autoformalized problems
  • Focus: High-school contest math, IMO problems
  • Accuracy: 93.5%

PSV: Propose, Solve, Verify (2024)

  • URL: https://arxiv.org/abs/2512.18160
  • Authors: Wilf, Aggarwal, Parno, Fried, et al.
  • Focus: Self-play training via formal verification
  • Tool: Verus (Rust verification)
  • Result: 9.6x improvement in code generation
  • Relevance: Shows verification as training oracle

Hitchhiker’s Guide to Logical Verification

  • Level: Graduate CS/PL theory
  • Note: Copyright (All Rights Reserved) - reference only

Toolchain

Current Installation

gmake deps  # Check your tools

elan (Version Manager)

Recommended Learning Path

  1. Day 1: Play Natural Number Game
  2. Day 2: Read FPIL chapters 1-3
  3. Day 3: Try Glimpse of Lean (2-3 hours)
  4. Week 1: Complete this workshop’s exercises
  5. Week 2+: Choose path:
    • Programming → Continue FPIL
    • Proofs → Read TPIL
    • Mathematics → Start MIL

Workshop Project Ideas

  1. Natural Number Game completion
  2. Implement and prove basic list operations
  3. Formalize a small mathematical structure
  4. Add to the satirical examples collection
  5. Create a domain-specific example (crypto, security)

Local Variables