Proving that W-algebra homomorphisms are contractible

higher-category-theoryhomotopy-type-theorytype-theoryunivalent-foundations

I don't understand the conclusion of the proof of Theorem 5.4.7 of the Homotopy Type Theory text and would like a more detailed explanation of how it works. Here's my attempt at divining an answer.

The theorem states that the type of W-algebra homomorphisms is always contractible (i.e., any two elements of the type are propositionally equal).

A W-algebra homomorphism between types $C$ and $D$ is a (dependent?) pair $(f, s_f)$ such that $f: C \to D$ and $s_f : f \circ s_C = s_D \circ Pf$ where $s_C$ is the successor function of the argument type family $P: A \to \mathcal{U}$ to $C$ and $P$ acts as a functor on $f$ on the RHS.

For any two elements of this type $(f,s_f)$ and $(g,s_g)$, we must show that $(f,s_f) = (g,s_g)$ to prove the theorem. Following the computation rule for equalities on dependent pairs established in an earlier chapter, we start by showing $f = g$. This is immediate given the W-elimination and function extensionality rules, as the proof suggests.

The reason it gives for $s_f = s_g$ is where it becomes inscrutable to me. It gives the two pasting diagrams

pasting diagrams

and then goes into a bit about algebra 2-cells that has no connection to what came before. (AS AN ASIDE: Does this have something to do with higher category theory? I don't fully understand what an $n$-morphism is. Does it somehow imply that $s_f = s_g$ because types are $(\infty, 1)$-groupoids? It would be great if the book had an appendix about them)

Anyway, returning to the second step of showing equalities between dependent pairs, I would think we would next show $e_*(s_f) = s_g$ where $e : f = g$ was obtained in the previous step and $e_*$ is the transportation function associated to $e$ by the transportation lemma.

The pasting diagram argument seems to suggest that we can infer the equality by substituting appearances of $f$ with $g$ using $e$, and similarly for $Pf$ and $Pg$ using $Pe$ (plus, aren't pasting diagrams meant to be pasted together? How on earth do you paste these two?)

But how can that alone suffice to show that $s_f = s_g$? $f$ and $g$ are propositionally equal, not definitionally so. As such, deriving the type of $s_g$ from the value of $s_f$ involves concatenating paths/equalities onto $s_f$, and it's been my understanding so far that this may produce an equality proof distinct from $s_g$ (but sharing its type, of course). Hence, I doubt that $s_f = s_g$ can follow from this observation alone. In other words, I see that I am missing something.

Best Answer

The implicit point is that $e_*(s_f)=s_g$ is equivalent to the type of equalities from the left-hand pasting diagram to the right-hand pasting diagram. That is, the two aren't pasted together with each other: the results of the two individual pastings are equated to each other in the type $(s_C \circ Pg) =_{(PW \to C)} (f\circ s_W)$. Thus, constructing an equality between those two diagrams is equivalent to showing $e_*(s_f)=s_g$, which as you noted is what we obviously need to show $(f,s_f) = (g,s_g)$.

Related Question