0cf85517c2022ee08c5923d76691b4c94a134d76
Lean 4 + Programming Language Semantics
A self-study curriculum for computer scientists who know PL theory and want to mechanize proofs in Lean 4 — from syntax to soundness of the Hindley-Milner type system.
Structure
├── README.md ← this file
├── tutorial-01-basics/ ← Lean 4 fundamentals
│ ├── 01-types-and-functions.md
│ ├── 02-inductive-types.md
│ ├── 03-propositions-and-proofs.md
│ ├── 04-quantifiers-and-equality.md
│ ├── 05-advanced-tactics.md
│ ├── 06-structures-type-classes.md
│ └── 07-dependent-types.md
├── tutorial-02-semantics/ ← PL semantics in Lean
│ ├── 08-syntax-representation.md
│ ├── 09-substitution.md
│ ├── 10-small-step-semantics.md
│ ├── 11-stlc-type-system.md
│ ├── 12-type-safety.md
│ ├── 13-hm-declarative.md
│ ├── 14-algorithm-w.md
│ └── 15-soundness-completeness.md
└── references.md ← all cited resources
How to Use
- Install Lean 4 (VS Code +
lean4extension): lean-lang.org/lean4/doc/quickstart.html - Start with Tutorial 1, Unit 1. Each unit is a standalone
.mdfile with inline Lean exercises. - Type the exercises into a
.leanfile and make it compile. - After Tutorial 1, move to Tutorial 2 to mechanize STLC and HM.
Prerequisites
- Functional programming (Haskell/OCaml familiarity)
- Basic PL theory (lambda calculus, operational semantics, type systems)
- No prior proof assistant experience required
References
See references.md for the full list of resources.
Description
Languages
Org
100%