Extending Type Theory with Forcing

This paper presents an intuitionistic forcing translation for the Calculus of Constructions (CoC), a translation that corresponds to an internalization of the presheaf construction in CoC. Depending on the chosen set of forcing conditions, the resulting type theory can be extended with extra logical principles. The translation is proven correct---in the sense that it preserves type checking---and has been implemented in Coq. As a case study, we show how the forcing translation on integers (which corresponds to the internalization of the topos of trees) allows us to define general inductive types in Coq, without the strict positivity condition. Using such general inductive types, we can construct a shallow embedding of the pure lambda-calculus in Coq, without defining an axiom on the existence of an universal domain. We also build another forcing layer where we prove the negation of the continuum hypothesis.

[1]  Lars Birkedal,et al.  The impact of higher-order state and control effects on local relational reasoning , 2012, J. Funct. Program..

[2]  F. Stephan,et al.  Set theory , 2018, Mathematical Statistics with Applications in R.

[3]  J. van Leeuwen,et al.  Theorem Proving in Higher Order Logics , 1999, Lecture Notes in Computer Science.

[4]  Rasmus Ejlers Møgelberg,et al.  First Steps in Synthetic Guarded Domain Theory: Step-Indexing in the Topos of Trees , 2011, 2011 IEEE 26th Annual Symposium on Logic in Computer Science.

[5]  M. Hofmann Extensional concepts in intensional type theory , 1995 .

[6]  M. Tierney Sheaf theory and the continuum hypothesis , 1972 .

[7]  I. Moerdijk,et al.  Sheaves in geometry and logic: a first introduction to topos theory , 1992 .

[8]  I. Stark,et al.  Operational reasoning for functions with local state , 1999 .

[9]  Jean-Louis Krivine,et al.  Realizability algebras: a program to well order R , 2010, Log. Methods Comput. Sci..

[10]  BirkedalLars,et al.  The impact of higher-order state and control effects on local relational reasoning , 2010 .

[11]  Lars Birkedal,et al.  The impact of higher-order state and control effects on local relational reasoning , 2010, ICFP '10.

[12]  Matthieu Sozeau,et al.  Un environnement pour la programmation avec types dépendants. (An environment for programming with dependent types) , 2008 .

[13]  Hiroshi Nakano,et al.  A modality for recursion , 2000, Proceedings Fifteenth Annual IEEE Symposium on Logic in Computer Science (Cat. No.99CB36332).

[14]  Hongseok Yang,et al.  Step-indexed kripke models over recursive worlds , 2011, POPL '11.

[15]  Andrew W. Appel,et al.  A very modal model of a modern, major, general type system , 2007, POPL '07.

[16]  P. J. Cohen Set Theory and the Continuum Hypothesis , 1966 .

[17]  Alexandre Miquel Forcing as a Program Transformation , 2011, 2011 IEEE 26th Annual Symposium on Logic in Computer Science.

[18]  Nicolas Oury Extensionality in the Calculus of Constructions , 2005, TPHOLs.