I am currently reading the HoTT book and came across exercise 3.14:
Show that assuming $\mathrm{LEM}$, the double negation $\neg \neg A$ has the same universal property as the propositional truncation $\| A \|$, and is therefore equivalent to it. Thus, under $\mathrm{LEM}$, the propositional truncation can be defined rather than taken as a separate type former.
The rules governing the truncation are:
Formation
- For every type A, $\|A\|$ is a type
Introduction
- For any $a:A$ we have $ |a| : \| A \|$.
- For any $x,y:\| A\|$, we have $x=y$.
Elimination resp. Recursion
- If $B$ is a mere proposition and we have $f:A\to B$, then there is an induced $g:\| A\| \to B$ such that $g(|a|) \equiv f(a)$ for all $a:A$.
My Problem
To proof the recursion principle for $\neg \neg A$ we first fix some $f:A\to B$ and then need to define $g:\neg\neg A\to B$. I don't know how to do that.
There are ways to use $\mathrm{lem:LEM}$, but I have no idea how to convert this terms (to assert judgemental equality), as $\mathrm{lem}$ is a primitive constant.
There is a solution in the Github folder HoTT/HoTT/contrib/HoTTBookExercises.v, that is programmed in Coq. Although I understood the argumentation I still don't see why it should be sufficient to proof $\neg\neg A \simeq \|A\|$ as we would end up with a propositional equality again.
I would really appreciate any help. Thanks in advance.
Best regards, Philipp
EDIT: I assume that $$\mathrm{LEM}=\mathrm{LEM}_{-1}=\prod_{A:\mathcal{U}}\mathrm{isprop}(A)\to A+\neg A. $$ just like the book does.