"Type" is not a type

A function has a <i>dependent type</i> when the type of its result depends upon the value of its argument. Dependent types originated in the type theory of intuitionistic mathematics and have reappeared independently in programming languages such as CLU, Pebble, and Russell. Some of these languages make the assumption that there exists a <i>type-of-all-types</i> which is its own type as well as the type of all other types. Girard proved that this approach is inconsistent from the perspective of intuitionistic logic. We apply Girard's techniques to establish that the type-of-all-types assumption creates serious pathologies from a programming perspective: a system using this assumption is inherently not normalizing, term equality is undecidable, and the resulting theory fails to be a conservative extension of the theory of the underlying base types. The failure of conservative extension means that classical reasoning about programs in such a system is not sound.

[1]  Gerhard Gentzen,et al.  Investigations into Logical Deduction , 1970 .

[2]  Henk Barendregt,et al.  The Lambda Calculus: Its Syntax and Semantics , 1985 .

[3]  Nancy Jean Mccracken,et al.  An investigation of a programming language with a polymorphic type structure. , 1979 .

[4]  Alan J. Demers,et al.  Data types are values , 1985, ACM Trans. Program. Lang. Syst..

[5]  Butler W. Lampson,et al.  A Kernel Language for Abstract Data Types and Modules , 1984, Semantics of Data Types.

[6]  Thierry Coquand,et al.  Constructions: A Higher Order Proof System for Mechanizing Mathematics , 1985, European Conference on Computer Algebra.

[7]  Lawrence C. Paulson,et al.  Deriving Structural Induction in LCF , 1984, Semantics of Data Types.

[8]  John C. Mitchell,et al.  Abstract types have existential types , 1985, POPL.

[9]  John C. Mitchell Lambda calculus models of typed programming languages , 1984 .

[10]  John C. Reynolds,et al.  Types, Abstraction and Parametric Polymorphism , 1983, IFIP Congress.

[11]  Henry Ledgard,et al.  Reference Manual for the ADA® Programming Language , 1983, Springer New York.

[12]  P. Martin-Löf An Intuitionistic Theory of Types: Predicative Part , 1975 .

[13]  Kim B. Bruce,et al.  The Semantics of Second Order Polymorphic Lambda Calculus , 1984, Semantics of Data Types.

[14]  Craig Schaffert,et al.  CLU Reference Manual , 1984, Lecture Notes in Computer Science.

[15]  John C. Reynolds,et al.  Polymorphism is not Set-Theoretic , 1984, Semantics of Data Types.

[16]  James E. Donahue,et al.  An Informal Description of Russell , 1980 .

[17]  John C. Reynolds,et al.  Towards a theory of type structure , 1974, Symposium on Programming.

[18]  Daniel Leivant,et al.  The Expressiveness of Simple and Second-Order Type Structures , 1983, JACM.

[19]  John C. Mitchell,et al.  Second-Order Logical Relations (Extended Abstract) , 1985, Logic of Programs.

[20]  D. Prawitz Natural Deduction: A Proof-Theoretical Study , 1965 .

[21]  de Ng Dick Bruijn,et al.  A survey of the project Automath , 1980 .

[22]  Hendrik Pieter Barendregt,et al.  Semantics for Classical AUTOMATH and Related Systems , 1984, Inf. Control..