Let $(X,\mathcal{A},\mu)$ be a measure space, and $f \colon X \to \mathbb{C}$ an $\mathcal{A}$-measurable function.
My texbook defines, for essentially bounded functions with respect to $\mu$, i.e., $\exists M \in \mathbb{R}_{++}$ such that $\lvert f \rvert \leq M, \ \mu$-a.e.,
$\|f\|_{\infty} := \inf\{M > 0 : \lvert f \rvert \leq M, \mu-a.e.\}$,
which I take to be the essential supremum of $f$ (although this name does not appear in the book).
My problem is that it is apparently not obvious from the definition of $\|\cdot \|_{\infty}$ that for an essentially bounded function $f$, $\lvert f \rvert \leq \|f\|_{\infty}, \ \mu-$a.e., as this is proved in a separate lemma.
I can't see why it wouldn't follow from the definition, so any clarification would be much appreciated. I am thinking that when we consider $\|f\|_{\infty}$, aren't we in a sense approximating from above the "smallest possible" $M$ such that $\lvert f \rvert \leq M, \ \mu-$a.e., thus shouldn't the resultant $M = \|f\|_{\infty}$ also share the property that $\lvert f \rvert \leq \|f\|_{\infty}, \ \mu-$a.e?
(sidenote: my professor, if I am quoting him correctly, explained that the definition doesn't say that $\lvert f \rvert \leq \|f\|_{\infty}, \ \mu$-a.e., it only says that if we choose an $M > \|f\|_{\infty}$, then $\lvert f \rvert \leq M, \ \mu$-a.e.)
I think that the crux of the matter is that one needs to convince oneself that $\|f\|_\infty\in\{M>0:\mu(|f|>M)=0\}$.
The definition you present is equivalent to $$ \|f\|_\infty=\inf\{M>0:\mu(|f|>M)=0\} $$ Take a decreasing sequence $M_n$ in $\{M>0:\mu(|f|>M)\}$ that converges to $\|f\|_\infty$. Then $\mu(|f|>\|f\|_\infty)=\mu\Big(\bigcup_n\{|f|>M_n\}\Big)=\lim_n\mu(|f|>M_n)=0$. From this you can see now that $|f|\leq\|f\|_\infty$ $\mu$-a.s.