# Coalgebra 返代數

「文學是苦悶的象徵」每隔一陣子讀了幾頁書，總是會想起廚川白村這句話。文字之間的情緒滲透進來的，很少是喜悅大多是難以言喻說不出口的哀戚。那些太過歡樂的，情緒往往都很膚淺很少留住。

# An equational way to prove associativity of least upper bounds

Traditionally, to prove the associativity of the least upper bounds, i.e. $x \vee (y \vee z) = (x \vee y) \vee z$ we need few lines to prove the inequality from the left hand side and conversely. However, by turning the definition of finit join to the adjunction form, we have a more compact and algebraic-like way to do it. Continue reading

# Yoneda argument – Application

A simple application of Yoneda argument is to prove that $a^1 \cong a$ in Cartesian closed category.

Lemma. In Cartesian closed category, $a^1 \cong a$ where $1$ is terminal.

Proof. $hom(b, a) \cong hom(b \times 1, a) \cong hom(b, a^1)$ for all objects $b$. Hene $a \cong a^1$.

It’s also quite easy to see that $a^{b \times c} \cong (a^b)^c$ since $hom(d, a^{b \times c}) \cong hom(d \times b \times c, a) \cong hom(d \times c, a^b) \cong hom(d, (a^b)^c)$.  Hence $a^{b \times c} \cong (a^b)^c$. It’s just like that we prvoe the equality $c \wedge b \rightarrow a = c \rightarrow (b \rightarrow a)$ in the Heyting algebra!

# Yoneda argument

I don’t want to repeat the Yoneda lemma, but one of the important corollary should be emphasized. Roughly speaking, given any object $c$ in the category $\mathcal{C}$, $c$ is determined by its morphisms up to isomorphism. That is, the natural isomorphism between hom-sets corresponds to the isomorphism between objects, i.e. $hom(-, c) \cong hom(-, d) \Leftrightarrow c \cong d$. How do we prove it? Well, let’s see a simpler analogy in partial orders.

Lemma. $\uparrow x = \uparrow y$ if and only if $x = y$.
Proof. If $\uparrow x = \uparrow y$, then $a \in \uparrow b$ and $b \in \uparrow a$ which imply $a \leq b$ and $b \leq a$. Hence $a = b$. The converse is quite trivial.

First, we can prove it by brute force method.

Lemma. $hom( - , c ) \cong hom( - , d )$ if and only if $c \cong d$.
Proof. Consider the following diagrams,



by replacing $f$ with $\phi^{-1}_{d}(id_{d})$, we will see that $id_{d} = \phi_{c}(id_c) \circ \phi^{-1}_{d}(id_{d})$ and we will have the other isomorphism by replacing $f$ with $\phi_{c}(id_c)$ and reversing the arrows.

However, the diagram above is exactly used in Yoneda lemma, and of course we can use Yoneda lemma to prove it.

First recall that Yoneda lemma states that $Nat ( hom ( - , r ), K ) \cong Kr$ where $K$ is a Set-valued functor and $r$ is an object in a locally small category $\mathcal{C}$. Let $K$ be the hom-set functor $hom(-, s)$. It gives the isomorphism between $Nat(hom(-, r), hom(-, s)) \cong hom(r, s)$. Hence, it indeed tells you that $Y(d) = hom(-, d)$ is fully faithful. Therefore, we have the second proof.

Proof2. Given that $Y$ is fully faithful, thus the natural isomorphisms $Y ( d ) \cong Y ( c )$ actually correspond to the isomorphism $d \cong c$ and vice verse. That’s it!