6.13 The general syntax of higher inductive definitions
In §5.6 (http://planetmath.org/56thegeneralsyntaxofinductivedefinitions), we discussed the conditions on a putative “inductive definition” which make it acceptable, namely that all inductive occurrences of the type in its constructors are “strictly positive”. In this section^{}, we say something about the additional conditions required for higher inductive definitions. Finding a general syntactic description of valid higher inductive definitions is an area of current research, and all of the solutions proposed to date are somewhat technical in nature; thus we only give a general description and not a precise definition. Fortunately, the corner cases never seem to arise in practice.
Like an ordinary inductive definition, a higher inductive definition is specified by a list of constructors, each of which is a (dependent) function. For simplicity, we may require the inputs of each constructor to satisfy the same condition as the inputs for constructors of ordinary inductive types. In particular, they may contain the type being defined only strictly positively. Note that this excludes definitions such as the $0$truncation as presented in §6.9 (http://planetmath.org/69truncations), where the input of a constructor contains not only the inductive type being defined, but its identity type as well. It may be possible to extend the syntax to allow such definitions; but also, in §7.3 (http://planetmath.org/73truncations) we will give a different construction of the $0$truncation whose constructors do satisfy the more restrictive condition.
The only difference^{} between an ordinary inductive definition and a higher one, then, is that the output type of a constructor may be, not the type being defined ($W$, say), but some identity type of it, such as $u{=}_{W}v$, or more generally an iterated identity type such as $p{=}_{(u{=}_{W}v)}q$. Thus, when we give a higher inductive definition, we have to specify not only the inputs of each constructor, but the expressions $u$ and $v$ (or $u$, $v$, $p$, and $q$, etc.) which determine the source and target of the path being constructed.
Importantly, these expressions may refer to other constructors of $W$. For instance, in the definition of ${\mathbb{S}}^{1}$, the constructor $\mathrm{\U0001d5c5\U0001d5c8\U0001d5c8\U0001d5c9}$ has both $u$ and $v$ being $\mathrm{\U0001d5bb\U0001d5ba\U0001d5cc\U0001d5be}$, the previous constructor. To make sense of this, we require the constructors of a higher inductive type to be specified in order, and we allow the source and target expressions $u$ and $v$ of each constructor to refer to previous constructors, but not later ones. (Of course, in practice the constructors of any inductive definition are written down in some order, but for ordinary inductive types that order is irrelevant.)
Note that this order is not necessarily the order of “dimension”: in principle, a 1dimensional path constructor could refer to a 2dimensional one and hence need to come after it. However, we have not given the 0dimensional constructors (point constructors) any way to refer to previous constructors, so they might as well all come first. And if we use the hubandspoke construction (§6.7 (http://planetmath.org/67hubsandspokes)) to reduce all constructors to points and 1paths, then we might assume that all point constructors come first, followed by all 1path constructors — but the order among the 1path constructors continues to matter.
The remaining question is, what sort of expressions can $u$ and $v$ be? We might hope that they could be any expression at all involving the previous constructors. However, the following example shows that a naive approach to this idea does not work.
Example 6.13.1.
Consider a family of functions $f\mathrm{:}{\mathrm{\prod}}_{\mathrm{(}X\mathrm{:}\mathrm{U}\mathrm{)}}\mathrm{(}X\mathrm{\to}X\mathrm{)}$. Of course, ${f}_{X}$ might be just ${\mathrm{id}}_{X}$ for all $X$, but other such $f$s may also exist. For instance, nothing prevents ${f}_{\mathrm{2}}\mathrm{:}\mathrm{2}\mathrm{\to}\mathrm{2}$ from being the nonidentity automorphism^{} (see http://planetmath.org/node/87835Exercise 6.9).
Now suppose that we attempt to define a higher inductive type $K$ generated by:

•
two elements $a,b:K$, and

•
a path $\sigma :{f}_{K}(a)={f}_{K}(b)$.
What would the induction^{} principle for $K$ say? We would assume a type family $P\mathrm{:}K\mathrm{\to}\mathrm{U}$, and of course we would need $x\mathrm{:}P\mathit{}\mathrm{(}a\mathrm{)}$ and $y\mathrm{:}P\mathit{}\mathrm{(}b\mathrm{)}$. The remaining datum should be a dependent path in $P$ living over $\sigma $, which must therefore connect some element of $P\mathit{}\mathrm{(}{f}_{K}\mathit{}\mathrm{(}a\mathrm{)}\mathrm{)}$ to some element of $P\mathit{}\mathrm{(}{f}_{K}\mathit{}\mathrm{(}b\mathrm{)}\mathrm{)}$. But what could these elements possibly be? We know that $P\mathit{}\mathrm{(}a\mathrm{)}$ and $P\mathit{}\mathrm{(}b\mathrm{)}$ are inhabited by $x$ and $y$, respectively, but this tells us nothing about $P\mathit{}\mathrm{(}{f}_{K}\mathit{}\mathrm{(}a\mathrm{)}\mathrm{)}$ and $P\mathit{}\mathrm{(}{f}_{K}\mathit{}\mathrm{(}b\mathrm{)}\mathrm{)}$.
Clearly some condition on $u$ and $v$ is required in order for the definition to be sensible. It seems that, just as the domain of each constructor is required to be (among other things) a covariant functor^{}, the appropriate condition on the expressions $u$ and $v$ is that they define natural transformations. Making precise sense of this requirement is beyond the scope of this book, but informally it means that $u$ and $v$ must only involve operations^{} which are preserved by all functions between types.
For instance, it is permissible for $u$ and $v$ to refer to concatenation of paths, as in the case of the final constructor of the torus in §6.6 (http://planetmath.org/66cellcomplexes), since all functions in type theory^{} preserve path concatenation (up to homotopy^{}). However, it is not permissible for them to refer to an operation like the function $f$ in Example 6.13.1 (http://planetmath.org/613thegeneralsyntaxofhigherinductivedefinitions#Thmpreeg1), which is not necessarily natural: there might be some function $g:X\to Y$ such that ${f}_{Y}\circ g\ne g\circ {f}_{X}$. (Univalence implies that ${f}_{X}$ must be natural with respect to all equivalences, but not necessarily with respect to functions that are not equivalences.)
The intuition of naturality supplies only a rough guide for when a higher inductive definition is permissible. Even if it were possible to give a precise specification of permissible forms of such definitions in this book, such a specification would probably be out of date quickly, as new extensions^{} to the theory are constantly being explored. For instance, the presentation^{} of $n$spheres in terms of “dependent $n$loops” referred to in §6.4 (http://planetmath.org/64circlesandspheres), and the “higher inductiverecursive definitions” used in http://planetmath.org/node/87585Chapter 11, were innovations introduced while this book was being written. We encourage the reader to experiment — with caution.
Title  6.13 The general syntax of higher inductive definitions 
\metatable 