Implementing Dependent Type Theory Inhabitation and Unification
Inhabitation and unification are undecidable but useful problems in dependent type theory for theorem proving and program synthesis. Existing solvers do not fully exploit the structure of dependent type theory.
The authors introduce Canonical-min, a sound and complete solver for inhabitation and unification in dependent type theory, implemented in 185 lines of Lean code. A novel representation of lambda expressions decomposes them into bindings, head, and spine. A monadic framework transforms the type checker into a performant solver. They also introduce DTTBench, a benchmark for type inhabitation.
Canonical-min is implemented in 185 lines of Lean and solves both inhabitation and unification problems. DTTBench provides a standard evaluation benchmark for type inhabitation in dependent type theory.
