I'm trying to determine when a category is equivalent to the category $\ast$ – the category with one object and one morphism. Such category clearly cannot have a morphism which is not an isomorphism, and I think that the condition $|Hom_C (X,Y)|=1$ for every two objects $X,Y$, is also needed. Am I right? how can I prove a necessary and sufficient condition?
Criteria for equivalence to the trivial category $\ast$
category-theory
Related Solutions
A category with exactly one morphism between any (ordered) pair of objects is called an indiscrete category. If it has at least one object, it is equivalent to the terminal category. Any two indiscrete categories are therefore equivalent and, as you suggest, are isomorphic when they have isomorphic collections of objects, meaning their collections of objects have the same cardinality. This is intuitively because you can forget the information of the morphisms and simply treat the categories as sets or classes.
The claim you ask for is extremely restrictive and I wouldn't expect there to be any nice natural conditions on a category that would make it true. In particular, keep in mind that when you write $$\operatorname{Hom}_C(1,H) \cong \operatorname{Hom}_C(Y,X)$$ this is merely an isomorphism of sets. That is, you are saying that if $H$ is a set such that the cardinality of the set of homomorphisms $1\to H$ is the same as the cardinality of the set of homomorphisms $Y\to X$, then $H$ admits the structure of an exponential object $X^Y$. In the case where $Y=1$, this says in particular that an object $X$ of $C$ is determined up to isomorphism by merely the number of homomorphisms $1\to X$. This is virtually never true.
For an explicit example where this fails but exponential objects exist, consider $C=\mathtt{Set}\times\mathtt{Set}$. Then, for instance, the objects $(1,\mathbb{N})$ and $(\mathbb{N},\mathbb{N})$ both have $\aleph_0$ homomorphisms from the terminal object $1=(1,1)$, but they are not isomorphic.
(Note that even asking for an isomorphism of sets $\operatorname{Hom}_C(Z,H) \cong \operatorname{Hom}_C(Z \times Y,X)$ for all $Z$ is not enough to conclude that $H$ is an exponential object $X^Y$. This isomorphisms also have to be natural in $Z$. For instance, in the full subcategory of $\mathtt{Set}$ consisting of just a single infinite set $X$, there is a bijection $\operatorname{Hom}(Z,X) \cong \operatorname{Hom}(Z \times X,X)$ for all $Z$ (since $X$ itself can be given the structure of a product $X\times X$) but this cannot be made natural in $Z$ so $X$ cannot be made into an exponential object $X^X$.)
Best Answer
A category $C$ is equivalent to the trivial category (which I'll denote by $1$, with unique object $*$ and unique arrow $\text{id}_*$) if and only if it is nonempty and $|\text{Hom}(X,Y)| = 1$ for all objects $X$ and $Y$. I'll give you a concrete proof straight from the definitions.
Proof: Note that $1$ is the terminal category: for any category $C$, there is a unique functor $!_C\colon C\to 1$ sending every object to $*$ and every arrow to $\text{id}_*$. In particular, $!_1 = \text{Id}_1$.
Now suppose $C$ is nonempty and $|\text{Hom}(X,Y)| = 1$ for all objects $X$ and $Y$ in $C$. Let's note that every arrow in $C$ is an isomorphism. Indeed, if $f\colon X\to Y$ is an arrow, then letting $g\colon Y\to X$ be the unique arrow in $\text{Hom}(Y,X)$, we have $g\circ f = \text{id}_X$ and $f\circ g = \text{id}_Y$, since these are the unique arrows in $\text{Hom}(X,X)$ and $\text{Hom}(Y,Y)$, respectively.
Since $C$ is nonempty, we can pick an object $X$ in $C$. Define a functor $F\colon 1\to C$ by $F(*) = X$ and $F(\text{id}_*) = \text{id}_X$. We need to show that $F$ and $!_C$ form an equivalence of categories. We have $!_C\circ F = \text{Id}_1$, since this is the unique functor $1\to 1$. It remains to define a natural isomorphism $\eta\colon \text{Id}_C \cong (F \circ !_C)$. For each $Y\in C$, $F(!_C(Y)) = F(*) = X$. Let $\eta_Y\colon Y\to X$ be the unique arrow in $\text{Hom}(Y,X)$, which is an isomorphism. All naturality squares automatically commute, by our assumption on uniqueness of arrows. So we're done.
Conversely, suppose $C$ is equivalent to $1$. Then there is a functor $F\colon 1\to C$ which forms an equivalence of categories with the unique functor $!_C\colon C\to 1$. Let $X = F(*)$, and note that the existence of $X$ shows that $C$ is nonempty.
Now we have a natural isomorphism $\eta\colon \text{Id}_C\cong (F\circ !_C)$, with component isomorphisms $\eta_Y\colon Y\to X$ for all objects $Y$ in $C$. In particular, $\text{Hom}(Y,Z)$ is nonempty for all $Y$ and $Z$, since it contains $\eta_Z^{-1}\circ \eta_Y$. It remains to show that for any $f \in \text{Hom}(Y,Z)$, $f = \eta_Z^{-1}\circ \eta_Y$. By naturality, $$\eta_Z\circ f = F(!_C(f))\circ \eta_Y = F(\text{id}_*)\circ \eta_Y = \text{id}_X\circ \eta_Y = \eta_Y.$$ So $f = \eta_Z^{-1}\circ \eta_Y$, as desired.