Skip to main content
QUICK REVIEW

[Paper Review] Cubical Categories for Higher-Dimensional Parametricity

Patricia Johann, Kristina Sojakova|arXiv (Cornell University)|Jan 23, 2017
Logic, programming, and type systemsComputer Science12 references6 citations
TL;DR

This paper introduces p-dimensional cubical categories to generalize Reynolds' relational parametricity for System F to all finite and infinite dimensions. It constructs a unified framework where types are interpreted as face map- and degeneracy-preserving cubical functors, and terms as cubical natural transformations, yielding split λ2-fibrations that recover known models like Reynolds' and the PER model as 1-dimensional instances and derive higher-dimensional analogues of key parametricity results.

ABSTRACT

Reynolds' theory of relational parametricity formalizes parametric polymorphism for System F, thus capturing the idea that polymorphically typed System F programs always map related inputs to related results. This paper shows that Reynolds' theory can be seen as the instantiation at dimension 1 of a theory of relational parametricity for System F that holds at all higher dimensions, including infinite dimension. This theory is formulated in terms of the new notion of a p-dimensional cubical category, which we use to define a p-dimensional parametric model of System F for any p, where p is a natural number or infinity. We show that every p-dimensional parametric model of System F yields a split $λ$ 2-fibration in which types are interpreted as face map- and degeneracy-preserving cubical functors and terms are interpreted as face map- and degeneracy-preserving cubical natural transformations. We demonstrate that our theory is "good" by showing that the PER model of Bainbridge et al. is derivable as another 1-dimensional instance, and that all instances at all dimensions derive higher-dimensional analogues of expected results for parametric models, such as a Graph Lemma and the existence of initial algebras and final coalgebras. Finally, our technical development resolves a number of significant technical issues arising in Ghani et al.'s recent bifibrational treatment of relational parametricity, which allows us to clarify their approach and strengthen their main result. Once clarified, their bifibrational framework, too, can be seen as a 1-dimensional instance of our theory.

Motivation & Objective

  • To extend Reynolds' relational parametricity for System F beyond dimension 1 to all finite and infinite dimensions.
  • To resolve technical shortcomings in Ghani et al.'s bifibrational framework by introducing a more general, instantiable theory.
  • To formalize higher-dimensional parametricity, including proof-relevant and infinite-dimensional cases, using cubical categories.
  • To demonstrate that known parametric models (e.g., Reynolds' and PER) are proper instances of the new theory at dimension 1.
  • To derive higher-dimensional analogues of fundamental parametricity results, such as the Graph Lemma and existence of initial algebras and final coalgebras.

Proposed method

  • Introduce the notion of a p-dimensional cubical category as a generalization of cubical sets to higher dimensions.
  • Define p-dimensional parametric models of System F using face map- and degeneracy-preserving cubical functors for types and natural transformations for terms.
  • Construct split λ2-fibrations where the base category captures types and the total category captures relations, with structure preserved under face maps and degeneracies.
  • Show that the framework subsumes existing models by embedding them as 1-dimensional instances, including Reynolds' original model and the PER model.
  • Use internal category theory to clarify and strengthen Ghani et al.'s bifibrational approach, showing it too is a 1-dimensional instance of the new theory.
  • Demonstrate that the theory supports higher-dimensional generalizations of parametricity theorems, such as the Graph Lemma and initial/final (co)algebras, via cubical structure.

Experimental results

Research questions

  • RQ1Can Reynolds' relational parametricity for System F be naturally extended to higher dimensions beyond 1?
  • RQ2How can a uniform, instantiable framework for parametric models be constructed that properly includes known models like the PER model and Reynolds' original model?
  • RQ3What is the role of cubical structure in modeling higher-dimensional parametricity, particularly in preserving relations and natural transformations?
  • RQ4Can the bifibrational framework of Ghani et al. be fully reconciled with the theory of relational parametricity through a higher-dimensional cubical approach?
  • RQ5What are the implications of infinite-dimensional parametricity, and how does it relate to homotopy type theory and the homotopy-canonicity conjecture?

Key findings

  • The theory successfully generalizes Reynolds' 1-dimensional relational parametricity to all dimensions p ∈ ℕ ∪ {∞}, including infinite dimensions.
  • The PER model of Bainbridge et al. and Reynolds' original model are both shown to be proper 1-dimensional instances of the new cubical framework.
  • The framework yields higher-dimensional analogues of key parametricity results, such as the Graph Lemma and the existence of initial algebras and final coalgebras for positive type expressions.
  • The bifibrational framework of Ghani et al. is clarified and strengthened by showing it is a 1-dimensional instance of the new theory, resolving prior technical issues with functor and natural transformation preservation.
  • The theory supports proof-relevant parametricity at dimension 2, suggesting a path toward formalizing higher-dimensional uniformity in dependent type theory.
  • The framework provides a foundation for future exploration of infinite-dimensional parametricity and its connections to the homotopy-canonicity conjecture in homotopy type theory.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.