Convergence in Probability - Random function evaluated in random argument. Suppose that $g_n: \mathbb{R}^k \to \mathbb{R}^h$ are random linear mappings such that
$$
g_n \stackrel{P}{\to} g, \quad \quad \text{as } n\to\infty,
$$
where the non-random limit $g$ is injective. Now assume that
$$
g_n(\hat{\beta}_n - \beta_0) \stackrel{P}{\to} 0 , \quad \quad \text{as } n\to\infty.
$$
where $\hat{\beta}_n$ is some estimator of $\beta_0$.
Does it follow that $\hat{\beta}_n \stackrel{P}{\to} \beta_0$? 
Heuristically I would assume that something like the following steps could be used
$$
g_n(\hat{\beta}_n - \beta_0) \stackrel{P}{\to} g(\text{P-lim}\hat{\beta}_n - \beta_0) =0 \iff \text{P-lim}\hat{\beta}_n =\beta_0,
$$
as $g$ is injective. 
However I have failed to show this formally. How would one argue these steps formally?
 A: My attempt based on the above hints: 
 Note that as $g$ is injective we have that $rank(g) = G$, and as such $rank(g^t g) = rank(g) = G$ so $g^t g$ is invertible. Furthermore by Slutsky's theorem we get that
    \begin{align*}
 g_n \stackrel{P}{\to}g \implies g_n^t g_n \stackrel{P}{\to} g^t g
 \end{align*}
    as $n\to\infty$, that is for any $\epsilon>0$
\begin{align*}
 P(||g_n^t g_n-g^t g\| \leq \epsilon) =P(g_n^t g_n \in \overline{B(g^t g,\epsilon)})  \to_n 1.
 \end{align*}
    Now note that the set of all non-singular $G\times G$ matrices $NS(G,G)$ is an open subset of all $G\times G$ matrices $M(G,G)$, and as such we know that there exists an $\epsilon>0$ such that 
    \begin{align*}
 \overline{B(g^t g,\epsilon)} \subset NS(G,G),
 \end{align*}
    hence  $g_n^t g_n$ will be invertible with probability tending towards 1, that is
    \begin{align*}
 P(g_n^t g_n \in NS(G,G)) \underset{n\to\infty}{\to } 1.
 \end{align*}
    Let $h_n:\Omega\to NS(G,G)$ be given by
    \begin{align*}
 h_n(\omega)  = \left\{ \begin{array}{ll}
 g_n^t(\omega) g_n(\omega), & \text{if } \omega\in (g_n^t g_n \in NS(G,G)) \\
 I, & \text{otherwise}
 \end{array}\right.
 \end{align*}
    Realize that $h_n \underset{n\to\infty}{\stackrel{P}{\to}} g^t g$, since for any $\epsilon >0$
\begin{align*}
 P(\|h_n-g^t g\| >\epsilon ) = &P((\|g_n^t g_n-g^t g\|> \epsilon) \cap (g_n^t g_n \in NS(G,G))) \\
 & + P((\|I-g^t g\|> \epsilon )\cap (g_n^t g_n \in NS(G,G))^c) \\
 \leq & P(\|g_n^t g_n-g^t g\|> \epsilon) + P(g_n^t g_n \in NS(G,G))^c). \\
 \to_n & 0,
 \end{align*}
        By continuity of the inverse operator and the continuous mapping theorem we have that $\|h_n^{-1}\|\underset{n\to\infty}{\stackrel{P}{\to}} \|(g^t g)^{-1}\|\in \mathbb{R}$. Furthermore, 
        \begin{align*}
  \|g_n^t g_n(\hat{\beta}_n-\beta_0) \| \leq \|g_n^t \| \| g_n(\hat{\beta}_n-\beta_0) \|  \underset{n\to\infty}{\stackrel{P}{\to}} \|g^t \|  \cdot  0= 0,
  \end{align*}
        by the assumptions and Slutsky's theorem. Hence for any  $\epsilon>0$
\begin{align*}
P( \|h_n(\hat{\beta}_n-\beta_0) \| > \epsilon ) =& P( (\|g_n^t g_n(\hat{\beta}_n-\beta_0) \| > \epsilon ) \cap (g_n^t g_n \in NS(G,G)) ) \\
&+ P( (\|\hat{\beta}_n-\beta_0\| > \epsilon) \cap  (g_n^t g_n \in NS(G,G))^c) \\
\leq & P( (\|g_n^t g_n(\hat{\beta}_n-\beta_0) \| > \epsilon ) ) + P((g_n^t g_n \in NS(G,G))^c)\\
\to_n & 0.
 \end{align*}
Thus
    $$
 \|\hat{\beta}_n-\beta_0\| = \| h_n^{-1} h_n(\hat{\beta}_n-\beta_0) \| \leq \|h_n^{-1}\| \| h_n(\hat{\beta}_n-\beta_0) \| \underset{n\to\infty}{\stackrel{P}{\to}} \|(g^t g)^{-1}\| \cdot 0=0,
 $$
    by Slutsky's theorem, yielding that $\hat{\beta}_n$ is an consistent estimator of $\beta_0$.
