Countable indicator partition of a euclidean real function

Let $f : X \to \mathbb{R}^D$ be a D4363: Euclidean real function such that
 (i) $E_0, E_1, E_2, \ldots \subseteq X$ are each a D78: Subset of $X$ (ii) $E_0, E_1, E_2, \ldots$ is a D5143: Set partition of $X$
Then $$f = \sum_{n = 0}^{\infty} f I_{E_n}$$
Subresults
Subresult 0
Countable indicator partition of a complex function
Let $f : X \to \mathbb{C}$ be a D4881: Complex function such that
 (i) $E_0, E_1, E_2, \ldots \subseteq X$ are each a D78: Subset of $X$ (ii) $E_0, E_1, E_2, \ldots$ is a D5143: Set partition of $X$
Then $$f = \sum_{n = 0}^{\infty} f I_{E_n}$$
Subresult 1
Countable indicator partition of a random euclidean real number
Let $P = (\Omega, \mathcal{F}, \mathbb{P})$ be a D1159: Probability space such that
 (i) $X : \Omega \to \mathbb{R}^D$ is a D4383: Random euclidean real number on $P$ (ii) $E_0, E_1, E_2, \ldots \in \mathcal{F}$ are each an D1716: Event in $P$ (iii) $E_0, E_1, E_2, \ldots$ is a D5143: Set partition of $\Omega$
Then $$X = \sum_{n = 0}^{\infty} X I_{E_n}$$
Proofs
<No proofs for this assertion yet>