# Find Borel functions $f,g$ that agree on a dense subset of R but not at $\lambda$-almost every $x\in R$

Here is the homework question, verbatim:

Find Borel functions $f,g: \mathbb{R} \to \mathbb{R}$ that agree on a dense subset of $\mathbb{R}$ but are such that $f(x) \neq g(x)$ holds at $\lambda$-almost every $x\in \mathbb{R}$

I interpreted the latter part to mean, "... holds $\lambda$-almost everywhere in $\mathbb{R}$."

I also understand $\lambda$ to actually be $\lambda^{\ast}$ - Lebesgue outer measure.

I also think the question says that $f(x) \neq g(x)$ holds $\lambda$-almost everywhere in $\mathbb{R}$ and means that for only a set of outer Lebesgue measure zero is it true that $f(x) = g(x)$. This latter set happens to be the dense subset of $\mathbb{R}$ mentioned in the problem.

So what I have so far is that $f(x) = g(x)$ on a set $A$ s.t. $\lambda \big(A:=\{x \in \mathbb{R} : f(x) = g(x) \}\big)=0$. So $A$ is dense, meaning that for any $x \in \mathbb{R}$, any neighborhood $N(x,\;\;\;) \ni$ (at least one point from $A$). This to me means that, since the interior of $int \; (A^c) = \varnothing$, only the points ${}^{\pm}\infty$ of the extended real number line is where these functions agree. But I don't see how $\{{}^-\infty\}$ and $\{{}^+\infty\}$ can be dense....?

So does this mean two different functions (classes of functions?) that only share one or both infinite limits?

Thanks much for any guidance!

nate

-
It seems to me that you're overthinking this. Hint: Try really simple functions first - for example indicator functions. – kahen Oct 20 '11 at 23:04
As you suggested I let $h(x) :=f(x)-g(x)$ and so $h(x) = \left\{ \begin{array}{ll} 0 & x \in A \subseteq \mathbb{R} \\ c_1 & x \in \mathbb{R}\backslash A \end{array} \right.$ But I don't know how to use the Borel feature of $f$ and $g$, nor the $A$ being dense... – nate Oct 20 '11 at 23:12
You're making it far too difficult on yourself. Why the sudden appearance of $h$?! What the heck is that $c_1$ doing there?! You're still overthinking it. – kahen Oct 20 '11 at 23:15
Well indicator function made me think of $h(x)$ and $c_1$ is just a number. For what you had proposed, $1_A$ and $0$ agree on the set $\{0\} \cup A^c$. As far as too difficult - maybe, but that is because I don't know how to do this I guess. – nate Oct 20 '11 at 23:24
You might as well take $g(x)$ to be identically $0$. Now take $f$ to be the indicator function of some subset of $\mathbb{R}$ whose complement is dense in $\mathbb{R}$. You have to choose the subset so as to get $f(x)\ne 0$ almost everywhere, but there’s an easy example that does just that. – Brian M. Scott Oct 20 '11 at 23:28

So set $g(x)=0$ identically and treat $f(x)$ as an indicator/characteristic function on the set where $f(x) \neq g(x)$. The dense subset of $\mathbb{R}$ where the two functions are equal has the properties, $$f(x) = g(x) \longleftrightarrow \lambda^{\ast}(\left\{ x \in \mathbb{R} : f(x) = g(x) \right\} ) = \lambda^{\ast}\big(H^c:= dense\;\;subset\;\;of\;\;\mathbb{R} \big) = 0,$$ and the function is defined as, $$f(x) = \left\{ \begin{array}{ll} 1,& x \in H \subseteq \mathbb{R} \\ 0, & x \notin H \end{array} \right. .$$ So choose $H$ s.t. $f(x) \neq 0\;\;a.e.$.
Let $H:=\mathbb{R}\backslash \mathbb{Q} \Longleftrightarrow H^c = \mathbb{Q}$, where $\mathbb{Q}$ is dense (and countable). Then the indicator function becomes, $$f(x) = \left\{ \begin{array}{ll} 1, & x \in \mathbb{R}\backslash \mathbb{Q} \\ 0, & x \in \mathbb{Q} \end{array} \right. .$$ As a check then, on $\mathbb{Q}$, $f(x) = 0$ and $g(x) = 0$ (though $g(x) = 0$, being identically 0 implies it is the additive identity of the underlying group, and $f(x)=0$ implies that $\left[f(x)\right] = 0$ as a class of functions - are they really the same?).
On $\mathbb{R} \backslash \mathbb{Q}$, $f(x) = 1$ and $g(x) = 0$.