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 inductionMathworldPlanetmath 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 structureMathworldPlanetmath 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 π•Š1, the recursion principle says that given any type B equipped with a point b:B and a path β„“:b=b, there is a function f:π•Š1β†’B such that f⁒(π–»π–Ίπ—Œπ–Ύ)=b and 𝖺𝗉f⁒(π—…π—ˆπ—ˆπ—‰)=β„“.

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 operationMathworldPlanetmath 𝖺𝗉f is not really a fundamental part of the type theoryPlanetmathPlanetmath, but something that we defined using the induction principle of identity types (and which we might have defined in some other, equivalentMathworldPlanetmathPlanetmathPlanetmathPlanetmath, 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 f⁒(π–»π–Ίπ—Œπ–Ύ)≑b, judgmentally. This choice facilitates a computational view of higher inductive types. Moreover, it also greatly simplifies our lives, since otherwise the second computation rule 𝖺𝗉f⁒(π—…π—ˆπ—ˆπ—‰)=β„“ 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 f⁒(π–»π–Ίπ—Œπ–Ύ) with b. (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 languagePlanetmathPlanetmath 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.

Remark 6.2.1.

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 p:Nβ†’N is defined by p(0):≑0 and p(succ(n)):≑n. In the case of higher inductive types, this sort of notation is reasonable for the point constructors (e.g.Β f(base):≑b), but for the path constructors it could be misleading, since equalities such as f(loop)=β„“ are not judgmental. Thus, we hybridize the notations, writing instead f(loop):=β„“ for this sort of β€œpropositional equality by definition”.

Now, what about the induction principle (the dependent eliminator)? Recall that for an ordinary inductive type W, to prove by induction that ∏(x:W)P⁒(x), we must specify, for each constructor of W, an operation on P which acts on the β€œfibers” above that constructor in W. For instance, if W is the natural numbersMathworldPlanetmath β„•, then to prove by induction that ∏(x:β„•)P⁒(x), we must specify

  • β€’

    An element b:P⁒(0) in the fiber over the constructor 0:β„•, and

  • β€’

    For each n:β„•, a function P⁒(n)β†’P⁒(π—Œπ—Žπ–Όπ–Όβ’(n)).

The second can be viewed as a function β€œPβ†’P” lying over the constructor π—Œπ—Žπ–Όπ–Ό:β„•β†’β„•, generalizing how b:P⁒(0) lies over the constructor 0:β„•.

By analogyMathworldPlanetmath, therefore, to prove that ∏(x:π•Š1)P⁒(x), we should specify

  • β€’

    An element b:P⁒(π–»π–Ίπ—Œπ–Ύ) in the fiber over the constructor π–»π–Ίπ—Œπ–Ύ:π•Š1, and

  • β€’

    A path from b to b β€œlying over the constructor π—…π—ˆπ—ˆπ—‰:π–»π–Ίπ—Œπ–Ύ=π–»π–Ίπ—Œπ–Ύβ€.

Note that even though π•Š1 contains paths other than π—…π—ˆπ—ˆπ—‰ (such as π—‹π–Ύπ–Ώπ—…π–»π–Ίπ—Œπ–Ύ and π—…π—ˆπ—ˆπ—‰β’\centerdotβ’π—…π—ˆπ—ˆπ—‰), we only need to specify a path lying over the constructor itself. This expresses the intuition that π•Š1 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 b=b, since that would be a path in the fiber P⁒(π–»π–Ίπ—Œπ–Ύ) (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 u:P⁒(x) to v:P⁒(y) lying over p:x=y can be represented by a path p*(u)=v in the fiber P⁒(y). Since we will have a lot of use for such dependent paths in this chapter, we introduce a special notation for them:

(u=pPv):≑(π—π—‹π–Ίπ—‡π—Œπ—‰π—ˆπ—‹π—P(p,u)=v). (6.2.2)
Remark 6.2.3.

There are other possible ways to define dependent paths. For instance, instead of p*(u)=v we could consider u=(p-1)*(v). 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 p*(u)=v as the definition makes it easiest to conclude other things about dependent paths, such as the fact that apdf 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 π•Š1: given P:π•Š1→𝒰 and

  • β€’

    An element b:P⁒(π–»π–Ίπ—Œπ–Ύ), and

  • β€’

    A path β„“:b=π—…π—ˆπ—ˆπ—‰Pb,

there is a function f:∏(x:π•Š1)P⁒(x) such that f⁒(π–»π–Ίπ—Œπ–Ύ)≑b and 𝖺𝗉𝖽f(π—…π—ˆπ—ˆπ—‰)=β„“. As in the non-dependent case, we speak of defining f by f(π–»π–Ίπ—Œπ–Ύ):≑b and 𝖺𝗉𝖽f(π—…π—ˆπ—ˆπ—‰):=β„“.

Remark 6.2.4.

When describing an application of this induction principle informally, we regard it as a splitting of the goal β€œP⁒(x) for all x:S1” into two cases, which we will sometimes introduce with phrases such as β€œwhen x is base” and β€œwhen x varies along loop”, 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 sectionPlanetmathPlanetmathPlanetmathPlanetmathPlanetmath of a proof; see Lemma 6.4.2 (http://planetmath.org/64circlesandspheres#Thmprelem2) for an example.

Topologically, the induction principle for π•Š1 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 b in the fiber over π–»π–Ίπ—Œπ–Ύ along with a path from b to b 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 b to b over π—…π—ˆπ—ˆπ—‰ is represented by a path from π—…π—ˆπ—ˆπ—‰*(b) to b in the fiber over π–»π–Ίπ—Œπ–Ύ.



FigureΒ 6.1: The topological induction principle for π•Š1


FigureΒ 6.2: The type-theoretic induction principle for π•Š1

Of course, we expect to be able to prove the recursion principle from the induction principle, by taking P to be a constant type family. This is in fact the case, although deriving the non-dependent computation rule for π—…π—ˆπ—ˆπ—‰ (which refers to 𝖺𝗉f) from the dependent one (which refers to 𝖺𝗉𝖽f) is surprisingly a little tricky.

Lemma 6.2.5.

If A is a type together with a:A and p:a=Aa, then there is a function f:S1β†’A with

f⁒(π–»π–Ίπ—Œπ–Ύ) :≑a
𝖺𝗉f⁒(π—…π—ˆπ—ˆπ—‰) :=p.

We would like to apply the induction principle of π•Š1 to the constant type family, (Ξ»x.A):π•Š1→𝒰. The required hypotheses for this are a point of (Ξ»x.A)(π–»π–Ίπ—Œπ–Ύ)≑A, which we have (namely a:A), and a dependent path in a=π—…π—ˆπ—ˆπ—‰x↦Aa, or equivalently π—π—‹π–Ίπ—‡π—Œπ—‰π—ˆπ—‹π—x↦A⁒(π—…π—ˆπ—ˆπ—‰,a)=a. This latter type is not the same as the type a=Aa where p lives, but it is equivalent to it, because by Lemma 2.3.5 (http://planetmath.org/23typefamiliesarefibrations#Thmprelem4) we have π—π—‹π–Ίπ—‡π—Œπ—‰π—ˆπ—‹π—π–Όπ—ˆπ—‡π—Œπ—π—…π—ˆπ—ˆπ—‰A⁒(a):π—π—‹π–Ίπ—‡π—Œπ—‰π—ˆπ—‹π—x↦A⁒(π—…π—ˆπ—ˆπ—‰,a)=a. Thus, given a:A and p:a=a, we can consider the composite


Applying the induction principle, we obtain f:π•Š1β†’A such that

f⁒(π–»π–Ίπ—Œπ–Ύ) ≑a  and (6.2.6)
𝖺𝗉𝖽f⁒(π—…π—ˆπ—ˆπ—‰) =π—π—‹π–Ίπ—‡π—Œπ—‰π—ˆπ—‹π—π–Όπ—ˆπ—‡π—Œπ—π—…π—ˆπ—ˆπ—‰A⁒(a)⁒\centerdot⁒p. (6.2.6)

It remains to derive the equality 𝖺𝗉f⁒(π—…π—ˆπ—ˆπ—‰)=p. However, by Lemma 2.3.8 (http://planetmath.org/23typefamiliesarefibrations#Thmprelem5), we have


Combining this withΒ (6.2.6) and canceling the occurrences of π—π—‹π–Ίπ—‡π—Œπ—‰π—ˆπ—‹π—π–Όπ—ˆπ—‡π—Œπ— (which are the same byΒ (6.2.6)), we obtain 𝖺𝗉f⁒(π—…π—ˆπ—ˆπ—‰)=p. ∎

We also have a corresponding uniqueness principle.

Lemma 6.2.6.

If A is a type and f,g:S1β†’A are two maps together with two equalities p,q:

p:f⁒(π–»π–Ίπ—Œπ–Ύ) =Ag⁒(π–»π–Ίπ—Œπ–Ύ),
q:f(π—…π—ˆπ—ˆπ—‰) =pλ⁒x.x=Axg(π—…π—ˆπ—ˆπ—‰).

Then for all x:S1 we have f⁒(x)=g⁒(x).


This is just the induction principle for the type family P(x):≑(f(x)=g(x)). ∎

These two lemmas imply the expected universal propertyMathworldPlanetmath of the circle:

Lemma 6.2.7.

For any type A we have a natural equivalence


We have a canonical function f:(π•Š1β†’A)β†’βˆ‘(x:A)(x=x) defined by f(g):≑(g(π–»π–Ίπ—Œπ–Ύ),g(π—…π—ˆπ—ˆπ—‰)). The induction principle shows that the fibers of f are inhabited, while the uniqueness principle shows that they are mere propositions. Hence they are contractible, so f is an equivalence. ∎

As in Β§5.5 (http://planetmath.org/55homotopyinductivetypes), we can show that the conclusionMathworldPlanetmath 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