Pure Type Systems with Judgemental Equality
Sign up for access to the world's latest research
Abstract
In a typing system, there are two approaches that may be taken to the notion of equality. One can use some external relation of convertibility defined on the terms of the grammar, such as beta-convertibility or beta-eta-convertiblity; or one can introduce a judgement form for equality into the rules of the typing system itself. For quite some time, it has been an open problem whether the two systems produced by these two choices are equivalent. This problem is essentially the problem of proving the Subject Reduction property holds in the system with judgemental equality. In this paper, we shall prove that the equivalence holds for all functional Pure Type Systems (PTSs). The proof essentially consists of proving the Church-Rosser Theorem for a typed version of parallel one-step reduction. This method should generalise easily to many typing systems which satisfy the Uniqueness of Types property.
Related papers
Proceedings of the 2007 ACM SIGPLAN international workshop on Types in languages design and implementation - TLDI '07, 2007
We introduce System F C , which extends System F with support for non-syntactic type equality. There are two main extensions: (i) explicit witnesses for type equalities, and (ii) open, non-parametric type functions, given meaning by toplevel equality axioms. Unlike System F, F C is expressive enough to serve as a target for several different source-language features, including Haskell's newtype, generalised algebraic data types, associated types, functional dependencies, and perhaps more besides.
The Journal of Symbolic Logic, 2001
Pure Type Systems. PTSs, introduced as a generalisation of the type systems of Barendregt's lambda-cube, provide a foundation for actual proof assistants, aiming at the mechanic verification of formal proofs. In this paper we consider simplifications of some of the rules of PTSs. This is of independent interest for PTSs as this produces more flexible PTS-like systems, but it will also help, in a later paper, to bridge the gap between PTSs and systems of Illative Combinatory Logic.
Electronic Proceedings in Theoretical Computer Science, 2010
We present an approach to type theory in which the typing judgments do not have explicit contexts. Instead of judgments of the shape Γ A : B, our systems just have judgments of the shape A : B. An essential feature of our systems is that already in pseudo-terms we distinguish the free from the bound variables. Specifically we give the rules of the 'Pure Type System' class of type theories in this style. We prove that the type judgments of these systems corresponds in a natural way with the judgments of the traditionally formulated Pure Type Systems. I.e., our systems have exactly the same well-typed terms as traditional presentations of type theory. Our system can be seen as a type theory in which all type judgments share an identical, infinite, typing context that has infinitely many variables for each possible type. For this reason we call our system Γ∞. This name means to suggest that our type judgment A : B should be read as Γ∞ A : B, with a fixed infinite type context called Γ∞.
Electronic Notes in Theoretical Computer Science, 1997
We present a notion of classical pure type system, which extends the formalism of pure type system with a double negation operator.
Information Processing Letters, 2012
We describe a derivational approach to proving the equivalence of different representations of a type system. Different ways of representing type assignments are convenient for particular applications such as reasoning or implementation, but some kind of correspondence between them should be proven. In this paper we address two such semantics for type checking: one, due to Kuan et al., in the form of a term rewriting system and the other in the form of a traditional set of derivation rules. By employing a set of techniques investigated by Danvy et al., we mechanically derive the correspondence between a reductionbased semantics for type-checking and a traditional one in the form of derivation rules, implemented as a recursive descent. The correspondence is established through a series of semantics-preserving functional program transformations.
Proceedings of the ACM on Programming Languages
Type theory should be able to handle its own meta-theory, both to justify its foundational claims and to obtain a verified implementation. At the core of a type checker for intensional type theory lies an algorithm to check equality of types, or in other words, to check whether two types are convertible. We have formalized in Agda a practical conversion checking algorithm for a dependent type theory with one universe à la Russell, natural numbers, and η-equality for Π types. We prove the algorithm correct via a Kripke logical relation parameterized by a suitable notion of equivalence of terms. We then instantiate the parameterized fundamental lemma twice: once to obtain canonicity and injectivity of type formers, and once again to prove the completeness of the algorithm. Our proof relies on inductive-recursive definitions, but not on the uniqueness of identity proofs. Thus, it is valid in variants of intensional Martin-Löf Type Theory as long as they support induction-recursion, for...
Information and Computation/information and Control, 2003
By a detailed analysis of the interaction between b-reduction ! b and g-expansion ! g g in the simply typed k-calculus, a modular and purely syntactic proof method is devised in order to derive strong normalization of the combined reduction ! b g g from that of ! b and ! g g . It is shown how this technique extends to bnormalizing functional Pure Type Systems with BartheÕs formulation of g-expansion.
2010
Propositions that express type equality are a frequent ingredient of modern functional programming-they can encode generic functions, dynamic types, and GADTs. Via the Curry-Howard correspondence, these propositions are ordinary types inhabited by proof terms, computed using runtime type representations. In this paper we show that two examples of type equality propositions actually do reflect type equality; they are only inhabited when their arguments are equal and their proofs are unique (up to equivalence.) We show this result in the context of a strongly normalizing language with higher-order polymorphism and primitive recursion over runtime type representations by proving Reynolds's abstraction theorem. We then use this theorem to derive "free" theorems about equality types.
Proceedings of the third ACM SIGPLAN workshop on Mathematically structured functional programming - MSFP '10, 2010
We analyze a normalization function for the simply typed λcalculus based on hereditary substitutions, a technique developed by Pfenning et al. The normalizer is implemented in Agda, a total language where all programs terminate. It requires no termination proof since it is structurally recursive which is recognized by Agda's termination checker. Using Agda as an interactive theorem prover we establish that our normalization function precisely identifies βη-equivalent terms and hence can be used to decide βηequality. An interesting feature of this approach is that it is clear from the construction that βη-equality is primitive recursive.
Lecture Notes in Computer Science, 2002
In this paper we study the addition of parameters to typed -calculus with definitions. We show that the resulting systems have nice properties and illustrate that parameters allow for a better fine-tuning of the strength of type systems as well as staying closer to type systems used in practice in theorem provers and programming languages.