Suppose $\displaystyle g:[0,\infty)\rightarrow\mathbb{R}$ and $\displaystyle L\in[-\infty,\infty]$. Prove that $\displaystyle lim_{t\rightarrow\infty}g(t)=L \iff$ for every increasing sequence $\displaystyle (a_n)$ in $\displaystyle [0,\infty)$, if $\displaystyle a_n\rightarrow\infty$, then $\displaystyle g(a_n) \rightarrow L$.

I'm trying to prove [<==] when $\displaystyle L=\infty$ by contradiction. But not sure about the definition:

$\displaystyle lim_{t\rightarrow\infty}g(t)=\infty$ means that $\displaystyle \forall M>0 $, there is $\displaystyle x\in[0,\infty)$ such that $\displaystyle \forall t>x, g(t)>M.$ Is this the correct definition?

So if $\displaystyle lim_{t\rightarrow\infty}g(t)\not=\infty$, then there exists $\displaystyle M>0 $ such that $\displaystyle \forall x\in[0,\infty)$ there exists $\displaystyle t>x$ such that $\displaystyle g(t) \leq M.$ Right?