Redirected from "principle of substitution".
Contents
This page is about the notion in homotopy type theory. For parallel transport via connections in differential geometry see there. For the relation see below.
Context
Type theory
Equality and Equivalence
equivalence
-
equality (definitional, propositional, computational, judgemental, extensional, intensional, decidable)
-
identity type, equivalence of types, definitional isomorphism
-
isomorphism, weak equivalence, homotopy equivalence, weak homotopy equivalence, equivalence in an (∞,1)-category
-
natural equivalence, natural isomorphism
-
gauge equivalence
-
Examples.
principle of equivalence
equation
-
fiber product, pullback
-
homotopy pullback
-
Examples.
-
linear equation, differential equation, ordinary differential equation, critical locus
-
Euler-Lagrange equation, Einstein equation, wave equation
-
Schrödinger equation, Knizhnik-Zamolodchikov equation, Maurer-Cartan equation, quantum master equation, Euler-Arnold equation, Fuchsian equation, Fokker-Planck equation, Lax equation
Contents
Idea
Gottfried Leibniz said (in translation from Lewis 1918, p. 373 with original Latin terms in parenthesis; see also Cartwright 1971, p. 119 and Gries & Schneider 1998)
Two terms are the same (eadem) if one can be substituted for the otherwithout altering the truth of any statement (salva veritate). If we have and , and enters into some true proposition, and the substitution of for wherever it appears results in a new proposition that is likewise true, and if this can be done for every proposition, then and are said to be the same; conversely, if and are the same, they can be substituted for one another.
The converse mentioned at the end of the last sentence is known as the principle of substitution or the indiscernibility of identicals. In any simply typed first-order theory, given a predicate on , this principle is formalized as the following
In the interpretation of propositions as types in type theory, propositions are interpreted as types, and the above statement has a generalization from the types which are propositions to all types: the universal quantifier becomes a dependent product type, the predicate becomes a type family, implication becomes an a function type, and logical equivalence of propositions becomes an equivalence type. This results in what is known as transport in type theory, which for the type and the type family results in the dependent function:
(1)
Definitions
There are actually two notions of transport in dependent type theory. One notion of transport is transport across the identification for elements and . The other notion of transport is transport across the path . These two are interchangeable through the recursion principle and uniqueness principle of the interval type.
Similarly, there are multiple notions of equivalence types in dependent type theory, which can be used for a definition of univalence for a type universe ; these include
The transport equivalence is called strict transport definitional transport or judgmental transport if the equivalence type is a definitional isomorphism type. It is called (weak) transport if the equivalence type is a (weak) equivalence type.
Transport across paths
Inductive definition
Given any notion of equivalence type between types and , let denote the identity equivalence on .
Transport across paths is inductively defined using path induction for function types out of the interval type. Path induction states that
Theorem
Given any type , and any type family indexed by paths in , and given any dependent function which says that for all elements , there is an element of the type defined by substituting the constant path of into , , one can construct a dependent function such that for all , .
Now, given a type family indexed by , there exists a dependent function called transport
This is inductively defined by path induction, where for all ,
Using function application and Russell universes
Suppose that the dependent type theory uses a sequence of Russell universes to define types, instead of a separate type judgment. Then, given a path , transport across the type family can be defined as the evaluation of the inductively defined function
at the function application of to the path , :
Transport across identifications
Inductive definition
Given any notion of equivalence type between types and , let denote the identity equivalence on .
Transport across identification is inductively defined using the J-rule. The J-rule states that
Theorem
Given a type and given a type family indexed by , , and , and a dependent function , one can construct a dependent function
such that for all ,
Now, given a type family indexed by , there exists a dependent function called transport
This is inductively defined by path induction, where for all ,
Using function application and Russell universes
Suppose that the dependent type theory uses a sequence of Russell universes to define types, instead of a separate type judgment. Then, given elements , , and identification , transport across the type family can be defined as the evaluation of the inductively defined function
at the function application of to the identification , :
Properties
Transport across paths
The type of families of transport functions on a type family is given by the type
where is a heterogeneous identity type defined using paths.
In general, a family of transport functions is an element of this type. However, any element of the type of families of transport functions is unique up to identification:
Theorem
The type of families of transport functions
is a contractible type.
Proof
We first show that the type
is contractible for all . By path induction, it suffices to show that the type
is contractible for all . There is an equivalence of types
and thus by the typal congruence rules for dependent function types and dependent pair types, there is an equivalence of types
Now,
is just the type of identity functions on , and is thus always contractible, which implies that
is contractible for all . By induction on identity types, the type
is contractible for all paths . By weak function extensionality, this implies that
is contractible.
Thus, it makes sense to refer to the canonical family of transport functions
inductively defined by
for all as the transport function on the type family .
Theorem
Given a family of transport functions
for all , the function is a quasi-inverse function of , where is the inverse path of .
Proof
For all paths and for all , we have
and for all we have
Thus, we have
and
By concatenating heterogeneous identifications, we get
and
where
Since and , we thus have
and
By converting heterogeneous identifications over constant paths, one gets
and
Thus, we have shown that is a quasi-inverse function of for all paths .
We define the dependent functions
in type
and
in type
for all .
Theorem
Given a family of transport functions
for all , the function is bi-invertible.
Proof
We construct the element
in the type
indicating that is bi-invertible for all .
By definition, it follows that:
Corollary
Given a family of transport functions
for all , the function is an equivalence of types.
Hence, in dependent type theory, transport functions are also called transport equivalences.
Transport across identifications
The type of families of transport functions on a type family is given by the type
where is a heterogeneous identity type defined using identifications.
In general, a family of transport functions is an element of this type. However, any element of the type of families of transport functions is unique up to identification:
Theorem
The type of families of transport functions
is a contractible type.
Proof
We first show that the type
is contractible for all , , and . By induction on identity types, it suffices to show that the type
is contractible for all . There is an equivalence of types
and thus by the typal congruence rules for dependent function types and dependent pair types, there is an equivalence of types
Now,
is just the type of identity functions on , and is thus always contractible, which implies that
is contractible for all . By induction on identity types, the type
is contractible for all , , and . By weak function extensionality, this implies that
is contractible.
Thus, it makes sense to refer to the canonical family of transport functions
inductively defined by
for all as the transport function on the type family .
Theorem
Given a family of transport functions
for all , , and , the function is a quasi-inverse function of .
Proof
For all , , and and for all , we have
and for all we have
Thus, we have
and
By concatenating heterogeneous identifications, we get
and
Since and , we thus have
and
By converting heterogeneous identifications over reflexivity to homogeneous identifications, one gets
and
Thus, we have shown that is a quasi-inverse function of for all , , and .
We define the dependent functions
in type
and
in type
for all , , and .
Theorem
Given a family of transport functions
for all , , and , the function is bi-invertible.
Proof
We construct the element
in the type
indicating that is bi-invertible for all , , and .
By definition, it follows that:
Corollary
Given a family of transport functions
for all , , and , the transport function is an equivalence of types.
Hence, in dependent type theory, transport functions are also called transport equivalences.
Examples and applications
Univalent Tarski universes
Tarski universes are types which behave like internal models of dependent type theory inside of the type theory itself. We use a very general notion of Tarski universe: a Tarski universe merely consists of a type of encodings for types and a universal type family . Given an encoding , an internal type family indexed by is a function .
There are two ways to say that and are the same, by way of the identity type of the Tarski universe , and by way of the type of equivalences between the type reflections of and , . By transport, there is a canonical function
The Tarski universe is then said to be a univalent universe if the transport function is an equivalence of types
for all encodings and .
One could also internalize the type of equivalences inside of the Tarski universe , but that requires the Tarski universe be closed under identity types, dependent product types, and dependent sum types.
A Tarski universe is weakly closed under identity types if it has an internal encoding of identity types in the Tarski universe: Given an element , there is a function and for all elemments and an equivalence
A Tarski universe is weakly closed under dependent product types if it has an internal encoding of dependent product types in the Tarski universe: given an element and a function , there is an element , and an equivalence
A Tarski universe is weakly closed under dependent sum types if it has an internal encoding of dependent sum types in the Tarski universe: given an element and a function , there is an element , and an equivalence
Every Tarski universe which is weakly closed under identity types, dependent product types, and dependent sum types types has an internal encoding of type of equivalences , defined for all and as
with defined by whatever suitable definition of equivalence in homotopy type theory.
Thus, there is a third way to say that and are the same, by way of the type reflection of the internal encoding of the type of equivalences: . It could be proven, from the closure of the universe under identity types, dependent product types, and dependent sum types, that there is an equivalence
There is a more common definition of a univalent Tarski universe: a Tarski universe is a univalent universe if the canonical function
is an equivalence
These two definitions of univalent universes are the same. In order to show that the two definitions are the same, we need to show that there is an identification
for all identifications . By the J rule it is enough to show that maps the identity function of to the identity function of . Since the identity function in is just the above statement is always true. Thus, the second definition of a univalent universe is equivalent to the definition by transport.
These results apply to strictly Tarski universes as well, which are strictly closed rather than weakly closed (the equivalences become definitional equality): since implies that for types and , every strictly Tarski universe is weakly Tarski.
Relation to parallel transport
See also
References
The traditional notion of the “transport” in algebraic topology (via the fundamental theorem of covering spaces and more generally via the notion of Serre fibrations):
The notion in homotopy type theory:
and in cubical type theory:
Implementation in Agda:
and in cubical Agda:
Leibniz‘s original paragraph (from an unpublished manuscript probably written after 1683) is reproduced in the Latin original in:
- K. Gerhard (ed.), Section XIX, p. 228 in: Die philosophischen Schriften von Gottfried Wilhelm Leibniz, Siebenter Band, Weidmannsche Buchhandlung (1890) [archive.org]
and in English translation in:
- Clarence I. Lewis, Appendix (p. 373) of: A Survey of Symbolic Logic, University of California (1918) [pdf]
and further discussed in:
-
Richard Cartwright, Identity and Substitutivity, p. 119-133 of: Milton Munitz (ed.) Identity and Individuation, New York University Press (1971) [pdf]
-
David Gries, Fred Schneider, Formalizations Of Substitution Of Equals For Equals (1998) [pdf, ecommons:1813/7340
The understanding of transport in HoTT as expressing Leibniz‘s principle of “indiscernibility of identicals” (aka “substitution of equals”, “substitutivity”) has been made explicit in:
-
James Ladyman, Stuart Presnell, §6.3 in: Identity in Homotopy Type Theory, Part I: The Justification of Path Induction, Philosophia Mathematica 23 3 (2015) 386–406 [doi:10.1093/philmat/nkv014, pdf]
-
Benedikt Ahrens, Paige Randall North, §3.1 in: Univalent foundations and the equivalence principle, in: Reflections on the Foundations of Mathematics, Synthese Library 407 Springer (2019) [arXiv:2202.01892, doi:10.1007/978-3-030-15655-8]
The converse implication of path induction from transport (together with the uniqueness principle for id-types) is made explicit in:
For the role of transport in defining an equivalent notion of univalence in weakly Tarski universes, see:
- Madeleine Birchfield, Valery Isaev, Univalence for weakly Tarski universes, MathOverflow, (web)