TITLE: Group of groups
QUESTION [8 upvotes]: The product $\times$ of two groups is associative and commutative and there's a neutral element $\{1\}$.  Let's say I create "virtual groups" which are inverses with respect to $\times$ (like getting $\mathbb{Z}$ from $\mathbb{N}$).  Then I have a group $G$ whose elements are all groups.
This isn't allowed, though, is it?  Since a set can't be a member of itself.

REPLY [2 votes]: In addition to the problems mentioned by Brian Scott, there is another problem.
You seem to be trying to mimic the construction of the enveloping group of a semigroup (this is the image of the adjoint functor to the forgetful functor from $\mathsf{Group}$ to $\mathsf{Semigroup}$ or to $\mathsf{Monoid}$); in the commutative case, this is often called the Grothendieck group. Generally, you do not have an embedding of the original semigroup into the enveloping; you need the semigroup to be cancellative for that to hold. 
But in this setting, there are groups $A$, $B$, and $C$, pairwise nonisomorphic, such that $A\times B\cong A\times C$. That would mean that in the enveloping group, we would need to identify $A$ with the trivial group, or $B$ with $C$. You are going to have a lot of collapse in this resulting object. For example, if your class of groups includes the infinite direct product of copies of $\mathbb{Z}$, and this group is not identified with the trivial group, then every finite rank free abelian group will be identified with each other (a less than desirable outcome). 
You could get away with doing this for, say, finite groups. You can even do it within ZFC, by restricting the groups to having underlying set contained in a particular infinite set. Then, under the equivalence relation of "isomorphism" you have a cancellative commutative monoid under cartesian product, so you can construct the Grothendieck group by adjoining "formal inverses". I don't think you get anything particularly interesting, though: the monoid is free abelian on the indecomposable groups, and so the Grothendieck group is just free abelian on the indecomposable groups.