$||f||_p <\infty$ , then there exist a sequence of simple functions $\{g_n\}$ such that $||g_n-f||_p\to 0$? Let $f$ be a measurable function on a measure space $(X,\mathcal F,\mu)$ and $p>0$ such that $||f||_p:=(\int_X|f|^p d\mu)^{1/p} <\infty$ , then is it true that there exist a sequence of simple functions $\{g_n\}$ such that $||g_n-f||_p\to 0$ as $n \to \infty$ ?
 A: For $p\in[1,\infty)$, there exists a sequence of simple functions $\{g_n\}$ with $g_n\uparrow f$. Hence
$$|g_n-f|^p\leqslant |f|^p $$ 
so by dominated convergence,
$$
\lim_{n\to\infty}\|g_n-f\|_p = \lim_{n\to\infty}\left(\int_X |g_n-f|^p\,\mathsf d\mu\right)^\frac1p
= \left(\int_X\lim_{n\to\infty} |g_n-f|^p\,\mathsf d\mu\right)^\frac1p\stackrel{n\to\infty}\longrightarrow 0.
$$
For $p=\infty$, $f\in L^\infty$ implies that
\begin{align}
\|f\|_\infty&:=\operatorname{ess\ sup}f\\&=\sup\{C>0 : \mu(\{x\in X: |f(x)|>C\}=0\} \\&<\infty,
\end{align} and so there is a sequence of simple functions $\{g_n\}$ that converges to $f$ uniformly. That is, for any $\varepsilon>0$ there exists $N$ such that $$\sup_{x\in X}|g_n(x)-f(x)|<\varepsilon$$ for $n\geqslant N$. For each positive integer $k$, choose $N_k$ so that $\sup|g_n-f|<\frac1k$ for $n\geqslant N_k$. Then
\begin{align}
\lim_{n\to\infty}\|g_n-f\|_\infty <\frac1k 
\end{align}
for all $k$, so that $g_n\stackrel{L^\infty}\longrightarrow f$.
The statement is not well-defined for $0<p<1$ since then $\|\cdot\|_p$ is no longer a norm.
