6.2 Induction principles and dependent paths
When we describe a higher inductive type such as the circle as being generated by certain constructors, we have to explain what this means by giving rules analogous to those for the basic type constructors from http://planetmath.org/node/87533Chapter 1. The constructors themselves give the introduction rules, but it requires a bit more thought to explain the elimination rules, i.e. the induction and recursion principles. In this book we do not attempt to give a general formulation of what constitutes a “higher inductive definition” and how to extract the elimination rule from such a definition — indeed, this is a subtle question and the subject of current research. Instead we will rely on some general informal discussion and numerous examples.
The recursion principle is usually easy to describe: given any type equipped with the same structure with which the constructors equip the higher inductive type in question, there is a function which maps the constructors to that structure. For instance, in the case of , the recursion principle says that given any type equipped with a point and a path , there is a function such that and .
The latter two equalities are the computation rules. There is, however, a question of whether these computation rules are judgmental equalities or propositional equalities (paths). For ordinary inductive types, we had no qualms about making them judgmental, although we saw in http://planetmath.org/node/87578Chapter 5 that making them propositional would still yield the same type up to equivalence. In the ordinary case, one may argue that the computation rules are really definitional equalities, in the intuitive sense described in the Introduction.
For higher inductive types, this is less clear. Moreover, since the operation is not really a fundamental part of the type theory, but something that we defined using the induction principle of identity types (and which we might have defined in some other, equivalent, way), it seems inappropriate to refer to it explicitly in a judgmental equality. Judgmental equalities are part of the deductive system, which should not depend on particular choices of definitions that we may make within that system. There are also semantic and implementation issues to consider; see the Notes (http://planetmath.org/chapter6notes).
It does seem unproblematic to make the computational rules for the point constructors of a higher inductive type judgmental. In the example above, this means we have , judgmentally. This choice facilitates a computational view of higher inductive types. Moreover, it also greatly simplifies our lives, since otherwise the second computation rule would not even be well-typed as a propositional equality; we would have to compose one side or the other with the specified identification of with . (Such problems do arise eventually, of course, when we come to talk about paths of higher dimension, but that will not be of great concern to us here. See also §6.7 (http://planetmath.org/67hubsandspokes).) Thus, we take the computation rules for point constructors to be judgmental, and those for paths and higher paths to be propositional.11In particular, in the language of §1.1 (http://planetmath.org/11typetheoryversussettheory), this means that our higher inductive types are a mix of rules (specifying how we can introduce such types and their elements, their induction principle, and their computation rules for point constructors) and axioms (the computation rules for path constructors, which assert that certain identity types are inhabited by otherwise unspecified terms). We may hope that eventually, there will be a better type theory in which higher inductive types, like univalence, will be presented using only rules and no axioms.
Recall that for ordinary inductive types, we regard the computation rules for a recursively defined function as not merely judgmental equalities, but definitional ones, and thus we may use the notation for them. For instance, the truncated predecessor function is defined by and . In the case of higher inductive types, this sort of notation is reasonable for the point constructors (e.g. ), but for the path constructors it could be misleading, since equalities such as are not judgmental. Thus, we hybridize the notations, writing instead for this sort of “propositional equality by definition”.
Now, what about the induction principle (the dependent eliminator)? Recall that for an ordinary inductive type , to prove by induction that , we must specify, for each constructor of , an operation on which acts on the “fibers” above that constructor in . For instance, if is the natural numbers , then to prove by induction that , we must specify
An element in the fiber over the constructor , and
For each , a function .
The second can be viewed as a function “” lying over the constructor , generalizing how lies over the constructor .
By analogy, therefore, to prove that , we should specify
An element in the fiber over the constructor , and
A path from to “lying over the constructor ”.
Note that even though contains paths other than (such as and ), we only need to specify a path lying over the constructor itself. This expresses the intuition that is “freely generated” by its constructors.
The question, however, is what it means to have a path “lying over” another path. It definitely does not mean simply a path , since that would be a path in the fiber (topologically, a path lying over the constant path at ). Actually, however, we have already answered this question in http://planetmath.org/node/87569Chapter 2: in the discussion preceding Lemma 2.3.4 (http://planetmath.org/23typefamiliesarefibrations#Thmprelem3) we concluded that a path from to lying over can be represented by a path in the fiber . Since we will have a lot of use for such dependent paths in this chapter, we introduce a special notation for them:
There are other possible ways to define dependent paths. For instance, instead of we could consider . We could also obtain it as a special case of a more general “heterogeneous equality”, or with a direct definition as an inductive type family. All these definitions result in equivalent types, so in that sense it doesn’t much matter which we pick. However, choosing as the definition makes it easiest to conclude other things about dependent paths, such as the fact that produces them, or that we can compute them in particular type families using the transport lemmas in §2.5 (http://planetmath.org/25thehighergroupoidstructureoftypeformers).
With the notion of dependent paths in hand, we can now state more precisely the induction principle for : given and
An element , and
A path ,
there is a function such that and . As in the non-dependent case, we speak of defining by and .
When describing an application of this induction principle informally, we regard it as a splitting of the goal “ for all ” into two cases, which we will sometimes introduce with phrases such as “when is ” and “when varies along ”, respectively. There is no specific mathematical meaning assigned to “varying along a path”: it is just a convenient way to indicate the beginning of the corresponding section of a proof; see Lemma 6.4.2 (http://planetmath.org/64circlesandspheres#Thmprelem2) for an example.
Topologically, the induction principle for can be visualized as shown in Figure 6.1 (http://planetmath.org/62inductionprinciplesanddependentpaths#S0.F1). Given a fibration over the circle (which in the picture is a torus), to define a section of this fibration is the same as to give a point in the fiber over along with a path from to lying over . The way we interpret this type-theoretically, using our definition of dependent paths, is shown in Figure 6.2 (http://planetmath.org/62inductionprinciplesanddependentpaths#S0.F2): the path from to over is represented by a path from to in the fiber over .
Of course, we expect to be able to prove the recursion principle from the induction principle, by taking to be a constant type family. This is in fact the case, although deriving the non-dependent computation rule for (which refers to ) from the dependent one (which refers to ) is surprisingly a little tricky.
If is a type together with and , then there is a function with
We would like to apply the induction principle of to the constant type family, . The required hypotheses for this are a point of , which we have (namely ), and a dependent path in , or equivalently . This latter type is not the same as the type where lives, but it is equivalent to it, because by Lemma 2.3.5 (http://planetmath.org/23typefamiliesarefibrations#Thmprelem4) we have . Thus, given and , we can consider the composite
Applying the induction principle, we obtain such that
It remains to derive the equality . However, by Lemma 2.3.8 (http://planetmath.org/23typefamiliesarefibrations#Thmprelem5), we have
We also have a corresponding uniqueness principle.
If is a type and are two maps together with two equalities :
Then for all we have .
This is just the induction principle for the type family . ∎
These two lemmas imply the expected universal property of the circle:
For any type we have a natural equivalence
We have a canonical function defined by . The induction principle shows that the fibers of are inhabited, while the uniqueness principle shows that they are mere propositions. Hence they are contractible, so is an equivalence. ∎
As in §5.5 (http://planetmath.org/55homotopyinductivetypes), we can show that the conclusion of Lemma 6.2.7 (http://planetmath.org/62inductionprinciplesanddependentpaths#Thmprelem3) is equivalent to having an induction principle with propositional computation rules. Other higher inductive types also satisfy lemmas analogous to Lemma 6.2.5 (http://planetmath.org/62inductionprinciplesanddependentpaths#Thmprelem1),Lemma 6.2.7 (http://planetmath.org/62inductionprinciplesanddependentpaths#Thmprelem3); we will generally leave their proofs to the reader. We now proceed to consider many examples.
|Title||6.2 Induction principles and dependent paths|