In category theory, it seems that a monomorphism from $A$ to $B$ and one from $B$ to $A$ should be enough to guarantee isomorphy, but it doesn't seem to be so. (If I'm right then there's something fishy with the standard definition of "subobject")

So here's the counterexample I thought up, please explain where I went wrong.

Consider a category consisting of 2 objects $A$ and $B$. There is a monomorphism $\phi: A \to B$ and another $\psi : B \to A$. "Close" this under composition in much the same way you do when defining a free group (that is, no non-trivial identities are allowed). I claim that this does not guarantee isomorphism. All morphisms are monic, since no identities hold, so the condition for monomorphism is trivially satisfied.

What am I doing wrong here?

A→B→A, and their composite is the identity $1_A$,thenthese monos are isos”. (Proving this is a nice exercise!) In terms of subobjects: “ifAis a s.o. ofB, andBis a subobject ofA, and these are compatible with our standard way of thinking ofAas a subobject of itself, thenAandBare isomorphic”. – Peter LeFanu Lumsdaine Jul 18 '10 at 19:54