https://github.com/chasenorman/canonical-min
A sound and complete solver for type inhabitation and unification in dependent type theory, written in 185 lines of Lean.
https://github.com/chasenorman/canonical-min
automated-reasoning dependent-types formal-methods lean4 program-synthesis theorem-prover theorem-proving
Last synced: 4 months ago
JSON representation
A sound and complete solver for type inhabitation and unification in dependent type theory, written in 185 lines of Lean.
- Host: GitHub
- URL: https://github.com/chasenorman/canonical-min
- Owner: chasenorman
- License: mit
- Created: 2026-02-13T03:16:59.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2026-03-02T05:24:22.000Z (5 months ago)
- Last Synced: 2026-03-02T09:54:13.316Z (5 months ago)
- Topics: automated-reasoning, dependent-types, formal-methods, lean4, program-synthesis, theorem-prover, theorem-proving
- Language: Lean
- Homepage: https://chasenorman.com
- Size: 24.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Canonical-min
Canonical-min is a sound and complete solver for type inhabitation and unification in dependent type theory, written in 185 lines of Lean. Canonical-min serves as a simplified reference for the algorithm behind [Canonical](github.com/chasenorman/Canonical), and a baseline for the development of future automated reasoning tools. A special feature of this implementation is the use of the *continuation monad* to convert the type checker into a constraint solver.
## Project Structure
- `Data.lean` — The definition of terms and types.
- `Monad.lean` — The monadic framework to convert the type checker into a solver.
- `Checker.lean` — The type checker.
- `Search.lean` — The iterative deepening depth-first search.