Depending on the course i was looking at, i could find different definition of "existence" of the lebesgue integral of a random sign function , and i can't really understand how they can be equivalent or what's the interest of choosing one or another : Here are two definition i could find (There is a question on the forum that is similar to mine , but i couldn't really find what i was searching in it) [Translated from french , some vocabulary mistakes could appear]
Definition 1) Let $(X,T,µ)$ be a mesured space. Let $f$: $X\rightarrow R$ be a measurable function. We define $f^+ = max (0,f)$ and $f^- = max(0,-f)$. If $\displaystyle \int f^+ dµ $ AND $\displaystyle \int f^-dµ $ are both finite , we define the integral of f by $$\displaystyle \int f dµ = \int f^+dµ - \int f^-dµ$$
Definition 2)Let $(X,T,µ)$ be a mesured space. Let $f$: $X\rightarrow \overline{R}$ be a measurable function. We define $f^+ = sup (0,f)$ and $f^- = sup(0,-f)$. If $\displaystyle \int f^+ dµ $ OR $\displaystyle \int f^-dµ $ is finite, we define the integral of f by $$\displaystyle \int f dµ = \int f^+dµ - \int f^-dµ$$ Two things i notice : in the second definition , our f function has to be $\overline{R}$ valued, and the max notation is remplaced by a sup. To sum up , i'll say my three questions are :
1)How can these two definitions exists simultaneously ? I mean , it's a pretty huge difference to say in one case, the lebesgue integral of a random sign function has to be finished to exist, and in the other case it can exists to the infinite sense.
2)About the sup , I don't really see how can sup be different to max in this particular case, as we are just comparing 0 to f(x) for x in X.(for the $f^+$ case as example).
3)Is the $\overline{R}$ difference in term of image space of f the reason why these two definition can exists ? To be more precise, what property is giving $\overline{R}$ instead of $R$ in this definition , is it related to the fact we are using the sup instead of the max ?
Let me start with your point 2): Using $\sup$ or $\max$ is is equivalent here. The function $f^+$ is defined pointwise so you are only comparing two values.
Regarding 1): If both $\int f^+\text{d}\mu$ and $\int f^-\text{d}\mu$ are finite then so is $\int f\text{d}\mu$. But if for example $\int f^+\text{d}\mu=\infty$ and $\int f^-\text{d}\mu<\infty$ it still makes sense to define $\int f\text{d}\mu=\infty$. So in this sense Definition 2 is just more general and not really contradicting Definition 2.
Regarding 3): $\overline{\mathbb{R}}$ refers to the extended real number line and is defined as $\overline{\mathbb{R}}:=\mathbb{R}\cup\{\infty\}\cup\{-\infty\}$. This means you allow functions where for some $x$ you have $f(x)=\infty$. An important convention here is $0*\infty=0$. This doesn't really change much in most cases since if for example you have $f(x)=\infty$ for $x\in A$ and $A$ isn't a null set this immediately implies that $\int f\text{d}\mu$ cannot be finite. What you need is of course a sigma algebra for $\overline{\mathbb{R}}$ which is given by $\mathcal{B}(\overline{\mathbb{R}})=\{A\cup C:A\in\mathcal{B}(\mathbb{R}), C\subset\{-\infty,\infty\}\}$. As you see this looks very simlar to the usual $\mathcal{B}(\mathbb{R})$ and the basic results regarding generating systems, measurability of functions, etc. are analogue.