% This is the exercise solution document for the homotopy type theory book. % This file supports two book sizes: % - Letter size (8.5" x 11") % - US Trade size (6" x 9") % % To activate one or the other, uncomment the appropriate font size in % the documentclass below, and then one of the two page geometry incantations % % NOTE: The 6" x 9" format is only experimental. It will break the % title page, for example. \PassOptionsToPackage{table}{xcolor} % DOCUMENT CLASS \documentclass[ % %10pt % for US Trade 6" x 9" book % 11pt % for Letter size book ]{article} \usepackage{etex} % We're running out of registers and dimensions, or some such \newcounter{chapter} % So that macros.tex doesn't choke % PAGE GEOMETRY % % Uncomment one of these % We make the page 40pt taller than the standard LaTeX book. % OPTION 1: Letter \usepackage[papersize={8.5in,11in}, twoside, includehead, top=1in, bottom=1in, inner=0.75in, outer=1.0in, bindingoffset=0.35in]{geometry} % OPTION 2: US Trade % \usepackage[papersize={6in,9in}, % twoside, % includehead, % top=0.75in, % bottom=0.75in, % inner=0.5in, % outer=0.75in, % bindingoffset=0.35in]{geometry} % HYPERLINKING AND PDF METADATA \usepackage[pagebackref, colorlinks, citecolor=darkgreen, linkcolor=darkgreen, unicode, pdfauthor={Univalent Foundations Program}, pdftitle={Homotopy Type Theory: Univalent Foundations of Mathematics}, pdfsubject={Mathematics}, pdfkeywords={type theory, homotopy theory, univalence axiom}]{hyperref} % OTHER PACKAGES % Use this package and stick \layout somewhere in the text to see % page margins, text size and width etc. Useful for debugging page format. %\usepackage{layout} %%% Because Germans have umlauts and Slavs have even stranger ways of mangling letters \usepackage[utf8]{inputenc} %%% For table {tab:theorems} \usepackage{pifont} %%% Multi-Columns for long lists of names \usepackage{multicol} %%% Set the fonts \usepackage{mathpazo} \usepackage[scaled=0.95]{helvet} \usepackage{courier} \linespread{1.05} % Palatino looks better with this \usepackage{graphicx} \DeclareGraphicsExtensions{.png} \input{bmpsize-hack} % for bounding boxes in dvi mode \usepackage{comment} \usepackage{wallpaper} % For the background image on the cover page \usepackage{fancyhdr} % To set headers and footers \usepackage{nextpage} % So we can jump to odd-numbered pages \usepackage{amssymb,amsmath,amsthm,stmaryrd,mathrsfs,wasysym} \usepackage{enumitem,mathtools,xspace} \usepackage{xcolor} % For colored cells in tables we need \cellcolor \usepackage{booktabs} % For nice tables \usepackage{array} % For nice tables \usepackage{supertabular} % For index of symbols \definecolor{darkgreen}{rgb}{0,0.45,0} \usepackage{aliascnt} \usepackage[capitalize]{cleveref} \usepackage[all,2cell]{xy} \UseAllTwocells \usepackage{braket} % used for \setof{ ... } macro \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} \usepackage{etoolbox} % hacking commands for TOC \usepackage{mathpartir} % for formal.tex appendix, section 3 \usepackage[numbered]{bookmark} % add chapter/section numbers to the toc in the pdf metadata \input{macros} %%%% Indexing \usepackage{makeidx} \makeindex %%%% Header and footers \pagestyle{fancyplain} \setlength{\headheight}{15pt} \renewcommand{\sectionmark}[1]{\markright{\textsc{\thesection\ #1}}} \newcommand{\transfun}[3]{\mathcal{I}_{#1}(#2, #3)} \newcommand{\nathom}[2]{\mathsf{nat}_{#1}(#2)} \newcommand{\Tgh}[2]{\mathcal{T}_1(#1,#2)} \newcommand{\T}[2]{\mathcal{T}_2(#1,#2)} \newcommand{\TT}[2]{\mathcal{T}_3(#1,#2)} \newcommand{\I}{\mathcal{I}_1} \newcommand{\II}{\mathcal{I}_2} \newcommand{\hapfuneq}{\mathsf{happly}\mbox{-}\mathsf{funext}\mbox{-}\mathsf{inv}} \lhead[\fancyplain{}{{\thepage}}]% {\fancyplain{}{\nouppercase{\rightmark}}} \rhead[\fancyplain{}{\nouppercase{\leftmark}}]% {\fancyplain{}{\thepage}} \cfoot{\textsc{\scriptsize \textcolor{gray}{[Draft of \today]}}} \lfoot[]{} \rfoot[]{} %%%% Chapter & part style \usepackage{titlesec} \titleformat{\part}[display]{\fontsize{40}{40}\fontseries{m}\fontshape{sc}\selectfont}{\hfil\partname\ \Roman{part}}{20pt}{\fontsize{60}{60}\fontseries{b}\fontshape{sc}\selectfont\hfil} \titleformat{\chapter}[display]{\fontsize{23}{25}\fontseries{m}\fontshape{it}\selectfont}{\chaptertitlename\ \thechapter}{20pt}{\fontsize{35}{35}\fontseries{b}\fontshape{n}\selectfont} \input{main.labels} \title{Solutions to selected exercises} \begin{document} \maketitle \section*{Exercises from \cref{cha:typetheory}} \subsection*{Solution to \cref{ex:composition}} We of course know what composition of functions $f : A \to B$ and $g : B \to C$ should be, but let us see how we might derive it by considering available forms of construction. We want a term \[ g \circ f \defeq (\Box : A \to C), \] where $\Box : A \to C$ indicates that in place of $\Box$ we would like to put something of type $A \to C$. Since we are defining a function whose domain is $A$, we expect it to be of the form \[ g \circ f \defeq \lam{x:A} (\Box : C), \] so now we are looking for something of type $C$, with $x$, $f$ and $g$ available. Of these $g$ looks most promising as it lands in $C$: \[ g \circ f \defeq \lam{x:A} g (\Box : B). \] Now we repeat the same trick with $f$ to get \[ g \circ f \defeq \lam{x:A} g(f(\Box : A)). \] Inside the abstraction $x$ is available and has the type we need, so we define \begin{equation} \label{eq:composdef} g \circ f \defeq \lam{x:A} g(f(x)) : C \end{equation} % This baby example demonstrates how one often works with a proof assistant: look at what you need and what is available, and try to make some progress. Now, suppose given also $h : C \to D$. We have, according to \cref{eq:composdef}, % \begin{align*} h \circ (g \circ f) &\jdeq \lamu{x:A} h ((\lam{y:A} g(f(y))) x)\\ &\jdeq \lamu{x:A} h(g(f(x))), \end{align*} % and % \begin{align*} (h \circ g) \circ f & \jdeq \lamu{x:A} (\lam{y:A} h(g(y))) (f(x))\\ & \jdeq \lamu{x:A} h(g(f(x))). \end{align*} % They are equal, which establishes associativity of composition. \subsection*{Solution to \cref{ex:pr-to-rec}} If we suppose given only $\fst : A \times B \to A$ and $\snd : A \times B \to B$ satisfying $\fst(\tup{a}{b}) \jdeq a$ and $\snd(\tup{a}{b})\jdeq b$, we can define $\rec{A\times B}'$ by \[ \rec{A\times B}'(C,g,x) \defeq g (\fst x) (\snd x). \] We can now verify, given $C:\UU$, $g:A\to B \to C$ and $(a,b):A\times B$, \begin{align*} \rec{A\times B}'(C,g,(a,b)) &\jdeq g (\fst (a,b)) (\snd (a,b))\\ &\jdeq g (a) (b). \end{align*} % For $\Sigma$-types we replace $A \times B$ above with $\sm{a:A} B(a)$, but otherwise everything else stays the same: \[ \rec{\sm{x:A} B(x)}'(C,g,x) \defeq g (\fst x) (\snd x). \] \subsection*{Solution to \cref{ex:pr-to-ind}} Quite naturally, we form \[ \ind{A\times B}''(C,g,x) \defeq g (\fst x) (\snd x),\] of type \[ \prd{C:A\times B \to \UU}\Parens{\prd{y:A}\prd{z:B} C(\tup yz)} \to \prd{x : A \times B} C (\tup{\fst x}{\snd x}). \] This is not quite what we need because $\ind{A\times B}$ has the type \[ \prd{C:A\times B \to \UU}\Parens{\prd{y:A}\prd{z:B} C(\tup{y}{z})} \to \prd{x : A \times B} C (x). \] % Recall that we have the propositional uniqueness principle % \[ \uniq{A\times B}: \prd{x : A \times B} (\id[A\times B]{\tup{\fst x}{\snd x}}{x}), \] % satisfying $\id{\uniq{A\times B}(\tup{a}{b})}{\refl{(a,b)}}$. We can transport along $\uniq{A\times B}(x)$ to get from $C(\tup{\fst x}{\snd x})$ to $C(x)$: % \[ \ind{A\times B}'(C,g,x) \defeq \transfib{C}{\uniq{A\times B}(x)}{\ind{A \times B}''(C, g, x)}. \] % It remains to verify that $\ind{A \times B}'(C, g, x)$ behaves as expected: % \begin{align*} \ind{A \times B}'(C,g,(a,b)) &\jdeq \transfib{C}{\uniq{A\times B}(\tup{a}{b})}{g(\fst \tup{a}{b})(\snd\tup{a}{b})} \\ &\jdeq \transfib{C}{\uniq{A\times B}(\tup{a}{b})}{g(a)(b)} \\ &\jdeq \transfib{C}{\refl{\tup ab}}{g(a)(b)} \\ &\jdeq g(a)(b). \end{align*} % Now for $\Sigma$-types the exact same expressions work as well, except that the types change. \section*{Exercises from \cref{cha:basics}} \subsection*{Solution to \cref{ex:npaths}} In general, when defining an ``$n$-foo'', one should ensure that a ``$1$-foo'' is just a ``foo'' (e.g.\ a 1-category is just a category). In this case, a $1$-path in some type $A$ should just be a path, that is, an equality $\id[A] xy$ between some elements $x,y:A$. Then a 0-path should probably be an element of $A$. We also know that a $2$-path, or homotopy, is a pair of $1$-paths and an equality between them. Our definition should extrapolate from this pattern. Define $C\defeq \lam{n}\type\to\type$. By the induction principle for $\nat$, it suffices to give terms \begin{gather*} c_0 : \type\to\type \\ c_s : \prd{n:\nat}\prd{f:\type\to\type}\type\to\type \end{gather*} Define these by \begin{align*} c_0 &\defeq \idfunc[\type] \\ c_s(n,f,A) &\defeq \sm{x,y:f(A)}\id[]xy \end{align*} That is to say, an $(n+1)$-dimensional path should be a pair of $n$-dimensional paths, together with a path between them. More concisely: \begin{gather*} \operatorname{npath} : \nat\to\type\to\type \\ \operatorname{npath} \defeq \ind{\nat}\Parens{\lam{n}\type\to\type, \idfunc[\type], \lam{n}\lam{f}\lam{A}\Parens{\sm{x,y:f(A)}\id[]xy}} \end{gather*} What should the boundary of an $n$-path be? The boundary of a $1$-path is a pair of points. The boundary of a $2$-path (that is, a homotopy) is a pair of $1$-paths. Perhaps the boundary of an $(n+1)$-path should be a pair of $n$-paths. We can get these by using the appropriate projections: \begin{gather*} \operatorname{nboundary} : \prd{n:\nat}\prd{A:\type}\operatorname{npath}(\suc(n),A)\to \operatorname{npath}(n,A)\times \operatorname{npath}(n,A) \\ \operatorname{nboundary}(p)\defeq (\proj{1}(p),\proj{1}(\proj{2}(p))) \end{gather*} \section*{Exercises from \cref{cha:logic}} \subsection*{Solution to \cref{ex:equiv-functor-set}} % Prove that if $\eqv A B$ and $A$ is a set, then so is $B$. Generally, we can use univalence to transform equivalences to equalities (paths), and use the principle indiscernability of identicals (transport) to show that any statement (family) that holds for one type holds for any type it is equivalent to. Let $A,B:\type$, $s:\isset(A)$, and $\eqv A B$. By univalence, there is a path $p:A=_{\type}B$. We can transport $s$ across this path to obtain the desired result: \begin{equation*} \transfib{X\mapsto \isset(X)}{p}{s} : \isset(B) \end{equation*} \subsection*{Solution to \cref{ex:isset-coprod}} Let $A,B:\type$, and assume that $A$ and $B$ are sets. To show $\isset(A+B)$, we must show that there is at most one path between elements of $A+B$, up to homotopy. Let $x,y:A+B$. We proceed by case analysis on $x$ and $y$. Consider the cases where $x\jdeq \inl(a)$ and $y\jdeq \inr(b)$ or $x\jdeq \inr(b)$ and $y\jdeq \inl(a)$ for some $a:A$ and $b:B$. By the characterization of paths in coproduct types (\cref{sec:compute-coprod}), these can't be equal. In particular, by \eqref{eq:inlrdj}, given $p:x=y$, we can conclude anything we like. Now suppose that $x\jdeq \inl(a_1)$ and $y\jdeq \inl(a_2)$ for $a_1,a_2:A$. Then by \eqref{eq:inlinj}, \begin{equation*} (x=y)\jdeq {(\inl(a_1)=\inl(a_2))}\eqvsym {(a_1=a_2)}. \end{equation*} Since $A$ is a set, $a_1=a_2$ is a mere proposition. It follows that $x=y$ is a mere proposition (one can use univalence and transport, as in the previous exercise). A symmetric proof shows that in the case that $x\jdeq \inr(b_1)$ and $y\jdeq \inr(b_2)$ for $b_1,b_2:B$, $x=y$ is also a mere proposition. Therefore, $A+B$ is a set. \subsection*{Solution to \cref{ex:prop-endocontr}} ($\Rightarrow$) Let $A:\type$ and $P:\isprop(A)$. To show that $A\to A$ is contractible, we must give a center of contraction and show that every other function $A\to A$ is equal to the center. Define our center to be $\idfunc[A]$, and let $f:A\to A$. Define a homotopy $\idfunc[A]\htpy f$ by \begin{gather*} \alpha:\prd{x:A}\id[]{\idfunc[A](x)}{f(x)} \\ \alpha(x)\defeq P(\idfunc[A](x),f(x)) \end{gather*} Then by function extensionality, $\idfunc[A]=f$. ($\Leftarrow$) Assume $A\to A$ is contractible with center of contraction $c$, and let $x,y:A$. We want to show that $x=y$. Define $f:A\to A$ by $f(z)\defeq y$. By contractability of $A\to A$, $\idfunc[A]=c=f$. Using $\happly$ on the equality between $\idfunc[A]$ and $f$, we obtain that $x\jdeq \idfunc[A](x)=f(x)\jdeq y$, so $\id[]xy$. We have shown that any two elements of $A$ are equal, that is, $A$ is a mere proposition. \subsection*{Solution to \cref{ex:lem-mereprop}} Assume $A$ is a proposition, and let $x,y:A+(\neg A)$. We want to show that $x=y$. We proceed by cases using the induction principle for coproducts. \begin{enumerate} \item Assume $x\jdeq \inl(a)$ and $y\jdeq \inr(n)$. Then $n(a):\emptyt$ gives us a contradiction. \item Assume $x\jdeq \inr(n)$ and $y\jdeq \inl(a)$. Then $n(a):\emptyt$ gives us a contradiction. \item Assume $x\jdeq \inl(a_1)$ and $y\jdeq \inl(a_2)$. By the characterization of paths in coproduct types (\cref{sec:compute-coprod}), we know $\eqv{(\id[]xy)}{(\id[]{a_1}{a_2})}$, and we have $\id[]{a_1}{a_2}$ since $A$ is a proposition. \item Finally, assume $x\jdeq \inr(n_1)$ and $y\jdeq \inr(n_2)$. Again by the characterization of paths in coproduct types, we know $\eqv{(\id[]xy)}{(\id[]{n_1}{n_2})}$, so it suffices to show $\id[]{n_1}{n_2}$. Since $\neg A\jdeq A\to \emptyt$ and $\emptyt$ is a mere proposition, we have by \cref{thm:isprop-forall} that $\neg A$ is a mere proposition. Therefore, any two elements of $\neg A$ are equal, and in particular, $\id[]{n_1}{n_2}$. \end{enumerate} \subsection*{Solution to \cref{ex:disjoint-or}} Assume $h:\neg(A\times B)$, and let $x,y:A+B$. We want to show that $x=y$. We proceed by cases using the induction principle for coproducts. \begin{enumerate} \item Assume $x\jdeq \inl(a)$ and $y\jdeq \inr(b)$ for $a:A$ and $b:B$. Then $h(a,b):\emptyt$, and we can use the destructor for $\emptyt$ to conclude anything we wish. \item Assume $x\jdeq \inr(b)$ and $y\jdeq \inl(a)$. Then $h(a,b):\emptyt$, and we're done. \item Assume $x\jdeq \inl(a_1)$ and $y\jdeq \inl(a_2)$. By the characterization of paths in coproduct types (\cref{sec:compute-coprod}), we know $\eqv{(\id[]xy)}{(\id[]{a_1}{a_2})}$, and we have $\id[]{a_1}{a_2}$ since $A$ is a proposition. \item Assume $x\jdeq \inr(b_1)$ and $y\jdeq \inr(b_2)$. Just as above, we have $\eqv{(\id[]xy)}{(\id[]{b_1}{b_2})}$, and $\id[]{b_1}{b_2}$. \end{enumerate} \subsection*{Solution to \cref{ex:decidable-choice}} The hypotheses imply that \[ \Parens{\sm{n:\nat}P(n)} \to \sm{n:\nat}\Parens{P(n) \times \prd{m:\nat} \big((m] (N0) -- node[above]{\footnotesize $i_n$} (N1); \draw[->] (N0) -- node[left]{\footnotesize $j_n$} (N2); \draw[->] (N1) -- node[right]{\footnotesize $j_{n+1}$} (N2); \draw[double, double equal sign distance] (N3) -- node[left,above]{\footnotesize $glue_n$} (N4); \end{tikzpicture} \end{center} we get a path $x \defeq j_n(y) = j_{n+1} (i_n(y))$. But, as we will show, the inclusion $i_n$ of $\Sn^n$ in $\Sn^{n+1}$ is nullhomotopic, every point in the image is equal to $\north_{n+1}$. Thus, we are able to show that $j_{n+1}(i_n(y)) = j_{n+1}(\north_{n+1})$. Composing the proof of the first step with the proof of the second step we conclude the exercise. To construct a $D_{\blank} : \prd{n:\nat} j_n(\north_n) = j_0(\north_0)$ we proceed by induction on $n$. For the base case we can use $\refl{j_0(\north_0)}$. For the inductive case, we have by inductive hypothesis $j_n(\north_n) = j_0(\north_0)$. By our definition of $i_{\blank}$, we have that $\north_{n+1} \equiv i_n(\north_n)$. So $j_{n+1} (\north_{n+1})$ equals $j_{n+1}(i_n(\north_n))$. By concatenation with $\glue_n(\north_n)$, we reduce our goal to the inductive hypothesis. Let's now show that the inclusion of $\Sn^n$ in $\Sn^{n+1}$ can be continuously retracted to $\north_{n+1}$. That is, let's construct a homotopy: \[ H_{\blank} : \prd{n:\nat}{x:\Sn^n} i_n(x) = \north_{n+1} \] For the case $n\equiv 0$ we know that $i_0(\btrue) \equiv \north_1$ and $i_0(\bfalse) \equiv \south_1$. This is because we constructed the inclusion that way. So we can prove the equalities using $\refl{\north_1}$ and $\merid_1(\btrue) : \north_1 = \south_1$. For the inductive case we defined, previously, $i_n(\north_n) \equiv \north_{n+1}$ and $i_n(\south_{n}) \equiv \south_{n+1}$. So we can prove the equalities using $\refl{\north_{n+1}}$ and $(\merid_{n+1}(\north_n))^{-1}$. Then we have to prove that the function respects $\merid_n$: \[ \prd{x:\Sn^{n-1}} \dpath {x\mapsto (i_n(x) = \north_{n+1})} {\merid_n(x)} {\refl{\north_{n+1}}} {(\merid_{n+1}(\north_n))^{-1}} \] By \cref{thm:transport-path} (and some straightforward computation) this reduces to: \[ i_n(\merid_n(x)) = \merid_{n+1}(\north_{n}) \] But, by our definition of $i_{\blank}$, and the computation rule of the suspension induction $i_n(\merid_n(x))$ equals $\merid_{n+1} (i_{n-1}(x))$. And, by inductive hypothesis, $i_{n-1}(x) = \north_n$, which gives us the desired result. Composing the two proofs we just gave we get a function: \[ J_n(x) \defeq \glue_n(x)\ct \apfunc{j_{n+1}}{H_n(x)}\ct D_{n+1} : \prd{n:\nat}{x:\Sn^n} j_n(x) = j_0(\north_0). \] We use this function and induction on $\Sn^{\infty}$ to derive the contractibility of the space. Now it remains to show that our function respects the gluing: \[ \prd{n:\nat}{x:\Sn^n} \dpath {x\mapsto (x = j_0(\north_0))} {\glue_n(x)} {J_n(x)} {J_{n+1}(i_n (x))} \] By definition this is: \[ \prd{n:\nat}{x:\Sn^n} \transfib{x\mapsto (x = j_0(\north_0))}{\glue_n(x)}{J_n(x)} = {J_{n+1}(i_n (x))} \] The LHS is equal to $\glue_{n}(x)^{-1}\ct J_n(x)$, which, by definition of $J_n(x)$, is: \[ \glue_n(x)^{-1}\ct\glue_n(x)\ct\apfunc{j_{n+1}}{H_n(x)}\ct D_{n+1} \] Cancelling we get: \[ \apfunc{j_{n+1}}{H_n(x)}\ct D_{n+1} \] We also use the definition of $J_{\blank}$ in the RHS, and then the computation rule of $D_{\blank}$, giving us the equalities: \begin{align*} & J_{n+1}(i_n(x))\\ &= \glue_{n+1}(i_n(x))\ct\apfunc{j_{n+2}}{H_{n+1}(i_n(x))}\ct D_{n+2}\\ &= \glue_{n+1}(i_n(x))\ct\apfunc{j_{n+2}}{H_{n+1}(i_n(x))}\ct \glue_{n+1}(\north_{n+1})^{-1}\ct D_{n+1}. \end{align*} So it suffices to show: \[ \apfunc{j_{n+1}}{H_n(x)} = \glue_{n+1}(i_n(x))\ct\apfunc{j_{n+2}}{H_{n+1}(i_n(x))} \ct\glue_{n+1}(\north_{n+1})^{-1} \] Or equivalently: \[ \apfunc{j_{n+1}}{H_n(x)} \ct\glue_{n+1}(\north_{n+1}) = \glue_{n+1}(i_n(x))\ct\apfunc{j_{n+2}}{H_{n+1}(i_n(x))} \] But we remember that we have the homotopy $\glue_{n+1} : j_{n+1} = j_{n+2}\circ i_{n+1}$, so, by a simple application of \cref{lem:htpy-natural} and the functoriality of $\apfunc{}{}$, we get a proof of the equality: \[ \apfunc{j_{n+1}}{H_n(x)} \ct\glue_{n+1}(\north_{n+1}) = \glue_{n+1}(i_n(x))\ct\apfunc{j_{n+2}}{\apfunc{i_{n+1}}{H_n(x)}} \] So we reduced the goal to showing: \[ \apfunc{i_{n+1}}{H_n(x)} = H_{n+1}(i_n(x)) \] This can be done easily by induction in $\Sn^n$ using the definition of $H_{\blank}$. \subsection*{Solution to \cref{ex:contr-infinity-sphere-susp}} First we write down the type of the induction principle explicitly: \[ \ind{\Sn^\infty} : \prd{C:\Sn^\infty \to \UU}{n:C(\north)}{s:C(\south)} \Parens{\prd{x:\Sn^\infty} C(x) \to \dpath C {\merid(x)} {n}{s}} \to \prd{x:\Sn^\infty} C(x) . \] We take $\north$ as center of contraction. So we have to prove $\prd{x:\Sn^\infty} \north = x$. For this we use induction on $\Sn^\infty$ taking: \[C \defeq (\lambda x. \north = x) : \Sn^\infty \to \UU .\] When $x$ is $\north$ we just use $\refl{\north} : \north = \north$. When $x$ is $\south$ we use $\merid(\north) : \north = \south$. When $x$ varies along $\merid$ we have to give a function of type: \[\prd{x:\Sn^\infty} \Parens{\north = x} \to \Parens{\dpath C {\merid(x)} {\refl{\north}}{\merid(\north)}}. \] So, given $x : \Sn^\infty$ and $p : \north = x$, we have to prove: \[\transfib{x \mapsto (\north = x)}{\merid(x)}{\refl{\north}} = \merid(\north).\] By \cref{cor:transport-path-prepost} it suffices to show $\refl{\north}\ct \merid(x) = \merid(\north)$. Canceling $\refl{\north}$ and applying $\merid$ to $p$ gets us the desired result. \subsection*{Solution to \cref{ex:unique-fiber}} We know that every two points $y_1,y_2 : Y$ are merely equal, because $Y$ is is connected. That is, we have a function $c : \prd{y_1,y_2:Y}\trunc {} {y_1 = y_2}$. To prove this we can use the remark after \cref{thm:connected-pointed}. If we want to show that any pair of points $y_1,y_2 : Y$ are merely equal we can use the first point $y_1$ to get a pointed space $(Y,y_1)$, and then use the remark. We note that it suffices to show that for any $y_1,y_2:Y$ we have $\trunc {} {\hfib{f}{y_1} = \hfib{f}{y_2}}$ because $\hfib{f}{y_1} = \hfib{f}{y_2}$ implies (using $\idtoeqv$) $\hfib{f}{y_1}\simeq \hfib{f}{y_2}$ and thus, by recursion on the truncation of $\hfib{f}{y_1} = \hfib{f}{y_2}$, we get that $\trunc {} {\hfib{f}{y_1} = \hfib{f}{y_2}}$ implies $\trunc {} {\hfib{f}{y_1} \simeq \hfib{f}{y_2}}$. The type of $c(y_1,y_2)$ is a truncation, so we can use its recursion to prove the desired result. By recursion we can assume that $y_1 = y_2$, and in that case we obviously have $\trunc {} {\hfib{f}{y_1} = \hfib{f}{y_2}}$. We also have to show that the proposition we want to prove is $-1$-truncated, but that is straightforward because it is a $-1$-truncation. \section*{Exercises from \cref{cha:category-theory}} \subsection*{Solution to \cref{ex:stack}} Define $K$ to be the precategory with $K_0 \defeq Y$ and $\hom_K(y_1,y_2) \defeq (p(y_1)=p(y_2))$. Then $\mathrm{Desc}(A,p)\defeq A^K$ is a good definition. Moreover, the obvious functor $K\to X$ (where $X$ denotes the discrete category on itself) is a weak equivalence, so \cref{ct:esofull-precomp-ff,ct:cat-weq-eq} yield the second and third parts. Finally, $K$ is a strict category, so if it is a stack, then $p$ has a section, while conversely if $p$ has a section then $K\to X$ is a (strong) equivalence. \section*{Exercises from \cref{cha:set-math}} \subsection*{Solution to \cref{ex:prop-ord}} Define $A