Let $X\ne\emptyset$ a set, $f\colon X\to [0,+\infty)$. We consider \begin{equation} A_n=\{x:f(x)\le n\}. \end{equation}
Clearly, $A_n\subseteq A_{n+1}$, then \begin{equation} \lim_{n\to\infty}A_n=\bigcup_{n=1}^{\infty}A_n. \end{equation}
Can I say the following thing?
\begin{equation} \bigcup_{n=1}^{\infty} A_n =\{x:f(x)<+\infty\}=\{x:0\le f(x)<+\infty\}=X. \end{equation}
Thanks!