I have just shown that in $L^p([a,b])$ for $p=1,2$, if we have $f_n \rightarrow f$ almost everywhere and $\left \| f_n\right \|_p\rightarrow \left \| f\right \|_p$, then there is convergence in $L^p$: $$\left \| f_n -f \right \|_p\rightarrow0$$ I was wondering if this can be generalized for other $L^p$ spaces, and I am particularly concerned about $L^{\infty}([a,b])$. My intuition is that it shouldn't, but I am struggling to find a counterexample in $L^{\infty}([a,b])$, which should in principle be the easist space to disprove it.
My question therefore is, is there any example of a sequence $\{f_n\}\in L^{\infty}([a,b])$ and $f\in L^{\infty}([a,b])$ such that $f_n \rightarrow f$ almost everywhere and $\left \| f_n\right \|_{\infty}\rightarrow \left \| f\right \|_{\infty}$, but $\{f_n\}$ does not converge to $f$ in $L^{\infty}([a,b])$ (that is, with the supremum norm)?
You can take $$f_n(x) = \left\{ \begin{array}{l} x^n &\text{ if } x\in[0,1] \\ 1&\text{ if } x\in[1,2]. \end{array}\right. $$ It converges to $f = \mathbb{1}_{[1,2]}$ almost everywhere, and $\|f_n\|_{L^\infty} = \|f\|_{L^\infty} = 1$, but $\|f_n-f\|_{L^\infty} = 1$, so it does not converges in $L^\infty$.