\documentclass{rae}
\usepackage{amsmath,amsthm,amssymb,epic}
%\coverauthor{Krzysztof Ciesielski and Harvey Rosen}
%\covertitle{Two Examples Concerning Extendable and Almost Continuous 
%Functions}
\received{March 19, 1999}
\MathReviews{Primary:  26A15; Secondary: 54A25.}
\keywords{extendable functions, peripherally continuous functions.}
\firstpagenumber{579}
\markboth{Krzysztof Ciesielski and Harvey Rosen}{Extendable and 
Almost Continuous
Functions}
\author{Krzysztof Ciesielski%
\thanks{
The work of the first author
was partially supported by NSF Cooperative
Research Grant INT-9600548 with its Polish part
financed by Polish Academy of Science PAN.
\endgraf
Papers authored or co-authored by a Contributing Editor are managed
by a Managing Editor or one of the other Contributing Editors.},
Department of Mathematics, West Virginia University,
Morgantown, WV 26506-6310.
e-mail: {\tt K\_Cies@math.wvu.edu}\\
web page: {\tt http://www.math.wvu.edu/homepages/kcies}
\and
Harvey Rosen, Department of Mathematics,
University of Alabama, Tuscaloosa, AL 35487.
e-mail: {\tt hrosen@gp.as.ua.edu}}
\title{TWO EXAMPLES CONCERNING EXTENDABLE AND ALMOST CONTINUOUS FUNCTIONS}
%%%Put Autnor's Definitons Below Here%%%
\newcommand{\bbP} {\mathbb{P}}
\newcommand{\bbR} {\mathbb{R}}
\newcommand{\bbL} {\mathbb{L}}

\def\real{{\mathbb R}}
\def\rational{{\mathbb Q}}
\def\integer{{\mathbb Z}}
\def\continuum{{\frak c}}
\def\co{\continuum}
\def\add{{\operatorname{A}}}
\def\mul{{\operatorname M}}

\def\ext{{\operatorname{Ext}}}
\def\pr{{\operatorname{PR}}}
\def\pc{{\operatorname{PC}}}
\def\ac{{\operatorname{AC}}}
\def\conn{{\operatorname{Conn}}}
\def\darb{{\operatorname D}}

\def\Ext{\ext}
\def\pr{{\operatorname{PR}}}
\def\PC{\pc}
\def\AC{\ac}
\def\Conn{\conn}
\def\D{\darb}

\def\proj{{\operatorname{pr}}}
\def\supp{{\operatorname{supp}}}




\def\cl{{\operatorname{cl}}}
\def\bd{{\operatorname{bd}}}
\def\cf{{\operatorname{cf}}}
\def\diam{{\operatorname{diam}}}


\def\rl{\real}
\def\reals{\real}
\def\mathR{\real}

\def\ds{\bigcup}
\def\di{\bigcap}
\def\sb{\subseteq}
\def\su{\subseteq}
\newcommand{\propsub}{\subsetneqq}
\def\sm{\setminus}
\def\es{\emptyset}
\def\B{{\cal B}}
\def\C{{\cal C}}
\def\F{{\cal F}}
\def\G{{\cal G}}
\def\H{{\cal H}}
\def\J{{\cal J}}
\def\T{{\cal T}}
\def\e{\varepsilon}
\def\la{\langle}
\def\ra{\rangle}
% characteristic function
      \newcommand{\charf}[1]{\mbox{\raise.48ex\hbox{$\chi$}$_{#1}$}}



%% Theorems, etc.

\newtheorem{theorem}{Theorem}[section]
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{problem}{Problem}[section]
\newtheorem{example}{Example}[section]
\newtheorem{definition}{Definition}
\newtheorem{remark}{Remark}[section]

\newcommand{\thm}[2]{\begin{theorem}\label{#1}#2\end{theorem}}
\newcommand{\cor}[2]{\begin{corollary}\label{#1}#2\end{corollary}}
\newcommand{\prop}[2]{\begin{proposition}\label{#1}#2\end{proposition}}
\newcommand{\lem}[2]{\begin{lemma}\label{#1}#2\end{lemma}}
\newcommand{\prob}[2]{\begin{problem}\label{#1}#2\end{problem}}
\newcommand{\ex}[2]{\begin{example}\label{#1}#2\end{example}}
\newcommand{\defi}[2]{\begin{definition}\label{#1}#2\end{definition}}
\newcommand{\rem}[2]{\begin{remark}\label{#1}#2\end{remark}}

\def\pf{\noindent{\sc Proof.} }
\def\proof{\pf}

%%%%%%

\begin{document}
\maketitle

\begin{abstract}
The main purpose of this paper is to describe two examples.
The first is that of an almost continuous, Baire class two, non-extendable
function $f\colon[0,1]\to[0,1]$ with a $G_\delta$ graph.
This answers a question of Gibson~\cite{Gib}.
The second example is that of a connectivity function
$F\colon\real^2\to\real$ with dense graph such that
$F^{-1}(0)$ is contained in a countable union of
straight lines. This easily implies the existence
of an extendable function $f\colon\real\to\real$
with dense graph such that $f^{-1}(0)$ is countable.
We also give a sufficient condition for a Darboux function %from
$f\colon[0,1]\to[0,1]$ with a $G_\delta$ graph
whose closure is bilaterally dense in itself
to be quasi-continuous and extendable.
\end{abstract}


\section{Definitions and Notation}

Our terminology is standard and follows \cite{Ci:book}.
We consider only real-valued
functions of one or more
real variables. No distinction is made between
a function and its graph.
A restriction of a function $f\colon X\to Y$ to a set $A\subset X$
is denoted by $f\restriction A$.
%Symbol $\charf{A}$ will be used
%for a characteristic function of a subset $A$ of a fixed space $X$.
By $\real$ and $\rational$ we denote the set
of all real and rational numbers, respectively,
while $I$ will stand for the interval $[0,1]$.
The closure of a set $A\subset\real^n$
is denoted by $\cl(A)$, its boundary by $\bd(A)$ and its diameter by
$\diam(A)$.
The first coordinate projection of a set $A\subset\real^2$
will be denoted by $\proj(A)$.

The ordinal numbers will be identified with the sets of
all their predecessors and cardinals with the initial ordinals. In particular
$2=\{0,1\}$ and the first infinite ordinal $\omega$ number
is equal to the set of all natural numbers $\{0,1,2,\ldots\}$.
%The family of all functions from a
%set $X$ into $Y$ is denoted by $Y^X$. In particular
%$2^n$ will stand for the set of all sequences
%$s\colon \{0,1,2,\ldots,n-1\}\to\{0,1\}$, while
%$2^{<\omega}=\bigcup_{n<\omega}2^n$ is the set of all finite sequences
%into $2$.
%The symbol $|X|$ stands for the cardinality of a set $X$. The cardinality of
%$\real$ is denoted by $\co$ and referred as {\em continuum}.
%A set $S\subset\real$ is said to be {\em $\co$-dense\/}
%if $|S\cap(a,b)|=\co$ for every $a<b$.



We will also use the following terminology~\cite{GN}.
For $X\subseteq\real^n$
a function $f\colon X\to\real$ is:
\begin{itemize}
\item {\em Darboux\/} if $f[K]$ is a connected subset of $\real$ (i.e.,
an interval) for every connected subset $K$ of $X$;

\item {\em almost continuous\/} (in the sense of Stallings)
if each open subset of $X\times\real$ containing
$f$ also contains a continuous function from $X$ to $\real$~\cite{JS};

\item
  {\it connectivity\/} function if the graph of $f\restriction Z$
  is connected in $Z\times\real$ for any connected subset $Z$ of~$X$;

\item
  {\it extendable\/} function if %provided
  there is %exists
a connectivity function $F\colon X\times[0,1]\to\real$
  such that $f(x)=F(x,0)$ for every $x\in X$;

  \item
{\it peripherally continuous\/} if for
every $x\in X$ and for all pairs of open sets $U$ and $V$ containing
$x$ and $f(x)$, respectively, there exists an open subset $W$ of $U$
such that $x \in W$ and $f[\bd (W)]\subset V$.
\end{itemize}

The classes of these functions are denoted by  $\D$,
$\AC$, $\Conn$, $\Ext$ and $\PC$, respectively, where
the space $X$ will be always clear
from the context. Recall also (see e.g. \cite{GN} or~\cite{CiJa}) that
for the functions from $\real$ to $\real$ and from $I$ into $I$
we have the following
strict inclusions
\begin{equation}\label{DLF}
\Ext\subsetneq\AC\subsetneq\Conn\subsetneq\D\subsetneq\PC
\end{equation}
while in the Baire class one all these classes coincide.
(See Brown, Humke and Laczkovich \cite{bhl}.) On the other hand,
for the classes of functions from $\real^n$, with $n>1$, into $\real$
we have

\hspace{-2.1pc}
\begin{picture}(0,90)
\put(120,55){\makebox(0,0){$\Ext=\Conn=\PC$}}
    \put(167,55){\vector(1,0){15}}
    \put(205,55){\makebox(0,0){$\AC\cap\D$}}
  \put(230,60){\vector(2,1){18}}
  \put(262,70){\makebox(0,0){${\AC}$}}
  \put(260,40){\makebox(0,0){${\D}$}}
  \put(230,52){\vector(2,-1){18}}
\end{picture}
where arrows denote strict inclusions.
(Equation $\Ext=\Conn$ on $\real^n$ is proved in~\cite{CNW}.)

\section{Almost Continuous Non-Extendable Function with $G_\delta$ Graph}

As noted above the classes listed in (\ref{DLF}) cannot be distinguished
within the family $\B_1$ of Baire one functions.
On the other hand, the classes of functions on $\real$ or $I$ listed in
(\ref{DLF})
can be distinguished
within the family $\B_2$ of Baire class two functions.
(See e.g. \cite[thm~1.2]{CiJa}.)
The next natural question is: for which classes $\G$ containing
$\B_1$ but not $\B_2$ will the inclusions remain strict?
For several classes $\G$ strictly between
$\B_1$ and $\B_2$ this has been investigated by
Brown~\cite{Br} and
Brown, Humke and Laczkovich~\cite{bhl}.

In this section we will investigate the
inclusions in (\ref{DLF}) within the class
$\G=\G_\delta\cap\B_2$, where
$\G_\delta$ is the class
of functions with $G_\delta$ graphs.
Notice that $\B_1\subset\G_\delta$
since for every pointwise limit $f$ of continuous
functions $f_n\colon I\to\real$
the graph of $f$ is equal to
$\bigcap_{n=1}^\infty \bigcup_{i=n}^\infty
\{\la x,y\ra\colon |f_i(x)-y|<2^{-n}\}$.
Clearly also every function $f$ from $\G_\delta$ is
Borel, since for every open $U\subset\real$
the set $f^{-1}(U)=\proj(f\cap[I\times U])=
I\setminus\proj(f\cap[I\times(\real\setminus U)])$
is simultaneously analytic and coanalytic, and hence Borel.
(See e.g.~\cite[p.~489]{Kur} or \cite[p.~89]{Ke}.)
On the other hand there are functions
in $\G_\delta$ of arbitrary high Borel class.
This follows from the fact that every Borel
set is a one-to-one continuous image of
a closed subset of
$\real\setminus\rational$ (see e.g. \cite[15.3, p.~89]{Ke})
which is clearly $G_\delta$ in $\real$.
Indeed, if $A\subset I$ is of the class at least $\alpha$ for some
$\alpha<\omega_1$, take one-to-one continuous
functions $f_0$ from
a closed subset of $(0,1)\setminus\rational$ onto $A$
and $f_1$ from
a closed subset of $(2,3)\setminus\rational$ onto $I\setminus A$.
Then $f=f_0^{-1}\cup f_1^{-1}\colon I\to\real$
has a $G_\delta$ graph and is of Borel class at
least $\alpha$, since $f^{-1}[(0,1)]=A$.
Thus, if $\B_\alpha$ stands for the Baire class $\alpha$ functions, then
we have the following relations for every $2\leq\alpha<\omega_1$,
where arrows denote strict inclusions.

\vspace{-15pt}

\hspace{-2.1pc}
\begin{picture}(0,100)
\put(90,50){\makebox(0,0){$\B_1$}}
    \put(105,50){\vector(1,0){15}}
    \put(145,50){\makebox(0,0){$\G_\delta\cap \B_2$}}

  \put(169,55){\vector(2,1){18}}
  \put(200,65){\makebox(0,0){${\B_\alpha}$}}
  \put(210,64){\vector(2,-1){18}}

  \put(200,35){\makebox(0,0){${\G_\delta}$}}
  \put(169,47){\vector(2,-1){18}}
  \put(210,38){\vector(2,1){18}}

    \put(245,50){\makebox(0,0){$Borel$}}
\end{picture}
\vspace{-15pt}

The properness of inclusions in (\ref{DLF}) within the class
$\G_\delta$ has been summarized by
Brown in~\cite{B}.  (See also \cite[sec.~3]{GN}.)
In particular, he noticed that the inclusions
$\AC\subset\Conn\subset\D\subset\PC$
remain proper within this class $\G_\delta$
leaving open the problem of
properness of inclusion $\Ext\subset\AC$ in the $\G_\delta$ class.
(This problem is stated explicitly by
Gibson in~\cite[Question~4]{Gib}.)
In fact the examples exhibiting properness of the inclusions
$\AC\subset\Conn\subset\D\subset\PC$
within the class $\G_\delta\cap\B_2$
can be found in the literature.
For $\AC\subset\Conn$
Jones and Thomas~\cite{JT} (also see Thomas~\cite{Th})
  constructed a non almost continuous
function $f\colon I\to I$ with a connected $G_\delta$ graph.
This $f$ is also $\B_2$, but it is not pointed out in the paper.
Also Brown~\cite[remark~3]{Br} gives
a bit stronger example and states explicitly
that it is in $\G_\delta\cap\B_2\cap\Conn$ but not in $\AC$.
The properness of the inclusion
$\Conn\subset\D$ within $\G_\delta\cap\B_2$
is stated explicitly by Brown in~\cite[example~1 and remark~3]{Br},
using the example constructed by him in~\cite[example~2]{Br0}.
(Also, in~\cite{Mil}
Miller gives an example of a Darboux function $f\colon I\to I$
having a $G_\delta$ graph but no fixed point
and so the graph of $f$ is not connected.
This function is also $\B_2$, but it is not pointed out in the paper.)
Concerning the properness of the inclusion $\D\subset\PC$
in $\G_\delta\cap\B_2$ Brown~\cite{B} states that there is one
(not mentioning $\B_2$) and Miller~\cite{Mil}
describes a peripherally continuous non Darboux
function with $G_\delta$ graph, which turns out to be
also in $\B_2$.

The main goal of this section is to describe
an example justifying properness of
$\Ext\subset\AC$ within $\G_\delta\cap\B_2$, thus answering a question of
Gibson in~\cite[Question~4]{Gib}.
However, we will notice also that the small modifications
of this example justify also
properness of the remaining inclusions of (\ref{DLF})
within $\G_\delta\cap\B_2$.

\begin{picture}(280,280)(-20,0)
{\thicklines
\put(0,10){\vector(1,0){260}}
\put(0,10){\vector(0,1){260}}
}

\drawline[20](243,8)(243,12)\put(243,2){\makebox(0,0){{\small $1$}}}
\drawline[20](-2,253)(2,253)\put(-8,253){\makebox(0,0){$1$}}

\drawline[20](81,8)(81,12)\put(81,2){\makebox(0,0){$c_1$}}
\drawline[20](162,8)(162,12)\put(162,2){\makebox(0,0){$d_1$}}
\drawline[20](162,10)(81,131.5)
\drawline[20](-2,131.5)(2,131.5)\put(-8,131.5){\makebox(0,0){$\frac{1}{2}$}}

\drawline[20](27,8)(27,12)\put(27,2){\makebox(0,0){{\small $a_1$}}}
\drawline[20](54,8)(54,12)\put(54,2){\makebox(0,0){{\small $b_1$}}}
\drawline[20](27,10)(54,131.5)

\drawline[20](189,8)(189,12)\put(189,2){\makebox(0,0){{\small $a_2$}}}
\drawline[20](218,8)(218,12)\put(218,2){\makebox(0,0){{\small $b_2$}}}
\drawline[20](189,10)(218,192.25)
\drawline[20](-2,192.25)(2,192.25)
\put(-8,192.25){\makebox(0,0){$\frac{3}{4}$}}

\drawline[20](9,8)(9,12)\put(9,2){\makebox(0,0){{\small $c_2$}}}
\drawline[20](18,8)(18,12)\put(18,2){\makebox(0,0){{\small $d_2$}}}
\drawline[20](18,10)(9,192.25)

\drawline[20](63,8)(63,12)\put(63,2){\makebox(0,0){{\small $c_3$}}}
\drawline[20](72,8)(72,12)\put(72,2){\makebox(0,0){{\small $d_3$}}}
\drawline[20](72,10)(63,222.625)
\drawline[20](-2,222.625)(2,222.625)
\put(-8,222.625){\makebox(0,0){$\frac{7}{8}$}}

\drawline[20](171,8)(171,12)\put(171,2){\makebox(0,0){{\small $c_4$}}}
\drawline[20](180,8)(180,12)\put(180,2){\makebox(0,0){{\small $d_4$}}}
\drawline[20](180,10)(171,237.8125)
\drawline[20](-2,237.8125)(2,237.8125)
\put(-8,237.8125){\makebox(0,0){$\frac{15}{16}$}}

\drawline[20](227,8)(227,12)\put(227,2){\makebox(0,0){{\small $c_5$}}}
\drawline[20](236,8)(236,12)\put(236,2){\makebox(0,0){{\small $d_5$}}}
\drawline[20](236,10)(227,245.40575)
\drawline[20](-2,245.40575)(2,245.40575)
\end{picture}
\begin{center} Figure 1: function $f\in \G_\delta\cap\B_2\cap\AC\setminus\Ext$
from Example~\ref{ex:Gd}
\end{center}



\ex{ex:Gd}{There exists an almost continuous, non-extendable,
Baire class two function $f\colon I\to I$ with $G_\delta$ graph.}
%which is not extendable.}

\proof The example is a slight modification of
a function constructed by Ciesielski and
Jastrz{\c{e}}bski in~\cite[thm~3.1]{CiJa}.
It also slightly simplifies the argument given there.

Let $C$ be the Cantor ternary set in $I$ and let ${\cal J}$
be the family of all component intervals of $I\setminus C$.
For $i\in\{0,1\}$ let ${\cal J}_i$ be the family of all
intervals $J\in{\cal J}$ of length $3^{-2n+i}$ for some integer $n$.
Thus, $\{{\cal J}_0,{\cal J}_1\}$ is a partition of ${\cal J}$.
Let $\{(a_n,b_n)\colon 0<n<\omega\}$ and $\{(c_n,d_n)\colon 0<n<\omega\}$
be the enumerations of $\J_0$ and $\J_1$, respectively.
Define function $f \colon [0,1] \to [0,1]$ in the following way.
(See Figure~1.)
\begin{itemize}
\item For every $0<n<\omega$ we put $f(a_n)=f(d_n)=0$,
$f(b_n)=f(c_n)=1-2^{-n}$ and
extend it linearly on each interval $[a_n, b_n]$ and $[c_n, d_n]$.
We refer to $b_n$ and $c_n$ as {\em upper endpoints for $f$\/} of
$[a_n, b_n]$ and $[c_n, d_n]$, respectively.
\item For all other $x$'s we put $f(x)=0$.
\end{itemize}
(Ciesielski and Jastrz{\c{e}}bski define their function by
assigning to $f(b_n)$ and $f(c_n)$ value $1$ instead of $1-2^{-n}$.
It does not have $G_\delta$ graph since
$f\cap(I\times\{1\})=\bigcup_{n=1}^\infty\{b_n,c_n\}\times\{1\}$
is not $G_\delta$ being countable dense in $C\times\{1\}$.)
First note that the graph of $f$ is a $G_\delta$ set
as a union of three $G_\delta$ sets:
\begin{itemize}
\item
$f\restriction \left(C\setminus\bigcup_{n=1}^\infty\{b_n,c_n\}\right)=
\left(C\setminus\bigcup_{n=1}^\infty\{b_n,c_n\}\right)\times\{0\}$,
\item $f\restriction (I\setminus C)=\bigcap_{n=1}^\infty
\{\la x,y\ra\colon x\in I\setminus C\ \&\ |f(x)-y|<2^{-n}\}$ and
\item
$f\restriction \bigcup_{n=1}^\infty\{b_n,c_n\}=
\bigcup_{n=1}^\infty\{\la b_n,1-2^{-n}\ra,\la c_n,1-2^{-n}\ra\}$
which is discrete.
\end{itemize}
Also, since the first two restrictions are continuous,
it is easy to see that the preimage $f^{-1}(U)$
of any open set $U\subset I$ is a union of
a $G_\delta$-set and an $F_\sigma$-set; so $f$ is of Baire class two.


Next we will show that $f$ is not extendable.
By way of contradiction, assume that $f$ is extendable; that is, that there is
a connectivity function
$F \colon I^2 \to I$ with $F(x,0)=f(x)$ for all $x \in I$.
Thus $F$ is peripherally continuous.
We will deduce from this that
there exists an $x\in I$ such that $F(x,0)=1$,
which implies $f(x)=1$, contradicting our definition of~$f$.
For this we define inductively the sequences
$\la p_1,p_2,p_3,\ldots\ra$ of upper endpoints for $f$
and $\la B_0,B_1,B_2,\ldots\ra$ of closed connected subsets of $I^2$
such that for each $n<\omega$ we have
\[
\mbox{$F[B_n]\subset(1-2^{-n+1},1]$,\ \
$B_n\cap B_{n+1}\neq\emptyset$, \ \  $\diam(B_n)\leq 2^{-n}$,}
\]
and
\[
\mbox{$\la p_{n+1},0\ra\in B_n$,  \ \
$F(p_{n+1},0)=f(p_{n+1})\geq 1-2^{-(n+1)}$.}
\]

We will start with $B_0=[c_2,d_2]\times\{0\}$
and $p_1=c_2$. Clearly, the above conditions are satisfied.
So assume that $p_n$ and $B_{n-1}$ satisfying the above are already
constructed for some $n>0$.
Then $p_n$ is the upper endpoint for $f$ of some interval $J_0\in\J$.
We have to find $B_n$ and $p_{n+1}$. So,
choose an
$\e>0$ less than the length of $J_0$
%$\e\in(0,2^{-n+1})$ less than the length of $J_0$
%and $\diam(B_n)$ such that $\e<\min\{p_n,1-p_n\}$ and
such that $\e<\min\{2^{-(n+1)},p_n,1-p_n,\diam(B_{n-1})\}$ and
\begin{description}
\item{($*$)} if $J\in\J\setminus\{J_0\}$
is closer to $p_n$ than $\e$, then
it has the length at most $2^{-(n+1)}$ and $f(p)\geq 1-2^{-(n+1)}$
for the upper endpoint $p$ for $f$ of $J$.
\end{description}
Since $F(p_{n},0)\geq 1-2^{-n}$ and $F$ is peripherally continuous
we can find an open neighborhood
$W_n\subset[0,1]^2$ of
$\la p_n,0\ra$ with diameter less than $\e$
and such that $F[\bd(W_n)]\subset(1-2^{-n+1},1]$.
Without loss of generality we can
also assume that $\bd(W_n)$ is connected.
(This is a standard argument. See e.g.~\cite{JS}.)
Note that the choice of $\e$ guarantees that
$\bd(W_n)\cap B_{n-1}\neq\emptyset\neq\bd(W_n)\cap(I_0\times\{0\})$,
where $I_0$ is a component of $I\setminus J_0$ containing $p_n$.
This is so, since $\bd(W_n)$ disconnects $[0,1]^2$, while
$B_{n-1}$ and $I_0\times\{0\}$ are connected,
containing $\la p_n,0\ra\in W_n$ and of diameter greater than
$\e\geq\diam(\bd(W_n))$.
Let $z\in I_0$ be such that
$\la z,0\ra\in \bd(W_n)\cap (I_0\times\{0\})$.
Since $F(z,0)\in F[\bd(W_n)]\subset(1-2^{-n+1},1]\subset(0,1]$,
there exists a $J\in\J$
such that $z\in\cl(J)$.
Let $p_{n+1}$ be the upper endpoint for $f$ of $J$.
Then, by ($*$), $f(p_{n+1})\geq 1-2^{-(n+1)}$ and the distance of
$\la p_{n+1},0\ra$ from $\la z,0\ra\in \bd(W_n)$
is at most $2^{-(n+1)}$.
The set $B_n$ is defined as a union of $\bd(W_n)$ and
a closed segment joining $\la z,0\ra$ and $\la p_{n+1},0\ra$.
It is easy to see that the inductive conditions are satisfied.
This finishes the construction.

Now, to finish the argument notice that for every $n<\omega$ the set
$B^n=\bigcup_{k=n}^\infty B_k$ is connected, has diameter
at most $\sum_{k=n}^\infty 2^{-k}=2^{-n+1}$ and contains $\la p_{n+1},0\ra$.
In particular, there exists $p\in I$ with $p=\lim_n p_n$.
We claim that $F(p,0)=1$. Indeed, if this is not the case,
then there exists an $n<\omega$ such that $|F(p,0)-1|>2^{-n+2}$.
Take $\e>0$ less than the diameter of $B^n$ and let $U$ be an open neighborhood
of $\la p, 0\ra$ of diameter less than $\e$ and such that
$F[\bd(U)]\subset(F(p,0)-2^{-n+1},F(p,0)+2^{-n+1})$.
Then there exists
a point $w\in B^n\cap\bd(U)$, since $U\cap B^n\neq\emptyset$,
$U$ has diameter less than $\diam(B^n)$ and $B^n$ is connected.
But then $F(w)$ belongs
to both $(F(p,0)-2^{-n+1},F(p,0)+2^{-n+1})$
and $F[B^n]\subset(1-2^{-n+1},1]$, which is impossible, since these two
sets are disjoint. So, $F(p,0)=1$. But
this is impossible as well
since then we would have $f(p)=F(p,0)=1$ and $f$ does not attain $1$.
This contradiction finishes the proof that $f$ is not extendable.


To show that $f$ is almost continuous let $G$ be an open subset of $I^2$
containing the graph of $f$.
Notice that for every $x\in[0,1]$ there exists an interval $(r_x,s_x)$
(for $x=0$ and $x=1$ we consider intervals $[r_x,s_x)$ and
$(r_x,s_x]$, respectively) such that
\begin{itemize}
\item $x\in(r_x, s_x)$, $f(r_x)=f(s_x)=0$ and
\item there is a continuous function $g_x \colon [0,1] \to \mathR$
   with $g_x \restriction{[r_x,s_x]} \subset G$ and such that
   $g_x(t)=0$ for $t \notin (r_x, s_x)$.
\end{itemize}
Indeed, if $f(x)=0$, then it is easy to find
$r_x<s_x$ for which $g_x\equiv 0$ works.
If $f(x)\neq 0$, then $x\in\cl(J)$ for some $J\in\J$. For the sake of 
simplicity
assume that $f$ is increasing on $J$; that is, that $J\in\J_0$,
the other case being similar. Let $J=(a,b)$.
Then $f(b)>0$. Let $U\subset G$ be an open circular neighborhood of
$\la b,f(b)\ra$. Then
there exists an interval $J'=(c,d)\in\J_1$ with $b<c$
such that $f\restriction (c,d)$
intersects $U$. Let $u\in(c,d)$ be such that $\la u,f(u)\ra\in U$.
Put $r_x=a$, $s_x=d$, define $g_x(b)=f(b)$, $g_x(u)=f(u)$,
$g_x(0)=g_x(r_x)=g_x(s_x)=g_x(1)=0$ and
extend $g_x$ linearly on each interval with these endpoints.
Thus $g_x$ has a ``hat'' shape.
We have $g_x \restriction{[r_x,s_x]} \subset G$
since $g_x\restriction[b,u]\subset U\subset G$ and
$g_x\restriction([a,b]\cup[u,d])=f\restriction([a,b]\cup[u,d])\subset G$.
Now choose a finite subcover
$\{[r_0,s_0),(r_1,s_1]\}\cup\{(r_{x_i},s_{x_i})\colon i\leq n\}$,
of the cover
$\{[r_0,s_0),(r_1,s_1]\}\cup\{(r_x, s_x)\colon x \in (0,1)\}$ of the
interval $[0,1]$.
Then
\[
g(x)=\max\{g_0(x),g_1(x),g_{x_0}(x),g_{x_1}(x),\ldots,g_{x_{n}}(x)\}
\]
is continuous and $g \subset G$. This ends the proof that $f$ is almost
continuous.
\qed

\medskip

Note that as in \cite[Proposition~3.4]{CiJa}
one can show the following.



\rem{rem}{If $f$ is from Example~\ref{ex:Gd}, then there exists
a characteristic function $\charf{B}$ of
a meager $F_\sigma$ subset $B$ of $C$
such that $f_0=f+\charf{B}$ is extendable.}



The next example is a slight modification of
the function from Example~\ref{ex:Gd}
and is a variant of examples of Jastrz\c{e}bski~\cite{Jas}
and Kellum~\cite{K}. In what follows we will use the notation from
Example~\ref{ex:Gd}.


\ex{ex:ACconn}{There exists a connectivity, non almost continuous,
Baire class two function $f\colon I\to I$ with $G_\delta$ graph.}

\proof Define $f$ as follows. (See Figure~2.)
\begin{itemize}
\item For every $0<n<\omega$ we put $f(a_n)=f(c_n)=0$,
$f(b_n)=f(d_n)=1-2^{-n}$ and
extend it linearly on each interval $[a_n, b_n]$ and $[c_n, d_n]$.
(Of course we could now reduce our enumeration of $\J$
to just one sequence, instead of two.)
\item For all other $x$'s we put $f(x)=0$.
\end{itemize}
The proof that such $f$ is in $\G_\delta\cap\B_2$ is identical to that for
$f$ from Example~\ref{ex:Gd}. The proof that
$f$ is connectivity is easy and is essentially the same as
for the examples in~\cite{Jas,K}.
The fact that $f\notin\AC$ follows from~\cite[Lemma~1]{K}. \qed





\begin{picture}(280,280)(-20,0)
{\thicklines
\put(0,10){\vector(1,0){260}}
\put(0,10){\vector(0,1){260}}
}

\drawline[20](243,8)(243,12)\put(243,2){\makebox(0,0){{\small $1$}}}
\drawline[20](-2,253)(2,253)\put(-8,253){\makebox(0,0){$1$}}

\drawline[20](81,8)(81,12)\put(81,2){\makebox(0,0){$c_1$}}
\drawline[20](162,8)(162,12)\put(162,2){\makebox(0,0){$d_1$}}
\drawline[20](81,10)(162,131.5)
\drawline[20](-2,131.5)(2,131.5)\put(-8,131.5){\makebox(0,0){$\frac{1}{2}$}}

\drawline[20](27,8)(27,12)\put(27,2){\makebox(0,0){{\small $a_1$}}}
\drawline[20](54,8)(54,12)\put(54,2){\makebox(0,0){{\small $b_1$}}}
\drawline[20](27,10)(54,131.5)

\drawline[20](189,8)(189,12)\put(189,2){\makebox(0,0){{\small $a_2$}}}
\drawline[20](218,8)(218,12)\put(218,2){\makebox(0,0){{\small $b_2$}}}
\drawline[20](189,10)(218,192.25)
\drawline[20](-2,192.25)(2,192.25)
\put(-8,192.25){\makebox(0,0){$\frac{3}{4}$}}

\drawline[20](9,8)(9,12)\put(9,2){\makebox(0,0){{\small $c_2$}}}
\drawline[20](18,8)(18,12)\put(18,2){\makebox(0,0){{\small $d_2$}}}
\drawline[20](9,10)(18,192.25)

\drawline[20](63,8)(63,12)\put(63,2){\makebox(0,0){{\small $c_3$}}}
\drawline[20](72,8)(72,12)\put(72,2){\makebox(0,0){{\small $d_3$}}}
\drawline[20](63,10)(72,222.625)
\drawline[20](-2,222.625)(2,222.625)
\put(-8,222.625){\makebox(0,0){$\frac{7}{8}$}}

\drawline[20](171,8)(171,12)\put(171,2){\makebox(0,0){{\small $c_4$}}}
\drawline[20](180,8)(180,12)\put(180,2){\makebox(0,0){{\small $d_4$}}}
\drawline[20](171,10)(180,237.8125)
\drawline[20](-2,237.8125)(2,237.8125)
\put(-8,237.8125){\makebox(0,0){$\frac{15}{16}$}}

\drawline[20](227,8)(227,12)\put(227,2){\makebox(0,0){{\small $c_5$}}}
\drawline[20](236,8)(236,12)\put(236,2){\makebox(0,0){{\small $d_5$}}}
\drawline[20](227,10)(236,245.40575)
%\drawline[20](236,10)(227,245.40575)
\drawline[20](-2,245.40575)(2,245.40575)
\end{picture}%
\begin{center}
Figure 2: function $f\in \G_\delta\cap\B_2\cap\Conn\setminus\AC$
from Example~\ref{ex:ACconn}
\end{center}



\ex{ex:ConnD}{There exists a Darboux, non connectivity,
Baire class two function $f\colon I\to I$ with $G_\delta$ graph.}

\proof This is a slight modification of function $k\colon I\to I$
constructed by Ciesielski and Kellum in~\cite{CiKe}.
Let $C$ denote the Cantor middle two-fifths set:
\[
C=\left\{\sum_{n=1}^\infty\frac{i_n}{5^n}\colon
i_n\in\{0,2,4\}\ \mbox{ for  every $n$}\right\}.
\]
Geometrically, $C$ is obtained from $I$ by first removing the
pair of intervals (1/5,2/5) and (3/5,4/5) from $I$; then by
removing similar pairs of intervals (the middle two fifths) from
each of [0,1/5], [2/5,3/5] and [4/5,1], etc.
Let $\{\la(a_n,b_n),(c_n,d_n)\ra\colon n<\omega\}$
be an enumeration of all such pairs (with $b_n<c_n$).
Also, put
$C^\circ=I\setminus\bigcup_{n<\omega}[a_n,b_n]\cup[c_n,d_n]$
and let $\Delta$ denote the diagonal $\{\la x,x\ra\colon x\in I\}$ in
$I^2$.
Define $f$ as follows.
\begin{itemize}
\item For $n<\omega$ put $f(c_n)=0$,
choose $f(b_n)>d_n>b_n$ from $(1-2^{-n},1)$,
pick $a_n<f(a_n)<f(d_n)<d_n$ and
extend $f$ linearly on the intervals $[a_n, b_n]$ and $[c_n, d_n]$.
Note that $f[[a_n,b_n]\cup[c_n,d_n]]=[0,f(b_n)]$
and that $f\restriction \bigcup_{n<\omega}[a_n,b_n]\cup[c_n,d_n]$
is disjoint from $\Delta$.

\item Put $f(0)=1/2$ and $f(x)=0$ for $x\in C^\circ\setminus\{0\}$.
\end{itemize}
The proof that such an $f$ is in $\G_\delta\cap\B_2$ is identical to that used
in Example~\ref{ex:Gd}. The function $f$ is not connectivity, since
$\Delta$ separates its graph. It is Darboux, since
$f[J]=[0,1)$ for every interval $J$ intersecting $C^\circ$.
\qed


\ex{ex:DPC}{There exists a peripherally continuous, non Darboux,
Baire class two function $f\colon I\to I$ with $G_\delta$ graph.}

\proof We use here the notation from Example~\ref{ex:ConnD}.
Define $f$ as follows.
\begin{itemize}
\item For $n<\omega$ put $f(a_n)=0$,
$f(b_n)=\frac{1}{2}-2^{-n-3}$,
$f(c_n)=\frac{1}{2}+2^{-n-3}$,
$f(d_n)=1-2^{-n-3}$ and
extend $f$ linearly on intervals $[a_n, b_n]$ and $[c_n, d_n]$.

\item Put $f(x)=0$ for all $x\in C^\circ$.
\end{itemize}
The proof that such an  $f$ is in $\G_\delta\cap\B_2$ is
essentially identical to that used
in Example~\ref{ex:Gd}. The function $f$ is in $\PC\setminus D$
since $f[J]=[0,1)\setminus\left\{\frac{1}{2}\right\}$
for every interval $J$ intersecting $C^\circ$.
\qed

\cor{corSec2}{The inclusions
\[
\Ext\subset\AC\subset\Conn\subset\D\subset\PC
\]
remain strict for the Baire class two functions
$f\colon I\to I$ with $G_\delta$ graphs.}



\section{An Extendable Function with Dense Graph and Countable Zero Level}

In this section we concentrate on functions from $\real$ to $\real$, though
essentially all presented results remain the same for functions from 
$I$ to $I$.
Our main result here is the following.

\thm{thCor}{There exists an
extendable function $f\colon\real\to\real$
with dense graph for which $f^{-1}(0)$ is countable. }

The motivation for searching for such an example
comes from several directions.
First of all in~1970 Brown~\cite{Br:Neg} proved that
if $\F$ is the class of connectivity
functions from $\real$ to $\real$, then
\begin{description}
\item{(A)} if $f\in\F$ has a dense graph, then
every nowhere dense set $N$ is {\em $f$-negligible for $\F$}; that is,
any function
$g\colon\real\to\real$ equal to $f$ outside of $N$ remains in $\F$;
\item{(B)} part (A) is false for countable sets $N$; that is,
there exists an $f\in\F$ with a dense graph
and a countable dense set $D\subset\real$ which is not
$f$-negligible for $\F$.
\end{description}
The similar result for the class $\F$ of almost continuous
functions has been proved in 1982 by Kellum~\cite{Kel1982}.
Also for the class $\F$ of extendable functions
in 1994 Rosen~\cite{Ros1994} proved part (A).
However, so far there has been no example justifying (B)
for the class $\Ext$. The function $f$ from Theorem~\ref{thCor}
clearly justifies (B) for $\F=\Ext$,
since the countable zero level $D=f^{-1}(0)$
cannot be $f$-negligible for $\Ext$. (Modifying $f$ on $D$
we can get a non Darboux function.)

The other motivation comes for the following theorem
of Ciesielski and Ros{\l}anowski~\cite[thm.~3.1]{CRo},
(which has been used in constructing an additive,
almost continuous, non extendable function with the
SCIVP property).

\prop{prop1}{If $f\colon\real\to\real$
is extendable and
has a dense graph, then $f$ has the following (super SCIVP) property
%
\begin{itemize}
\item[]
For every $x,y\in\mathR$ and for
each perfect $K$ between $f(x)$ and
$f(y)$ there is a perfect $C$ between $x$
and $y$ such that $f[C]\subset K$ and $f\restriction C$ is
continuous {\tt strictly monotone}.
\end{itemize}
}

It seems natural to ask whether in the above the phrase
``strictly monotone'' can be replaced with ``constant''
or, more generally, the perfect set $K$ be replaced by a singleton.
We do not know the answer to the first of these questions. However
the example from Theorem~\ref{thCor}
is a counterexample for the second conjecture.

Theorem~\ref{thCor} is also related to the following
open problem \cite[Question 9.31]{GN}. {\em
Is it true that $g\colon\real\to\real$ is a product of two
extendable functions if and only if
$g$ has a zero in each subinterval in which it changes sign?}
(This characterization is true if the class of
extendable functions is replaced by the class of
Darboux, connectivity, or almost continuous functions.)
It gives the positive answer in the following particular case.

\cor{corMolt}{If $g\colon\real\to\real$ is such that
$g^{-1}(0)$ is dense in $\real$, then $g$ is
a product of two
extendable functions.}

\proof The proof is a slight modification of the
fact that every function $g\colon\real\to\real$
is a sum of two extendable functions.
(See \cite{Ros1994} or \cite{CR}.)


Let $f$ be from Theorem~\ref{thCor}. Then there exists
a dense $G_\delta$ subset $G$ of $\real$ which is
$f$-negligible for $\ext$. (See \cite[Theorem~1]{Ros1994}.)
Also there exists a homeomorphism $h_0$ of $\real$
such that $G\cup h_0[G]=\real$.
Moreover, $f_0=f\circ h_0^{-1}$ is extendable and
$h_0[G]$ is $f_0$-negligible for $\ext$.

Let $h$ be a homeomorphism of $\real$
such that $h[f^{-1}(0)\cup f_0^{-1}(0)]\subset g^{-1}(0)$
and put $f_1=f\circ h^{-1}$ and
$f_2=f_0\circ h^{-1}=f\circ h_0^{-1}\circ h^{-1}$.
Then, $f_1$ and $f_2$ are extendable
and the sets $G_1=h[G]$ and $G_2=h[h_0[G]]$
are $f_1$- and $f_2$-negligible, respectively.
Also, $Z=f_1^{-1}(0)\cup f_2^{-1}(0)\subset g^{-1}(0)$.
Define
$$\begin{array}{ll}
\hat f_1(x)=\left\{
\begin{array}{ll}
\frac{g(x)}{f_2(x)} &\mbox{for $x\in G_1\setminus Z$}\\
f_1(x) &\mbox{otherwise}
\end{array}\right.
&
\!\!\!\text{and \ \ }
\hat f_2(x)=\left\{
\begin{array}{ll}
f_2(x) &\mbox{for $x\in G_1\cup Z$}\!\!\!\\
\frac{g(x)}{f_1(x)} &\mbox{otherwise.}\!\!\!
\end{array}\right.
\end{array}
$$
Then $\hat f_1$ and $\hat f_2$ are well defined since
$f_1$ and $f_2$ are not $0$
outside $Z$. They are extendable, since
they are respective modifications of $f_1$ and $f_2$
on negligible sets  $G_1\setminus Z\subset G_1$
and $\real\setminus(G_1\cup Z)\subset G_2$. Also,

\begin{itemize}
\item for $x\in Z$
we have $\hat f_1(x) \hat f_2(x)=0=g(x)$,
\item for $x\in G_1\setminus Z$ we have
$\hat f_1(x) \hat f_2(x)=\frac{g(x)}{f_2(x)}\ f_2(x)=g(x)$ and
\item for $x\in \real\setminus(G_1\cup Z)$ we have
$\hat f_1(x) \hat f_2(x)=f_1(x)\ \frac{g(x)}{f_1(x)}=g(x)$.
\end{itemize}
Thus,  $g=\hat f_1 \hat f_2$.\qed
\medskip


Theorem~\ref{thCor} will be concluded from the
following theorem. The construction is
a modification of
Ciesielski-Rec\l aw's construction from~\cite[Theorem~3.3]{CR}.
However, the triangles in the triangulations
are not equilateral, as in the
generalization of \cite[Theorem~3.3]{CR}
presented in \cite[prop.~2.3]{CW}.

\thm{thConnExamp}{ There exists a connectivity function
$F\colon\rl^2 \to \rl$
with graph dense in $\real^3$ such that $F^{-1}(0)$
is contained in a countable union of straight lines in~$\real^2$.
}


Before we prove Theorem~\ref{thConnExamp} let us notice how
it implies Theorem~\ref{thCor}.

\medskip

{\noindent{\sc Proof of Theorem~\ref{thCor}.}} Let $F$ be as in
Theorem~\ref{thConnExamp}.
Note that by rotating the domain $\real^2$ of $F$
we obtain the same kind of example. Thus, without loss of
generality we can assume the countable family $\cal L$
of lines with  $F^{-1}(0)\subset\bigcup{\cal L}$
does not contain a line parallel to the $x$-axis.
Then every line $L_y=\real\times\{y\}$ intersects
$F^{-1}(0)$ in a countable set.
Moreover, by examining the function $F$ constructed below
(or by an argument similar to that of Rosen
from~\cite[Theorem~1]{Ros1994})
there exists
a dense $G_\delta$ subset $G$ of $\real^2$ such that
$G$ is $F$-negligible for the class $\Conn$.
Thus, by the Kuratowski-Ulam theorem (a category analog of the Fubini theorem),
there is $y\in\real$ such that $G\cap L_y$ is a dense $G_\delta$
subset of  $L_y$.
This implies that the graph of $F\restriction L_y$ is dense in
$L_y\times \real$. It is easy to see that $f$ defined by
$f(x)=F(x,y)$ has all the desired properties. \qed

\medskip


{\noindent{\sc Proof of Theorem~\ref{thConnExamp}.}}
The constructed function $F$ will be
peripherally continuous, so connectivity.
(See e.g. \cite[Theorem~8.1]{GN} or \cite[p.~171]{KCsurv}.)

\smallskip

\noindent{\bf Basic Idea}: By induction on $n<\omega$ we will construct a
sequence $\la S_n\colon n<\omega\ra$ of triangular ``grids,''
that is, triangulations of the plane.
We will begin with
$S_0$ formed with
equilateral triangles of side length $1$ as in Figure~3.
Then, at the stage $n+1$, we will subdivide each triangle from $S_n$
into finitely many pieces making sure that their sizes
tend to zero.
The grid $S_n$ will be identified with
the points on the edges of triangles forming it
and we will assume that $S_n\su S_{n+1}$ for all $n<\omega$.
With each grid $S_n$ we will associate a
continuous function $f_n\colon S_n\to\real$
which is linear on each side of a triangle from $S_n$.
Moreover, each $f_{n+1}$ will be an extension of $f_n$.
The function $F$ will be defined as an extension of $\bigcup_{n<\omega}f_n$
such that $F^{-1}(0)\subset \bigcup_{n<\omega}S_n$.
Thus, $F^{-1}(0)$ will be
contained in a countable union of straight lines; those that
contain sides of triangles from $S_n$'s.

\hspace{-1.5pc}
\begin{picture}(300,120)(-100,0)
\thicklines
\multiput(10,5)(30,0){4}{
\drawline[20](0,0)(30,0)(15,26)(0,0)}
\multiput(25,31)(30,0){3}{
\drawline[20](0,0)(30,0)(15,26)(0,0)}
\multiput(40,57)(30,0){2}{
\drawline[20](0,0)(30,0)(15,26)(0,0)}
\put(55,83){
\drawline[20](0,0)(30,0)(15,26)(0,0)}
\end{picture}
\begin{center} Figure 3: grid $S_0$ \end{center}



\smallskip

\noindent{\bf Terminology}: In what follows a {\em triangle\/} will be
identified
with the set of points of its interior or its  boundary.
For a grid $S$ we say that a {\em triangle $T$ is
from $S$\/} if the interior of $T$ is equal to
a component of $\real^2\setminus S$.

For a triangle $T$ its {\em basic partition\/}
will be its split into ten triangles as in Figure~4.
The central triangle $\hat{T}$ of Figure~4 will be
referred to as {\em the middle quarter of $T$}.
It is similar to $T$ and its sides are parallel
to the sides of $T$ and of $1/4$ of their
respective lengths. Also, $T$ and $\hat T$ have the same center and the
vertices on the sides of $T$ are at their centers.
It is easy to see that the diameter of each of
triangle from the basic partition of $T$ is at most half of
the diameter of $T$.
Also $\hat{T}\cap\bd(T)=\emptyset$.

\begin{picture}(300,120)(-92,0)
{\thicklines
\drawline[20](0,0)(120,0)(90,104)(0,0)
\drawline[20](82.5,26)(52.5,26)(75,52)(82.5,26)
}
\dashline{3}(60,0)(105,52)(45,52)(60,0)

%\drawline[20]
\dashline{3}(0,0)(52.5,26)
\dashline{3}(120,0)(82.5,26)
\dashline{3}(90,104)(75,52)
\end{picture}
\begin{center} Figure 4: the middle quarter $\hat T$ of a triangle $T$
and the basic partition of $T$
\end{center}

\medskip

If a function $f$ is defined on the three vertices of a triangle
$T$, its {\em basic extension\/} is defined as
the unique function $\hat{f}\colon T\to\real$
extending $f$ whose graph is a subset of a plane in $\real^3$.
Notice, that $\hat{f}$ is linear on each side of the triangle $T$
and that $\hat{f}$ extends $f$
even if the function $f$ has already been defined on some side of $T$
as long as $f$ is linear on this side.
In particular, if
$f$ is defined on a grid $S$ and is linear on each
side of every triangle from $S$, then $\hat f\colon\real^2\to\real$
is defined in a natural way.


\smallskip

\noindent{\bf Inductive construction}:
We will inductively define two increasing sequences:
$\la S_n\colon n<\omega\ra$
of triangular grids and
$\la f_n\in\real^{S_n}\colon n<\omega\ra$ of continuous functions such that
the following inductive conditions are satisfied for every $n<\omega$.

\begin{description}
\item[(i)]   For each triangle $T$ from $S_n$ function $f_n$ on $T$ is
              linear not identically $0$ and
$            f_n[T]$ is a subset of one of the intervals:
              $[-2^n,-1]$, $[-1,0]$, $[0,1]$, or $[1,2^n]$.
%             either $f_n[T]\subset[0,2^n]$
%             or $f_n[T]\subset[-2^n,0]$. In particular,
%             $f_n\colon S_n\to[-2^n,2^n]$.


\item[(ii)]  The side length of each triangle from $S_{n}$ is at most $1/2^n$.

\item[(iii)] The variation of $f_n$ on each triangle from $S_{n}$
              is at most $1/2^n$.

\item[(iv)]  If $n>0$, $k\in\{-1,1\}$, then for every
              triangle $T$ from $S_{n-1}$ for which
              $(k\cdot f_n)[T]\subset[0,\infty)$ the following holds.

  \begin{description}
  \item{(a)}  With every non-zero dyadic
              number $i/2^{n}\in[-2^n,2^n]$, where
              $i$ belongs to
              $D_n=\{i\in\integer\colon -4^{n}\leq i\leq 4^{n}\ \&\ i\neq 0\}$,
              we associate a triangle $T_i\su\hat{T}$ from $S_n$
              such that all triangles $T_i$ are disjoint,
              $\hat f_n\left[\hat T\setminus\bigcup_{i\in D_n}T_i\right]=\{k\}$
              and $\hat f_n\left[\hat T_i\right]=\{i/2^{n}\}$ for every
$i\in D_n$.

  \item{(b)}  For every $x\in T\setminus \hat T$
              either $\hat f_{n-1}(x)\leq\hat f_{n}(x)\leq k$
              or $\hat f_{n-1}(x)\geq\hat f_{n}(x)\geq k$.
%     $\hat f_{n-1}(x)$ and $\hat f_{n}(x)$ remain on the same side of $k$
%             and $|\hat f_n(x)-k|\leq |\hat f_{n-1}(x)-k|$
%             for every $x\in T\setminus \hat T$.

  \end{description}
\end{description}

To start the induction
define grid $S_0$ as in Figure~3 with all sides
of length $1$ and let $f_0\colon S_0\to\real$
be identically $1$. It is easy to see that
conditions (i)--(iv) are satisfied for such a choice.

Next, assume that for some $n>0$ we already have
$S_{n-1}$ and $f_{n-1}$ satisfying (i)--(iv).
We will define $S_n$ and extend $f_{n-1}$ to
$f_n\colon S_n\to\real$ such that (i)--(iv) will still hold.
Let $T$ be a triangle from $S_{n-1}$
and put $k=1$ if $\hat f_{n-1}[T]\subset [0,\infty)$
and $k=-1$ for $\hat f_{n-1}[T]\subset (-\infty,0]$.
The $S_n$-triangulation of $T$ will be a refinement
of the basic triangulation of $T$.
This will guarantee (ii).

Clearly $f_n$ is already defined on $\bd(T)$.
We define $f_n$ on each vertex of
the middle quarter $\hat{T}$ of $T$ by assigning
it the value $k$. Next, on each triangle $T'$
from the basic partition of $T$
except for $\hat T$ (see Figure~4)
we extend $f_n$ to $\hat f_n$ linearly.
Such an extension is unique since $f_n$ is already defined on each vertex
of $T'$. Note that this and the choice of $k$
guarantee (iv)(b). This also gives us (i) for any
triangle from a subtriangulation of $T'$.

\bigskip

\begin{picture}(300,220)(-40,0)
\thicklines
\multiput(10,10)(60,0){4}{
\dashline{4}(0,0)(60,0)(30,52)(0,0)}
\multiput(40,62)(60,0){3}{
\dashline{4}(0,0)(60,0)(30,52)(0,0)}
\multiput(70,114)(60,0){2}{
\dashline{4}(0,0)(60,0)(30,52)(0,0)}
\put(100,166){
\dashline{4}(0,0)(60,0)(30,52)(0,0)}
\multiput(55,36)(60,0){3}{
\drawline[20](0,0)(30,0)(15,26)(0,0)}
\multiput(85,88)(60,0){2}{
\drawline[20](0,0)(30,0)(15,26)(0,0)}
\put(115,140){
\drawline[20](0,0)(30,0)(15,26)(0,0)}
\end{picture}
\begin{center} Figure 5:
some triangles $T_i$ of the grid of $\hat{T}$ \end{center}


Thus, $\hat f_n$ is defined so far on
$T\setminus \hat T$. To extend $\hat f_n$ to $\hat T$
we proceed as follows.
Partition $\hat{T}$ into a grid $S$ such that
$S$ contains $2\cdot 4^n$ disjoint
triangles $\{T_i\colon i\in D_n\}$.
(See Figure~5.) We extend $\hat f_n$ to
$\hat T\setminus\bigcup_{i\in D_n}T_i$ by assigning
it the constant value $k$, while
on each $\hat T_i$ with      $i\in D_n$, $\hat f_n$ is identically
  $i/2^{n}$. This guarantees the reminder of
  condition (iv)
as well as (i) for the triangles considered so far.
Finally, $\hat f_n$ is extended linearly
on each triangle from the basic partition
of $T_i$ using the fact that it is already defined on
each of its vertices. This finishes the construction of $\hat f_n$.


Now, to make sure that (iii) and the remaining part of (i)
are satisfied we will refine the triangulations
defined so far to the grid $S_n$. This will lead to the definition
of $f_n$ as $\hat f_n\restriction S_n$.

For (i) we proceed as follows. If $k$ and $i\in D_n$ have the same sign,
then $\hat f^n\restriction T_i$ does not attain value $0$ and (i)
is already satisfied by the triangles from the basic partition of $T_i$.
In this case $S_n$ on $T_i$ will be formed from the triangles considered so
far.
On the other hand, if $k$ and $i\in D_n$ have different signs,
then $(\hat f^n\restriction T_i)^{-1}(0)$ is a boundary of a triangle $T'$
similar to $T_i$. Then we subtriangulate the basic partition of $T_i$
in such a way that every edge of $T'$ is covered by the edges of this
subtriangulation and that each triangle from the
subtriangulation intersects at most one edge (excluding the end points)
of $T'$.
If, in addition, $(\hat f^n\restriction T_i)^{-1}(-k)$ is nonempty,
then it is a boundary of a triangle (or the entire triangle)
and we will make sure that this boundary is a subset of
our subtriangulation.

Condition (iii) is easily guaranteed by
refining the triangulation described so far.
This finishes the inductive construction.

\medskip

Now, $F$ is defined on $S=\ds_{n<\omega}S_{n}$ as $f=\ds_{n<\omega}f_{n}$.
We will extend it to $\real^2$
making sure that $F(x)\neq 0$ for every $x\in\real^{2}\sm S$.
This will guarantee that $F^{-1}(0)\subset S$.
Note also that, by (iv)(a), the graph of $f$ is already dense
in $\real^3$. So any extension $F$ of $f$ will
have this property as well.

To extend $F$ to $\real^2$ pick an $x\in\real^{2}\sm S$.
Note that, by (i), $\hat f_n(x)\neq 0$ for every $n<\omega$.
For every $n<\omega$ let $T^x_n$ be the triangle from $S_n$
containing $x$ and let
$N=\{n<\omega\colon x\in\hat T^x_n\}$.
We consider two cases.

\smallskip

\noindent Case 1. The set $N$ is infinite. If
$N^k=\{n\in N\colon \hat f_n[\hat T^x_n]=\{k\}\}$ for $k\in\{-1,1\}$,
then $N=N^{-1}\cup N^1$ and so at least one of the sets
$N^{-1}$ and $N^1$ is infinite. Let $k=1$ if $N^1$ is infinite and
put $k=-1$ otherwise. In this case we define $F(x)=k$.
Notice that this guarantees that $F$ is peripherally continuous at $x$
since for any $n\in N^k$
\[
F[\bd(\hat T^x_n)]=f_n[\bd(\hat T^x_n)]=\{k\}=\{F(x)\},
\]
$x$ belongs to the interior of $\hat T^x_n$ and
the diameter of $\hat T^x_n$ is at most $1/2^n$.

\smallskip

\noindent Case 2. The set $N$ is finite. Fix an $m<\omega$ such that
$N\subset\{0,\ldots,m-2\}$. Then
$x\in T^x_n\setminus \hat T^x_n$ for every $n\geq m$.
So, if $k\in\{-1,1\}$ is such that
$(k\cdot f_m)[T^x_m]\subset[0,\infty)$, then, by (iv)(b),
either
$\hat f_{m}(x)\leq\hat f_{m+1}(x)\leq\hat f_{m+2}(x)\leq\cdots\leq k$
or $\hat f_{m}(x)\geq\hat f_{m+1}(x)\geq\hat f_{m+2}(x)\geq\cdots\geq k$.
So the limit $L=\lim_{m\to\infty}\hat f_{m}(x)$ is well defined
and not equal to $0$.
We put $F(x)=L$.
This, together with (ii) and (iii), guarantees
that $F$ is peripherally continuous at $x$.

This finishes the construction of function $F$
and the argument that $F$ is
peripherally continuous on $\real^2\setminus S$.
To see that $F$ is peripherally continuous on $S$ take an $x\in S$.
Then, there exists a $k<\omega$ such that
$x \in S_{n}$ for every $n\geq k$. For any such
$n$ let $\T_n$ be the set of all triangles from $S_n$ to which
$x$ belongs. Then $x$ belongs to the interior of the polygon $P_n=\bigcup\T_n$.
Moreover, by (ii) and (iii),
the variation on the boundary of $P_n$
and the diameter of $P_n$ are at most $2/2^n$.
So, the sequence $\la P_n\ra$ guarantees that $F$ is peripherally
continuous at $x$. This finishes the proof of Theorem~\ref{thConnExamp}. \qed

\section{Quasi-Continuous Extendable Functions}

To state the results of this section we need the following additional
terminology and facts.

For $x\in I$ let $l_x=\{x\}\times I$ and
for function $f\colon I\to I$ let $C(f)$ stand for the set of
points of continuity of $f$.
Recall that for a Darboux function $f\colon I\to I$
the set $\cl(f)\cap l_x$ is connected for every $x\in I$
and that $C(f)$ is a dense $G_\delta$
provided
$f$ has a $G_\delta$ graph.
(See e.g.~\cite{JT}.)
The function $f\colon I\to I$ is {\em  quasi-continuous\/}
if $f\restriction C(f)$ is dense in the graph of $f$.
A function $f\colon I\to I$ is said to have a closure that is
{\em bilaterally dense in itself\/}
if $\cl(f\restriction(0,x))\cap l_x=\cl(f\restriction(x,1))\cap l_x$
for each $x\in(0,1)$.

Croft's function $f\colon I\to I$ from~\cite{Croft}
is Darboux, upper semicontinuous (hence of Baire
class one) and $0$ almost everywhere, but is not identically $0$.
It follows that the
closure of $f$ is bilaterally dense in itself.
However, since it is not quasi-continuous,
Croft's function does not satisfy the second category condition in
the following result.
But a function like Kellum and Garrett's~\cite[Example~1]{KG} does
satisfy it and the rest of the hypothesis.



\thm{thS4}{
Suppose $f\colon I\to I$
is a Darboux function with a $G_\delta$
graph whose closure is bilaterally dense
in itself. Also suppose for every point
$\la x,f(x)\ra$ of $f$ there exists an open
neighborhood $W\subset I^2$ of $\la x,f(x)\ra$
such that if $B$ is closed and nowhere dense
in $\proj(f\cap W)$, then $\proj^{-1}(B)\cap (f\cap W)$
is nowhere dense in $f\cap W$.  Then $f$ is quasi-continuous and
extendable.
}

\proof
Let $A=\{x\in I\colon \cl(f)\cap l_x\mbox{ is nondegenerate}\}$.
Assume $f$ is not quasi-continuous at some point $x_0\in I$.
Then there exists a rectangular open
neighborhood $W=I_1\times I_2\subset I^2$ of $\la x_0,f(x_0)\ra$
that obeys the second category condition of
the hypothesis and that contains no point
of $f\restriction C(f)$.
Note that  $\proj(f\cap W)=\{x\in A\cap I_1\colon \la x,f(x)\ra\in W\}$.
According to the Alexandroff theorem, the $G_\delta$
subset $f\cap W$ of $I^2$ is homeomorphic to a complete metric space.
Therefore, by hypothesis, $\proj(f\cap W)$
is of second category in itself.

Observe that if $x\in\proj(f\cap W)$, then $\cl(f)\cap l_x$
is a nondegenerate interval meeting $I^2\setminus W$
and so $\cl(f\cap W)\cap l_x$ contains a nondegenerate interval containing
$\la x,f(x)\ra$.  To show $f\cap W$
is nowhere dense in $\proj(f\cap W)\times I$
let $[a,b]\times[c,d]$ be a rectangle in $I^2$ that meets
$\proj(f\cap W)\times I$ and let $G_1\supset G_2\supset\cdots$ be open
subsets of $I^2$ such that
$f\cap W=\left(\bigcap_{n=1}^\infty G_n\right)\cap(\proj(f\cap W)\times I)$.
For all positive integers $n$ and rational numbers
$r$ and $s$ with $c\leq r<s\leq d$ let
$H(n,r,s)$ be the set of all $x\in\proj(f\cap W)\cap[a,b]$
for which some
component of $l_x\setminus G_n$ meets both $I\times\{r\}$ and $I\times\{s\}$.
Each $H(n,r,s)$ is closed in $\proj(f\cap W)\cap[a,b]$
and each point of $\proj(f\cap W)\cap[a,b]$
belongs to some $H(n,r,s)$.
Therefore there exist $n$, $r$, $s$ and an interval $(u,v)$ such that
$H(n,r,s)\supset \proj(f\cap W)\cap(u,v)\neq\emptyset$.
Since the sets $f\cap W$ and $[\proj(f\cap W)\cap(u,v)]\times(r,s)$
are disjoint, $f\cap W$
is nowhere dense in $\proj(f\cap W)\times I$.

For each positive integer $n$ let
$Q_n$ be the set of all $x\in\proj(f\cap W)$
for which $\cl(f\cap W) \cap l_x$
contains an interval containing
$\la x,f(x)\ra$ of length at least $\frac{1}{n}$.
Each $Q_n$ is closed in $\proj(f\cap W)$.
   Since $f\cap W$ is nowhere dense in $\proj(f\cap W)\times I$,
each $Q_n$
is nowhere dense in $\proj(f\cap W)$.
Because $\proj(f\cap W)$ is of second category and
$\proj(f\cap W)=\bigcup_{n=1}^\infty Q_n$,
this a contradiction.
By \cite[Theorem~1]{Ros1} a Darboux quasi-continuous function $f$
whose closure is bilaterally dense in itself is extendable.  \qed


\begin{thebibliography}{10}

\bibitem{Br0} J.~B.~Brown, {\it  Nowhere dense Darboux graphs},
Colloq. Math. {\bf 20} (1969), 243--247.

\bibitem{Br:Neg}
J.~B.~Brown, {\it  Negligible sets for real connectivity functions},
Proc. Amer. Math. Soc. {\bf 24} (1970), 263--269.

\bibitem{Br} J.~B.~Brown, {\it  Almost continuous Darboux functions and Reed's
pointwise convergence criteria}, Fund. Math. {\bf 86} (1974), 1--7.

\bibitem{B} J.~B.~Brown, {\it  Measurable Darboux functions},
Real Anal. Exchange {\bf 15} (1989--90), 65--66.

\bibitem{bhl} J.~B.~Brown, P.~Humke and M.~Laczkovich,
{\it  Measurable Darboux functions}, Proc. Amer. Math. Soc. {\bf 102} (1988),
603--610.

\bibitem{Ci:book} K.~Ciesielski,
{\it  Set Theory for the Working Mathematician}, London Math. Soc. 
Student Texts
{\bf 39}, Cambridge Univ. Press 1997.


\bibitem{KCsurv} K.~Ciesielski,
{\it  Set theoretic real analysis}, J. Appl. Anal. {\bf 3}(2) (1997), 143--190.
(Preprint$^\star$ available.%
\footnote{Preprints marked by $^\star$ are available in electronic form
%. They can be accessed
from {\it Set Theoretic Analysis Web Page:}
http://www.math.wvu.edu/homepages/kcies/STA/STA.html})

\bibitem{CiJa} K.~Ciesielski, J.~Jastrz{\c{e}}bski,
{\it  Darboux--like functions within the classes of Baire one, Baire
two, and additive functions}, Topology Appl., in print.
(Preprint$^\star$ available.)

\bibitem{CiKe} K.~Ciesielski, K.~R.~Kellum,
{\it  Compositions of Darboux and connectivity functions},
Real Anal. Exchange {\bf 24}(2) (1998--99), 599--605.
(Preprint$^\star$ available.)

\bibitem{CNW}
K.~Ciesielski, T.~Natkaniec, J.~Wojciechowski, {\em  Extending connectivity
functions on
$\mathR^n$}, Topology Appl., to appear. (Preprint$^\star$ available.)

\bibitem{CR}  K.~Ciesielski, I.~Rec{\l }aw, {\it  Cardinal invariants 
concerning
extendable and peripherally continuous functions}, Real Anal. Exchange {\bf 21}
(1995--96), 459--472. (Preprint$^\star$ available.)

\bibitem{CRo}
K.~Ciesielski, A.~Ros{\l}anowski, {\it   Two examples concerning almost
continuous
functions},  Topology Appl., in print.
(Preprint$^\star$ available.)

\bibitem{CW}  K.~Ciesielski, J.~Wojciechowski, {\it  Sums of connectivity
functions on $\real^n$}, Proc. London Math. Soc.
{\bf 76}(2) (1998), 406--426. (Preprint$^\star$ available.)

\bibitem{Croft}  H.~T.~Croft,
{\it  A note on a Darboux continuous function}, London Math. Soc. {\bf 38}
(1963),
9--10.

\bibitem{Gib}  R.~G.~Gibson, {\it  Darboux functions with a perfect road},
Real Anal. Exchange {\bf 15} (1989--90), 582--591.

\bibitem{GN} R.~G.~Gibson, T.~Natkaniec,
{\it  Darboux like functions},
Real Anal. Exchange {\bf 22}(2) (1996--97),
492--533. (Preprint$^\star$ available.)

%\bibitem{Hamil} O.~H.~Hamilton, {\it  Fixed points for certain noncontinuous
%transformations},  Proc. Amer.  Math. Soc. {\bf 8 }(1957), 750--756.

\bibitem{Jas} J.~Jastrz\c{e}bski, {\it  An answer to a question of R.~G.~Gibson
and F.~Roush}, Real Anal. Exchange {\bf 15} (1989--90), 340--341.

\bibitem{JT} F.~B.~Jones, E.~S.~Thomas, Jr., {\it  Connected 
$G_\delta$ graphs},
Duke Math. J. {\bf 33} (1966), 341--345.

\bibitem{Ke} A.~S.~Kechris, {\it  Classical Descriptive Set Theory},
Springer-Verlag, New York, 1994.


\bibitem{Kel1982}
  K.~R.~Kellum, {\it  Almost continuity and
  connectivity---sometimes it's as easy to prove a stronger
  result}, Real Anal. Exchange {\bf 8} (1982--83), 244--252.

\bibitem{K} K.~R.~Kellum, {\it  Compositions of Darboux-like functions}, Real
Anal. Exchange {\bf 23}(1) (1997--98), 211--216.

\bibitem{KG} K.~R.~Kellum, B.~D.~Garrett, {\it  Almost continuous real
functions},
Proc. Amer. Math. Soc. {\bf 33} (1972), 181--184.

%\bibitem{KR} K~.R.~Kellum, H.~Rosen,
%{\it  Compositions of continuous functions and connected functions},
%Proc. Amer. Math. Soc. {\bf 115} (1992), 145--149.

\bibitem{Kur} K. Kuratowski,
{\it  Topology}, Vol. I, Academic Press, New York, NY, 1968.


\bibitem{Mil} M.~H.~Miller, Jr., {\it  Discontinuous $G_\delta$ graphs},
Studies in Topology, Academic Press, Inc. (1975), 383--392.

\bibitem{Ros1994}
  H.~Rosen, {\it  Limits and sums of extendable
  connectivity functions}, Real Anal. Exchange {\bf 20}(1)
  (1994--95), 183--191.

\bibitem{Ros1} H.~Rosen, {\it  Darboux quasicontinuous functions},
Real Anal. Exchange {\bf 22}(2) (1998--99), 631--639.

\bibitem{JS}
  J.~Stallings, {\it  Fixed point theorems for connectivity maps},
  Fund. Math. {\bf 47} (1959), 249--263.

\bibitem{Th} E.~S.~Thomas, Jr., {\it  Almost continuous
functions and functions of Baire class~1},
Topology Seminar Wisconsin, 1965, Princeton Univ. Press (1966), 125--128.

\end{thebibliography}

\end{document}
