Let $a$ $\in$ $\mathbb{R}$ be a fixed real number and let $f$ be an extended real-valued function with domain $D$ $\in$ $\Sigma$. Then $f$ is measurable if and only if the function $g$; $\Omega$ $\longrightarrow$ $\overline R$ defined by
$$ g(w)= \begin{cases} f(w),w\in D\\ a, w \notin D \end{cases} $$
is measurable
My understanding. g(w) = f(w) if w $\in$ D. Now suppose that f is measurable, then if w $\geq$ 0 then both sets g(w) and f(w) being grater than w are measurable such that x lies inside the domain of D. That is both the sets F(w) and g(w) are in fact equal which then implies that is it measurable. However if w is less than D or rather not in D we have a, which i am confused with. That must mean the original set f(x) such that x is inside D must be measurable only if that set union the compliment of the entire set D is measurable.
I don't know if my thinking is wrong or not but I am confused how to do the reverse.