# Are there differences between total functions, epimorphic functions and surjective functions?

I've read three definitions which seems to point to the same idea. I've read about epimorphic functions in Mazzola's Comprehensive Mathematics for Computer Scientists - in this book, he treats it as if they were surjective functions. I guess that this idea is employed in category theory (with more generality, I guess). In functions, it seems that the idea is about relations of sets, in category theory, these ideas seems to be employed in objects different of sets. Is that correct?

Today I was reading Boolos' Logic and Computability, they mention the total functions, which by definition seems also to be the same of surjectivity. But I guess it may be used in some general way for the purposes of computer science, I'm still not sure about it. I've seen it on an exercise in the book (see below) and they use both terms: total function and surjectivity - This confuses me a little, presuming they are the same, why use both names Can you show me what are the differences of these three?

-
They are defining total to means that domain of $f$ is $A$, not that it is surjective. – user141267 Apr 7 '14 at 17:47
@Jacobo Sorry, I don't follow: "If $f(a)$ is defined for every $a$ of $A$, then the function is called total". This seems a lot like surjectivity, no? – Voyska Apr 7 '14 at 17:52

"Surjective" and "epimorphic" have the same meaning. They specifically mean that every element of the range occurs as the image under $f$ of some domain element.
But isn't there a function $f:\mathbb{R}\to \mathbb{R}$ defined as $f(x)=1/x$? This function is undefined for $x=0$. Now that you answered, I'm not sure if I can call this a function. – Voyska Apr 7 '14 at 18:13
@PristineKavalostka: No, there is not. The function you are talking about is $f:\mathbb R\setminus\{0\}\rightarrow\mathbb R$. The domain is not $\mathbb R$. I suppose, using the terminology this question concerns, you might even call it a "partial function on $\mathbb R$", but I don't think that's what it was meant to be used for. – MPW Apr 7 '14 at 21:03
The problem with bandying these names about is that the user is often "sloppy" about the meaning. People usually do speak of "the function $f(x)=1/x$ of a real variable", but it is implicit that the domain is restricted to values that make sense, just as you speak of "the square root of a real number" when you probably mean the square root of a nonnegative real number". – MPW Apr 7 '14 at 22:09