A comprehensible guide to a new unifier for CIC including universe polymorphism and overloading*

  title={A comprehensible guide to a new unifier for CIC including universe polymorphism and overloading*},
  author={Beta Ziliani and Matthieu Sozeau},
  journal={Journal of Functional Programming},
Abstract Unification is a core component of every proof assistant or programming language featuring dependent types. In many cases, it must deal with higher order problems up to conversion. Since unification in such conditions is undecidable, unification algorithms may include several heuristics to solve common problems. However, when the stack of heuristics grows large, the result and complexity of the algorithm can become unpredictable. Our contributions are twofold: (1) We present a full… Expand
Towards Certified Meta-Programming with Typed Template-Coq
This work generalizes Template-Coq to handle the entire Calculus of Inductive Constructions (CIC), as implemented by Coq, including the kernel's declaration structures for definitions and inductives, and implement a monad for general manipulation of Coq's logical environment. Expand
Practical dependent type checking using twin types
The reformulated Gundry and McBride's technique without twin variables is reformulated, with the aim of making the technique easier to implement in existing type checkers (in particular Agda), and a type-agnostic syntactic equality rule is introduced that seems to be useful in practice. Expand
A framework for improving error messages in dependently-typed languages
This work modify a higher-order unification algorithm that is used to resolve and type-check implicit arguments, and augment this algorithm with replay graphs, allowing for a global heuristic analysis of a unification problem-set, error-tolerant typing, and counter-factual unification, which makes error messages less affected by the order in which types are checked. Expand
Gradualizing the Calculus of Inductive Constructions
This work investigates gradual variations on the Calculus of Inductive Construction for swifter prototyping with imprecise types and terms, and establishes the metatheory of this cast calculus through both a syntactic model into CIC and a monotone model that purports the study of the graduality of two of the three variants. Expand
The MetaCoq Project
This work generalizes Template-Coq to handle the entire polymorphic calculus of cumulative inductive constructions, as implemented by Coq, including the kernel’s declaration structures for definitions and inductives, and implement a monad for general manipulation of Coq ’s logical environment. Expand


A unification algorithm for Coq featuring universe polymorphism and overloading
A full description of a new unification algorithm for the Calculus of Inductive Constructions (the base logic of Coq), including universe polymorphism, canonical structures, and the overloading mechanism baked into Coq's unification, and a small set of useful heuristics are presented. Expand
Universe Polymorphism in Coq
A conservative extension of pCIC supporting universe polymorphism and treating its whole hierarchy with typical ambiguity and implicit polymorphic generalization at the same time is introduced, keeping it mostly transparent to the user. Expand
Higher-order constraint simplification in dependent type theory
  • J. Reed
  • Mathematics, Computer Science
  • LFMTP '09
  • 2009
This work describes and proves correct a new, terminating constraint simplification algorithm for a dynamic pattern fragment of higher-order unification in a dependent type system, and discusses its implementation. Expand
Type Checking with Universes
This paper considers the basic type checking and well-typedness problems for the Generalized Calculus of Constructions and considers a formulation of Russell and Whitehead's “typical ambiguity” convention whereby universe levels may be elided, provided that some consistent assignment of levels leads to a correct derivation. Expand
Unification of Simply Typed Lamda-Terms as Logic Programming
This paper shows that the unification of simply typed ‚-terms modulo the rules of fl- and ·-conversions can be coded as a query of the logic programming language L‚ in a natural and clear fashion. Expand
How to make ad hoc proof automation less ad hoc
This work proposes a novel approach to proof automation in Coq that allows the user to specify the behavior of custom automated routines in terms of Coq's own type system, and presents a series of design patterns for canonical structure programming that enable one to carefully and predictably coax coq's type inference engine into triggering the execution of user-supplied algorithms during unification. Expand
Mtac: a monad for typed tactic programming in Coq
Mtac is presented, a lightweight but powerful extension to Coq that supports dependently-typed tactic programming, and avoids the need to touch the trusted kernel typechecker of Coq by encapsulating uses of these new tactical primitives in a *monad*, and instrumenting Coq so that it executes monadic tactics during type inference. Expand
A Bi-Directional Refinement Algorithm for the Calculus of (Co)Inductive Constructions
Bi-directional rules for CIC are proposed that have better error message reporting and better inference of dependent types, and the coercion system for sub-typing is more eective and type inference generates simpler unication problems that are more likely to be solved by the inherently incomplete higher order unication algorithms implemented. Expand
Higher-Order Dynamic Pattern Unification for Dependent Types and Records
A constraint-based unification algorithm for λΠΣ-calculus which solves a richer class of patterns than currently possible; in particular it takes into account type isomorphisms to translate unification problems containing Σ-types into problems only involving Π-types. Expand
Crafting a Proof Assistant
This work analyzes Matita: a new interactive theorem prover based--as Coq--on the Calculus of Inductive Constructions (CIC), focusing on the dependencies of its components, how they implement the main functionalities, and their degree of reusability. Expand