Coercive subtyping: Theory and implementation

Coercive subtyping is a useful and powerful framework of subtyping for type theories. The key idea of coercive subtyping is subtyping as abbreviation. In this paper, we give a new and adequate formulation of T[C], the system that extends a type theory T with coercive subtyping based on a set C of basic subtyping judgements, and show that coercive subtyping is a conservative extension and, in a more general sense, a definitional extension. We introduce an intermediate system, the star-calculus T[C]^@?, in which the positions that require coercion insertions are marked, and show that T[C]^@? is a conservative extension of T and that T[C]^@? is equivalent to T[C]. This makes clear what we mean by coercive subtyping being a conservative extension, on the one hand, and amends a technical problem that has led to a gap in the earlier conservativity proof, on the other. We also compare coercive subtyping with the 'ordinary' notion of subtyping - subsumptive subtyping, and show that the former is adequate for type theories with canonical objects while the latter is not. An improved implementation of coercive subtyping is done in the proof assistant Plastic.

[1]  Zhaohui Luo Manifest Fields and Module Mechanisms in Intensional Type Theory , 2008, TYPES.

[2]  Zhaohui Luo,et al.  Coercion completion and conservativity in coercive subtyping , 2001, Ann. Pure Appl. Log..

[3]  Zhaohui Luo,et al.  Structural subtyping for inductive types with functorial equality rules† , 2008, Mathematical Structures in Computer Science.

[4]  Healfdene Goguen A typed operational semantics for type theory , 1994 .

[5]  Zhaohui Luo,et al.  An Implementation of LF with Coercive Subtyping & Universes , 2001, Journal of Automated Reasoning.

[6]  S. C. Kleene,et al.  Introduction to Metamathematics , 1952 .

[7]  Zhaohui Luo Contextual Analysis of Word Meanings in Type-Theoretical Semantics , 2011, LACL.

[8]  Lionel Marie-Magdeleine,et al.  Sous-typage coercitif en présence de réductions non-standards dans un système aux types dépendants. (Coercive subtyping in a system with dependents types and non-standards reductions) , 2009 .

[9]  Zhaohui Luo,et al.  Dependent Coercions , 1999, CTCS.

[10]  Yong Luo,et al.  Transitivity in coercive subtyping , 2005, Inf. Comput..

[11]  David Aspinall,et al.  Subtyping dependent types , 1996, Proceedings 11th Annual IEEE Symposium on Logic in Computer Science.

[12]  Zhaohui Luo,et al.  Dot-types and Their Implementation , 2012, LACL.

[13]  Per Martin-Löf,et al.  Intuitionistic type theory , 1984, Studies in proof theory.

[14]  John C. Mitchell,et al.  Type inference with simple subtypes , 1991, Journal of Functional Programming.

[15]  Giuseppe Longo,et al.  Coherence and transitivity of subtyping as entailment , 2000, J. Log. Comput..

[16]  John C. Mitchell,et al.  Coercion and type inference , 1984, POPL.

[17]  Christine Paulin-Mohring,et al.  The coq proof assistant reference manual , 2000 .

[18]  Zhaohui Luo,et al.  Formal semantics in modern type theories with coercive subtyping , 2012, Linguistics and Philosophy.

[19]  Zhaohui Luo,et al.  Coercive Subtyping , 1995 .

[20]  Zhaohui Luo,et al.  Type-theoretical semantics with coercive subtyping , 2010 .

[21]  Zhaohui Luo,et al.  Computation and reasoning - a type theory for computer science , 1994, International series of monographs on computer science.

[22]  Yong Luo,et al.  Coherence and Transitivity in Coercive Subtyping , 2001, LPAR.

[23]  E. Van Gestel,et al.  Programming in Martin-Löf's Type Theory: an Introduction : Bengt Nordström, Kent Petersson and Jan M. Smith Intl. Series of Monographs on Computer Science, Vol. 7, Oxford Science Publications, Oxford, 1990, 231 pages , 1991 .

[24]  Gang Chen,et al.  Subtyping Parametric and Dependent Types , 1996 .

[25]  Hugo Herbelin,et al.  The Coq proof assistant : reference manual, version 6.1 , 1997 .

[26]  Amokrane Saïbi Typing algorithm in type theory with inheritance , 1997, POPL '97.

[27]  Nicholas Asher,et al.  A Type Driven Theory of Predication with Complex Types , 2008, Fundam. Informaticae.

[28]  Zhaohui Luo,et al.  Coercive Subtyping in Type Theory , 1996, CSL.

[29]  James Pustejovsky,et al.  The Generative Lexicon , 1995, CL.