Extended Abstract: From Pattern Unification Towards Pattern Matching Unification

📅 2026-07-20
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses a fundamental limitation in higher-order unification within existing dependently typed languages, where Miller’s pattern fragment restricts the ability to handle functions defined via pattern matching—particularly those involving common type inference constraints such as induction principles. To overcome this, the paper introduces a novel paradigm that deeply integrates dependent pattern matching into the unification process. By collecting deferred unification constraints and resolving them collaboratively with a pattern-matching compiler, the approach enables automatic inference for a significantly broader class of functions. This integration bridges, for the first time, the gap between type inference and pattern-matching compilation, thereby surpassing the expressiveness limits of traditional unification mechanisms. A prototype implementation successfully infers functions that state-of-the-art systems like Rocq and Lean cannot handle, demonstrating the method’s effectiveness and superiority.
📝 Abstract
We revisit the role of higher-order unification in dependently typed languages and identify a fundamental limitation of existing pattern-based fragments: their inability to synthesize functions defined by case analysis. Even simple and ubiquitous constraints arising from type inference, particularly from use of induction principles, fall outside the expressive power of Miller patterns and their modern extensions. We observe that such constraints naturally correspond to definitions by dependent pattern matching. Motivated by this correspondence, we propose integrating dependent pattern matching into the unification process. We present a prototype implementation of a small dependently typed language that collects delayed unification constraints and resolves them via a pattern matching compiler. Our approach successfully infers solutions that are rejected by current systems such as Rocq and Lean, suggesting a new direction for unification that unifies type inference and pattern matching compilation.
Problem

Research questions and friction points this paper is trying to address.

higher-order unification
dependently typed languages
pattern matching
type inference
induction principles
Innovation

Methods, ideas, or system contributions that make the work stand out.

dependent pattern matching
higher-order unification
type inference
pattern unification
case analysis
🔎 Similar Papers
No similar papers found.