Understanding Almost Everywhere Statements in Stromberg's Book On page 263 of his book Stromberg gives the following definition ($M_0$ denotes the set of real-valued step functions on $\mathbb{R}$).

What is the exact meaning of $\phi_n(x)\to f(x)$ a.e.? Is it $\lambda(E^{c})=0$ where $\lambda$ is Lebesgue measure and $E=\{x\in \mathbb{R} : f(x) \text{ is defined and } \phi_n(x)\ \to f(x)\}$?
Stromberg also makes the following remark.

But this means that $f(x)$ could take value $\pm\infty$ on a set of measure zero and still be in $M_1$. Hence in definition (6.10) it seems like $f(x)$ does not need to be strictly real-valued, but only real-valued almost everywhere.
Am I understanding this correctly? Is it better to view $f$ as a function defined on all of $\mathbb{R}$ but whose values are allowed to be arbitrary on a set of measure zero?
Thanks a lot for help.
 A: About your first point: it should mean that there exists a set $E\subseteq \mbox{Domain}(f)$ such that $\lambda(\mathbb R - E) = 0$ and for all $x \in E:\ \phi_n(x)\to f(x)$.
On your second point: if you have a function $f$ that has infinities only in a set of measure zero, you can still consider the restricted function $f' = f|_{f^{-1}(\mathbb R)}$, and ask if $f'$ is in $M_1$. The functions $f$ and $f'$ are equal a.e.. The assumption in the definition is not a real restriction since for anything that matters you will always work in spaces where a "function" is really an equivalence class of functions that are equal a.e.
A: Your understanding of "$\phi_n\rightarrow f$ a.e." is correct (note, though, that it is weird to say "$\phi_n(x)\rightarrow f(x)$ a.e.", because this looks like an element $x$ has already been fixed and $\phi_n(x)\rightarrow f(x)$ for a fixed $x$ is either true or not, without any notion of a.e.; to remove this ambiguity, one could also write "$\phi_n(x)\rightarrow f(x)$ for a.e. $x\in\mathbb{R}$").
Now, I don't have Strombergs book, but from the first excerpt you posted, it says "$f$ is a real-valued function", so it appears that he is only considering functions that take values in $\mathbb{R}$. So, in his remark, it would appear that he, to begin with, only considers real-valued $g$ for which it is supposed to apply.
Note, however, that this is merely a definitional obstruction, not a conceptual one. Indeed, measure theory can be developed perfectly well while considering functions that take values in the extended real numbers $\mathbb{R}\cup\{\pm\infty\}$ (and this is sometimes more convenient). The remark still remains true in this context.
Now, your last question demonstrates great insight, so I will digress for a bit. The takeaway of this remark (and this applies in even more generality) is that "what a function does on a set of measure $0$ is negligible". Intuitively, this isn't particularly surprising: we are doing measure theory and sets of measure $0$ are negligible measure-theoretically, so what a function does on such a set ought to be negligible too. The consequence is that if two functions are equal almost everywhere, they will essentially always behave the same when it comes to measure- or integration-theoretic questions.
Now, precisely because what a function does on a set of measure $0$ doesn't really matter to measure theory, we often look at spaces whose elements are not functions, but equivalence classes of functions, where the equivalence relation is given by equality a.e. (the most common ones are the so-called $L^p$ spaces). This is what captures your intuition of "values are allowed to be arbitrary on a set of measure zero" and these spaces lead to lots of interesting theory. The drawback is that if you only have an equivalence class of functions, talking about a specific value like $f(x)$ doesn't make sense anymore, because the set $\{x\}$ has measure zero. So, while losing the ambiguity of only caring about things up to equality almost everywhere, you're also losing the fact that the objects you're considering aren't actually functions anymore, but something a bit more strange (and trying to understand what exactly they are is part of the interesting theory).
So, to summarize, appreciate that your functions are bona fide functions while you still have them, but definitely, at any point in time, keep in mind that we don't care about what happens on a set of measure $0$.
