# Closure of space of simple functions in $L^\infty([a,b])$

Let $a,b\in\mathbb R$ and $L^\infty([a,b])$ be a space of all bounded functions $f:[a,b]\to\mathbb R$. It is a metric space with a metric function given by $$d(f,g) = \sup\limits_{x\in[a,b]}|f(x) - g(x)|.$$ Let us say that the function $f\in L^\infty([a,b])$ is in the class $S$, i.e. $f\in S$ if there is a finite partition $$\mathcal T = \{a = t_0<t_1<\dots<t_n = b\}$$ and a sequence of reals $c_0,\dots,c_{n-1}$ such that $$f(t) = \sum\limits_{i=0}^{n-2}c_i1_{[t_i,t_{i+1})}(t)+c_{n-1}1_{[t_{n-1},t_n](t)}$$ for all $t\in [a,b]$. I wonder if there is a nice characterization of $\bar S$, the closure of $S$ in $L^\infty([a,b])$. E.g. any continuous on $[a,b]$ function is in $\bar S$ - but it surely is much larger.

-
Is the last term $c_{n-1}\mathbf 1_{[t_{n+1},t_n]}(t)$? You could be interested in regulated functions. – Davide Giraudo Feb 26 '12 at 20:37
@DavideGiraudo: thanks for mentioning the typo (I guess you meant $t_{n-1}$, not $t_{n+1}$). Regulated functions form exactly the class I was looking for. Would you put this comment as an answer? – Ilya Feb 26 '12 at 21:55
These are usually called step functions. Simple functions allow characteristic functions of sets that are not intervals. – Jonas Meyer Feb 27 '12 at 5:04
@Jonas: thank you! – Ilya Feb 27 '12 at 7:59

The closure for the uniform norm of step functions is the space of functions which have left and right limit at each point of $(a,b)$ (right for $a$ and left for $b$). These functions are called regulated functions.
If $f$ is in the closure for the uniform norm of step functions, we fix $\varepsilon>0$. We can find a step function $f_1$ such that $||f-f_1||_{\infty}\leq \varepsilon$. Let $x_0\in (a,b)$. Then we can find $\eta>0$ such that $f_1$ is constant on $(x_0,x_0+\eta)$. If $x,y\in (x_0,x_0+\eta)$ then $$|f(x)-f(y)|\leq |f(x)-f_1(x)|+|f_1(x)-f_1(y)|+|f_1(y)-f(y)|\leq 2\varepsilon,$$ so by Cauchy's criterion $f$ has a right limit at $x_0$. A similar argument shows that $x_0$ has a left limit and that $a$ has a right limit, $b$ a left limit.
Conversely, if $f$ is regulated, we fix $\varepsilon>0$. Then for all $x\in [a,b]$, we can find $\eta(x)>0$ such that if $y,z\in (x-\eta(x),x)\cup (x,x+\eta(x))$ we have $|f(x)-f(y)|<\varepsilon$. Let $I_n:=[a,b]\cap (x-\eta(x),x+\eta(x))$. Then $(I_x)_{x\in [a,b]}$ is an open cover of $[a;b]$, so exists a $\eta>0$ such that for all open interval $I\subset [a,b]$ of diameter $<\eta$ is contained in a set $I_x$. Let $(t_0,\ldots,t_m)$ a subdivision of $[a,b]$ such that $\max_it_{i+1}-t_i<\eta$, $x_i$ such that $(t_i,t_{i+1})\subset I_{x_i}$. Let $S=(a_1,\ldots,a_p)$ a subdivision containing $t_i$ and $x_i$. We have for all $y,z\in (a_i,a_{i+1})$: $|f(y)-f(z)|<\varepsilon$. Fix $c_j:=f\left(\frac{a_i+a_{i+1}}2\right)$ and $f_1$ the step function defined by $f_1(x)=c_j$ if $x\in (a_i,a_{i+1})$ and $f_1(a_i)=f(a_i)$. Then $||f-f_1||_{\infty}\leq \varepsilon$.