Step-Indexed Syntactic Logical Relations for Recursive and Quantified Types

We present a sound and complete proof technique, based on syntactic logical relations, for showing contextual equivalence of expressions in a λ-calculus with recursive types and impredicative universal and existential types. Our development builds on the step-indexed PER model of recursive types presented by Appel and McAllester. We have discovered that a direct proof of transitivity of that model does not go through, leaving the “PER” status of the model in question. We show how to extend the Appel-McAllester model to obtain a logical relation that we can prove is transitive, as well as sound and complete with respect to contextual equivalence. We then augment this model to support relational reasoning in the presence of quantified types. Step-indexed relations are indexed not just by types, but also by the number of steps available for future evaluation. This stratification is essential for handling various circularities, from recursive functions, to recursive types, to impredicative polymorphism. The resulting construction is more elementary than existing logical relations which require complex machinery such as domain theory, admissibility, syntactic minimal invariance, and ⊤⊤-closure.

[1]  Lars Birkedal,et al.  Relational Interpretations of Recursive Types in an Operational Setting , 1999, Inf. Comput..

[2]  Carolyn L. Talcott,et al.  1 Equivalence in Functional Languages with E ectsIan , 2007 .

[3]  Andrew W. Appel,et al.  An indexed model of recursive types for foundational proof-carrying code , 2001, TOPL.

[4]  Jérôme Vouillon,et al.  Semantic types: a fresh look at the ideal model for types , 2004, POPL '04.

[5]  Andrew W. Appel,et al.  An Indexed Model of Impredicative Polymorphism and Mutable References , 2003 .

[6]  Lars Birkedal,et al.  Relational Interpretations of Recursive Types in an operational Setting (Summary) , 1997, TACS.

[7]  J. Y. Girard,et al.  Interpretation fonctionelle et elimination des coupures dans l'aritmetique d'ordre superieur , 1972 .

[8]  Philip Wadler,et al.  Theorems for free! , 1989, FPCA.

[9]  Gordon D. Plotkin,et al.  An Ideal Model for Recursive Polymorphic Types , 1986, Inf. Control..

[10]  Andrew M. Pitts,et al.  Relational Properties of Domains , 1996, Inf. Comput..

[11]  Amal Ahmed,et al.  Semantics of types for mutable state , 2004 .

[12]  Karl Crary,et al.  Syntactic Logical Relations for Polymorphic and Recursive Types , 2007, Computation, Meaning, and Logic.

[13]  Andrew M. Pitts,et al.  Parametric polymorphism and operational equivalence , 2000, Mathematical Structures in Computer Science.

[14]  Benjamin C. Pierce,et al.  Advanced Topics In Types And Programming Languages , 2004 .

[15]  William W. Tait,et al.  Intensional interpretations of functionals of finite type I , 1967, Journal of Symbolic Logic.

[16]  Benjamin C. Pierce,et al.  Types and programming languages: the next generation , 2003, 18th Annual IEEE Symposium of Logic in Computer Science, 2003. Proceedings..

[17]  Richard Statman,et al.  Logical Relations and the Typed lambda-Calculus , 1985, Inf. Control..

[18]  Jérôme Vouillon,et al.  Recursive polymorphic types and parametricity in an operational framework , 2005, 20th Annual IEEE Symposium on Logic in Computer Science (LICS' 05).

[19]  Andrew M. Pitts Existential Types: Logical Relations and Operational Equivalence , 1998, ICALP.