A Logical Framework with Dependently Typed Records

Our long term goal is a system to formally represent complex structured mathematical objects, and proofs and computation on such objects; e.g. a foundational computer algebra system. Our approach is informed by the long development of module systems for functional programming based on dependent record types as signatures [22]. For our logical purposes, however, we want a dependently typed base language. In this paper we propose an extension of Martin-Lof’s logical framework [25, 21] with dependently typed records, and present the semantic foundation and the typechecking algorithm of our system. Some of the work is formally checked in Coq [8].1 We have also implemented and experimented with several related systems. Our proposal combines a semantic foundation, provably sound typechecking, good expressiveness (e.g. subtyping, sharing) and first-class higher-order modules. The development of functional programming modules has addressed many aspects of the problem, such as use of manifest or transparent fields to control the information available in a signature, signature strengthening, type abstraction, sharing and subtyping [19, 15, 20]. The problem of modularity is not, however, closed, with much current research into first-class higher-order modules, recursive modules and mixins. There has also been work on dependently typed records over dependent base languages. A first practical implementation is described in [3], however without semantic foundation. An original extension of Martin-Lof’s logical framework is given in [6], however it lacks manifest fields to express sharing, and lacks metamathematical analysis. A general approach to adding modules on top of a Pure Type System

[1]  Álvaro Tasistro,et al.  Extension of Martin-Lf's Type Theory with Record Types and Subtyping , 1998 .

[2]  Jacek Chrzaszcz,et al.  Modules in Coq Are and Will Be Correct , 2003, TYPES.

[3]  Lennart Augustsson,et al.  Cayenne—a language with dependent types , 1998, ICFP '98.

[4]  Judicaël Courant Strong Normalization with Singleton Types , 2002, Electron. Notes Theor. Comput. Sci..

[5]  Frank Pfenning,et al.  On equivalence and canonical forms in the LF type theory , 2001, TOCL.

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

[7]  Jean-Yves Girard,et al.  Locus Solum: From the rules of logic to the logic of rules , 2001, Mathematical Structures in Computer Science.

[8]  Mark Lillibridge,et al.  A type-theoretic approach to higher-order modules with sharing , 1994, POPL '94.

[9]  Healfdene Goguen A syntactic approach to eta equality in type theory , 2005, POPL '05.

[10]  Giovanni Sambin,et al.  Twenty-five years of constructive type theory. , 1998 .

[11]  James McKinna,et al.  Some Lambda Calculus and Type Theory Formalized , 1997, Journal of Automated Reasoning.

[12]  Alvaro Tasistro Abstract Insertion Sort in an Extension of Type Theory with Record Types and Subtyping , 1996, TYPES.

[13]  S. Allen A Non-Type-Theoretic Semantics for Type-Theoretic Language , 1987 .

[14]  R. Harper,et al.  Singleton kinds and singleton types , 2000 .

[15]  Judicaël Courant,et al.  A Module Calculus for Pure Type Systems , 1997, TLCA.

[16]  Jean-Yves Girard Locus Solum: From the Rules of Logic to the Logic of Rules , 2001, CSL.

[17]  Alexandre Miquel The Implicit Calculus of Constructions , 2001, TLCA.

[18]  Robert Pollack Dependently Typed Records in Type Theory , 2002, Formal Aspects of Computing.

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

[20]  David B. MacQueen Using dependent types to express modular structure , 1986, POPL '86.

[21]  Xavier Leroy,et al.  A syntactic theory of type generativity and sharing , 1996, Journal of Functional Programming.

[22]  Alexei Kopylov,et al.  Dependent intersection: a new way of defining records in type theory , 2003, 18th Annual IEEE Symposium of Logic in Computer Science, 2003. Proceedings..

[23]  Karl Crary Sound and Complete Elimination of Singleton Kinds , 2000, Types in Compilation.

[24]  Gordon D. Plotkin,et al.  Logical frameworks , 1991 .

[25]  AugustssonLennart Cayennea language with dependent types , 1998 .

[26]  Xavier Leroy,et al.  Manifest types, modules, and separate compilation , 1994, POPL '94.

[27]  Susumu Hayashi Singleton, Union and Intersection Types for Program Extraction , 1994, Inf. Comput..

[28]  T. Coquand An algorithm for testing conversion in type theory , 1991 .

[29]  Jan M. Smith,et al.  Martin-Löf's type theory , 2001, LICS 2001.

[30]  David Aspinall,et al.  Subtyping with Singleton Types , 1994, CSL.