nLab parametric dependent type theory

Redirected from "explicit parametricity".

Context

Type theory

natural deduction metalanguage, practical foundations

  1. type formation rule
  2. term introduction rule
  3. term elimination rule
  4. computation rule

type theory (dependent, intensional, observational type theory, homotopy type theory)

syntax object language

computational trinitarianism =
propositions as types +programs as proofs +relation type theory/category theory

logicset theory (internal logic of)category theorytype theory
propositionsetobjecttype
predicatefamily of setsdisplay morphismdependent type
proofelementgeneralized elementterm/program
cut rulecomposition of classifying morphisms / pullback of display mapssubstitution
introduction rule for implicationcounit for hom-tensor adjunctionlambda
elimination rule for implicationunit for hom-tensor adjunctionapplication
cut elimination for implicationone of the zigzag identities for hom-tensor adjunctionbeta reduction
identity elimination for implicationthe other zigzag identity for hom-tensor adjunctioneta conversion
truesingletonterminal object/(-2)-truncated objecth-level 0-type/unit type
falseempty setinitial objectempty type
proposition, truth valuesubsingletonsubterminal object/(-1)-truncated objecth-proposition, mere proposition
logical conjunctioncartesian productproductproduct type
disjunctiondisjoint union (support of)coproduct ((-1)-truncation of)sum type (bracket type of)
implicationfunction set (into subsingleton)internal hom (into subterminal object)function type (into h-proposition)
negationfunction set into empty setinternal hom into initial objectfunction type into empty type
universal quantificationindexed cartesian product (of family of subsingletons)dependent product (of family of subterminal objects)dependent product type (of family of h-propositions)
existential quantificationindexed disjoint union (support of)dependent sum ((-1)-truncation of)dependent sum type (bracket type of)
logical equivalencebijection setobject of isomorphismsequivalence type
support setsupport object/(-1)-truncationpropositional truncation/bracket type
n-image of morphism into terminal object/n-truncationn-truncation modality
equalitydiagonal function/diagonal subset/diagonal relationpath space objectidentity type/path type
completely presented setsetdiscrete object/0-truncated objecth-level 2-type/set/h-set
setset with equivalence relationinternal 0-groupoidBishop set/setoid with its pseudo-equivalence relation an actual equivalence relation
equivalence class/quotient setquotientquotient type
inductioncolimitinductive type, W-type, M-type
higher inductionhigher colimithigher inductive type
-0-truncated higher colimitquotient inductive type
coinductionlimitcoinductive type
presettype without identity types
set of truth valuessubobject classifiertype of propositions
domain of discourseuniverseobject classifiertype universe
modalityclosure operator, (idempotent) monadmodal type theory, monad (in computer science)
linear logic(symmetric, closed) monoidal categorylinear type theory/quantum computation
proof netstring diagramquantum circuit
(absence of) contraction rule(absence of) diagonalno-cloning theorem
synthetic mathematicsdomain specific embedded programming language

homotopy levels

semantics

Contents

Idea

All dependent type theories satisfy a meta-theoretic version of parametricity traditionally called external parametricity.

Parametric dependent type theory is dependent type theory with an explicit notion of parametricity inside of the theory itself called explicit parametricity, in the same way that some dependent type theories have explicit substitution. A dependent type theory without explicit parametricity is called non-parametric.

Parametric dependent type theories are distinguished by the kind of explicit parametricity that they have:

  • External parametricity, which applies to types and terms in the empty context.

  • Internal parametricity, which applies to types and terms in all contexts.

Explicit external parametricity is not the same as meta-theoretic external parametricity in that the parametricity is partially internalized in the theory itself. The use of the bare external parametricity for explicit external parametricity originates from Narya‘s documentation.

Note: In the rest of this article, we shall follow the terminology of the Narya documentation and use external parametricity for explicit external parametricity. To disambiguate, we shall use meta-theoretic parametricity for the traditional meta-theoretic notion of external parametricity.

The various forms of explicit parametricity differ to whether it is a conservative extension of non-parametric dependent type theory.

  • External parametricity is a conservative extension over non-parametric dependent type theory and is thus fully consistent with all classical axioms.

  • Internal parametricity is not a conservative extension; it contradicts many classical axioms such as the axiom of choice and excluded middle.

In addition, external parametricity has categorical semantics in any (,1)(\infty,1)-topos of semi-cubical objects? in a base (,1)(\infty,1)-topos, while internal parametricity has categorical semantics in any (,1)(\infty,1)-topos of cubical objects in a base (,1)(\infty,1)-topos (see Kolomatskaia & Shulman 2023, Narya Docs).

There are also versions of explicit parametricity called modal parametricity, which are modal type theories with a discrete mode and a non-discrete mode, where parametricity can only be applied in the non-discrete mode and where the discrete mode is consistent with all classical axioms:

  • In external modal parametricity the parametricity in the non-discrete mode can only be applied to types and terms in contexts that are guarded by a context lock for the modal operator representing the discrete coreflection of a type.

  • In internal modal parametricity the parametricity in the non-discrete mode can be applied to types and terms in all contexts.

These modal type theories attempt to formalize, in addition to the internal logic of a (,1)(\infty,1)-topos of cubical or semi-cubical objects, also the internal logic of the base (,1)(\infty,1)-topos and its adjoint functors with the ( , 1 ) (\infty,1) -sheaf ( , 1 ) (\infty,1) -topos.

Examples of such modal parametric type theories include the displayed type theory by Kolomatskaia & Shulman 2023 with external modal parametricity and the cohesive type theory by Aberlé 2024 with internal modal parametricity.

References

A proof assistant implementing an observational parametric type theory with both internal and external parametricity of variable arity:

Last revised on June 3, 2025 at 12:50:41. See the history of this page for a list of all contributions to it.