$$text{with the equality}quad text{ind}_{=_A}(C,c,x,x,text{refl}_x):equiv c(x)$$ my first impression was that this last expression does not define the resulting function $$f:prod_{x,y:A}prod_{p:x=_Ay} C(x,y,p),$$ but just states its property. That is in contrast to previous examples of the induction principles $text{ind}_{Atimes B}$,$text{ind}_{A+B}$ or $text{ind}_mathbb{N}$ — there are defining equations for those elements — we actually know how to construct the resulting function, given the premises. Which is in agreement with the “constructiveness” of type theory adverted throughout the chapter. Going back to $text{ind}_{=_A}$, I was suspicious about the fact that (looks like) it is not defined. Stating that the element $f$ just exists seemed out of tune with the rest of the chapter. And indeed, the section 1.12.1 seems to stress that my impression is wrong and we in fact have defined
… the function $f:prod_{x,y:A}prod_{p:x=_Ay} C(x,y,p),$ defined by
path induction from $c:prod_{x:A}C(x,x,text{refl}_x)$, which moreover
satisfies $f(x,x,text{refl}_x):equiv c(x)$ …
That leaves me utterly confused, but I have a feeling that this point is very important for all the further developments. So which of the two readings for $text{ind}_{=_A}$ should I go with? Or, probably, I’m missing some important subtlety and the answer is “neither”?
Asked By : Kostya
Answered By : Andrej Bauer
- The same will hold for the identity type, because every closed term of an identity type will be judgmentally equal to some $mathrm{refl}(a)$, and so then the equation for $mathrm{ind}_{=_A}$ will tell us how to compute.
- Just because we know how to compute with closed terms of a type, that does not mean we have actually defined anything because there is more to a type than its closed terms, as I tried to explain once.
For example, Martin-Löf type theory (without the identity types) can be interpreted domain-theoretically in such a way that $1$ contains two elements $bot$ and $top$, where $top$ corresponds to $star$ and $bot$ to non-termination. Alas, since there is no way to write down a non-terminating expression in type theory, $bot$ cannot be named. Consequently, the equation for $mathrm{ind}_1$ does not tell us how to compute on $bot$ (the two obvious choices being “eagerly” and “lazily”). In software engineering terms, I would say we have a confusion between specification and implementation. The HoTT axioms for the identity types are a specification. The equation $mathrm{ind}_{=_C}(C,c,x,x,mathrm{refl}(x)) equiv c(x)$ is not telling us how to compute with, or how to construct $mathrm{ind}_{=_C}$, but rather that however $mathrm{ind}_{=_C}$ is “implemented”, we require that it satisfy the equation. It is a separate question whether such $mathrm{ind}_{=_C}$ can be obtained in a constructive fashion. Lastly, I am a bit weary of how you use the word “constructive”. It looks as if you think that “constructive” is the same as “defined”. Under that interpretation the Halting oracle is constructive, because its behavior is defined by the requirement we impose on it (namely that it output 1 or 0 according to whether the given machine halts). It is prefectly possible to describe objects which only exist in a non-constructive setting. Conversely, it is perfectly possible to speak constructively about properties and other things that cannot actually be computed. Here is one: the relation $H subseteq mathbb{N} times {0,1}$ defined by $$H(n,d) iff (d = 1 Rightarrow text{$n$-th machine halts}) land (d = 0 Rightarrow text{$n$-th machine diverges})$$ is constructive, i.e., there is nothing wrong with this definition from a constructive point of view. It just so happens that constructively one cannot show that $H$ is a total relation, and its characteristic map $chi_H : mathbb{N} times {0,1} to mathsf{Prop}$ does not factor through $mathtt{bool}$, so we cannot “compute” its values. Addendum: The title of your question is “Is path induction constructive?” After having cleared up the difference between “constructive” and “defined”, we can answer the question. Yes, path induction is known to be constructive in certain cases:
- If we restrict to type theory without Univalence so that we can show strong normalization, then path induction and everything else is constructive because there are algorithms that perform the normalization procedure.
- There are realizability models of type theory, which explain how every closed term in type theory corresponds to a Turing machine. However, these models satisfy Streicher’s Axiom K, which rules out Univalence.
- There is a translation of type theory (again without Univalence) into constructive set theory CZF. Once again, this validates Streicher’s axiom K.
- There is a groupoid model inside realizability models which allows us to interpret type theory without Streicher’s K. This is preliminary work by Steve Awodey and myself.
We really need to sort out the constructive status of Univalence.
Best Answer from StackOverflow
Question Source : http://cs.stackexchange.com/questions/28701