The representational adequacy of Hybrid

The Hybrid system (Ambler et al. 2002b), implemented within Isabelle/HOL, allows object logics to be represented using higher order abstract syntax (HOAS), and reasoned about using tactical theorem proving in general, and principles of (co)induction in particular. The form of HOAS provided by Hybrid is essentially a lambda calculus with constants. Of fundamental interest is the form of the lambda abstractions provided by Hybrid. The user has the convenience of writing lambda abstractions using names for the binding variables. However, each abstraction is actually a definition of a de Bruijn expression, and Hybrid can unwind the user's abstractions (written with names) to machine friendly de Bruijn expressions (without names). In this sense the formal system contains a hybrid of named and nameless bound variable notation. In this paper, we present a formal theory in a logical framework, which can be viewed as a model of core Hybrid, and state and prove that the model is representationally adequate for HOAS. In particular, it is the canonical translation function from λ-expressions to Hybrid that witnesses adequacy. We also prove two results that characterise how Hybrid represents certain classes of λ-expression. We provide the first detailed proof to be published that proper locally nameless de Bruijn expressions and α-equivalence classes of λ-expressions are in bijective correspondence. This result is presented as a form of de Bruijn representational adequacy, and is a key component of the proof of Hybrid adequacy. The Hybrid system contains a number of different syntactic classes of expression, and associated abstraction mechanisms. Hence, this paper also aims to provide a self-contained theoretical introduction to both the syntax and key ideas of the system. Although this paper will be of considerable interest to those who wish to work with Hybrid in Isabelle/HOL, a background in automated theorem proving is not essential.

[1]  Furio Honsell,et al.  Translating specifications from nominal logic to CIC with the theory of contexts , 2005, MERLIN '05.

[2]  Frank Pfenning,et al.  Verifying Uniqueness in a Logical Framework , 2004, TPHOLs.

[3]  Alberto Momigliano,et al.  A Comparison of Formalizations of the Meta-Theory of a Language with Variable Bindings in Isabelle , 2001 .

[4]  Roy L. Crole,et al.  A Combinator and Presheaf Topos Model for Primitive Recursion over Higher Order Abstract Syntax. , 2003 .

[5]  Andrew M. Pitts,et al.  A Metalanguage for Structural Operational Semantics , 2007, Trends in Functional Programming.

[6]  Amy P. Felty Two-Level Meta-reasoning in Coq , 2002, TPHOLs.

[7]  Amy P. Felty,et al.  Reasoning with hypothetical judgments and open terms in hybrid , 2009, PPDP '09.

[8]  Gordon D. Plotkin,et al.  Abstract syntax and variable binding , 1999, Proceedings. 14th Symposium on Logic in Computer Science (Cat. No. PR00158).

[9]  Christian Urban,et al.  Mechanizing the Metatheory of LF , 2008, LICS.

[10]  Frank Pfenning,et al.  Higher-order abstract syntax , 1988, PLDI '88.

[11]  James Brotherston,et al.  A formalised first-order confluence proof for the -calculus using one-sorted variable names , 2003, Inf. Comput..

[12]  A. Krall,et al.  Metatheoretic Results for a Modal λ-Calculus , 2001 .

[13]  Tobias Nipkow,et al.  More Church-Rosser Proofs (in Isabelle/HOL) , 1996, CADE.

[14]  Amy P. Felty,et al.  Combining de Bruijn Indices and Higher-Order Abstract Syntax in Coq , 2006, TYPES.

[15]  Roy L. Crole,et al.  Combining Higher Order Abstract Syntax with Tactical Theorem Proving and (Co)Induction , 2002, TPHOLs.

[16]  James Cheney A Simple Nominal Type Theory , 2009, Electron. Notes Theor. Comput. Sci..

[17]  Natarajan Shankar,et al.  A mechanical proof of the Church-Rosser theorem , 1988, JACM.

[18]  Alberto Momigliano,et al.  Multi-level Meta-reasoning with Higher-Order Abstract Syntax , 2003, FoSSaCS.

[19]  Dale Miller,et al.  Reasoning with higher-order abstract syntax in a logical framework , 2000, TOCL.

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

[21]  Amy P. Felty,et al.  Logic Colloquium 2006: Higher-order abstract syntax in type theory , 2009 .

[22]  Frank Pfenning,et al.  Primitive recursion for higher-order abstract syntax , 1997, Theor. Comput. Sci..

[23]  Christian Urban,et al.  Nominal unification , 2004, Theor. Comput. Sci..

[24]  Andrew D. Gordon,et al.  Five Axioms of Alpha-Conversion , 1996, TPHOLs.

[25]  Christian Urban,et al.  Mechanizing the Metatheory of LF , 2008, 2008 23rd Annual IEEE Symposium on Logic in Computer Science.

[26]  Donald S. Lee THE STRUCTURE OF SUBSTITUTION , 1980 .

[27]  Andrew M. Pitts,et al.  A new approach to abstract syntax involving binders , 1999, Proceedings. 14th Symposium on Logic in Computer Science (Cat. No. PR00158).

[28]  Martin Hofmann Semantical analysis of higher-order abstract syntax , 1999, Proceedings. 14th Symposium on Logic in Computer Science (Cat. No. PR00158).

[29]  Tobias Nipkow More Church–Rosser Proofs , 2004, Journal of Automated Reasoning.

[30]  Christian Urban,et al.  A Head-to-Head Comparison of de Bruijn Indices and Names , 2007, Electron. Notes Theor. Comput. Sci..

