# making a function càdlàg

Suppose $f:[a,b]\to\mathbb{R}$ has a right limit $f(x+)$ at all $a \le x \lt b$ and a left limit $f(x-)$ at all $a\lt x\le b$.

Is the function $$g[a,b]\to\mathbb{R}:x\mapsto\begin{cases}f(x+)&a\le x\lt b\\ f(b)&x=b\end{cases}$$ càdlàg? and is the set $\lbrace x\in[a,b]:f(x)\neq g(x)\rbrace$ at most countable (like you would expect)?

-
There is a result which says that for any real function there exist only countably many points $x$ of $\mathbb R$ for which $f$ is not continuous at $x$ but $f(x+)$ exists. See e.g. van Rooij, Schikhof: A Second Course on Real Functions, Theorem 7.7, p.45. I believe this answers the second part of your question. – Martin Sleziak Apr 26 '12 at 10:58
Maybe I am missing something, but I think that to show that the first part is true, it suffices to show that $f(x+)=g(x+)$ and $f(x-)=g(x-)$ for each $x$, which does not seem to be that difficult. – Martin Sleziak Apr 26 '12 at 11:11
If these two accounts here and here both belong to you, you might consider registering and ask moderators to merge the old accounts with the new one. Registering might make easier for you to follow the questions you posted. – Martin Sleziak May 1 '12 at 6:33

$\newcommand{\ve}{\varepsilon}$ I'll try to give an $\ve$-$\delta$ proof.

You assume that $f(x+)$ exists for each $x$. You have defined $$g[a,b]\to\mathbb{R}:x\mapsto\begin{cases}f(x+)&a\le x\lt b\\ f(b)&x=b\end{cases}$$ and you're asking whether at each point both one-sided limits $g(x-)$ and $g(x+)$ exist and whether $g(x+)=g(x)$.

Clearly, if we show that $f(x+)=g(x+)$ and $f(x-)=g(x-)$, then this is true.

Fix a point $x_0\in[a,b)$

Let $r=f(x_0+)$, i.e. for each $\ve>0$ there is a $\delta>0$ such that $|f(x)-r|<\ve$ for each $x\in(x_0,x_0+\delta)$. This clearly implies that $|g(x)-r|=|f(x+)-r|\le\ve$ for each $x\in(x_0,x_0+\delta/2)$. This shows that $g(x_0+)=r=f(x_0+)$.

Let $l=f(x_0-)$, i.e. for each $\ve>0$ there is a $\delta>0$ such that $|f(x)-l|<\ve$ for each $x\in(x_0-\delta,x_0)$. Now if $x\in(x_0-\delta,x_0)$ then we have an interval $(x,x_0)$ on the right from $x$ such that $|f(x')-l|<\ve$ for each $x'$ in this interval. From this we get $|g(x)-l|=|f(x+)-l|\le\ve$ for each $x\in(x_0-\delta,x_0)$. This shows that $g(x_0-)=l=f(x_0-)$

There is a result which says that for any real function there exist only countably many points $x$ of $\mathbb R$ for which $f$ is not continuous at $x$ but $f(x+)$ exists. See e.g. van Rooij, Schikhof: A Second Course on Real Functions, Theorem 7.7, p.45.

Clearly $f(x)\ne g(x)=f(x+)$ implies that $f$ is not continuous at $x$. By the above result, there is only countably many such points.

-

By result that Martin said $g$ is continuous except at a contable set $C$ and in $[a,b) \backslash C, \ g(t) = f^{+}(t) = f^{-}(t)= f(t)$ . Hence in $C$, $g$ is càdlàgle se $t \in C \backslash \{b\} .$ By $C$ to be contable, $t$ is a accumulation point and \begin{eqnarray*} g(t^{+}) & = & \lim_{s \downarrow t} g(s)\\ & = & \lim_{s \downarrow t} f^{+}(s)\\ & = & \lim_{s\downarrow t} f(s)\\ & = & f(t^{+}) \\ & = & g(t)\\ \end{eqnarray*} Analogously, $g(t^{-})$ exist and is equals to $f(t^{-})$. Hence $g$ is càdlàg. Excuse my bad English.

-