On measurable functions: Rudin's *Real and Complex Analysis*, Chapter 1, Exercise 6 
Let $X$ be an uncountable set, let $\mathfrak{M}$ be the collection of all sets $E \subset X$ such that either $E$ or $E^c$ is at most countable ( i.e, finite or countable), and define $\mu(E)=0$ in the first case, $\mu(E)=1$ in the second. Prove that $\mathfrak{M}$ is a $\sigma$-algebra  in $X$ and that $\mu$ is a measure on $\mathfrak{M}$. Describe the corresponding measurable functions and their integrals.

My understanding is that there are no mutually disjoint sets of the second type in $\mathfrak{M}$. After this, it was possible to establish that $\mathfrak{M}$ is a $\sigma$-algebra and that $\mu$ is a positive measure on $\mathfrak{M}$. In order to describe the measurable functions in this case, first consider a simple function $$s(x)=\sum_{i=1}^n c_i\chi_{E_i}$$ where $c_i$ are all non-negative. $s(x)$ is measurable if each $E_{i}$ is in $\mathfrak{M}$.  $E_i$'s are mutually disjoint, thus only one of them, say $E_1$ can be of the second type. What type of positive measurable function $f$  can be constructed as a limit of a monotonically increasing sequence of  such $s(x)$?  I am thinking only $f$ could be constant functions, but I am not very clear on this right now.
Thanks
 A: Let $f:X\to\mathbb{R}$ be a measurable function. This implies that for every $x\in\mathbb{R}$ we must have that $f^{-1}(x)=:E_x\in\mathfrak{M}$. We have two possible cases:


*

*Assume there is such an $x$ so that $E_x$ is uncountable. Then $E_x^c$ is at most countable. You can show that any choice of image for the elements of $E_x^c$ defines a valid measurable function.

*Assume there is no such $x$. Then $f$ defines a partition of $X$ into at most countable sets by $\bigsqcup_{x\in\mathbb{R}}E_x = X$. By cardinality arguments, there must be an uncountable number of sets in the partition. In particular, $f(X)$ is an uncountable subset of $\mathbb{R}$, and as such it has uncountably many limit points. From this, you should be able to prove that such a function cannot exist (else you would be able to construct two disjoint uncountable subsets of $X$ that are both in $\mathfrak{M}$).


In conclusion, a measurable function $f:X\to\mathbb{R}$ is completely determined by a real number $x$, an uncountable subset $E\subseteq X$ with at most countable complement, and a map $f':X\backslash E\to\mathbb{R}\backslash\{x\}$ with no restrictions. The integral of $f$ over $X$ is then given by $\int_Xf = x.$