[31]  Gopalan Nadathur,et al.  Combining Generic Judgments with Recursive Definitions , 2008, 2008 23rd Annual IEEE Symposium on Logic in Computer Science.

[32]  T. Melham A mechanized theory of the π-calculus in HOL , 1992 .

[33]  Dale Miller,et al.  Representing and Reasoning with Operational Semantics , 2006, IJCAR.

[34]  Marino Miculan,et al.  Developing (Meta)Theory of λ-calculus in the Theory of Contexts1 1Work partially supported by Italian MURST project tosca and EC-WG types. , 2001 .

[35]  Frank Pfenning,et al.  Primitive recursion for higher-order abstract syntax , 1997, Theoretical Computer Science.

[36]  de Ng Dick Bruijn,et al.  Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem , 1972 .

[37]  Peter Aczel,et al.  An Introduction to Inductive Definitions , 1977 .

[38]  Roy L. Crole Lectures on [Co]Induction and [Co]Algebras , .

[39]  Ranald Alexander Clouston Equational logic for names and binders , 2010 .

[40]  Thomas F. Melham A Mechanized Theory of the Pi-Calculus in HOL , 1994, Nord. J. Comput..

[41]  Arthur Charguéraud,et al.  Engineering formal metatheory , 2008, POPL '08.

[42]  de Ng Dick Bruijn Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem , 1972 .

[43]  Amy P. Felty,et al.  Higher-Order Abstract Syntax in Coq , 1995, TLCA.

[44]  Amy P. Felty,et al.  Hybrid - A Definitional Two-Level Approach to Reasoning with Higher-Order Abstract Syntax , 2012, J. Autom. Reason..

[45]  Ian A. Mason,et al.  Operational Techniques in PVS - A Preliminary Evaluation , 2001, Electron. Notes Theor. Comput. Sci..

[46]  M. Gabbay,et al.  A nominal axiomatisation of the lambda-calculus , 2008 .

[47]  Murdoch James Gabbay,et al.  A Nominal Axiomatization of the Lambda Calculus , 2010, J. Log. Comput..

[48]  Gérard Huet,et al.  Residual theory in λ-calculus: a formal development , 1994, Journal of Functional Programming.

[49]  Dale Miller,et al.  A logic for reasoning with higher-order abstract syntax , 1997, Proceedings of Twelfth Annual IEEE Symposium on Logic in Computer Science.

[50]  Furio Honsell,et al.  pi-calculus in (Co)inductive-type theory , 2001, Theor. Comput. Sci..

[51]  Roy L. Crole,et al.  A Hybrid Encoding of Howe's Method for Establishing Congruence of Bisimilarity , 2002, Electron. Notes Theor. Comput. Sci..

[52]  Andrew Gacek The Abella Interactive Theorem Prover (System Description) , 2008, IJCAR.

[53]  Christian Urban,et al.  Nominal Techniques in Isabelle/HOL , 2005, Journal of Automated Reasoning.

[54]  Andrew M. Pitts,et al.  Nominal Logic: A First Order Theory of Names and Binding , 2001, TACS.

[55]  Furio Honsell,et al.  A framework for defining logics , 1993, JACM.

[56]  J. Roger Hindley,et al.  Introduction to Combinators and Lambda-Calculus , 1986 .

[57]  Murdoch James Gabbay,et al.  Capture-avoiding substitution as a nominal algebra , 2007, Formal Aspects of Computing.

[58]  Marino Miculan Developing (Meta)Theory of Lambda-calculus in the Theory of Context , 2001, Electron. Notes Theor. Comput. Sci..

[59]  Mark R. Shinwell,et al.  Fresh Objective Caml user manual , 2005 .

[60]  Furio Honsell,et al.  An Axiomatic Approach to Metareasoning on Nominal Algebras in HOAS , 2001, ICALP.

[61]  Amy P. Felty,et al.  Two-Level Hybrid: A System for Reasoning Using Higher-Order Abstract Syntax , 2008, Electron. Notes Theor. Comput. Sci..

[62]  Andrew M. Pitts,et al.  Nominal Equational Logic , 2007, Electron. Notes Theor. Comput. Sci..

[63]  Michael Norrish,et al.  Proof Pearl: De Bruijn Terms Really Do Work , 2007, TPHOLs.

[64]  Andrew D. Gordon,et al.  A Mechanisation of Name-Carrying Syntax up to Alpha-Conversion , 1993, HUG.

[65]  Dale Miller,et al.  Reasoning in a logic with definitions and induction , 1997 .

[66]  Frank Pfenning,et al.  System Description: Twelf - A Meta-Logical Framework for Deductive Systems , 1999, CADE.

[67]  Andrew M. Pitts,et al.  Alpha-structural recursion and induction , 2005, JACM.

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

[69]  Andrew M. Pitts,et al.  A New Approach to Abstract Syntax with Variable Binding , 2002, Formal Aspects of Computing.

[70]  Robert Harper,et al.  Mechanizing metatheory in a logical framework , 2007, Journal of Functional Programming.

[71]  Amy P. Felty,et al.  Reasoning with Higher-Order Abstract Syntax and Contexts: A Comparison , 2010, ITP.

[72]  Lars Hallnäs,et al.  Partial Inductive Definitions , 1991, Theor. Comput. Sci..

[73]  Andrew M. Pitts,et al.  FreshML: programming with binders made simple , 2003, ICFP '03.