Equivalent definition of essential supremum Let $(X,\mathcal{A},\mu)$ be a measure space and let $f\colon X\to [-\infty,+\infty]$ be a measurable function. Denote with $\mathcal{N}_\mu$ the collection of $\mu$-null sets.
On same text the definition of essential supremum is

$$\operatorname{esssup}f:=\inf\left\{\sup_{x\in X\setminus N} f(x)\;\middle|\; N\in\mathcal{N}_\mu \right\}\tag 1$$

In other texts it is:

$$\operatorname{esssup}f:=\inf\left\{a\ge 0\;\middle|\;\mu\left(\{x\in X\;\middle|\; f(x)>a\}\right)=0         \right\}\tag2$$


Question Are $(1)$ and $(2)$ equivalent? Why?


I think you need $a\in \mathbb{R}$ and f(x) without the absolute value. Otherwise f konstant -1 is a couterexample. But if you correct this, the two definitions are equivalent:
Let $A:= \{\sup_{x\in X\setminus N}f(x)\mid N\in \mathcal{N}_{\mu}\}$ and $B:= \{a\in \mathbb{R}\mid \mu(\{x\in X\mid f(x)>a\})=0\}$. We show $\inf A=\inf B$:
"$\geq$": For $N\in \mathcal{N}_{\mu}$ we have $\{x\in X \mid f(x)>\sup_{x\in X\setminus N}f(x)\}\subseteq N$, and hence $\mu(\{x\in X \mid f(x)>\sup_{x\in X\setminus N}f(x)\})=0$. Therefore, $A\subseteq B$ and $\inf A\geq \inf B$.
"$\leq $": Let $a$ be given such that $\mu(\{x\in X\mid f(x)>a\})=0$ and define $N:= \{x\in X\mid f(x)>a\}$. Then $N\in \mathcal{N}_\mu$ and for $x\in X\setminus N$ we have $f(x)\leq a$, hence $\sup_{x\in X\setminus N}\leq a$. So for all $x\in B$ there is a $y\in A$ with $y\leq x$. Therefore, $\inf A\leq \inf B$.
