Can we rediscover the category of finite (abelian) groups from its morphisms? It was a question on stackexchange approximately a month ago if in the category $(grp)^{fin}$ $|Hom(H,G_1)|= |Hom(H,G_2)|$ for all $H \Rightarrow G_1 \cong G_2$.
Link to the previous question.
So lately I thought a bit about quite a related question.
Assume we are given the category of finite groups (or easier case: finite abelian groups), but with the names of all objects covered (i.e. we don't know which object is which).
Can we rediscover the objects by knowing
a) only the cardinality of all the $Hom$-Sets associated to the objects
b) the categorical structure (i.e. we know the $Hom$-Sets and how morphisms compose with each other)
In the Situation b) (which is of course more difficult than a) ), I am quite optimistic this is possible at least for abelian finite groups (something like let $A$ be such that there are no epis $A \rightarrow B$ for $0 \neq B \neq A$, then $A$ is cyclic of prime order. But then $A= \mathbb{Z}/(|Hom(A,A)|)\mathbb{Z}$. Now by induction we should be able to rediscover higher order cyclic groups and as we know the categorial structure, we should also know coproducts)
However, the case that is closer to the link above is situation a) and I have absolutely no idea whether this could be possible or not. (For example we can obviously rediscover $0$ and $\mathbb{Z}/2\mathbb{Z}$, but I don't see how to move on)
Maybe I should also note that of course the situation is quite different than in the original question: now we know a lot "more" $Hom$-sets, but we don't a priori know which objects they arise from.
Any input is welcome.
 A: Continuing from Martin's answer, here is a longer list of properties that are preserved by any auto-equivalence of FinGrp:


*

*The subgroup lattice is preserved, in particular infima (=intersections) and suprema (=subgroup generated by smaller subgroups) are preserved.

*As observed the normal structure is preserved: $H\hookrightarrow G$ is normal iff it is the difference kernel of some arrow $G\to X$ with the trivial arrow $G\to X$. Quotients are preserved by the universal property of quotients.

*In particular nilpotent (sylowgroups are normal), supersolvable ($\exists$ normal series with cyclic quotients), solvable ($\exists$ subnormal series with abelian quotients) groups are preserved.

*For solvable groups we can say more: The commutator group is preserved (minimal normal subgroup with abelian quotient), hence the derived series is preserved.

*The center is the maximal normal subgroup $Z\leq G$ such that $ZH$ is abelian for all cyclic subgroups $H\leq G$. Therefore upper and lower central series are preserved.

*Normal subgroups defined in terms of these notions like $O_p$, $O_\pi$, $O^p$, $O^\pi$, the Fitting subgroup $F(G)$ etc. are preserved.

*Since centers are preserved, central extensions and Schur multipliers are preserved. In particular quasisimple groups (=perfect, central extension of simple) are preserved.

*Therefore components (= subnormal and quasisimple subgroups) are preserved and therefore the generalized Fitting subgroup $F^\ast(G)$.

*The Frattini subgroup (=intersection of all maximal subgroups) is preserved.

*The centralizer $C_G(H)$ is the subgroup generated by all cylic subgroups $\langle z\rangle\leq G$ such that $\langle z\rangle$ and $\langle h\rangle$ generate an abelian subgroup for all cyclic subgroups $\langle h\rangle \leq H$.

*This should imply that the isomorphism class of each simple group is fixed. I haven't checked all details though.


This suggests that the "non-solvable part" of group theory is completely preserved. Things may get way a lot more complicated for $p$-groups since there are too many groups and too few invariants to really distinguish them. Well let's start anyway:


*

*Order, class, coclass are preserved

*For groups of small coclass there is a classification project by Bettina Eick, Max Horn et.al. It should imply that isomorphism classes of 2-groups of coclass $\leq 3$ are fixed etc.



EDIT 1:
Lemma: The isomorphism class of every finite Coxeter group is fixed.
Proof: Remember a Coxeter group is a group $W$ that is generated by a set of involutions $S\subseteq W$ (=a set of subgroups of size 2) modulo the relations $(st)^{m_{st}}=1$ for some $m_{st}=m_{ts}\in\mathbb{N}$ (with $m_{ss}=1$ of course, otherwise s wouldn't be an involutions). These relations can be equivalently rephrased as "$W$ is generated by cyclic subgroups $\langle s\rangle$ of order 2, $\langle s\rangle$ and $\langle t\rangle$ generate a group of size $2m_{st}$ for all $s,t$ and $W$ is maximal with this property". With this description it is clear that any Coxeter group is mapped to a Coxeter group.
In fact: If $\{\langle s\rangle\to W | s \in S\}$ is a Coxeter generating set, then the unique (!) isomorphism $\langle s\rangle \to \mathcal{F}(\langle s\rangle)$ extends to an isomorphism $W\to\mathcal{F}(W)$ for every auto-equivalence $\mathcal{F}:FinGrp\to FinGrp$ and these isomorphisms are compatible with parabolic subgroups.
In particular we get a sequence of isomorphisms $Sym(n)\to\mathcal{F}(Sym(n))$ that commute with the standard embeddings $Sym(n)\to Sym(n+1)$.

EDIT 2:
Lemma 2: (Inner) Automorphism groups (as object within FinGrp, not as morphism sets!) are preserved.
Proof: Fix $N$ and consider splitting, exact sequences $1\to N\to G \leftrightarrows A\to 1$. Every such sequence $S$ induces a morphism $\kappa_S : A\to Aut(N)$. Now consider all morphisms (=arrows $N\to N$, $\alpha:G\to G'$, $\beta:A\to A'$ such that everything commutes) between such sequences $S,S'$ where $N\to N$ is the identity. One verifies that $\kappa_{S'}(\beta(a)) = \kappa_S(a)$ for all $a\in A$.
The sequence $1\to N\to N\rtimes Aut(N)\to Aut(N)\to 1$ is a terminal object in the category of these sequences. The unique morphism from every seqence to it is induced by the $\kappa_S$ as one easily verifies.
A sequence $1\to N\to G\to A\to 1$ is a sequence with $A\leq Inn(N)$ iff $G=N\cdot C_G(N)$.
QED.

EDIT 3:
I think we're almost there. For every prime $\ell$ the category of finite dimensional $\mathbb{F}_\ell[G]$-modules is preserved by autoequivalences:
A $\mathbb{F}_\ell[G]$-module is the same thing as a split exact sequence $1\to V\to X\leftrightarrows G\to 1$ with $V$ abelian and $\ell$-torsion. A $G$-linear map $V\to W$ is the same thing as a morphism between the two sequences which is the identity on $G$. If one drops the condition of $\ell$-torsion and takes projective limits one similarly describes the categories of finitely generated $\mathbb{Z}_\ell[G]$-modules.
We therefore know that all these group rings for $G$ and $\mathcal{F}G$ are morita equivalent.
In fact this shows something stronger: Every autoequivalence $\mathcal{F}:FinGrp\to FinGrp$ induces an equivalence $\mathbb{F}_\ell[G]-mod\to\mathbb{F}_\ell[\mathcal{F}G]-mod$ which preserves the underlying vector spaces (since we already know that $\mathcal{F}$ is equivalent to the identity on abelian groups). The nLab entry on Tannaka duality tells us that this is enough to obtain an isomorphism of the group rings which should be (I haven't checked all the details) natural.
Additionally the trivial representation in each of these categories is preserved: it is the sequence $1\to V\to X\leftrightarrows G\to 1$ with $V\cong C_p$ that has a retract $X\to V$ such that $1\leftarrow V\leftarrow X\leftarrow G\leftarrow 1$ is also exact. Does anyone see how to characterize dual representations and tensor products of representations? In that case we could get the isomorphism for the groups an not just the group rings.
A: For the category of finite Abelian groups....
First, recall that every object factors into a product of groups of prime-power size, and similarly all of the $\hom$-sets respect this factorization. Thus, we can reduce the question to just individual prime powers.
So now, let's work in the category of groups whose order is a power of $p$. Let $C(p^n)$ be the cyclic group on $p^n$ elements. All logarithms are to the base $p$.
As you've noticed, we can find $C(1)$. We can also find $C(p)$: it's the only group satisfying $\hom(A, A) = p$.
The number $\hom(C(p), A)$ is the size of the $p$-torsion subgroup of $A$. In particular, its logarithm tells us how many summands appear in the direct sum decomposition of $A$.
We can thus determine which objects are cyclic groups. Since $|\hom(C(p^n), C(p^n))| = p^n$, we can give names to all of the cyclic groups.
Now, define numbers


*

*$a_n = | \hom(C(p^n), A) | $ - this is the size of the $p^n$-torsion subgroup of $A$

*$b_n = a_n / a_{n-1}$ - this is the size of the $p^n$-torsion subgroup of $A$, modulo $p^{n-1}$-torsion

*$c_n = \log_p b_n$ - this is the number of cyclic summands of $A$ that have size at least $p^n$

*$d_n = c_n - c_{n+1}$ - this is the number of cyclic summands of $A$ that have size exactly $p^n$


Thus, we can indeed recover every finite abelian group just from the cardinalities of the homsets.
A: The question is a bit vague, but it seems to ask (at least in b) if the category of finite (abelian) groups is rigid (this isn't standard terminology (yet)). At least for the category of (abelian) groups, this is correct. A reference is Freyd's classical book on abelian categories, Chapter I, Exercises E and F (pp. 30-32). For more details see the paper by E. Makai jun, section 2. The proofs center around a categorical definition of $\mathbb{Z}$ including its cogroup structure.
For finite groups we cannot do something that simple. It is not an algebraic category, there are no coproducts, there are no free objects, i.e. the forgetful functor $U : \mathsf{FinGrp} \to \mathsf{Set}$ has no left adjoint. The ring of "natural operations" on finite groups $\mathsf{End}(U)$ turns out to be the profinite completion $\widehat{\mathbb{Z}}$. All this indicates that the automorphisms of $\mathsf{FinGrp}$ are harder to classify. But I conjecture that they are all isomorphic to the identity.
Let us start with some categorical definitions in $\mathsf{FinGrp}$:


*

*The trivial group is the zero object. The trivial homomorphisms are the zero morphisms.

*Finite limits exists, including finite products and kernels. We have image factorizations.

*Injective homomorphisms are precisely the monomorphisms (use kernels). This characterizes subgroups.

*Surjective homomorphisms are precisely the regular epimorphisms (use the first isomorphism theorem). Actually every epimorphism is regular, but this is not trivial, see Exercise 7H (c) in ACC. This characterizes quotient groups.

*$G$ is simple iff $G$ is not trivial and $G$ has only trivial quotients.

*$G$ is abelian iff there is a homomorphism $m : G \times G \to G$ such that $m \circ \iota_1 = m \circ \iota_2 = \mathrm{id}_G$. Actually, finite abelian groups are precisely the group objects of $\mathsf{FinGrp}$.

*$G \cong \mathbb{Z}/p^n$ for some prime power $p^n$ iff $G$ is abelian and indecomposable. We can recover $p^n$ (and hence $p$) as the cardinality of $\mathrm{End}(G)$.

*$G$ is cyclic iff $G \cong \prod_{p  \text{ prime}} \mathbb{Z}/p^{n(p)}$ for some $n(p) \geq 0$. Again we can recover $n$ from $\mathbb{Z}/n$.

*The $n$-torsion of $G$ is $\{g \in G : g^n=1\} \cong \hom(\mathbb{Z}/n,G)$. The underlying set $U(G)$ of $G$ is therefore $\varinjlim_n \hom(\mathbb{Z}/n,G)$.

*The order of $G$ is $\limsup_n |\hom(\mathbb{Z}/n,G)|$.

*The character group of $G$ is $\hom(G,\mathbb{Z}/n)$ for $\mathrm{ord}(G)|n$ (the group structure coming from the group structure of the abelian group $\mathbb{Z}/n$).

*$G$ is a $p$-group (for some prime $p$) iff there is a chain of surjective homomorphisms $G=G_0 \to G_1 \to \dotsc \to G_n$ such that the kernel of each $G_i \to G_{i+1}$ is $\cong \mathbb{Z}/p$.

*The automorphism group of $G$ (as an object of $\mathsf{FinGrp}$ itsself!) is characterized by the fact that $1 \to G \to G \rtimes \mathrm{Aut}(G) \leftrightarrow \mathrm{Aut}(G) \to 1$ is a terminal object in the category of exact sequences $1 \to G \to S \leftrightarrow  H \to 1$ (where $S \leftrightarrow  H$ indicates that we have fixed a section of $S \twoheadrightarrow H$). These sequences characterize semidirect products.

*The conjugation homomorphism $G \to \mathrm{Aut}(G)$, $g \mapsto (h \mapsto g h g^{-1})$ is induced by any exact sequence $1 \to G \to S \leftrightarrow G \to 1$ where also the left map $G \to S$ has a retraction $S \to G$ which is left inverse to the section of $S \to G$ on the right.


Now let $F : \mathsf{FinGrp} \to \mathsf{FinGrp}$ be an equivalence of categories. Then $F$ preserves all the notions described above. For every $n > 0$ there is an isomorphism $F(\mathbb{Z}/n) \cong \mathbb{Z}/n$. It is not hard to arrange these isomorphisms to be compatible with respect to the divisibility relation (restrict to prime powers, and then construct the isomorphisms recursively). Hence, if $G$ is a finite group, we have a natural bijection
$$U(G) \cong \varinjlim_n \hom(\mathbb{Z}/n,G) \cong \varinjlim_n \hom(F(\mathbb{Z}/n),F(G)) \cong \varinjlim_n \hom(\mathbb{Z}/n,F(G)) \cong  U(F(G)).$$
We would be done if this is an isomorphism (or anti-isomorphism) of groups $G \cong F(G)$. By modifying $F$ we may assume that $U(G) = U(F(G))$. Then $F$ associates to every group $(X,\circ)$ a new group $(X,\circ^F)$ on the same underlying set, in such a way that every group arises this way (up to isomorphism), and a map $(X,\circ) \to (Y,\circ)$ is a homomorphism iff the same map $(X,\circ^F) \to (Y,\circ^F)$ is a homomorphism. We would like to show that either $\circ^F = \circ$ or $\circ^F = \circ^{\mathrm{op}}$ (perhaps depending on the group), so that $F \cong \mathrm{id}$. This is a down-to-earth reformulation of the problem.
Here is another idea: By formal nonsense we can extend $F$ to an equivalence of the category of profinite groups $F : \mathsf{ProFinGrp} \to \mathsf{ProFinGrp}$ (and conversely, the finite groups are the co-compact objects of the category of profinite groups, so that $\mathsf{FinGrp}$ and $\mathsf{ProFinGrp}$ have the same automorphism class group). By the discussion above we have $F(\widehat{\mathbb{Z}}) \cong \widehat{\mathbb{Z}}$. But $\widehat{\mathbb{Z}}$ represents the forgetful functor $\mathsf{ProFinGrp} \to \mathsf{Set}$. It follows that the only obstruction for $F \cong \mathrm{id}$ is the cogroup structure of $\widehat{\mathbb{Z}}$ induced by the isomorphism above. I have asked here for a classification.
