TITLE: Can the identity function be expressed as a countable-linear combination of indicator functions?
QUESTION [5 upvotes]: Question. Can the function $$\mathrm{id} : \mathbb{R} \rightarrow \mathbb{R}, \qquad \mathrm{id}_\mathbb{R}(x) = x$$
be expressed as a countable-linear combination of indicator functions of subsets of $\mathbb{R}$?

Remark. One idea for constructing such a thing is to try to find a function $a : \mathbb{Q} \rightarrow \mathbb{R}$ such that $$(\forall x \in \mathbb{R}) \qquad x = \sum_{q \in \mathbb{Q}}a_q[x<q],$$
where the square brackets connote the Iverson bracket. But it's not really clear how to choose the $a_q$'s.
Honestly, I think the answer is probably "no."
Ideas, anyone?
I'm also interested in the (simpler?) problem where $\mathbb{R}$ is replaced by $\mathbb{R}_{\geq 0}$.

REPLY [4 votes]: Fix for each $0\leq x<1$ some binary representation (for example, say that you use for each $x$ the representation not containing an infinite tail of ones).
Then 
$$
x=\sum_{j=1}^{\infty}2^{-j} [j\text{th digit in binary representation of }x\text{ is }1]
$$ for any $0\leq x<1$, as follows pretty much directly from the definition of binary representations.
To extend this to all of $\mathbb{R}_{\geq}$ just extend the sum to $-\infty$.
To extend it to all of $\mathbb{R}$ just add the same representation  with replacements $x\mapsto -x$ and $2^{-j}\mapsto -2^{-j}$