A long time ago I discovered a necessary and sufficient condition for a pair of groups to be isomorphic, assuming the groups are disjoint as sets. Essentially, two groups $G$ and $H$ are isomorphic if and only if each group operation extends to a group operation on the disjoint union $G\sqcup H$ such that the resulting extensions are "compatible" with respect to parentheses. The precise statement is as follows:
Let $(G,\cdot)$ and $(H,\ast)$ be groups such that $G\cap H=\emptyset$. Then $(G,\cdot)\cong(H,\ast)$ if and only if $\cdot$ and $\ast$ extend, respectively, to group operations $\circ$ and $\diamond$ on $G\cup H$ such that for all $a,b,c\in G\cup H$, we have $(a\circ b)\diamond c = a\circ (b\diamond c)$ and $(a\diamond b)\circ c = a\diamond(b\circ c)$.
I haven't been able to find any references to this result online, so I'm wondering if anyone has any insight into how this statement fits into existing theory. I'll sketch the proof, in case it's helpful.
For the "only if" direction, assume that some isomorphism $f:G\to H$ exists. Extend $\cdot$ to the binary operation $\circ_f$ on $G\cup H$ given by
$$a \circ_f b= \begin{cases} a \cdot b &: a,b \in G\\ f^{-1}(a) \cdot f^{-1}(b) &: a,b \in H\\ a \ast f(b)&: a\in H, b\in G\\ f(a) \ast b&: a\in G, b \in H. \end{cases}$$
Then $(G\cup H,\circ_f)$ is a group (in fact, $(G\cup H,\circ_f)\cong G\times C_2$, as pointed out by Amitai Yuval in this post: Is there a concise argument for why this group operation is associative?). The dual operation $\circ_{f^{-1}}$ ends up being compatible with $\circ_{f}$ in the above sense. For example, when $a\in G$ and $b,c\in H$, we have
$$\begin{align} (a\circ_f b)\circ_{f^{-1}} c &= (f(a)\ast b)\circ_{f^{-1}} c\\ &= (f(a)\ast b)\ast c \\ &= f(a)\ast (b\ast c)\\ &= f(a)\ast (b\circ_{f^{-1}} c)\\ &= a\circ_f (b\circ_{f^{-1}} c). \end{align}$$
This concludes the proof in one direction. For the "if" direction, assume that $\cdot$ and $\ast$ extend, respectively, to "compatible" group operations $\circ$ and $\diamond$ on $G\cup H$. Let $e_G$ and $e_H$ denote the identity elements of $(G,\cdot)$ and $(H,\ast)$, respectively. Then $e_G$ is necessarily the identity element of the group $(G\cup H,\circ)$. Moreover, if $g^{-1}\in G$ is the inverse of $g$ with respect to the operation $\cdot$, then $g^{-1}$ is also the inverse of $g$ in the group $(G\cup H,\circ)$. Similarly, $e_H$ is the identity element of $(G\cup H,\diamond)$, and the inverse $h^{-1}$ of $h\in H$ is also the inverse of $h$ with respect to the operation $\diamond$.
I claim that $g\circ h\in H$ for all $g\in G$, $h\in H$. To see this, assume that $g\circ h=g' \in G$, for some $g\in G, h\in H$. By the above remarks, if $g^{-1}\in G$ is the inverse of $g$ under $\cdot$, then $g^{-1}$ is also the inverse of $g$ with respect to $\circ$. Hence,
$h=g^{-1} \circ g' =g^{-1} \cdot g' \in G,$
a contradiction, as $G$ and $H$ are disjoint. The claim follows, and a symmetric argument shows that $h\diamond g\in G$ for all $g\in G, h\in H$. Define $f:G\to H$ by
$f(g)=g\circ e_H.$
Let's check that $f$ is a group homomorphism from $G$ into $H$. For $g,g'\in G$, we have
$$\begin{align} f(g\circ g')&=(g\circ g')\circ e_H\\ &=g\circ (g'\circ e_H)\\ &=g\circ f(g') \\ &= g\circ (e_H\diamond f(g')). \end{align}$$
Using "compatibility" of $\circ$ and $\diamond$, it follows that
$$\begin{align} g\circ (e_H\diamond f(g'))&= (g\circ e_H)\diamond f(g') \\ &= f(g)\diamond f(g')\\ &=f(g)\ast f(g'). \end{align}$$
Hence, $f(g \cdot g')=f(g) \ast f(g')$, so $f$ is a group homomorphism. But $f$ is injective, for if $f(g)=f(g')$, then $g \circ e_H=g' \circ e_H$ , which implies that $g=g'$. Moreover, $f$ is surjective, since for any $h\in H$, we have
$$\begin{align} h&=h\diamond e_H \\ &= h\diamond(e_G\circ e_H)\\ &=(h\diamond e_G)\circ e_H \\ &= f(h\diamond e_G), \end{align}$$
where $h\diamond e_G\in G$.
Thus, $f$ is a group isomorphism, and the proposition follows. (One may also observe that the inverse of $f$ is the map $h\mapsto h\diamond e_G$.)
Furthermore, the result is still "morally" true without the assumption of disjointness, but I don't want to dwell on this point right now.
I have a lot of ideas about how to extend this result. For example, I think most or all of the maps that I construct above are actually coming from universal properties (which I only learned about recently), and I'd like to try to prove a category-theoretic analogue of this theorem (Please, no spoilers if possible!). Additionally, given some fairly mild constraints, the isomorphisms (if any) $G\to H$ are in bijective correspondence with the algebraic systems $(G\cup H, \circ, \diamond)$, where $\circ$ and $\diamond$ are compatible extensions, as before. But before I spend any more time on this, I'd like to know if I'm overcomplicating something simple/obvious (as I tend to do), or if my theorem follows from well-known results. I'm quite sure, in any event, that the theorem is utterly useless, but I find its statement pretty interesting.