Reference. Logical Relations as Types: Proof-Relevant Parametricity for Program Modules
The theory of program modules is of interest to language designers not only for its practical importance to programming, but also because it lies at the nexus of three fundamental concerns in language design: the phase distinction, computational effects, and type abstraction. We contribute a fresh “synthetic” take on program modules that treats modules as the fundamental constructs, in which the usual suspects of prior module calculi (kinds, constructors, dynamic programs) are rendered as derived notions in terms of a modal type-theoretic account of the phase distinction. We simplify the account of type abstraction (embodied in the generativity of module functors) through a lax modality that encapsulates computational effects, placing projectibility of module expressions on a type-theoretic basis.
Our main result is a (significant) proof-relevant and phase-sensitive generalization of the Reynolds abstraction theorem for a calculus of program modules, based on a new kind of logical relation called a parametricity structure. Parametricity structures generalize the proof-irrelevant relations of classical parametricity to proof-relevant families, where there may be non-trivial evidence witnessing the relatedness of two programs—simplifying the metatheory of strong sums over the collection of types, for although there can be no “relation classifying relations,” one easily accommodates a “family classifying small families.”
Using the insight that logical relations/parametricity is itself a form of phase distinction between the syntactic and the semantic, we contribute a new synthetic approach to phase separated parametricity based on the slogan logical relations as types, by iterating our modal account of the phase distinction. We axiomatize a dependent type theory of parametricity structures using two pairs of complementary modalities (syntactic, semantic) and (static, dynamic), substantiated using the topos theoretic Artin gluing construction. Then, to construct a simulation between two implementations of an abstract type, one simply programs a third implementation whose type component carries the representation invariant.
Cite
Cited by (18)
Normalization for multimodal type theory gratzer-2026-normalization
Handling Higher-Order Effectful Operations with Judgemental Monadic Laws yang-2026-handling
Mechanizing Synthetic Tait Computability in Istari li_etal_2025
Mechanizing a Proof-Relevant Logical Relation for Timed Message-Passing Protocols zhang-2025-mechanizing
Consistency of a Dependent Calculus of Indistinguishability liu-2025-consistency
The Compositional Essence of Effectful Cost Analyses: Categorical Foundations and Fibered Logical Relations amorim_effcost
Controlling unfolding in type theory gratzer-2025-controlling
Parametricity via Cohesion aberle-2024-parametricity
Cost-sensitive computational adequacy of higher-order recursion in synthetic domain theory niu-2024-cost
Decalf: A Directed, Effectful Cost-Aware Logical Framework grodin-2024-decalf
Internalizing Indistinguishability with Dependent Types liu-2024-internalizing
Three non-cubical applications of extension types zhang-2023-three
Explicit Refinement Types ghalayini-2023-explicit
A Cubical Language for Bishop Sets sterling-2022-a
A cost-aware logical framework niu-2022-a
Strict universes for Grothendieck topoi gratzer-2022-strict
First Steps in Synthetic Tait Computability: The Objective Metatheory of Cubical Type Theory sterling_2021
Normalization for Cubical Type Theory sterling_angiuli_2021
Cites 143 works (16 here)
With notes (16)
Normalization for multimodal type theory gratzer-2026-normalization
Semantic analysis of normalisation by evaluation for typed lambda calculus fiore-2022-semantic
A Cubical Language for Bishop Sets sterling-2022-a
Internalizing representation independence with univalence angiuli-2021-internalizing
Normalization for Cubical Type Theory sterling_angiuli_2021
Modalities in homotopy type theory rijke-2020-modalities
Implementing a modal dependent type theory gratzer-2019-implementing
Gluing for Type Theory GluingForTypeTheory
Cubical Syntax for Reflection-Free Extensional Equality sterling-2019-cubical
A type theory for synthetic -categories riehl-2017-a
A relationally parametric model of dependent type theory atkey-2014-a
Call-By-Push-Value: A Functional/Imperative Synthesis levy-2003-callbypushvalue
Sketches of an Elephant: A Topos Theory Compendium johnstone-2002
Syntax and semantics of dependent types Hofmann_1997
Functorial Semantics of Algebraic Theories lawvere_1963
External (127)
- Higher Inductive Types and Internal Parametricity for Cubical Type Theory (2021)
- Topo-logie (2021)
- Idris 2: Quantitative Type Theory in Practice (2021)
- The Lean 4 Theorem Prover and Programming Language (System Description) (2021)
- A focused solution to the avoidance problem (2020)
- The history of Standard ML (2020)
- Internal Parametricity for Cubical Type Theory (2020)
- Syntactic categories for dependent type theory: sketching and adequacy (2020)
- The OCaml system manual (2020)
- cooltt (RedPRL Development Team) (2020)
- Gluing models of type theory along flat functors (unpublished draft) (2020)
- Canonicity and normalization for dependent type theory (2019)
- Fully abstract module compilation (2019)
- Definitional proof-irrelevance without K (2019)
- The fire triangle: how to mix substitution, dependent elimination, and effects (2019)
- A reasonably exceptional type theory (2019)
- Modal dependent type theory and dependent right adjoints (2019)
- Computational Semantics of Cartesian Cubical Type Theory (PhD thesis, Angiuli) (2019)
- Homotopy Canonicity for Cubical Type Theory (2019)
- PFPL Supplement: How to (Re)Invent Tait's Method (2019)
- 1ML – Core and modules united (2018)
- A General Framework For Relational Parametricity (2018)
- Equivalences for free: univalent parametricity for effective transport (2018)
- Presheaf Models of Relational Modalities in Dependent Type Theory (2018)
- redtt (RedPRL Development Team) (2018)
- Undecidability of equality in the free locally cartesian closed category (extended version). Log. Methods Comput. Sci. 13, 4 (2017)
- Cubical type theory: A constructive interpretation of the univalence axiom (2017)
- Parametric quantifiers for dependent type theory (2017)
- Formalizing Cartan Geometry in Modal Homotopy Type Theory (2017)
- Modules, abstraction, and parametric polymorphism (2016)
- Axioms for Modelling Cubical Type Theory in a Topos (2016)
- Normalisation by Evaluation for Dependent Types (2016)
- Guarded Cubical Type Theory: Path Equality for Guarded Recursion (2016)
- Dependent Types in Haskell: Theory and Practice (PhD thesis, Eisenberg) (2016)
- Denotational semantics in Synthetic Guarded Domain Theory (PhD thesis, Paviotti) (2016)
- A Presheaf Model of Parametric Type Theory (2015)
- Abstract effects and proof-relevant logical relations (2014)
- Functors are Type Refinement Systems (2014)
- F-ing modules (2014)
- Univalence for inverse diagrams and homotopy canonicity (2014)
- Structuralism, Invariance, and Univalence (2013)
- Proof-Relevant Logical Relations for Name Generation (2013)
- Type-theory in color (2013)
- Instances of Computational Effects: An Algebraic Perspective (2013)
- Internalizing Relational Parametricity in the Extensional Calculus of Constructions (2013)
- Invariance Under Isomorphism and Definability (Martin-Löf, Nagel Lectures) (2013)
- Scones, Logical Relations, and Parametricity (blog post) (2013)
- Monads with arities and their associated theories (2012)
- Proofs for free (2012)
- A Computational Interpretation of Parametricity (2012)
- Practical Foundations for Programming Languages (2012)
- Relational Parametricity for Higher Kinds (2012)
- First Steps in Synthetic Guarded Domain Theory: Step-Indexing in the Topos of Trees (2011)
- A Modular Type-Checking Algorithm for Type Theory with Singleton Types and Proof Irrelevance (2009)
- Mechanized Definition of Standard ML (alpha release) (2009)
- Logical relations for monadic types (2008)
- A type system for recursive modules (2007)
- Modular type classes (2007)
- Towards a mechanized metatheory of standard ML (2007)
- Relational Parametricity for Computational Effects (2007)
- Locales and Toposes as Spaces (2007)
- The Girard–Reynolds isomorphism (second edition) (2007)
- Extensional equivalence and singleton types (2006)
- A separate compilation extension to standard ML (2006)
- Whole-program compilation in MLton (2006)
- A very short note on homotopy λ-calculus (2006)
- Categorical models for Abadi and Plotkin's logic for parametricity (2005)
- Universes in toposes (2005)
- Certifying compilation for standard ml in a type analysis framework (2005)
- Understanding and Evolving the ML Module System (PhD thesis, Dreyer) (2005)
- A type system for higher-order modules (2003)
- Notions of Computation Determine Monads (2002)
- A modular module system (2000)
- Deciding type equivalence in a language with singleton kinds (2000)
- A Type-Theoretic Interpretation of Standard ML (2000)
- Singleton Kinds and Singleton Types (PhD thesis, Stone) (2000)
- A core calculus of dependency (1999)
- Transparent modules with fully syntatic signatures (1999)
- Units (1998)
- Propositional Lax Logic (1997)
- Two models of synthetic domain theory (1997)
- The Definition of Standard ML (1997)
- Lifting Grothendieck Universes (1997)
- A syntactic theory of type generativity and sharing (1996)
- Applicative functors and fully transparent higher-order modules (1995)
- Using functor categories to generate intermediate code (1995)
- Categorical reconstruction of a reduction free normalization proof (1995)
- Connected limits, familial representability and Artin glueing (1995)
- Signatures for a network protocol stack (1994)
- A type-theoretic approach to higher-order modules with sharing (1994)
- Manifest types, modules, and separate compilation (1994)
- Reflexive graphs and parametric polymorphism (1994)
- Subtyping with Singleton Types (1994)
- Formal parametric polymorphism (1993)
- A Framework for Defining Logics (1993)
- A logic for parametric polymorphism (1993)
- Deliverables: a categorical approach to program development in type theory (1993)
- Fibrations, Logical Predicates and Indeterminates (1993)
- Sheaves in Geometry and Logic: A First Introduction to Topos Theory (1992)
- First steps in synthetic domain theory (1991)
- Notions of computation and monads (1991)
- Semantics of Type Theory (1991)
- Higher-order modules and the phase distinction (1990)
- The Definition of Standard ML (1990)
- Programming in Martin-Löf's Type Theory (1990)
- Abstract types and the dot notation (1990)
- Theorems for free! (1989)
- A category-theoretic account of program modules (1989)
- A small complete category (1988)
- The essence of ML (1988)
- Abstract types have existential type (1988)
- Polymorphism is set theoretic, constructively (1987)
- A Non-Type-Theoretic Definition of Martin-Lof''s Types (1987)
- Using dependent types to express modular structure (1986)
- Generalised algebraic theories and contextual categories (1986)
- Implementing Mathematics with The Nuprl Proof Development System (1986)
- Type algebras, functor categories and block structure (1986)
- Abstract types have existential types (1985)
- Types, Abstraction and Parametric Polymorphism (1983)
- Topos Theory (Johnstone) (1977)
- Change of base for toposes with generators (1975)
- Lectures on elementary topoi (1975)
- Théorie des topos et cohomologie étale des schémas (SGA 4) (1972)
- The formal theory of monads (1972)
- Intensional interpretations of functionals of finite type I (1967)
- Semantical Analysis of Intuitionistic Logic I (1965)
- On Closed Elements in Closure Algebras (1946)