# Verifying if a function is a.e. equal to a continuous function then it is continuous a.e.

Is it true that if a function is almost everywhere equal to a continuous function then it is continuous almost everywhere?

I know that the converse is false. i.e. if f is continuous a.e. , there must not exist a function $g$ such that $g=f$ a.e. and $g$ is continuous. But couldn't get a counter example that makes the statement false. Please someone give me hints.

• No. Let $f(x)$ be $0$ if $x\in \mathbb Q$ and $1$ otherwise. Then $f$ is nowhere continuous, yet it equals $1$ almost everywhere. – lulu Mar 22 '16 at 21:32
• What do you mean by continuous a.e.? Is it the set of discontinuity have measure $0$, or that $f$ is continuous restricted onto the complement of a measure zero set? – user251257 Mar 22 '16 at 21:39

Let $f = \chi_{\mathbf Q}$, the characteristic function of $\mathbf Q$. Then $f$ is nowhere continuous, although $f = 0$ $\lambda$-almost everywhere.
• Yes. Although $f$ does a.e. equal the continuous function $0$, $f$ is nowhere continuous. – martini Mar 22 '16 at 21:48