skip to main content
research-article

Logical relations for a logical framework

Published:28 November 2013Publication History
Skip Abstract Section

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.

References

  1. Atkey, R. 2009. A deep embedding of parametric polymorphism in coq. In Workshop on Mechanizing Metatheory.Google ScholarGoogle Scholar
  2. 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 ScholarGoogle Scholar
  3. Bainbridge, E., Freyd, P., Scedrov, A., and Scott, P. 1990. Functorial polymorphism. Theor. Comput. Sci. 70, 1, 35--64. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  5. Bernardy, J., Jansson, P., and Paterson, R. 2012. Proofs for free - Parametricity for dependent types. J. Funct. Program. 22, 2, 107--152. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Bertot, Y. and Castéran, P. 2004. Coq'Art: The Calculus of Inductive Constructions. Springer.Google ScholarGoogle Scholar
  7. Böhme, S. 2007. Free theorems for sublanguages of haskell. Master's thesis. http://www4.in.tum.de/∼boehmes/diplomathesis.pdf.Google ScholarGoogle Scholar
  8. Cerioli, M. and Meseguer, J. 1997. May I borrow your logic? (Transporting logical structures along maps). Theor. Comput. Sci. 173, 311--347. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  10. 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 ScholarGoogle Scholar
  11. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  12. Gacek, A. 2012. Abella sources and examples. http://abella.cs.umn.edu/examples/.Google ScholarGoogle Scholar
  13. Girard, J. Y., Taylor, P., and Lafont, Y. 1989. Proofs and Types. Cambridge University Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Harper, R., Honsell, F. and Plotkin, G. 1993. A framework for defining logics. J. ACM 40, 1, 143--184. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  16. Harper, R., Sannella, D., and Tarlecki, A. 1994. structured presentations and logic representations. Ann. Pure Appl. Logic 67, 113--160.Google ScholarGoogle ScholarCross RefCross Ref
  17. Horozal, F. and Rabe, F. 2011. Representing model theory in a type-theoretical logical framework. Theor. Comput. Sci. 412, 37, 4919--4945. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Iancu, M. and Rabe, F. 2011. Formalizing foundations of mathematics. Math. Struct.Comput. Sci. 21, 4, 883--911.Google ScholarGoogle ScholarCross RefCross Ref
  19. Johann, P. 2002. A generalization of short-cut fusion and its correctness proof. Higher-Order Symbolic Comput. 15, 4, 273--300. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  21. Keller, C. and Lasson, M. 2012. Parametricity in an impredicative sort. In Proceedings of the Annual Conference on Computer Science Logic. 381--395.Google ScholarGoogle Scholar
  22. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  23. Meng, J. and Paulson, L. 2008. Translating higher-order clauses to first-order clauses. J. Autom. Reason. 40, 1, 35--60. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Neis, G., Dreyer, D., and Rossberg, A. 2011. Non-parametric parametricity. J. Funct. Program. 21, 4-5, 497--562. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Norell, U. 2005. The agda wiki. http://wiki.portal.chalmers.se/agda.Google ScholarGoogle Scholar
  26. Pfenning, F. 2001. Logical frameworks. In Handbook of Automated Reasoning. Elsevier Science Publishers, 1063--1147. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  28. Pierce, B. 2002. Types and Programming Languages. MIT Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. 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 ScholarGoogle Scholar
  30. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  31. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  32. 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 ScholarGoogle ScholarCross RefCross Ref
  33. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  34. Rabe, F. and Sojakova, K. 2012. Twelf sources and examples. https://svn.kwarc.info/repos/twelf/projects/logrels/index.html.Google ScholarGoogle Scholar
  35. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  36. Reynolds, J. 1983. Types, abstraction, and parametric polymorphism. In Information Processing. North-Holland Publishing, 513--523.Google ScholarGoogle Scholar
  37. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  38. Sojakova, K. 2010. Mechanically verifying logic translations. Master's thesis. Jacobs University Bremen.Google ScholarGoogle Scholar
  39. Statman, R. 1985. Logical relations and the typed lambda calculus. Inf. Control 65, 85--97.Google ScholarGoogle ScholarCross RefCross Ref
  40. Tait, W. 1967. Intensional interpretation of functionals of finite type i. J. Symbolic Logic 32, 2, 198--212.Google ScholarGoogle ScholarCross RefCross Ref
  41. 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 ScholarGoogle Scholar
  42. Vytiniotis, D. and Weirich, S. 2010. Parametricity, type equality, and higher-order polymorphism. J. Funct. Program. 20, 2, 175--210. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Wadler, P. 1989. Theorems for free! In Proceedings of the ACM Conference Functional Programming and Computer Architecture. 347--359. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Logical relations for a logical framework

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in

          Full Access

          • Published in

            cover image ACM Transactions on Computational Logic
            ACM Transactions on Computational Logic  Volume 14, Issue 4
            November 2013
            282 pages
            ISSN:1529-3785
            EISSN:1557-945X
            DOI:10.1145/2555591
            Issue’s Table of Contents

            Copyright © 2013 ACM

            Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 28 November 2013
            • Accepted: 1 March 2013
            • Revised: 1 February 2013
            • Received: 1 September 2012
            Published in tocl Volume 14, Issue 4

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • research-article
            • Research
            • Refereed

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader