I am learning about topological groups and hit the following lemma about "topological groupness" being preserved by subspaces and products. I am struggling with the proofs.
Lemma 3.34 Any subgroup of a topological group is a topological group with the subspace topology. Any finite product of topological groups is a topological group with the direct product group structure and the product topology.
My Proof for subgroups Let $H$ be a subgroup of topological group $G$, and let $\iota: G \rightarrow G$ and $\mu: G \times G \rightarrow G$ be the continuous group operations on $G$. Then $H$ will be a topological group if we can show that the operations $\iota\vert_H: H \rightarrow H$ and $\mu\vert_H: H\times H\rightarrow H$ are continuous maps between topological spaces. As always, continuity will obviously be dictated by the topology, which here is the subspace topology.
We know from properties of the subspace topology that the restriction of continuous maps on a space to a subspace are continuous; here, $\iota\vert_H$ is the restriction of $\iota$ to $H$ and $\mu\vert_H$ is the restriction of $\mu$ from $G\times G$ to $H\times H$, another subspace. Both operations on $H$ are exactly such restrictions. Hence, they are both continuous maps on $H$ and so $H$ is a topological group. $\blacksquare$
I'm fairly convinced this is correct. I found this answer more or less confirming this approach. I'm more stuck on the product proof.
My Partial Proof for Products Let $\left\{H_i\right\}_{i=1}^n$ be a set of topological groups, and consider $H = \times_{i=1}^n H_i$. I want to show that the inversion map $\iota:H \rightarrow H$ given by $$ \iota\left(\left(h_1,\ldots,h_n\right)\right) = \left(h_1^{-1}, \ldots, h_n^{-1}\right) $$ and the multiplication map $\mu: H\times H \rightarrow H$ given by $$ \mu\left(\left(h_1,\ldots,h_n\right),\left(k_1,\ldots,k_n\right)\right) =\left(h_1k_1, \ldots, h_nk_n\right)$$ are continuous.
For inversion, let $U \subset H$ be a basis element, so $U = \times_{i=1}^n U_i$ where each $U_i \subset H_i$ is open. Then $$ \iota^{-1}\left(U\right) = \left\{ \left(h_1, \ldots, h_n\right) \vert \iota_i\left(h_i\right) \in U_i\right\} = \iota_1^{-1}\left(U_i\right) \times \cdots \times \iota_n^{-1}\left(U_n\right)$$ where $\iota_i$ is the inversion map for group $H_i$. Since each inversion map $\iota_i$ is continuous by assumption of $H_i$ a topological group, we have expressed $\iota^{-1}\left(U\right)$ as a basis element for the topology on $H$, and so it is open. This makes $\iota: H \rightarrow H$ continuous.
For the product mapping, I wanted to try something similar. Let $U$ be defined as above. Then $$ \mu^{-1}\left(U\right) = \left\{ \left(h,k\right) \in H\times H \vert h_ik_i \in U_i \forall i\right\} $$ and this is where I'm stuck.
Update: Attempt to finish the proof
Let's restrict to the case where $H= H_1 \times H_2$, the product of just two subspaces. Then the multiplication mapping is $$ \mu: H \times H \rightarrow H $$ given by $$ \mu\left(\left(g,h\right), \left(g',h'\right)\right) = \left(gg', hh'\right). $$ From properties of product spaces, we know that a mapping into a product is continuous if and only if each of the component mappings are continuous; here, those component mappings are $$ \mu_i: H \times H \rightarrow H_i, \text{ for } i = 1,2. $$ Thus it remains to show that these mappings are continuous.
Looking at $i=1$, let $U \subseteq H_1$ open. Then $$ \mu_1\left(\left(g,h\right), \left(g',h'\right)\right) = gg' $$ and we want to show that $$ \begin{align} \mu_1^{-1}\left(U\right) & = \left\{ \left(\left(g,h\right),\left(g',h'\right)\right) \in H\times H \vert gg' \in U \right\} \\ \end{align} $$ is open in $H \times H$.
(This seems over-complicated, but here goes.) Let $\left(\left(g,h\right), \left(g',h'\right)\right) \in \mu_1^{-1}\left(U\right)$. Then $\mu_{H_1}\left(g,g'\right) := gg' \in U$ where $\mu_{H_1}$ is the group multiplication on $H_1$, continuous since $H_1$ is a topological group. Thus we have $ \mu_{H_1}^{-1}\left(U\right) \subseteq H_1 \times H_1 $ open, and so there are open sets $M$ and $N$ in $H_1$ such that $$ \left(g, g'\right) \in M \times N \subseteq \mu_{H_1}^{-1}\left(U\right) \subseteq H_1 \times H_1. $$
With these sets $M$ and $N$ in hand, I claim that $$ \left(g, h\right) \times \left(g',h'\right) \in \left(M \times H_2\right) \times \left(N \times H_2\right) \subseteq \mu_1^{-1}\left(U\right)$$ in which case I will have demonstrated the existence of an open subset of $\mu_1^{-1}\left(U\right)$ containing our point, thus $\mu_1^{-1}\left(U\right)$ is open and $\mu_1$ is continuous.
Certainly $\left(g,h\right) \times \left(g',h'\right) \in \left(M\times H_2\right)\times \left(N\times H_2\right)$. This set is also clearly open. To show the set inclusion, let $\left(x,y\right)\times \left(x',y'\right) \in \left(M\times H_2\right)\times \left(N\times H_2\right)$. Then $\left(x,x'\right) \in M\times N $ so that $xx' \in U$ and $\left(x,y\right)\times\left(x',y'\right) \in \mu_1^{-1}\left(U\right)$. Hence, $ \left(M\times H_2\right)\times \left(N\times H_2\right) \subseteq \mu_1^{-1}\left(U\right)$ and so $\mu_1$ is continuous.
Similarly, $\mu_2$ is continuous and so our mapping $\mu: \left(H_1 \times H_2\right)\times\left(H_1 \times H_2\right) \rightarrow \left(H_1\times H_2\right)$ is continuous. The extension to arbitrary finite products of $n$ topological groups is a straightforward induction proof, and I'll omit this here. $\blacksquare$
Notes
The answer here gives some hints toward the solution, but no real justification for its claims. My product proof in particular feels very "low-level" in that I'm going back to the definition to prove it. I had tried using the characteristic property of product spaces, noting that the multiplication map is a map into a product space, and so by the characteristic property, $$ \mu \text{ continuous } \iff \pi_i \circ \mu \text{ continuous} $$ where $\pi: H \rightarrow H_i$ is the usual projection, but I found the latter composition just as difficult to get a hold of.
I updated my proof in the question with my answer.