Bifibrational Functorial Semantics of Parametric Polymorphism
Neil Ghani, Patricia Johann, Fredrik Nordvall Forsberg, Federico Orsanigo, Tim Revell · Electronic Notes in Theoretical Computer Science · 2015
Reynolds' theory of parametric polymorphism captures the invariance of polymorphically typed programs under change of data representation. Semantically, reflexive graph categories and fibrations are both known to give a categorical understanding of parametric polymorphism. This paper contributes further to this categorical perspective by showing the relevance of bifibrations. We develop a bifibrational framework for models of System F that are parametric , in that they verify the Identity Extension Lemma and Reynolds' Abstraction Theorem. We also prove that our models satisfy expected properties, such as the existence of initial algebras and final coalgebras, and that parametricity implies dinaturality.