TITLE: Does the functor law about preserving identity follow from other laws?
QUESTION [7 upvotes]: I've only recently picked up literature about category theory, but the definition of a functor on Wikipedia seems redundant to me. I've paraphrased it here:

Given categories $C$ and $D$, then a mapping $F : C \rightarrow D$ is a functor iff:

$F$ assigns to every object $X \in C$ an object $F(X) \in D$, (left-total for objects)
$F$ assigns to every arrow $f : X \rightarrow Y \in C$ an arrow $F(f) : F(X) \rightarrow F(Y) \in D$, (left-total for arrows)
For all arrows $f : X \rightarrow Y$ and $g : Y \rightarrow Z$ in $C$, $F(g \circ f) = F(g) \circ F(f)$, (homomorphism) and
For every identity arrow $1_X : X \rightarrow X$ in $C$, $F(1_X) = 1_{F(X)}$. (preservation of identity)


From what I understand, it can be proven that every identity arrow in a category is unique. Combined with this theorem, I think the following proof is correct:

Reflexivity of equality: $\forall f\in C: f = f$
Left-totality for arrows: $\forall f\in C: F(f) = F(f)$
Introduce left-identity: $\forall f\in C: F(1_Y \circ f) = F(f)$ (given $f:X \rightarrow Y$)
Homomorphism: $\forall f\in C: F(1_Y) \circ F(f) = F(f)$ (given $f:X \rightarrow Y$)
Because of uniqueness of identity, $F(1_Y)$ must be the identity arrow for $F(Y)$, so it follows that $F(1_Y) = 1_{F(Y)}$.

Am I missing something here? Does preservation of identity follow from other laws?

REPLY [4 votes]: Yes, the last step in your proof is incorrect. You can conclude that an arrow $e:X\rightarrow X$ is the identity on $X$ if for all arrows $f:X\rightarrow Y$ and all arrows $g:Z\rightarrow X$, $f\circ e = f$ and $e\circ g = g$.
You have shown that for all arrows of the form $F(f)$ we have $F(1_Y) \circ F(f) = F(f)$. This is not enough to conclude that $F(1_Y)$ is the identity.
Here is a counterexample: Let $C$ be a category with just one object, $X$, and just one arrow, $1_X$. 
Let $D$ be a category with just one object, $Y$, and two arrows: $\text{Hom}(Y,Y) = \{1_Y,f\}$, with composition defined so that $f\circ f = f$.
Now let $F$ be the "functor" (in quotes because it is not really a functor) sending $X$ to $Y$ and $1_X$ to $f$. $F$ preserves composition ($F(1_X\circ 1_X) = F(1_X) = f = f\circ f = F(1_X) \circ F(1_X)$), but it does not preserve identities.