# Equivalence Class of functions and properties examples

(1) A function $f:\mathbb{R}^d \rightarrow \mathbb{R}$ is continuous almost everywhere, if the set {x: $f$ is not continuous at x} is a null set

(2) There exists a continuous function $g:\mathbb{R}^d \rightarrow \mathbb{R}$ such that $f=g$ almost everywhere.

(a) Make an example of a function that satisfies (1) but not (2)

(b) Make an example of a function that satisfies (2) but not (1)

I was playing around online and came across this and thought it looked interesting. Ideas?

• it's talking about equivalence classes of measurable functions. Classes of functions that are equal on $\mathbb{R}^d\backslash N$, where $N$ is a set of Lebesgue measure 0. – Dunham Apr 25 '16 at 22:17
• For b it's not hard to construct a function almost everywhere $0$ but nowhere continuous. – Captain Lama Apr 25 '16 at 22:25

Define $f \colon \mathbb{R} \rightarrow \mathbb{R}$ by
$$f(x) = \begin{cases} \frac{1}{x} & x \neq 0 \\ 0 & x = 0 \end{cases}.$$
Then $f$ is continuous almost everywhere but there is no continuous $g \colon \mathbb{R} \rightarrow \mathbb{R}$ that agrees with $f$ almost everywhere (it would have to agree with $f$ everywhere on $\mathbb{R} \setminus \{ 0 \}$ but this is absurd).
On the other hand, if you take $f = \chi_{\mathbb{Q}}$ (the characteristic function of the rationals) then $f = 0$ almost everywhere but $f$ is not continuous at any $x \in \mathbb{R}$.