[proofplan]
We use only the homomorphism part of the isomorphism hypothesis. First we record that $\varphi$ preserves the identity element and inverses, because these facts are needed for the exponents $0$ and negative integers. Then we prove the formula for positive powers by induction. Finally, if $n<0$, we write $n=-m$ with $m \in \mathbb{N}$ and reduce to the positive-power case applied to $g^{-1}$.
[/proofplan]
[step:Show that $\varphi$ preserves the identity element and inverses]
Let $1_G$ and $1_H$ denote the identity elements of $G$ and $H$, respectively. Since $\varphi$ is a [group homomorphism](/page/Group%20Homomorphism),
\begin{align*}
\varphi(1_G) = \varphi(1_G 1_G) = \varphi(1_G)\varphi(1_G).
\end{align*}
Multiplying this equality on the left in $H$ by $\varphi(1_G)^{-1}$ gives
\begin{align*}
1_H = \varphi(1_G).
\end{align*}
Now let $x \in G$. Since $x x^{-1} = 1_G$ and $\varphi$ is a homomorphism,
\begin{align*}
\varphi(x)\varphi(x^{-1}) = \varphi(x x^{-1}) = \varphi(1_G) = 1_H.
\end{align*}
Thus $\varphi(x^{-1})$ is the inverse of $\varphi(x)$ in $H$, so
\begin{align*}
\varphi(x^{-1}) = \varphi(x)^{-1}.
\end{align*}
[guided]
Let $1_G$ be the identity element of $G$ and let $1_H$ be the identity element of $H$. The homomorphism property says that for all $a,b \in G$,
\begin{align*}
\varphi(ab) = \varphi(a)\varphi(b).
\end{align*}
Applying this with $a = 1_G$ and $b = 1_G$ gives
\begin{align*}
\varphi(1_G) = \varphi(1_G 1_G) = \varphi(1_G)\varphi(1_G).
\end{align*}
This equation takes place in the group $H$. Since every element of a group has an inverse, we may multiply on the left by $\varphi(1_G)^{-1}$. The left-hand side becomes $1_H$, and the right-hand side becomes $\varphi(1_G)$, so
\begin{align*}
1_H = \varphi(1_G).
\end{align*}
Next we prove inverse preservation. Let $x \in G$. Since $x^{-1}$ is the inverse of $x$ in $G$, we have $x x^{-1} = 1_G$. Applying the homomorphism property to this product gives
\begin{align*}
\varphi(x)\varphi(x^{-1}) = \varphi(x x^{-1}) = \varphi(1_G) = 1_H.
\end{align*}
Thus $\varphi(x^{-1})$ is a right inverse for $\varphi(x)$ in $H$. In a group, inverses are unique, so this right inverse is the inverse of $\varphi(x)$. Therefore
\begin{align*}
\varphi(x^{-1}) = \varphi(x)^{-1}.
\end{align*}
[/guided]
[/step]
[step:Prove the power formula for positive integers by induction]
We prove that for every $m \in \mathbb{N}$,
\begin{align*}\varphi(g^m) = \varphi(g)^m.\end{align*}
For $m=1$, this is
\begin{align*}\varphi(g^1) = \varphi(g) = \varphi(g)^1.\end{align*}
Assume for some $m \in \mathbb{N}$ that $\varphi(g^m) = \varphi(g)^m$. Since $g^{m+1} = g^m g$, the homomorphism property gives
\begin{align*}\varphi(g^{m+1}) = \varphi(g^m g) = \varphi(g^m)\varphi(g) = \varphi(g)^m\varphi(g) = \varphi(g)^{m+1}.\end{align*}
By induction, the formula holds for every $m \in \mathbb{N}$.
[/step]
[step:Handle the zero exponent]
By the definition of the zero power in a group, $g^0 = 1_G$ and $\varphi(g)^0 = 1_H$. From the identity preservation proved above,
\begin{align*}\varphi(g^0) = \varphi(1_G) = 1_H = \varphi(g)^0.\end{align*}
[/step]
[step:Reduce negative exponents to the positive case]
Let $n \in \mathbb{Z}$ with $n<0$. Define $m := -n$, so $m \in \mathbb{N}$ and $n=-m$. By the definition of negative powers in a group,
\begin{align*}g^n = g^{-m} = (g^{-1})^m.\end{align*}
Applying the positive-power result to the element $g^{-1} \in G$ gives
\begin{align*}\varphi(g^n) = \varphi((g^{-1})^m) = \varphi(g^{-1})^m.\end{align*}
Using inverse preservation from the first step,
\begin{align*}\varphi(g^{-1})^m = \varphi(g)^{-m} = \varphi(g)^n.\end{align*}
Hence $\varphi(g^n) = \varphi(g)^n$ for every negative integer $n$.
Combining the positive, zero, and negative cases proves the desired identity for every $n \in \mathbb{Z}$.
[/step]