This is an exercise from Algebra of Programming which I'm reading for self-study. Below, $T$ is the initial algebra of $F$.

enter image description here

What I've tried:

I can construct $h \circ F (\pi_2) : F(A \times B) \rightarrow B$. Then we take the product $\langle g, h \circ F(\pi_2) \rangle : F(A \times B) \rightarrow A \times B$. We can then take the catamorphism $cata(\langle g, h \circ F(\pi_2) \rangle) : T \rightarrow A\times B$ and need to show that $f = \pi_1 \circ cata(\langle g, h \circ F(\pi_2) \rangle)$.

I've tried using the fact that the diagram above commutes to get the equality above, to no avail. Any suggestions?



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.