TITLE: If $f:\mathbb{R}\to\mathbb{R}$ is a left continuous function can the set of discontinuous points of $f$ have positive Lebesgue measure?
QUESTION [30 upvotes]: If $f:\mathbb{R}\to\mathbb{R}$ is a left continuous function can the set of discontinuous points of $f$ have positive Lebesgue measure?
I wondered this today, but made little progress. Thank you.

REPLY [16 votes]: There's nothing wrong with Ben Derrett's answer, but I just thought I'd point out the same argument goes through under slightly weaker assumptions.
Lemma. Let $f: \mathbb{R} \to \mathbb{R}$ be arbitrary. Then the set $A \subset \mathbb{R}$ of all points $a$ such that

$f$ is discontinuous at $a$
the limit of $f(x)$ as $x$ approaches $a$ from the left exists

is countable.
Proof. Suppose for contradiction that $A$ is uncountable. For $i \in \mathbb{Z}^+$, let $A_i$ be the set of all $a \in A$ such that, for any neighbourhood $U$ of $a$, $|f(x) - f(y)| \geq 1/i$ holds for some $x,y \in U$. Since $f$ is discontinuous on $A$, we have $A = \bigcup_{i=1}^\infty A_i$  and it follows that $A_n$ is uncountable for some $n$.
Call a point $a \in A_n$ left-isolated if $(a - \epsilon,a)$ does not meet $A_n$ for sufficiently small $\epsilon>0$. By associating to each left isolated point $a$ a rational number from the interval $(a-\epsilon,a)$, we see that $A_n$ has countably many left-isolated points. Since $A_n$ is uncountable, there exists some $p \in A_n$ which is not left isolated.
But now, given $\epsilon > 0$, we have that $(p - \epsilon, p)$ is a neighbourhood of some $a \in A_n$. Hence, $|f(x) - f(y)| \geq 1/n$ for some $x,y \in (p - \epsilon, p)$. But this contradicts the assumption that the limit as $x \to p$ from the left of $f(x)$ exists. QED.
As an application, after reproving the lemma with left-hand limits replaced by right-hand limits, we get the following.
Theorem. If $f$ is such that for all $a \in \mathbb{R}$ one of the limits
$$ \lim_{x \to a^-} f(x) \text{ or } \lim_{x \to a^+} f(x) $$
exists, then $f$ has a countable number of discontinuities.
{"set_name": "stack_exchange", "score": 30, "question_id": 65941}