# Concrete examples of epimorphism in the category of sets and partial functions

• A epimorphism is a morphism $f : A \rightarrow B$ that is right-cancellative in the sense that, for all morphisms $g1, g2 : B \rightarrow X$ is true that

$$g_1\: o\: f = g_2\: o\: f \implies g_1 = g_2$$

I find hard to understand concrete examples of that statement when I thinking about partial functions.

So I tryed to formulate the following two examples:

1. Let $A = \{a, b, c\}$, $B = \{1, 2\}$ and $f_1:A \rightarrow B$ and mapping $f_1(a) = 1, f_1(b) = 2$. So $f_1$ is a partial surjective funtion.
2. Let $A = \{a, b, c\}$, $B = \{1, 2\}$ and $f_2:A \rightarrow B$ and mapping $f_2(a) = 1$. So $f_2$ is just a partial funtion.

Example 1 must be a epimorphism and to show that I can image two functions $g_1, g_2: B \rightarrow B$ with the same mapping and I can see why $g_1\: o\: f_1 = g_2\: o\: f_1 \implies g_1 = g_2$.

But in example 2, $\:g_1\: o\: f_2 = g_2\: o\: f_2 \implies g_1 = g_2$ looks to be also true, but it should not be.

I guess I missing something.

Epimorphisms in the category of sets and partial functions are simply partial surjections (i.e. partial functions $f\colon X\to Y$, such that $f(X)=Y$). So $f_1$ is an epimorphism but $f_2$ is not.
Let $f\colon X\to Y$ be a partial function, such that $f$ is not a partial surjection, i.e. there exists such $y_0\in Y$, that $f^{-1}(y_0)=\varnothing$. Then define two functions $g_1,g_2\colon Y\to\{1,2\}$, such that $g_1(y)=1$ for every $y\in Y$ and $g_2(y)=1$ for every $y\in Y\setminus\{y_0\}$ and $g_2(y_0)=2$. Then $g_1\circ f=g_2\circ f$, but $g_1\ne g_2$.
• I agree. But how this fails $g_1\: o\: f = g_2\: o\: f \implies g_1 = g_2$ ? May 20 '16 at 16:04
• @Tim By the way, the fact you mentioned (that $\mathbf{PartSet}\simeq\mathbf{Set}_*\cong(*\downarrow\mathbf{Set})$) is indeed interesting and useful. May 20 '16 at 16:12
• @RafaelCastro Specifically in the case of $f_2$ you should take two functions $g_1,g_2\colon B\to B$, such that $g_1(1)=1$, $g_1(2)=1$, $g_2(1)=1$, $g_2(2)=2$. May 20 '16 at 16:15
• @Oskar ow. I see. With that mapping the composition is equal, but $g_1 \neq g_2$. Right? May 20 '16 at 16:39