% Differentiability and density continuity
 
\documentstyle[12pt]{article}
%\pagestyle{empty}

\pagestyle{plain}
\setcounter{page}{239}
 
 
\newfont{\BTimesnine}{TimesB at 9pt}
\newfont{\bg}{TimesB at 17pt}
 
\begin{document}
 
{\small\noindent Krzysztof Ciesielski, Department of Mathematics, West
Virginia University, Morgantown, WV 26506
      \footnote
      {  This author had support from the Burroughs Wellcome Grant,
         Independent College Fund of North Carolina.
      }
 
 
\noindent Lee Larson, Department of Mathematics, University of
Louisville, Louisville, KY 40292
 
\noindent Krzysztof Ostaszewski, Department of Mathematics, University
of Louisville, Lou\-is\-ville, KY 40292
      \footnote
      {  This author was partially  supported by a
         University of Louisville research grant.
      }}
 
 
\vskip 15 mm
 
\centerline{\bg Differentiability and Density Continuity}
 
\newcommand{\io}{\mbox{I_0}}
\newcommand{\into}{\mbox{$\rightarrow$}}
\newcommand{\F}{\mbox{{\cal F}}}
\renewcommand{\H}{\mbox{{\cal H}}}
\newcommand{\M}{\mbox{{\cal M}}}
\newcommand{\C}{\mbox{$\cal C$}}
\newcommand{\D}{\mbox{{\cal D}}}
\newcommand{\R}{\mbox{{\cal R}}}
\newcommand{\J}{\mbox{{\cal J}}}
\newcommand{\sumin}{\mbox{$\sum_{i=1}^n$}}
\newcommand{\Nats}{\mbox{\bf N}}
\newcommand{\nats}{\mbox{{\BTimesnine N}}}
\newcommand{\reals}{\mbox{\bf R}}
\newcommand{\e}{\varepsilon}
\renewcommand{\d}{\mbox{$\delta$}}
\newcommand{\bstar}{Baire*1}
\newcommand{\osc}{\omega}
\newcommand{\fP}{\mbox{$f|_P$}}
\newcommand{\supp}{\mbox{{\rm supp}}}
\newcommand{\Cinfty}{\mbox{$C^\infty$}}
\newcommand{\epsfrac}{\frac{\rho}{1-\rho}}
\newcommand{\charf}[1]{\mbox{\raise .48em\hbox{$\chi$}$_#1$}}
 
\newcounter{conditions}
\newcounter{consequences}
 
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}
\newtheorem{corollary}{Corollary}
\newtheorem{example}{Example}
\newtheorem{observation}{Observation}
 
\section{Introduction}
The density topology \cite{jo,tal} on $\reals$ consists of 
all measurable
subsets $A$ of $\reals$ such that, for every $x\in A$,
$x$ is a density point of $A$. It is a completely regular
refinement of the natural topology. A function
$f\colon\reals\to\reals$ is {\em density continuous} if and
only if it is continuous as a selfmap of $\reals$ equipped
with the density topology. The class of density continuous
functions was investigated by Ostaszewski
\cite{ko1,ko2}. Bijections of the real line whose inverses are
density continuous were studied by Bruckner \cite{ab2} and
Niewiarowski \cite{jn}. Ostaszewski \cite{ko3} considered the
class as a semigroup with composition as the operation.
Ciesielski and Larson  \cite{cl} showed that real-analytic
functions are density continuous, and that the class of density
continuous functions is not a linear space. Furthermore, there
exist $C^{\infty}$ functions which are not density continuous.
Ciesielski, Larson, and Ostaszewski \cite{clo} proved that a
typical continuous function is nowhere density continuous, and
the class of sets of points of discontinuity of density
continuous functions is that of nowhere dense $F_\sigma$
subsets of $\reals$.
 
Throughout this paper we are concerned with the relationship between
density continuity and differentiability. In the process, we discuss
the fact that any closed set can be made into the zero set of a
$C^{\infty}$ density continuous function, and we show that there is a
nowhere approximately differentiable density continuous and continuous
function. This example answers a problem posed by Ostaszewski 
\cite{ko3}.
 
The following theorem will be used several times in the sequel. It is a 
restatement of a theorem due to Ciesielski and Larson \cite[Theorem
1]{cl}.
 
\begin{theorem}\label{thm:convex}
   If a function $f$ is convex in a neighborhood of $x$, then $f$
is
   density continuous at $x$.
\end{theorem}
 
The following notation will be used:
\begin{description}
\item $\reals$ -- the set of real numbers;
\item $\Nats$ -- the set of natural numbers, $\Nats = \{1, 2, 3
\ldots\}$; 
\item $|A|$ -- the Lebesgue measure of a
      measurable set $A\subset\reals$;
\item $A^c$ -- the complement of a set $A$;
\item ${\overline d}(A,x),\ {\underline d}(A,x),\ d^+(A,x),\
      d^-(A,x),\ d(A,x)$ -- the upper, lower, right-hand,
      left-hand, and ordinary (respectively) densities of a set
      $A\subset\reals$ at a point $x\in\reals$;
\item $\Cinfty$ -- the set of all smooth (i.e.,
      infinitely many times differentiable) functions
      $f:\reals\into\reals$; 
\item ${dist}(x,F)$ -- the distance of an $x\in\reals$ from a set
      $F\subset\reals$;
\item $\supp(f) = \{x\in\reals\colon f(x) \ne 0\}$; and
\item $f^{(k)}(x)$ -- the $k$'th derivative of $f$ at $x$. In particular,
      $f^{(0)}(x)=f(x)$.
\end{description}
 
\section{The zero-set of a density continuous function}
 
Ciesielski and Larson \cite{level} were able to show
that the complements of level sets for the density continuous
functions do not form a subbase for the density topology (i.e., the
density topology is not generated; see also the discussion of this
problem in \cite{ko3}). This implies, that the structure of level
sets, and the zero sets in particular, of density continuous
functions, is not very rich. However, we were able to prove that
closed sets are the zero sets of density continuous, continuous
functions with certain differentiability properties.
 
\begin{theorem}\label{thm:closed}
   Given a closed set $F$, there is a function $f\in\Cinfty$ which is 
   density continuous such that $F=\supp(f)^c$. 
\end{theorem}
 
In order to prove this theorem, we need two lemmas.
The first has already been shown by Ciesielski, Larson and
Ostaszewski \cite[Lemma 1]{clo}.
 
\begin{lemma}\label{lem:capture}
   Suppose that $I_n$ and $J_n$ are sequences of intervals such that
   $I_n\subset J_n$ and $I_n$ has the same center
   as $J_n$ for all $n\in\Nats$.
   If
   \[
      Z_x=\bigcup_{\{n:x\notin J_n\}} I_n
   \]
   and
   \[
      \sum_{n\in\nats} |I_n|/|J_n|<\infty,
   \]
   then $d(Z_x,x)=0$ for all $x\in\reals$.
\end{lemma}
   
\begin{lemma}\label{lem:convex}
   Suppose that $f$ is a function which is convex upward on $\reals$ and
   increasing on $[0,\infty)$, with $f(0) = 0$.
   If $h_0>0$, $0 < \rho < 1$, and $H\subset (0,h_0)$ is a measurable
set such that
   \begin{equation}\label{eq:ratio}
      |H\cap (0,h)|> h\rho >0,\ \forall h\in (0,h_0),
   \end{equation}
   then
   \[
      |f^{-1}(H)\cap (0,t)|\ge t\rho >0,\ \forall t\in (0,f^{-1}(h_0)).
   \]
\end{lemma}
 
Proof. Choose $t\in(0,f^{-1}(h_0))$. Let $h = f(t)$. There is
a nonnegative, nonincreasing function $g$ on $(0,h)$ such that 
\[
f^{-1}(k) = \int_0^k g(l) dl \,\,\hbox{for each}\, k\in(0,h).
\]
\noindent 
Denote
\[
v(s) = \sup\{k\in(0,h)\colon g(k)\ge s\}.
\]
Assume (1). Then
\begin{eqnarray*}
   \vert f^{-1}(H)\cap(0,t)\vert &
   = & 
   \int_{H\cap(0,h)}g(l)dl \\
   & = &
   \int_{H\cap(0,h)}\left(\int_0^{g(l)}dr\right)dl \\
   & = &
   \int_0^{g(0+)}\int_{H\cap(0,v(r))}dl\, dr \\
   & \ge &
   \rho\int_0^{g(0+)}v(r)dr \\
   & = & 
   \rho\int_0^h g(t)dt = \rho t.
\end{eqnarray*}
 
This proves Lemma \ref{lem:convex}, so we move on to the
proof of the theorem.
 
Without loss of generality, we may assume that $F\subset (0,1)$
and that $(0,1)\setminus F$ has an infinite number of components
denoted by $I_n=(a_n,b_n),\ n\in\Nats$.
 
For each $n$, let $c_n=(a_n+b_n)/2$ and choose
an $\e_n\in(0,|I_n|4^{-n})$.
In each $I_n$ choose $f_n\in\Cinfty$ such that
$\supp(f_n)=I_n$,
$f_n^{(k)}(a_n)=f_n^{(k)}(b_n)=0$ for all $k\ge 0$,
$f_n$ is convex upward on $(a_n,c_n-\e_n)$ and $(c_n+\e_n,b_n)$,
$f_n$ is convex downward on $(c_n-\e_n,c_n+\e_n)$
and
\begin{equation}\label{eq:nbound}
   \sup_{0\le k\le n} \| f_n^{(k)} \|_\infty < 1/n.
\end{equation}
Define
\begin{equation}\label{eq:fdef}
   f(x)=\sum_{n\ge 1} f_n(x).
\end{equation}
 
Using (\ref{eq:nbound}), (\ref{eq:fdef}) 
and the disjointness of the $I_n$ we see that $f^{(k)}$
converges uniformly for all $k\ge 0$. This implies that $f\in\Cinfty$.
It is also clear that $\supp(f)=F^c$.
 
To show that $f$ is density continuous, we note Theorem \ref{thm:convex}
implies $f$ is density continuous on each $I_n$, right density
continuous at each $a_n$ and left density continuous at each $b_n$.
 
Choose any $x\in F\setminus\{a_n:n\ge 0\}$, let $\rho\in(0,1)$ and let $H$ be
a density neighborhood of $0$.
There exists an $h_0>0$ such that whenever $0<h<h_0$,
then $|H\cap(0,h)|>h\rho$.
From the choice of $x$, there is a $\d>0$ such that
whenever 
$n\in S=\{n:I_n\cap(x,x+\d)\ne\emptyset\}$, then $\|f_n\|_\infty<h_0$.
 
From Lemma \ref{lem:convex} it is clear that for all $n\in S$,
\begin{equation}\label{eq:sides}
   |f^{-1}(H)\cap((a_n,c_n-\e_n)\cup(c_n+\e_n,b_n))|
   \ge
   \rho|((a_n,c_n-\e_n)\cup(c_n+\e_n,b_n))|.
\end{equation}
Lemma \ref{lem:capture} and the choice of $\e_n$ shows that
\begin{equation}\label{eq:top}
   d\left(\bigcup_{n\ge 1}(c_n-\e_n,c_n+\e_n),x\right)=0.
\end{equation}
Since $F\subset f^{-1}(H)$, we see from (\ref{eq:sides})
and (\ref{eq:top}) that
\[
   d^+(f^{-1}(H),x)\ge\rho.
\]
The arbitrarity of $\rho$ and $x$ shows that $f$ is right density
continuous everywhere. A similar argument establishes left density
continuity. 
 
The proof is the theorem is finished. Note that a part of the above
proof can be also used to show the following corollary.
 
\begin{corollary}
   Let $F$ be a closed subset of $\,$\reals. Then the function $f(x) =
dist (x, F)$ is density
continuous.
\end{corollary}
 
\begin{theorem}
   Let $F$ be a closed subset of $\,$\reals\ which is of measure
   zero. There exists a density continuous function $f$ such that
   $\supp(f)=F$ and $f$ is not approximately differentiable at any point
   of $F$, while being differentiable elsewhere. 
\end{theorem}
 
Proof. If the complement of $F$ has finitely many components then 
$F$ is finite and the result
is trivial. Therefore, without loss of generality, we may assume that
$F\subset (0,1)$ and that $(0,1)\setminus F$ has an infinite number of
components, denoted by $I_n=(a_n,b_n),\ n\in\Nats$.
 
Let $F^\prime$ be the set of all accumulation points of $F$. We also
define
\[
G = (0,1)\setminus F=\bigcup_{n\in\nats}(a_n,b_n),
\]
\[
c_n = (a_n + b_n)/2, n\in\Nats,
\]
\[
a_n^\prime = c_n - (c_n - a_n)/2, n\in\Nats,
\]
\[
b_n^\prime = c_n + (b_n - c_n)/2, n\in\Nats,
\]
\[
G^\prime = \bigcup_{n\in\nats}(a_n^\prime,b_n^\prime),
\]
\noindent and
\[
C = \{c_n: n\in\Nats\}.
\]
Note that every
point of $F$ is a density point of $G$, and 
\[
\overline{d}(G^\prime,x)\ge\frac{1}{4}
\]
for every $x\in F$.
 
Put $g(x) = 0$, if $x\in F$. To define $g$ on $G$ we will
proceed by induction. 
 
Let $m_0 = 0$. The induction step is as follows. For $i\in\Nats$, let
${\cal V}_i$ be a finite class of closed intervals, not necessarily
disjoint, of positive length not exceeding $i^{-2}$ such that
\[
F^\prime\subset\bigcup{\cal
V}_i\subset[0,1]\setminus\bigcup_{n=1}^{m_i}(a_n,b_n).
\]
In addition to the above we will also require that
for every $J\in{\cal V}_i$, $n\in\Nats$ either $J\cap(a_n,b_n) =
\emptyset$ or $(a_n,b_n)\subset J$.
 
As $F$ is of measure zero, we can find $m_{i+1} > m_i$ such that for
every $J\in{\cal V}_i$
\begin{equation}\label{six}
\left\vert J\cap\bigcup_{n =
1}^{m_{i+1}}(a_n,b_n)\right\vert\ge{1\over 2}\vert J\vert.
\end{equation}
Inequality (\ref{six}) implies that

\begin{eqnarray}\label{seven} 
\left\vert J\cap\bigcup_{n = m_i + 1}^{m_{i +
1}}(a_{n}^{\prime},b_n^{\prime})\right\vert
   & = & 
\frac{1}{2}\left\vert J\cap\bigcup_{n = m_i + 1}^{m_{i +
1}}(a_{n} ,b_n)\right\vert\nonumber
   \\
   & = &
\frac{1}{2}\left\vert J\cap\bigcup_{n = 1}^{m_{i +
1}}(a_{n} ,b_n)\right\vert \ge {1\over 4}\vert J\vert  
\end{eqnarray}
for every $J\in{\cal V}_i$.
 
For $n = m_i + 1, \ldots, m_{i + 1}$ define $g(c_n) = i^{-1}$, and
let $g$ be linear in the corresponding intervals $[a_n,c_n]$,
$[c_n,b_n]$. This completes the definition of $g$.
 
We will show now that $g$ is not approximately differentiable at any
point of $F$.
 
If $x\in F\setminus F^\prime$ then $x$ is an isolated point of $F$
and as such equals $a_n = b_m$ for some $n,m\in\Nats$. Clearly
the right-hand derivative of $g$ at $x$ is positive, while the
left-hand derivative is negative, so that $g$ is not approximately
differentiable at $x$.
 
If $x\in F^\prime$, then for every $i\in\Nats$ there exists a
$J\in{\cal V}_i$ such that $x\in J$. For every $z\in
J\cap\bigcup_{m_i + 1}^{m_{i+1}}(a_n^\prime,b_n^\prime)$
\[
\left\vert{{g(z) - g(x)}\over{z - x}}\right\vert = 
{{g(z)}\over{\vert z
- x\vert}} \ge 
{{{1\over 2}i^{-1}}\over{i^{-2}}} = {1\over 2}i. 
\]
This, combined with (\ref{seven}) implies that g is not approximately
differentiable at $x$.
 
An argument analogous to the one of Theorem 2 shows that $g$ is
density continuous. However, it is not differentiable at any of the
points $c_n$, $n\in\Nats$. We will modify $g$ to obtain a function
possessing all the desired properties.
 
Choose a sequence of
intervals $K_n$ centered at $c_n$, such that
\[
|K_n|/(b_n-a_n)<2^{-n}
\]
and modify $g$ on each $K_n$ to
be differentiable 
on $(a_n,b_n)$ and convex downward on $K_n$. 
In light of Theorem \ref{thm:convex} and Lemma \ref{lem:capture}, this
will not
change its density continuity.
Call the modified function $f$. Since the modification took place on
a set of density $0$ at every point of $F$, $f$ has all the desired
properties.
 
 
\section{A nowhere approximately differentiable \hfill\break
continuous density continuous function}
 
\begin{theorem}
There exists a continuous, density continuous function which
is nowhere approximately differentiable.
\end{theorem}
 
Proof. Let $I=[0,1]$. Mal\'{y} \cite{JM1} constructs a density
continuous function $f\colon I\to I$ such that there exists a set $A$
of measure zero with $\vert f(A)\vert = 1$. The function $f$ is
actually the $x$-coordinate of a Peano area-filling curve. We will
recall Mal\'{y}'s construction and show that the function $f$ is
nowhere approximately differentiable.
 
First, let $g\colon [0,9]\to[0,3]$ be defined as follows: $g(0) = 0,
g(1) = 1, g(2) = 0, g(3) = 1, g(4) = 2, g(5) = 1, g(6) = 2, g(7) = 3,
g(8) = 2, g(9) = 3$, and let $g$ be linear in each interval of the
form $[i, i + 1]$, where $0 \le i \le 8$. Define
\[
f_1(x) = {1\over 3}g\left({1\over 9}x\right).
\]
For every $n\in\Nats$, $k\in\Nats$, $0\le k < 9^n$, $0\le t\le
9^{-n}$ let 
\[
f_{n+1}\left({k\over{9^n}} + t\right) =
f_n\left({k\over{9^n}}\right) + {1\over 3}g\left(9^{n + 1} t\right)
\left(f_n\left({{k + 1}\over{9^n}}\right) -
f_n\left({k\over{9^n}}\right)\right).
\]
Mal\'{y} \cite{JM1} shows that the sequence $\{f_n\}_{n\in\nats}$
converges uniformly to a continuous, density continuous function
$f\colon I\to I$.
 
It remains to show that $f$ is approximately differentiable 
nowhere.
 
To do this, we note the following facts, which are obvious from the
construction.
\begin{description}
   \item{(a)} $f_n$ is linear on each interval of the form
   $[j9^{-n},(j+1)9^{-n}]$.
   \item{(b)} $f_n([j9^{-n},(j+1)9^{-n}])=[k3^{-n},(k+1)3^{-n}]$
   for all $j$ with $0\le j<9^{n}$ and some $k$ with $0\le k<3^{n}$.
\end{description}
 
Choose $x\in [0,1]$ and $n\in\Nats$. 
There is a $j$, $0\le j <9^n$, such that $x\in J
= [j9^{-n},(j+1)9^{-n}]$. Let $f(x)\in [\alpha,\beta] = 
[k3^{-n},(k+1)3^{-n}]$. Assume that $f_n$ is increasing on $J$ and
$f(x) \le {1\over 2}(\alpha + \beta)$ (the other cases are handled
similarly). Consider the interval
\[
K = \left[\left(j + {2\over 3}\right)9^{-n},\left(j +
1\right)9^{-n}\right]. 
\]
If $y\in K$ then
\[
f(y)\in\left[\left(k + {2\over 3}\right)3^{-n}, (k + 1)3^{-n}\right]
\]
and
\[
{{f(y) - f(x)}\over{y - x}} \ge {{\left(k + {2\over 3}\right)3^{-n} -
\left(k + {1\over 2}\right)3^{-n}}\over{\left(j + 1\right)9^{-n} -
j9^{-n}}} = {{{1\over 6}3^{-n}}\over{9^{-n}}} = {1\over 6}3^n.
\]
 
This implies
\[
   9^n
   \left|
      \left\{
         y\in
(x,x+9^{-n}):\frac{f(y)-f(x)}{y-x}\ge{1\over
6}3^{n}
      \right\}
   \right|
   \ge
   \frac{1}{3}.
\]
 
In general, for the above, and other cases of the behavior of $f$ on $J$,
\[
   {9^n}
   \left|
      \left\{
         y\in
   \left(x-9^{-n},x+9^{-n}\right):
   \left|\frac{f(y)-f(x)}{y-x}\right|\ge
         {{\frac{1}{6}}3^{n}}
      \right\}
   \right|
   \ge
   \frac{1}{12}
\]
for all $n$. It follows from that $f$ is not 
approximately differentiable at $x$.
 
\medskip
 
The authors would like to express their gratitude for the valuable
comments of the anonymous referees.
 
 
\pagebreak
 
\begin{thebibliography}{22}
\bibitem{ab2} Bruckner, A.M., Density-preserving
homeomorphism and the theorem of Maximoff, {\sl Quart. J.
Math. Oxford}, (2){\bf 21} (1970), 337-347.
\bibitem{cl} Ciesielski, K., and Larson, L., The space
of density continuous functions, to appear in {\sl Acta Math. Hung.}
\bibitem{level} Ciesielski, K., and Larson, L., Level sets of
density continuous functions and their relationship to S-admissible
classes, in preparation.
\bibitem{clo} Ciesielski, K., Larson, L., and Ostaszewski, K.,
Density continuity versus continuity, {\sl Forum
Math.}, {\bf 1}(1989), 1-11.   
\bibitem{JM1} Mal\'{y}, J., The Peano curve
and the density topology, {\sl Real Anal. Exch.}, {\bf 5}(1979-80),
326-329. 
\bibitem{jn} Niewiarowski, J., Density-preserving
homeomorphisms, {\sl Fund. Math.}, {\bf 106} (1980), 77-87.
\bibitem{ko1} Ostaszewski, K., Continuity in the density
topology, {\sl Real Anal. Exchange}, {\bf 7}(2) (1982),
259-270.
\bibitem{ko2} Ostaszewski, K., Continuity in the density
topology II, {\sl Rend. Circ. Mat. Palermo}, (2){\bf 32}
(1983), 398-414.
\bibitem{ko3} Ostaszewski, K., Semigroups of density-continuous functions,
{\sl Real Anal. Exch.}, {\bf 14}(1)
(1988-89), 104-114. 
\bibitem{jo} Oxtoby, J.C., {\sl Measure and
Category}, Springer, 1971.
\bibitem{tal} Tall, F.D., The density topology, {\sl Pacific
J. Math.}, {\bf 62}(1) (1976), 275-284.
\end{thebibliography}
 
 
\end{document}
