Abstract
Logical relations are a central concept used to study various higher-order type theories and occur frequently in the proofs of a wide variety of meta-theorems. Besides extending the logical relation principle to more general languages, an important research question has been how to represent and thus verify logical relation arguments in logical frameworks.
We formulate a theory of logical relations for Dependent Type Theory (DTT) with β η-equality which guarantees that any valid logical relation satisfies the Basic Lemma. Our definition is syntactic and reflective in the sense that a relation at a type is represented as a DTT type family but also permits expressing certain semantic definitions. We use the Edinburgh Logical Framework (LF) incarnation of DTT and implement our notion of logical relations in the type-checker Twelf. This enables us to formalize and mechanically decide the validity of logical relation arguments. Furthermore, our implementation includes a module system so that logical relations can be built modularly. We validate our approach by formalizing and verifying several syntactic and semantic meta-theorems in Twelf. Moreover, we show how object languages encoded in DTT can inherit a notion of logical relation from the logical framework.
- Atkey, R. 2009. A deep embedding of parametric polymorphism in coq. In Workshop on Mechanizing Metatheory.Google Scholar
- Atkey, R. 2012. Relational parametricity for higher kinds. In Proceedings of the Conference on Computer Science Logic, to appear. http://bentnib.org/fomega-parametricity.pdf.Google Scholar
- Bainbridge, E., Freyd, P., Scedrov, A., and Scott, P. 1990. Functorial polymorphism. Theor. Comput. Sci. 70, 1, 35--64. Google ScholarDigital Library
- Bernardy, J., Jansson, P., and Paterson, R. 2010. Parametricity and dependent types. In Proceedings of the 15th ACM SIGPLAN International Conference on Functional Programming. P. Hudak and S. Weirich, Eds., ACM Press, New York, 345--356. Google ScholarDigital Library
- Bernardy, J., Jansson, P., and Paterson, R. 2012. Proofs for free - Parametricity for dependent types. J. Funct. Program. 22, 2, 107--152. Google ScholarDigital Library
- Bertot, Y. and Castéran, P. 2004. Coq'Art: The Calculus of Inductive Constructions. Springer.Google Scholar
- Böhme, S. 2007. Free theorems for sublanguages of haskell. Master's thesis. http://www4.in.tum.de/∼boehmes/diplomathesis.pdf.Google Scholar
- Cerioli, M. and Meseguer, J. 1997. May I borrow your logic? (Transporting logical structures along maps). Theor. Comput. Sci. 173, 311--347. Google ScholarDigital Library
- Codescu, M., Horozal, F., Kohlhase, M., Mossakowski, T., and Rabe, F. 2011. Project abstract: Logic atlas and integrator (latin). In Intelligent Computer Mathematics, J. Davenport, W. Farmer, F. Rabe, and J. Urban, Eds., Springer, 289--291. Google ScholarDigital Library
- Coquand T. and Gallier, J.1990. A proof of strong normalization for the theory of constructions using a kripke-like interpretation. In Preliminary Proceedings of the Workshop on Logical Frameworks. http://repository.upenn.edu/cgi/viewcontent.cgi?article=1600&context=cis_reportsGoogle Scholar
- Gacek, A. 2008. The abella interactive theorem prover (system description). In Proceedings of the International Joint Conference on Automated Reasoning (IJCAR'08). A. Armando, P. Baumgartner, and G. Dowek, Eds., Lecture Notes in Artificial Intelligence, vol. 5195, Springer, 154--161. Google ScholarDigital Library
- Gacek, A. 2012. Abella sources and examples. http://abella.cs.umn.edu/examples/.Google Scholar
- Girard, J. Y., Taylor, P., and Lafont, Y. 1989. Proofs and Types. Cambridge University Press. Google ScholarDigital Library
- Harper, R., Honsell, F. and Plotkin, G. 1993. A framework for defining logics. J. ACM 40, 1, 143--184. Google ScholarDigital Library
- Harper, R and Pfenning, F. 2005. On equivalence and canonical forms in the lf type theory. ACM Trans. Comput. Logic 6, 1, 61--101. Google ScholarDigital Library
- Harper, R., Sannella, D., and Tarlecki, A. 1994. structured presentations and logic representations. Ann. Pure Appl. Logic 67, 113--160.Google ScholarCross Ref
- Horozal, F. and Rabe, F. 2011. Representing model theory in a type-theoretical logical framework. Theor. Comput. Sci. 412, 37, 4919--4945. Google ScholarDigital Library
- Iancu, M. and Rabe, F. 2011. Formalizing foundations of mathematics. Math. Struct.Comput. Sci. 21, 4, 883--911.Google ScholarCross Ref
- Johann, P. 2002. A generalization of short-cut fusion and its correctness proof. Higher-Order Symbolic Comput. 15, 4, 273--300. Google ScholarDigital Library
- Johann, P. and Voigtländer, J. 2006. The impact of seq on free theorems-based program transformations. Fundamenta Informaticae 69, 1--2, 63--102. Google ScholarDigital Library
- Keller, C. and Lasson, M. 2012. Parametricity in an impredicative sort. In Proceedings of the Annual Conference on Computer Science Logic. 381--395.Google Scholar
- Mairson, H. 1991. Outline of a proof theory of parametricity. In Proceedings of the 5th ACM Confetrence on Functional Programming Languages and Computer Architecture. J. Hughes, Ed., Springer, 313--327. Google ScholarDigital Library
- Meng, J. and Paulson, L. 2008. Translating higher-order clauses to first-order clauses. J. Autom. Reason. 40, 1, 35--60. Google ScholarDigital Library
- Neis, G., Dreyer, D., and Rossberg, A. 2011. Non-parametric parametricity. J. Funct. Program. 21, 4-5, 497--562. Google ScholarDigital Library
- Norell, U. 2005. The agda wiki. http://wiki.portal.chalmers.se/agda.Google Scholar
- Pfenning, F. 2001. Logical frameworks. In Handbook of Automated Reasoning. Elsevier Science Publishers, 1063--1147. Google ScholarDigital Library
- Pfenning, F. and Schürmann, C. 1999. System description: Twelf - A meta-logical framework for deductive systems. In Proceedings of the 16th International Conference on Automated Deduction: Automated Deduction (CADE'99). Lecture Notes in Computer Science, vol. 1632, Springer, 202--206. Google ScholarDigital Library
- Pierce, B. 2002. Types and Programming Languages. MIT Press. Google ScholarDigital Library
- Plotkin, G. 1973. Lambda-definability and logical relations. Memorandum SAI-RM_4. University of Edinburgh. http://homepages.inf.ed.ac.uk/gdp/publications/logical_relations_1973.pdf.Google Scholar
- Plotkin, G. and Abadi, M. 1993. A logic for parametric polymorphism. In Typed Lambda Calculi and Applications, M. Bezem and J. Groote, Eds., Springer, 361--375. Google ScholarDigital Library
- Plotkin, G., Power, J., Sannella, D., and Tennent, R. 2000. Lax logical relations. In Proceedings of the Colloquium on Automata, Languages and Programming. Lecture Notes in Computer Science, vol. 1853, Springer, 85--102. Google ScholarDigital Library
- Rabe, F. 2013. A logical framework combining model and proof theory. Math. Struct. Comput. Sci. 23, 5, 945-1001. http://kwarc.info/frabe/Research/rabe_combining_10.pdf.Google ScholarCross Ref
- Rabe, F. and Schürmann, C. 2009. A practical module system for lf. In Proceedings of the Workshop on Logical Frameworks: Meta-Theory and Practice (LFMTP'09). J. Cheney and A. Felty, Eds., ACM Press, New York, 40--48. Google ScholarDigital Library
- Rabe, F. and Sojakova, K. 2012. Twelf sources and examples. https://svn.kwarc.info/repos/twelf/projects/logrels/index.html.Google Scholar
- Reynolds, J. 1974. On the relation between direct and continuation semantics. In Proceedings of the 2nd Colloquium on Automata, Languages and Programming. Lecture Notes in Computer Science, vol. 14., Springer, 141--156. Google ScholarDigital Library
- Reynolds, J. 1983. Types, abstraction, and parametric polymorphism. In Information Processing. North-Holland Publishing, 513--523.Google Scholar
- Schürmann, C. and J. Sarnat. 2008. Structural logical relations. In Logic in Computer Science, F. Pfenning, Ed., IEEE Computer Society Press, Los Alamitos, CA, 69--80. Google ScholarDigital Library
- Sojakova, K. 2010. Mechanically verifying logic translations. Master's thesis. Jacobs University Bremen.Google Scholar
- Statman, R. 1985. Logical relations and the typed lambda calculus. Inf. Control 65, 85--97.Google ScholarCross Ref
- Tait, W. 1967. Intensional interpretation of functionals of finite type i. J. Symbolic Logic 32, 2, 198--212.Google ScholarCross Ref
- Takeuti, I. 2001. The theory of parametricity in lambda cube. http://www.kurims.kyoto-u.ac.jp/∼kyodo/kokyuroku/contents/pdf/1217-10.pdf.Google Scholar
- Vytiniotis, D. and Weirich, S. 2010. Parametricity, type equality, and higher-order polymorphism. J. Funct. Program. 20, 2, 175--210. Google ScholarDigital Library
- Wadler, P. 1989. Theorems for free! In Proceedings of the ACM Conference Functional Programming and Computer Architecture. 347--359. Google ScholarDigital Library
Index Terms
- Logical relations for a logical framework
Recommendations
Structural Logical Relations
LICS '08: Proceedings of the 2008 23rd Annual IEEE Symposium on Logic in Computer ScienceTait's method (a.k.a. proof by logical relations) is a powerful proof technique frequently used for showing foundational properties of languages based on typed lambda-calculi. Historically, these proofs have been extremely difficult to formalize in ...
Representing model theory in a type-theoretical logical framework
In a broad sense, logic is the field of formal languages for knowledge and truth that have a formal semantics. It tends to be difficult to give a narrower definition because very different kinds of logics exist. One of the most fundamental contrasts is ...
Logical Step-Indexed Logical Relations
LICS '09: Proceedings of the 2009 24th Annual IEEE Symposium on Logic In Computer ScienceWe show how to reason about "step-indexed" logical relations in an abstract way, avoiding the tedious, error-prone, and proof-obscuring step-index arithmetic that seems superficially to be an essential element of the method. Specifically, we define a ...
Comments