[Paper Review] Dependency Pairs Termination in Dependent Type Theory Modulo Rewriting
This paper presents a practical, syntax-directed type system for an extended System F with subtyping, inductive and coinductive types, and size annotations to ensure termination of recursive programs. By using local subtyping and choice operators (inspired by Hilbert's epsilon calculus), the system decouples size reasoning from recursion, enabling well-founded circular typing proofs that guarantee normalization and termination via semantic methods.
Dependency pairs are a key concept at the core of modern automated termination provers for first-order term rewriting systems. In this paper, we introduce an extension of this technique for a large class of dependently-typed higher-order rewriting systems. This extends previous results by Wahlstedt on the one hand and the first author on the other hand to strong normalization and non-orthogonal rewriting systems. This new criterion is implemented in the type-checker Dedukti.
Motivation & Objective
- To design a practical type system with subtyping that integrates polymorphism, inductive and coinductive types, and size invariants for termination.
- To overcome the limitations of existing subtyping systems in expressive type systems like those in Haskell or OCaml by enabling full subtyping with complex type constructors.
- To ensure termination of recursive programs not by direct checking, but by proving that their typing derivations are well-founded and circular.
- To support mixed polymorphism, (co-)induction, and Scott-encoded data types in a unified, implementable framework.
Proposed method
- Introduce a local subtyping judgment t ∈ A ⊂ B to interpret subtyping as 'if t has type A, then it also has type B'.
- Use choice operators εx∈A(t /∈B) to represent counterexamples and eliminate the need for typing contexts, enabling closed-term typing derivations.
- Formulate typing rules that are syntax-directed and only apply per term or type constructor, simplifying type inference and unification.
- Encode size invariants in inductive and coinductive types using ordinal annotations to track structural decrease and ensure termination.
- Construct circular proofs of typing derivations that are well-founded, relying on reducibility candidates and semantic normalization proofs.
- Implement the system using standard unification techniques, with support for existential types, record-like types, and extensible sums and products.
Experimental results
Research questions
- RQ1Can a practical, syntax-directed subtyping system be designed for an expressive type system with (co-)inductive types and size annotations?
- RQ2How can subtyping be integrated with polymorphism, inductive and coinductive types, and size invariants without breaking type safety or decidability?
- RQ3Can circular typing proofs be used to guarantee normalization and termination without direct recursion checks?
- RQ4To what extent can choice operators and local subtyping replace traditional typing contexts and handle complex type constructions?
- RQ5Is it possible to implement such a system efficiently using standard unification and avoid the need for complex variance analysis?
Key findings
- The system successfully supports termination proofs for complex programs involving mixed induction, coinduction, and polymorphism, such as quicksort and Scott-encoded data types.
- The use of choice operators and local subtyping allows for a syntax-directed type system that avoids the need for typing contexts and enables closed-term typing derivations.
- The system's typing rules are designed to be implementable using standard unification techniques, and the authors provide a working implementation that handles all example programs from the paper.
- The approach separates size reasoning from recursion, allowing termination to be derived from the well-foundedness of circular typing proofs rather than syntactic checks.
- The system can express and verify size-preserving transformations, such as the map function on lists, by encoding size invariants in the type system.
- The framework supports advanced features like dot notation on existential types and extensible records, with a clear implementation strategy that avoids variable renaming.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.