Redirected from "indexed heterogeneous bridge type".
This article contains a section on the notion of type universes being relativistic. For the notion of (the spacetime of) a universe in physics being relativistic, see special relativity.
Contents
Idea
In dependent type theory, bridge types are a reflexive type family used in explicit parametricity. The elements of bridge types are called bridges.
Finitary bridge types
Finitary bridge types come in -ary forms, for any natural number . Examples include
Narya has -ary bridge types for .
Unlike identity types, binary bridge types do not have transport.
Infinitary bridge types
There are also bridge types which are not finitary. One such example of “infinitary” bridge types is the bridge types in the internal dependent type theory of the topos of trees.
Bridge types of arbitrary arity
More generally, one can consider bridge types of arbitrary arity. For an index type , bridge types of arity are parameterized by an -indexed family of elements of ; that is,
The -ary bridge types are simply the case where the index type is the standard finite type with elements , due to the induction principle of the natural numbers type.
Properties
Reflexivity
Bridge types are reflexive in that for all elements , there is an element
where is the constant function which always returns .
For the type of booleans, this yields the usual notion of reflexivity for binary bridge types , since by the induction principle of the type of booleans, is equivalent to and .
Function application
In the same way that functions preserve identifications via function application to identifications, functions preserve bridges via function application to bridges or the action on bridges. For all functions and , and bridges , there is a bridge :
For the type of booleans and , this yields the usual notion of the action on bridges on binary bridge types , since by the induction principle of the type of booleans, is equivalent to .
Function application to bridges satisfy many of the same judgmental equalities as function application to identifications. These include, for , , , and ,
Heterogeneous bridge types
Similarly to heterogeneous identity types, there are heterogeneous versions of bridge types as well. Given a type and a type family and an index type for the bridge types, the heterogeneous bridge type is a type family
The usual version of a bridge type can be called homogeneous to contrast with heterogeneous bridge types.
For the type of booleans, , and , this yields the usual notion of a heterogeneous bridge types , since by the induction principle of the type of booleans, we have an equivalence of types
Like heterogeneous identity types, there is also a version of the heterogeneous bridge type which can be defined as a dependent sum type
These heterogeneous bridge types can be called fibered heterogeneous bridge types, and the other kind can be called indexed heterogeneous bridge types, in parallel to heterogeneous identity types.
Relation to homogeneous bridge types
Let be a type. Then heterogeneous bridge types over the constant type family at are the same as homogeneous bridge types of .
Similarly, given an element , heterogeneous bridge types over the constant function and reflexivity are the same as homogeneous bridge types of :
Heterogeneous reflexivity
Given an element and , there is an element of the heterogeneous bridge type
Since the heterogeneous bridge type is the same as the homogeneous bridge type , heterogeneous reflexivity is the same as the homogeneous reflexivity term
Dependent function application
In the same way that dependent functions preserve heterogeneous identifications via dependent function application to identifications, dependent functions preserve bridges via dependent function application to bridges or the dependent action on bridges. For all functions and dependent functions , and bridges , there is a heterogeneous bridge :
Dependent function application of bridges satisfies some of the same judgmental equalities as that of identifications. These include, for and ,
The walking bridge
Given a bridge type indexed by functions , the walking bridge type is a higher inductive type generated by a function and a bridge .
The idea of the walking bridge is that every bridge in a bridge type is given by a function that factors through :
in the same way that identifications are given by a function that factors through the interval type (the walking identification).
Inference rules
The inference rules of the walking bridge are as follows:
Formation rules for the walking bridge:
Introduction rules for the walking bridge:
Elimination rules for the walking bridge:
Computation rules for the walking bridge:
Discrete types
Since bridge types are reflexive, we can define the diagonal as the function
Let , indexed by functions , denote the identity type of arity . Binary identity types are equivalent to the usual identity type by the recursion principle of the type of booleans.
A type is discrete if and only if one of the following equivalent conditions holds:
-
the diagonal is an equivalence of types.
-
the canonical function which takes elements in to constant functions out of the walking bridge is an equivalence of types.
-
the canonical inductively defined family of functions defined via identification elimination is an equivalence of types for all .
The second condition is essentially saying that the localization at the walking bridge is equivalent to itself.
In a spatial type theory with a flat modality and sharp modality, one can create a cohesive type theory by adding an axiom of cohesion for the walking bridge, that says that a type is discrete in the spatial sense if and only if a type is discrete in the bridge sense. The shape modality of the cohesive type theory is then given by localization at the walking bridge.
The semantics of such a cohesive type theory for a finite type with -elements is the cohesive (infinity,1)-topos of -ary cubical objects in a base (infinity,1)-topos of cubically discrete objects.
Relativity
There is an analogue of the univalence axiom for type universes called relativity (see Cavallo & Harper 2021), which uses bridge types instead of identity types and types of -ary type families instead of types of equivalences. A universe is called relativistic if it satisfies the axiom of relativity:
Definition
Given an index type and bridge types , relativity for a type universe states that for all -indexed type families , there is an equivalence of types between the bridge type and the type of -small -ary type families.
Special cases of relativity for when the index type is the finite type with , , and elements respectively:
-
Nullary relativity of a type universe , where the empty type, says that there is an equivalence of types between the bridge type and the type of types , since the nullary product type is the unit type.
-
Unary relativity of a type universe , where the unit type, says that there is an equivalence of types between the bridge type and the type of type families , since the unary product type is the copy type.
-
Binary relativity of a type universe , where the type of booleans, says that there is an equivalence of types between the bridge type and the type of correspondences .
References
The terminology “bridge” is first used in this sense in
Bridge types first appear in an unary form, written as rather than , in
- Jean-Philippe Bernardy and Guilhem Moulin?. 2012. A Computational Interpretation of Parametricity. In Proceedings of the 27th Annual IEEE Symposium on Logic in Computer Science, LICS 2012, Dubrovnik, Croatia, June 25-28, 2012. IEEE Computer Society, 135–144. [doi:10.1109/LICS.2012.25]
An equivalent of univalence for unary bridge types appears (with inverse conditions given by the Pair-Pred and Surj-Typ equations) in
- Jean-Philippe Bernardy, Thierry Coquand, and Guilhem Moulin?. 2015. A Presheaf Model of Parametric Type Theory. In The 31st Conference on the Mathematical Foundations of Programming Semantics, MFPS 2015, Nijmegen, The Netherlands, June 22-25, 2015 (Electronic Notes in Theoretical Computer Science, Vol. 319), Dan R. Ghica (Ed.). Elsevier, 67–82. [doi:10.1016/j.entcs.2015.12.006]
The equivalent of univalence for (binary) bridge types is called “relativity” in:
A unary bridge type called “display” and written as instead of appears in
A fibered version of bridge types is defined in:
Bridge types in Narya:
-
Observational higher dimensions, Narya documentation. (web)
-
Parametricity, Narya documentation. (web)
Some discussion of bridge types occurs in
- synthetic algebraic geometry vs continuation passing style, Category Theory Zulip, web.