Formal parametric polymorphism

A polymorphic function is parametric if its behavior does notdepend on the type at which it is instantiated. Starting with Reynolds'work, the study of parametricity is typically semantic. In this paper,we develop a syntactic approach to parametricity, and a formal systemthat embodies this approach: system <inline-equation><f><sc>R</sc></f></inline-equation>. Girard's system F deals with terms and types;<inline-equation><f><sc>R</sc></f></inline-equation> is an extension of F that deals also with relationsbetween types. In <inline-equation><f><sc>R</sc></f></inline-equation>**, it is possible to derive theorems about functionsfrom their types, or “theorems for free”, as Wadler callsthem. An easy “theorem for free” asserts that the type <inline-equation><f>∀<fen lp="par">X<rp post="par"></fen>X→</f><?Pub Caret></inline-equation>Bool contains only constantfunctions; this is not provable in F. There are many harder and moresubstantial examples. Various metatheorems can also be obtained, such asa syntactic version of Reynolds' abstraction theorem.

[1]  Corrado Böhm,et al.  Automatic Synthesis of Typed Lambda-Programs on Term Algebras , 1985, Theor. Comput. Sci..

[2]  Martín Abadi,et al.  Formal Parametric Polymorphism , 1993, Theor. Comput. Sci..

[3]  G. Longo,et al.  The Genericity Theorem and the Notion of Parametricity in the Polymorphic λ-calculus , 1992 .

[4]  Luca Cardelli,et al.  An Extension of System F with Subtyping , 1991, TACS.

[5]  Richard Statman,et al.  Empty types in polymorphic lambda calculus , 1987, POPL '87.

[6]  Eugenio Moggi,et al.  Constructive Natural Deduction and its 'Omega-Set' Interpretation , 1991, Math. Struct. Comput. Sci..

[7]  Simon L. Peyton Jones,et al.  Imperative functional programming , 1993, POPL '93.

[8]  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 .

[9]  Martín Abadi,et al.  A Logic for Parametric Polymorphism , 1993, TLCA.

[10]  Philip Wadler,et al.  A Syntax for Linear Logic , 1993, MFPS.

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

[12]  Giuseppe Longo,et al.  The genericity theorem and the notion of parametricity in the polymorphic lambda -calculus , 1993, [1993] Proceedings Eighth Annual IEEE Symposium on Logic in Computer Science.

[13]  Joyce L. Vedral,et al.  Functional Programming Languages and Computer Architecture , 1989, Lecture Notes in Computer Science.

[14]  Ryu Hasegawa Parametricity of Extensionally Collapsed Term Models of Polymorphism and Their Categorical Properties , 1991, TACS.

[15]  John C. Reynolds,et al.  Types, Abstraction and Parametric Polymorphism , 1983, IFIP Congress.

[16]  John C. Mitchell,et al.  Notes on Sconing and Relators , 1992, CSL.

[17]  Giuseppe Longo,et al.  The Genericity Theorem and Parametricity in the Polymorphic lambda-Calculus , 1993, Theor. Comput. Sci..

[18]  Harry G. Mairson Outline of a Proof Theory of Parametricity , 1991, FPCA.

[19]  Andre Scedrov,et al.  Functorial Polymorphism , 1990, Theor. Comput. Sci..

[20]  Edmund Robinson,et al.  Algebraic Types in PER Models , 1989, Mathematical Foundations of Programming Semantics.

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

[22]  J. Girard,et al.  Proofs and types , 1989 .

[23]  Martín Abadi,et al.  Subtyping and parametricity , 1994, Proceedings Ninth Annual IEEE Symposium on Logic in Computer Science.

[24]  QingMing Ma,et al.  Parametricity as subtyping , 1992, POPL '92.

[25]  Ryu Hasegawa,et al.  Categorical data types in parametric polymorphism , 1994, Mathematical Structures in Computer Science.

[26]  John C. Reynolds,et al.  Types, Abstractions, and Parametric Polymorphism, Part 2 , 1991, MFPS.

[27]  Robin Milner,et al.  Definition of standard ML , 1990 .