Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Logical relations for a logical framework

Published: 28 November 2013 Publication History

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

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

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
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: 01 March 2013
Revised: 01 February 2013
Received: 01 September 2012
Published in TOCL Volume 14, Issue 4

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. LF
  2. Logical relation
  3. Twelf
  4. dependent type theory
  5. logical framework
  6. module system
  7. parametricity

Qualifiers

  • Research-article
  • Research
  • Refereed

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)37
  • Downloads (Last 6 weeks)8
Reflects downloads up to 16 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2018)Mechanizing proofs with logical relations – Kripke-styleMathematical Structures in Computer Science10.1017/S096012951800015428:09(1606-1638)Online publication date: 2-Aug-2018
  • (2015)Lax Theory MorphismsACM Transactions on Computational Logic10.1145/281864417:1(1-36)Online publication date: 28-Oct-2015
  • (2014)How to identify, translate and combine logics?Journal of Logic and Computation10.1093/logcom/exu07927:6(1753-1798)Online publication date: 14-Dec-2014
  • (2013)Structural logical relations with case analysis and equality reasoningProceedings of the Eighth ACM SIGPLAN international workshop on Logical frameworks & meta-languages: theory & practice10.1145/2503887.2503891(43-54)Online publication date: 23-Sep-2013

View Options

Get Access

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media