\documentclass[12pt]{article}
\usepackage{amstex}

\def\Bbb{\mathbb}
\def\la{\langle}
\def\ra{\rangle}
\def\B{{\cal B}}

%\def\reals{\real}
%\def\complex{\mathbb C}

\def\qed{\hfill$\Box$}
\newenvironment{pf}[1]{\noindent {\em Proof.} #1}{\qed}


%%%%%%%%%%%%
%\input tcilatex
\TeXButton{}{
\def\text#1{\hbox{#1}}
\def\QTR#1{\csname#1\endcsname}
\def\QTP#1{\csname#1\endcsname}
\def\LaTeXparent#1{}
\def\userA#1{{\Bbb #1}}
\def\userB#1{{\frak #1}}
\def\dfrac#1#2{{\displaystyle {#1 \over #2}}}
\def\dbigcup{\mathop{\displaystyle \bigcup }}
\def\dbigcap{\mathop{\displaystyle \bigcap }}
\def\dint{\displaystyle \int}
\def\dsum{\mathop{\displaystyle \sum }}
\def\func#1{\mathop{\rm #1}}
\def\limfunc#1{\mathop{\rm #1}}
\def\QATOP#1#2{{#1 \atop #2}}
\def\QDATOP#1#2{{\displaystyle {#1 \atop #2}}}
\def\real{\QTR{userA}{R}}
\def\charf{{\raise.48ex\hbox{$\chi$}}}
\def\conn{\limfunc{Conn}}
\def\pc{\limfunc{PC}}
\def\bd{\limfunc{bd}}
\def\dist{\limfunc{dist}}
\def\diam{\limfunc{diam}}
\def\cl{\limfunc{cl}}
\def\darb{\limfunc{D}}
\def\ac{\limfunc{AC}}
\def\ext{\limfunc{Ext}}
\def\dim{\operatorname{ind}}
\def\la{\langle}
\def\ra{\rangle}
\def\B{{\cal B}}
\def\qed{\hfill$\Box$}
}
\renewcommand{\baselinestretch}{1.4}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{example}[theorem]{Example}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{corollary}[theorem]{Corollary}

\begin{document}
\author{Krzysztof Ciesielski and Jerzy Wojciechowski}
\title{Sums of Connectivity Functions on $\QTR{userA}{R}^n$}
\date{}
\maketitle

\begin{center}
{\small
Department of Mathematics, West Virginia University, 
PO Box 6310, Morgantown, WV 26506-6310, USA}
\end{center}

\begin{abstract}
A function $f\colon\QTR{userA}{R}^n\to\QTR{userA}{R}$ is a 
{\em connectivity function} if the graph of its restriction $f|C$ 
to any connected $C\subset\QTR{userA}{R}^n$ is connected in 
$\QTR{userA}{R}^n\times\QTR{userA}{R}$.
The main goal of this paper is to prove that every function 
$f\colon\QTR{userA}{R}^n\to\QTR{userA}{R}$ 
is a sum of $n+1$ connectivity functions
(Cor~\ref{cbab}). We will also show that 
if $n>1$, then every function $g\colon\real^n\to\real$
which is a sum of $n$ connectivity functions is
continuous on some perfect set (see Thm~\ref{Thmdb})
which implies that the number 
$n+1$ in our theorem is
the best possible (Cor~\ref{Cortta}).

To prove the above results, we establish  
and then apply the following theorems     
that are of interest on their own.        

For every dense $G_\delta$ subset $G$ of $\real^n$ there are homeomorphisms 
$h_1,\dots,h_n$ of $\real^n$ such that $\real^n=G\cup h_1(G)\cup\dots h_n(G)$
(Prop~\ref{plaa}).

For every $n>1$ and 
any connectivity function $f\colon\QTR{userA}{R}^n\to\QTR{userA}{R}$, 
if $x\in\real^n$ and $\varepsilon>0$ then 
there exists an open set $U\subset\real^n$
such that $x\in U\subset B^n(x,\varepsilon)$, $f|\limfunc{bd}(U)$ is
continuous and $|f(x)-f(y)|<\varepsilon$ for every $y\in\limfunc{bd}(U)$
(Prop~\ref{Proplca}).
\end{abstract}

\section{Preliminaries}

Our basic terminology and notation is standard. (See e.g. \cite{Eng}.)
The terminology and preliminaries from dimension theory and the theory of
simplicial triangulations will be used only in some parts of the
paper and will be introduced on the ``as needed'' basis.

For a topological space $X$ and $U\subset X$ we will use the symbols $\cl(U)$
and $\bd(U)$ to denote the {\em closure} and the {\em boundary} of $U$, respectively.
Also, we will consider the following classes of functions $f\colon X\to \QTR{userA}{R}$. 
(We will use them only when $X\subset\QTR{userA}{R}^n$.)

\begin{description}
\item  {$\conn(X)$} --- the set of {\em connectivity functions} 
$f\colon X\to \QTR{userA}{R}$, i.e., such that the graph of $f|C$ 
is connected in 
$X\times\QTR{userA}{R}$ for every connected subset $C$ of $X$.

\item  {$\pc(X)$} --- the set of {\em peripherally continuous functions} 
$f\colon X\to \QTR{userA}{R}$, i.e., 
such that for every $x\in X$ and any pair $U\subset X$
and $V\subset \QTR{userA}{R}$ of open neighborhoods of $x$ and $f(x)$,
respectively, there exists an open neighborhood $W$ of $x$ with 
$\cl(W)\subset U$ and $f[\bd(W)]\subset V$.

\item  {$\ext(X)$} --- the set of {\em extendable functions} $f\colon X\to \real$,
i.e., such that there exists a connectivity function 
$g\colon X\times [0,1]\to \real$ with $f(x)=g(x,0)$ for every $x\in X$.
\end{description}

We will write $\conn$, $\pc$ and $\ext$
in place of $\conn(X)$, $\pc(X)$ and $\ext(X)$ when the
space $X$ is clear from the context.

It is immediate from the definition that
$\ext(X)\subset\conn(X)$ for every connected space $X$. 
In what follows we will use the following theorem.
(The inclusion ``$\subset$'' was proved by    
Hamilton~\cite{Hamilton} and                  
Stallings~\cite{Stallings}, and the inclusion 
``$\supset$'' by Hagan~\cite{Hagan}.)        

\begin{theorem}\label{ThHag} 
If $n\geq 2$, then $\conn(\real^n)=\pc(\real^n)$.
\end{theorem}

To place our results within wider context we need to define two other
classes of real functions. However, the rest of this section will not be
used in an essential way in the proofs of our main results.

\begin{description}
\item  {$\darb(X)$} --- the set of {\em Darboux functions} $f\colon X\to \real$,
i.e., such that $f[C]$ is connected in $\real$ for every connected subset $C$
of $X$.

\item  {$\ac(X)$} --- the set of {\em almost continuous functions} $f\colon X\to 
\real$, i.e., such that for every open subset $U$ of $X\times \real$
containing the graph of $f$, there is a continuous function $g\colon X\to 
\real$ with $g\subset U$.
\end{description}

We will write $\darb$ and $\ac$ in place of $\darb(X)$ and $\ac(X)$ when $X$
is clear from the context.

For $X=\real$ we have the following proper inclusions~\cite{BML}: 
\begin{equation}
\label{inclusions}\ext\subset \ac\subset \conn\subset \darb\subset \pc.
\end{equation}
In the case when $X=\real^n$ with $n\geq 2$ the following relations are
known to hold: 
$$
\ext\subset \pc=\conn\subset \darb\cap \ac,
\ \ \  \darb\cap \ac\not \subset\conn,\ \ \ \darb\not \subset \ac,\ \ \ 
\ac\not \subset \darb.
$$
The equality $\pc=\conn$ is a restatement of Theorem~\ref{ThHag} and the
inclusion $\ext\subset \conn$ is obvious from the definition. 
We do not know whether it is proper. The proof of the inclusion $\conn%
\subset \ac$ can be found in~\cite{Stallings}. The inclusion $\conn\subset 
\darb$ is clear from the definition. 
This gives $\conn\subset \darb\cap \ac$.
A simple Baire class 1 function in
$\darb\cap\ac\setminus\conn$
was described in \cite[Example~1]{RGR}.
The examples showing that 
$\darb\not \subset \ac$ and $\ac\not \subset \darb$ can be found in 
\cite[Examples 1.1.9 and 1.1.10]{AC}.

Our investigations in this paper are motivated by the following result of Natkaniec 
\cite[prop.~1.7.1]{AC}.

\begin{theorem}\label{natkaniec}
For every $n>0$, any function $f\colon\real^n\to \real$ is the sum of two
almost continuous functions.
\end{theorem}

In general, given a class ${\cal F}$ of functions $f\colon X\rightarrow 
\QTR{userA}{R}$ where $X\subseteq \QTR{userA}{R}^n$, let the {\em %
repeatability }${\cal R}({\cal F})$ of ${\cal F}$ be defined as the minimum
integer $k$ such that any function $f\colon X\rightarrow \QTR{userA}{R}$
can be expressed as the sum of $k$ functions from ${\cal F}$. Since the
class $\ac(\QTR{userA}{R}^n)$ is a proper subset of $\QTR{userA}{R}^{%
\QTR{userA}{R}^n}$, Theorem \ref{natkaniec} says that
\begin{equation}
\label{almcont}{\cal R}(\ac(\QTR{userA}{R}^n))=2,
\end{equation}
for every $n\ge 1$. Since the classes $\conn(\QTR{userA}{R})$, $\darb(%
\QTR{userA}{R})$ and $\pc(\QTR{userA}{R})$ are proper subsets of $%
\QTR{userA}{R}^{\QTR{userA}{R}}$, it follows from (\ref{almcont}) and (\ref
{inclusions}) that%
$$
{\cal R}(\conn(\QTR{userA}{R}))={\cal R}(\darb(\QTR{userA}{R}))={\cal R}(\pc(%
\QTR{userA}{R}))=2. 
$$
Moreover, Ciesielski and Rec\l aw \cite{CiesRec:inv-periph} and Rosen 
\cite{Rosen2}
independently proved that%
$$
{\cal R}(\ext(\QTR{userA}{R}))=2. 
$$
In this paper we show that the following general result holds.

\begin{theorem}\label{our}
For every $n\ge 1$
$$
{\cal R}(\ext(\QTR{userA}{R}^n))={\cal R}(\conn(\QTR{userA}{R}^n))={\cal R}(%
\pc(\QTR{userA}{R}^n))=n+1. 
$$
\end{theorem}

Theorem~\ref{our} follows from Theorem~\ref{tbab} and Corollary~\ref{Cortta}
that are stated and proved in the next section. We do not know% 
\footnote{It has been settled recently by Francis Jordan (private communication)
who proved that for every $n>1$ there exists a Baire~1 class function 
$f\colon\QTR{userA}{R}^n\to\QTR{userA}{R}$ which is not a sum of $n$
Darboux functions. This clearly implies 
${\cal R}(\darb(\QTR{userA}{R}^n))\geq n+1$, while the other inequality
follows from Theorem~\ref{our}.}
whether a
similar result is true for either of the classes $\darb\cap \ac$ or $\darb$
when $n>1$.


\section{The main results}

In this section we will prove 
the main theorems of the paper modulo 
three groups of technical results, each of which will be proved 
in one of the sections that follow. 

The following theorem and Theorem \ref{Thmdb} are the main results of the paper. 
 
\begin{theorem}\label{tbab}
Every function $g\colon\QTR{userA}{R}^n\rightarrow\QTR{userA}{R}$
can be represented as
a sum $g=g_0+g_1+\dots +g_n$ of $n+1$ extendable
functions
$g_0,\dots,g_n\colon\QTR{userA}{R}^n\rightarrow \QTR{userA}{R}$.
\end{theorem}

Since $\ext(\QTR{userA}{R}^n)\subset\conn(\QTR{userA}{R}^n)$,
Theorem~\ref{tbab} implies immediately the following corollary. 

\begin{corollary}\label{cbab}
Every function $g\colon\QTR{userA}{R}^n\rightarrow\QTR{userA}{R}$
can be represented as
a sum $g=g_0+g_1+\dots +g_n$ of $n+1$ connectivity 
functions
$g_0,\dots,g_n\colon\QTR{userA}{R}^n\rightarrow \QTR{userA}{R}$.\qed
\end{corollary}

For $n=1$, Theorem~\ref{tbab} has been proved in~\cite{CiesRec:inv-periph}.
For $n>1$, it follows from the next two propositions,
which will be proved in Sections~\ref{secA} and~\ref{secB}, respectively. 

\begin{proposition}\label{pbaa}
For every $n>1$, there exists a function 
$f\colon\QTR{userA}{R}^n\rightarrow \QTR{userA}{R}$ 
and a dense $G_\delta$ subset $G$ of $\QTR{userA}{R}^n$ such that any
function $g\colon\QTR{userA}{R}^n\rightarrow \QTR{userA}{R}$ 
with $g(x)=f(x)$ for 
$x\notin G$ is a connectivity function.
\end{proposition}

\begin{proposition}\label{plaa}
If $G\subseteq\real^n$ is a dense $G_\delta$ set,
then there are homeomorphisms 
$h_j\colon\real^n\rightarrow\real^n$ 
for $j\in\left\{ 1,\dots ,n\right\} $ such that 
\[
%\begin{equation}\label{eqab}
G\cup \bigcup_{j=1}^nh_j(G)=\real^n.
%\end{equation}
\]
\end{proposition}

\noindent {\bf Proof of Theorem~\ref{tbab}.}
Let $g\colon\QTR{userA}{R}^n\rightarrow \QTR{userA}{R}$ 
be an arbitrary function and let 
$\hat{f}\colon\real^n\times\real\to\real$ and a dense 
$G_\delta $ subset $\hat{G}$ of $\real^n\times\real$ 
be as in Proposition~\ref{pbaa}.
By the Kuratowski-Ulam theorem (a category analog of the Fubini theorem)
there exists $y\in\real$ such that a $G_\delta$ set 
$G=\{x\in\real^n\colon \la x,y\ra\in\hat{G}\}$ is dense
in~$\real^n$. 

Notice that if $f\colon\real^n\to\real$
is defined by $f(x)=\hat{f}(x,y)$ for every $x\in\real^n$,
then 
\begin{equation}\label{EqA}\!\!
g\colon\real^n\to\real\ \text{ is extendable provided
$g(x)=f(x)$ for every $x\notin G$}.
\end{equation}

Let $h_j\colon\QTR{userA}{R}^n\rightarrow \QTR{userA}{R}^n$
for $j\in\left\{ 1,\dots ,n\right\}$
be the homeomorphisms from Proposition~\ref{plaa}
and let $h_0:\QTR{userA}{R}^n\rightarrow \QTR{userA}{R}^n$ be the identity
homeomorphism. Notice 
that for every $j\in \left\{1,\dots ,n\right\}$ 
\begin{equation}\label{EqB}
g_j\colon\real^n\to\real\text{ is extendable}
\end{equation}
provided
$g_j(x)=\left(f\circ h_j^{-1}\right)(x)$ for every $x\notin h_j(G)$.

Indeed, if $g_j$ satisfies the hypothesis of (\ref{EqB}), then 
$g_j=g\circ h_j^{-1}$ where $g$ is defined by
$$
g(x)=\left\{ 
\begin{array}{rl}
\left(g_j\circ h_j\right) (x) & \text{if }x\in G, \\ 
f(x) & \text{if }x\notin G. 
\end{array}
\right. 
$$
But, by (\ref{EqA}), $g$ is extendable and so is $g_j$ as
a composition of a homeomorphism and an extendable function.

Let $G_0=G$, and for every $j=1,2,\dots ,n$ put
$$
G_j=h_j(G)\setminus \bigcup_{i=0}^{j-1}h_i(G). 
$$
Then the sets $G_0$, $G_1$, $\dots$, $G_n$ form
a partition of $\QTR{userA}{R}^n$. For each $i=0,1,\dots,n$, 
let $g_i\colon\QTR{userA}{R}^n\rightarrow \QTR{userA}{R}$ be defined by
$$
g_i(x)=\left\{ 
\begin{array}{cl}
g(x)-%\dsum\limits
\sum_{j\in\{0,\dots,n\}\setminus\{i\}}
(f\circ h_j^{-1})(x) & \text{if }x\in G_i, \\ 
(f\circ h_i^{-1})(x) & \text{if }x\notin G_i.
\end{array}
\right.  
$$
Then
$$
\left( g_0+\dots +g_n\right) (x)=g(x) 
$$
for every $x\in \QTR{userA}{R}^n$. Since 
$g_i(x)=\left(f\circ h_i^{-1}\right) (x)$ 
for every $i=0,1,\dots ,n$, and every $x\notin h_i(G)$,
it follows from (\ref{EqB}) that the functions $g_0,g_1,\dots,g_n$ are
extendable. \qed


Next, we will turn to the proof of %the following theorem. \chJW
our second main result.

\begin{theorem}\label{Thmdb}
If $n>1$ and 
$g_1,g_2,\dots,g_n\colon \QTR{userA}{R}^n\rightarrow\QTR{userA}{R}$ 
are connectivity functions then there exists a perfect set 
$P\subseteq \QTR{userA}{R}^n$ such that 
the restriction of $g_j$ to $P$ is continuous
for every $j\in\{1,2,\dots ,n\}$.
\end{theorem}

Notice, that Theorem~\ref{Thmdb} immediately implies the following corollary.
In particular, the number $n+1$ in Theorem~\ref{tbab}
is the best possible. 

\begin{corollary}\label{Cortta}
For every $n>0$ there exists a function 
$f\colon \QTR{userA}{R}^n\rightarrow\QTR{userA}{R}$ 
which is not a sum of $n$ peripherally continuous functions.
\end{corollary}

\TeXButton{\begin{pf}}{\begin{pf}}
For $n=1$, the statement follows from the fact that there exists a function
$f\colon\real\to\real$ which is not peripherally continuous.
(For example, the characteristic function of a singleton.)

For $n>1$, let 
$f\colon \QTR{userA}{R}^n\rightarrow\QTR{userA}{R}$ 
be the characteristic function of a Bernstein set, {\it i.e.}, 
a set $B\subseteq\QTR{userA}{R}^n$ such that $B\cap P\neq\emptyset$ and 
$B\setminus P\neq\emptyset$ for 
every perfect set $P\subseteq \QTR{userA}{R}^n$. 
Then the restriction of $f$ to any perfect subset of $\QTR{userA}{R}^n$
is discontinuous. It follows from 
Theorem~\ref{Thmdb} that $f$ is not a sum of 
$n$ connectivity functions. 
\TeXButton{\end{pf}}{\end{pf}}





The proof of Theorem~\ref{Thmdb}
is based on the next two propositions, whose proofs are postponed till
Section~\ref{sec3}. 

\begin{proposition}\label{Proplca}
Let $n>0$ and let 
$f\colon \QTR{userA}{R}^n\rightarrow \QTR{userA}{R}$ be a
peripherally continuous function. Then for any $x_0\in \QTR{userA}{R}^n$ and
any open set $W$ in $\QTR{userA}{R}^n$ containing $x_0$, 
there exists an open set 
$U\subseteq W$ such that $x_0\in U$ and the restriction of $f$ to 
$\limfunc{bd}U$ is continuous. 
Moreover, given any $\varepsilon>0$, the set $U$ can be chosen
so that $\left|f(x_0)-f(y)\right|<\varepsilon$ for every $y\in \limfunc{bd}U$.
\end{proposition}

\begin{proposition}\label{PROPlee}
Let $n>1$ and  
$g\colon \QTR{userA}{R}^n\rightarrow \QTR{userA}{R}$ be
peripherally continuous. If $X$ is a 
connected perfect subset of $\real^n$,
then there exists a perfect subset $P$ of $X$ such
that the restriction of $g$ to $P$ is continuous.
\end{proposition}
%
For $X=[0,1]^n$ Proposition~\ref{PROPlee} has been proved
earlier by Gibson, Rosen and Roush~\cite{GRRnew}.

Given $X\subseteq \QTR{userA}{R}^n$ and $U\subseteq\real^n$, we will
write $\limfunc{bd}_X U$ 
to denote the {\em boundary} of $U\cap X$ in $X$. 
For the proof of Theorem~\ref{Thmdb}
we need to recall the definition of the inductive dimension
of subsets $X$ of $\real^n$.
(See e.g.~\cite{Eng}.)
\begin{description}
\item[(i)]  $\dim X=-1$ if and only if $X=\emptyset $.

\item[(ii)]  $\dim X\le m$ if for any $p\in X$ and any open neighborhood
$W$ of $p$ there exists an open neighborhood
$U\subseteq W$ of $p$ such that $\dim \limfunc{bd}_X U\le m-1$.

\item[(iii)] $\dim X=m$ if $\dim X\le m$ 
and it is not true that $\dim X\le m-1$.
\end{description}
Recall that $\dim\real^n=n$.

\bigskip

\noindent {\bf Proof of Theorem~\ref{Thmdb}.}
We will define a sequence $D_0,D_1,\dots,D_{n-1}$ 
of compact subsets of $\QTR{userA}{R}^n$ such that $\dim D_i\ge n-i$ and
the restriction of $g_j$ to $D_i$ is continuous for every 
$j\leq i<n$.

First note, that this will finish the proof, 
since then we can choose a component $X$ of $D_{n-1}$,
(which is perfect and connected) and 
apply Proposition~\ref{PROPlee} to $X$ and the function $g_n$.

To construct such a sequence let
$D_0=\QTR{userA}{R}^n$ and assume that $D_{i-1}$ has been defined
for some $i\in \left\{ 1,2,\dots,n-1\right\}$.
Since $\dim D_{i-1}\ge n-i+1$, there
exists $p\in D_{i-1}$ and an open neighborhood $W\subset\real^n$ of $p$ 
such that 
$\dim\limfunc{bd}_{D_{i-1}}U\ge n-i$ for every 
open neighborhood $U\subset W$ of $p$. 
Since $g_i$ is peripherally continuous, it follows from 
Proposition~\ref{Proplca} 
that there is an open neighborhood $U\subseteq W$ of $p$
such that the restriction of $g_i$ to $\limfunc{bd}U$ is continuous. 
Let 
$$
D_i=\limfunc{bd}\nolimits_{D_{i-1}}U\subseteq \limfunc{bd}U\cap D_{i-1}. 
$$
Then $\dim D_i\ge n-i$ and the restriction of $g_j$ to $D_i$ is continuous
for every $j$ with $1\le j\le i$. Therefore the proof is complete. 
\qed





\section{Proof of Proposition~\ref{pbaa}}\label{secA}

The proof presented here is analogous to the technique used 
in~\cite{CiesRec:inv-periph}.
However, instead of equilateral triangulations of $\real^2$ we will
use a more general concept of a simplicial triangulation of 
$\QTR{userA}{R}^n$. 
An introduction to simplicial triangulations of $\QTR{userA}{R}^n$ can
be found for example in~\cite{HockYoung:topol}. For completeness, we will
give basic definitions and results.

Let $X=\{x_0,x_1,\dots ,x_m\}$ be a set of $m+1$ points in 
$\QTR{userA}{R}^n$. 
The points of $X$ are in {\em general position} if the vectors 
$x_1-x_0$, $x_2-x_0,\,\dots $, $x_m-x_0$ are linearly independent. An 
{\em $m$-dimensional simplex} $\Delta =\Delta(X)$ in $\QTR{userA}{R}^n$ 
is the subset of $\QTR{userA}{R}^n$ of the form 
$$
\Delta =\left\{
\sum_{x\in X}\beta_x x\colon
(\forall {x\in X})\,(\beta_x>0)\ \&\ \sum_{x\in X}\beta_x=1\right\}, 
$$
where $X$ is a set of points in general position. The elements of $X$ are
called the {\em vertices} of $\Delta$. Any simplex $\Delta(Y)$ with 
$\emptyset \neq Y\subseteq X$ is a {\em face} of $\Delta (X)$. A face 
$\Delta(Y)$ of $\Delta (X)$ is {\em proper} if $Y\neq X$. The {\em closure} 
$\limfunc{cl}\Delta$ of the simplex $\Delta =\Delta (X)$ is the union of all
faces of $\Delta $, {\it i.e.}, 
$$
\limfunc{cl}\Delta =\left\{
\sum_{x\in X}\beta_x x\colon
(\forall {x\in X})\,(\beta_x\ge 0)\ \&\ \sum_{x\in X}\beta_x=1\right\}. 
$$
The {\em boundary} $\limfunc{bd}\Delta $ of the simplex $\Delta $ is the
union of all proper faces of $\Delta $. Note that if $\Delta $ is an 
$n$-dimensional simplex in $\QTR{userA}{R}^n$, then $\limfunc{cl}\Delta$ is
the topological closure and $\limfunc{bd}\Delta$ is the topological
boundary of $\Delta $.

A {\em simplicial complex} ${\cal K}$ is a set of disjoint simplices in 
$\QTR{userA}{R}^n$ such that:

\QTP{userC}
\begin{description}
\item[(i)]  if $\Delta\in{\cal K}$ and $\Delta^{\prime }$ is a face of 
$\Delta$, then $\Delta^{\prime }$ is also in ${\cal K}$; and,

\QTP{userC}
\item[(ii)]  any bounded subset of $\QTR{userA}{R}^n$ intersects only
finitely many simplices of ${\cal K}$.
\end{description}

\QTP{userE}
A {\em vertex} of a simplicial complex ${\cal K}$ is a vertex of one of its
simplices and the {\em boundary }$\limfunc{bd}{\cal K}$ of ${\cal K}$ is the
union of the boundaries of the simplices of ${\cal K}$. If $\Delta $ is a
simplex, then 
symbol ${\cal K}_\Delta$ 
will denote the simplicial complex consisting of
all faces of $\Delta $. If ${\cal K}$ is a simplicial complex and $X$ is the
union of the simplices of ${\cal K}$, then we say that ${\cal K}$ is a 
{\em triangulation} of $X$.

Given an $m$-dimensional simplex $\Delta =\Delta (Y)$, 
the {\em barycenter} $c_\Delta $ of $\Delta $ be defined by 
$$
c_\Delta =\sum_{y\in Y}\frac 1{m+1}\ y. 
$$
Let ${\cal K}$ be a simplicial complex. The {\em barycentric subdivision} 
${\cal B}({\cal K})$ of ${\cal K}$ is the simplicial complex consisting of
all simplices 
$\Delta\left(\{c_{\Delta_1},c_{\Delta_2},\dots,c_{\Delta _s}\}\right)$ 
where $\Delta _i\in {\cal K}$ for every 
$i=1,2,\dots ,s$, and $\Delta _j$ is a proper face of $\Delta _{j+1}$ for
every $j=1,2,\dots ,s-1$. For a non-negative integer $k$, the 
{\em $k$-th
barycentric subdivision} ${\cal B}^k({\cal K})$ of ${\cal K}$ is defined
inductively by: ${\cal B}^0({\cal K})={\cal K}$ and 
${\cal B}^{k+1}({\cal K})={\cal B}({\cal B}^k({\cal K}))$.

Let $X\subseteq \QTR{userA}{R}^n$ and 
$f\colon X\rightarrow\QTR{userA}{R}$. Then 
$f$ is {\em linear} on $X$ if there are 
$a_0,a_1,\dots ,a_n\in \QTR{userA}{R}$
such that
$$
f(x_1,\dots ,x_n)=a_0+\sum_{i=1}^na_ix_i, 
$$
for every $\la x_1,\dots ,x_n\ra \in X$. If ${\cal K}$ is a
triangulation of $X$ and 
$f\colon X\rightarrow \QTR{userA}{R}$ is a function that
is linear on $\limfunc{cl}\Delta $ for every $\Delta \in {\cal K}$, then we
say that $f$ is ${\cal K}${\em -linear}. If $X$ is compact and 
$f\colon X\rightarrow \QTR{userA}{R}$ 
is continuous, then the {\em variation} of $f$
on $X$ is the difference between the maximal and minimal values of $f$ on 
$X$. 
The following lemmas are well known and easy to prove. 

\begin{lemma}\label{lbaa}
If $\Delta $ is an $n$-dimensional simplex, then there exists an 
$n$-dimen\-sional simplex $\Delta^{\prime }\in {\cal B}^2({\cal K}_\Delta)$
such that 
$\limfunc{cl}\Delta ^{\prime }\subseteq \Delta$. \qed
\end{lemma}

\begin{lemma}\label{lbab}
For every positive integers $n$ and  $m$ there is an integer $k$ such that
if $\Delta $ is an $n$-dimensional simplex, then there is a set 
${\cal A}\subseteq {\cal B}^k({\cal K}_\Delta )$ 
of cardinality $m$ consisting of $n$-dimensional simplices such that 
$$
\limfunc{cl}\Delta ^{\prime }\subseteq \Delta , 
$$
for any $\Delta ^{\prime }\in {\cal A}$ and 
$$
\limfunc{cl}\Delta ^{\prime }\cap 
\limfunc{cl}\Delta ^{\prime\prime}=\emptyset , 
$$
for any distinct $\Delta ^{\prime },\Delta ^{\prime \prime }\in {\cal A}$.
\end{lemma}

\TeXButton{\begin{pf}}{\begin{pf}}
Choose an $l$ such that for some $n$-dimensional simplex $\Delta$ 
the subdivision ${\cal B}^l({\cal K}_\Delta)$
contains $m$ distinct $n$-dimensional simplices. Note that this is 
true also for any other $n$-dimensional simplex.
Then, by Lemma~\ref{lbaa}, ${\cal B}^{l+2}({\cal K}_\Delta)$
contains the simplices as desired. So, $k=l+2$ satisfies the lemma. 
\TeXButton{\end{pf}}{\end{pf}}

\begin{lemma}\label{lbaf}
Let ${\cal K}$ be a triangulation of $\QTR{userA}{R}^n$ and 
$\Delta,\Delta^{\prime }\in\bigcup_{k\in\omega}{\cal B}^k({\cal K})$.
If the simplex $\Delta$ is $n$-dimensional and 
a vertex of $\Delta ^{\prime }$ 
belongs to $\Delta$ then $\Delta^{\prime }\subseteq \Delta $.
\end{lemma}

\TeXButton{\begin{pf}}{\begin{pf}}
For $k\in\omega$ let ${\cal A}_k$ denote the family
of all $n$-dimensional simplices from ${\cal B}^k({\cal K})$
and let $k,l\in\omega$ be such that $\Delta\in{\cal A}_k$
and $\Delta^\prime\in{\cal B}^l({\cal K})$.
Notice that $k<l$, since otherwise 
the vertex from $\Delta^\prime$ could not belong to
$\bigcup{\cal A}_k\supset\Delta$.
So, either $\Delta^{\prime }\subseteq \Delta$
or $\Delta^{\prime }\cap\Delta=\emptyset$,
since simplices from ${\cal B}^l({\cal K})$
form a partition of $\real^n$ which is finer than that formed 
by elements of ${\cal B}^k({\cal K})$.
But $\Delta^{\prime }\cap\Delta=\emptyset$ contradicts
the assumption that $\Delta$ contains a vertex of $\Delta^\prime$.
So, $\Delta^{\prime }\subseteq \Delta$.
\TeXButton{\end{pf}}{\end{pf}}


\begin{lemma}\label{lbda} 
{\rm \cite{HockYoung:topol}}
If $\Delta $ is an $n$-dimensional simplex and $d$ is the
diameter of $\Delta $, then the diameter of any $n$-dimensional simplex in 
${\cal B}({\cal K}_\Delta )$ is at most $\dfrac n{n+1}d$. \qed
\end{lemma}

From Lemma~\ref{lbda} we obtain immediately the following corollary. 

\begin{corollary}\label{lbac}
Let $\Delta $ be an $n$-dimensional simplex, $f$ be a linear
function on $\limfunc{cl}\Delta $, and $a$ be the variation of $f$ on 
$\limfunc{cl}\Delta $. If $\Delta ^{\prime }\in{\cal B}({\cal K}_\Delta)$,
then the variation of $f$ on $\limfunc{cl}\Delta ^{\prime }$ is at most 
$\dfrac n{n+1}a$. \qed
\end{corollary}

\begin{lemma}\label{lbae}
If ${\cal K}$ is a triangulation of $X$, and $V$ is the set of
all vertices of ${\cal K}$, then any function 
$f\colon V\rightarrow \QTR{userA}{R}$
can be uniquely extended to a ${\cal K}$-linear function on $X$.\qed
\end{lemma}

\noindent {\bf Proof of Proposition~\ref{pbaa}.}
Fix $n>1$, let 
$\QTR{userA}{D}=\left\{
\dfrac s{2^m}\colon s\in \QTR{userA}{Z},m\in \QTR{userA}{N}\right\}$ 
be the set of all {\em dyadic rationals} and let 
$\QTR{userA}{D}_i=\left\{ \dfrac{-4^i}{2^i},
\dfrac{-4^i+1}{2^i},\dots ,\dfrac{4^i}{2^i}\right\}\subseteq\QTR{userA}{D}$
for every $i\in \omega$. Let ${\cal K}$ be any triangulation of 
$\QTR{userA}{R}^n$. For each $i\in \omega$, we define integers $k_i$, $r_i$
and $\ell _i$, triangulations ${\cal K}_i$ and ${\cal K}_i^{\prime }$ of 
$\QTR{userA}{R}^n$, a function $\psi _i$ on the set ${\cal A}_i$ of 
$n$-dimensional simplices of ${\cal K}_i$, and a function 
$\xi _i$ on ${\cal A}_i\times \QTR{userA}{D}_i$ 
such that $\psi _i$ and $\xi _i$ take 
$n$-dimensional simplices in $\QTR{userA}{R}^n$ as values. 
Let $k_0=0$. 

Assume that $i\in \omega $ and that $k_i$ has been defined. Let 
${\cal K}_i={\cal B}^{k_i}({\cal K})$. 
By Lemma~\ref{lbaa}, for each $\Delta\in{\cal A}_i$
there exists  
an $n$-dimensional simplex 
$\psi _i(\Delta )\in {\cal B}^2({\cal K}_\Delta )$ 
such that $\limfunc{cl}\psi _i(\Delta )\subseteq \Delta $. By
Lemma~\ref{lbab}, there is an integer $r_i$ such that for every 
$\Delta \in{\cal A}_i$ and every $j\in \QTR{userA}{D}_i$ 
there is an $n$-dimensional
simplex $\xi _i(\Delta ,j)\in {\cal B}^{r_i}({\cal K}_{\psi (\Delta )})$ 
with
$$
\limfunc{cl}\xi _i(\Delta ,j)\subseteq \psi _i(\Delta ) 
$$
such that
$$
\limfunc{cl}\xi _i(\Delta ,j)\cap 
\limfunc{cl}\xi _i(\Delta ,j^{\prime})=\emptyset 
$$
for any distinct $j,j^{\prime }\in \QTR{userA}{D}_i$. Let 
$$
{\cal K}_i^{\prime }={\cal B}^{2+r_i}({\cal K}_i), 
$$
let $\ell _i$ be an integer such that
\begin{equation}
\label{eqaa}\left( \dfrac n{n+1}\right) ^{\ell _i}\cdot 4^i\le 2^{-i}, 
\end{equation}
and put $k_{i+1}=k_i+2+r_i+\ell_i$. 
This finishes the inductive construction.

Note that
$$
{\cal K}_{i+1}={\cal B}^{\ell _i}({\cal K}_i^{\prime }) 
\ \ \ \text{ and }\ \ \ 
\xi_i(\Delta ,j)\in {\cal K}_i^{\prime } 
$$
for every $i\in \omega $, 
$\Delta \in {\cal A}_i$ and $j\in \QTR{userA}{D}_i$.

For the next step of our construction
we will need the following additional notation. 
For each $i\in \omega $, let $V_i$ be the set of vertices of ${\cal K}_i$,
let $V_i^{\prime }$ be the set of vertices of ${\cal K}_i^{\prime }$, and
put
$$
\bar V_i=V_i^{\prime }\cap \bigcup_{\Delta \in {\cal A}_i}\limfunc{bd}\psi
_i(\Delta ). 
$$
Moreover, for every $i\in \omega $ and every $j\in \QTR{userA}{D}_i$, 
we define
$$
V_i^j=\bigcup_{\Delta \in {\cal A}_i}V_i^{\Delta ,j}, 
$$
where $V_i^{\Delta ,j}\subseteq V_i^{\prime }$ is the set of vertices of 
$\xi _i(\Delta ,j)$. 
Also, for every $i\in \omega $ and $x\in \QTR{userA}{R}^n$ let 
$\Delta _{x,i}^{\prime }\in {\cal K}_i^{\prime }$ be such that 
$x\in \Delta_{x,i}^{\prime }$, and for $q\in \omega $ put
$$
Y_q=\QTR{userA}{R}^n\setminus 
\bigcup_{t>q}\bigcup_{\Delta \in {\cal A}_t}\psi _t(\Delta ). 
$$
Note that for every $i,q\in \omega $ with $i>q$, the following condition
holds
\begin{equation}\label{eqKCa}
\text{if $x\in Y_q$, then every vertex of 
$\Delta_{x,i}^{\prime }$ is in $Y_q$.} 
\end{equation}
Indeed, suppose that some vertex $v$ of $\Delta _{x,i}^{\prime }$
does not belong to $Y_q$. 
Then there is $t>q$ and $\Delta\in{\cal A}_t$ such that 
$v\in \psi _t(\Delta )$. Then, by Lemma~\ref{lbaf},
$\Delta_{x,i}^{\prime }\subseteq \psi _t(\Delta )$, 
contradicting the fact that $x\in Y_q$.

Now, we define recursively a sequence of functions $g_0,g_1,\dots $ such
that the following conditions hold for every $i\in \omega $:

\QTP{userC}
\begin{description}
\item[(a)]  
$g_i\colon\QTR{userA}{R}^n\rightarrow \left[ -2^{i-1},2^{i-1}\right]$
is ${\cal K}_i$-linear,

\QTP{userC}
\item[(b)]  if $x\in \limfunc{bd}{\cal K}_i$, then $g_{i+1}(x)=g_i(x)$,

\QTP{userC}
\item[(c)]  if $x\in \limfunc{bd}\psi _i(\Delta )$ for some 
$\Delta \in{\cal A}_i$, then $g_{i+1}(x)=0$,

\QTP{userC}
\item[(d)]  if $x\in \limfunc{bd}\xi _i(\Delta ,j)$ for some 
$\Delta\in{\cal A}_i$ and $j\in \QTR{userA}{D}_i$, then $g_{i+1}(x)=j$,

\QTP{userC}
\item[(e)]  if there is $q\in \omega $ such that $x\in Y_q$, then 
$g_i(x)\in\left[ -2^q,2^q\right] $,

\QTP{userC}
\item[(f)]  for every $\Delta \in {\cal K}_i$ the variation of $g_i$ on 
$\limfunc{cl}\Delta $ is at most $2^{-i}$.
\end{description}

Let $g_0(x)=0$ for every $x\in \QTR{userA}{R}^n$. Suppose that 
$i\in \omega $ and that the function 
$g_i\colon\QTR{userA}{R}^n\rightarrow\left[ -2^{i-1},2^{i-1}\right]$ 
satisfies conditions (a)--(f). Let $g_{i+1}$
be the unique ${\cal K}_i^{\prime }$-linear extension of the function 
$h\colon V_i^{\prime }\rightarrow \left[ -2^i,2^i\right] $ defined by:
$$
h(v)=\left\{ 
\begin{array}{cl}
0  & \text{if }v\in \bar V_i\text{,} \\ 
j  & \text{if }v\in V_i^j\text{ for some }j\in \QTR{userA}{D}_i\text{,} \\ 
g_i(v) & \text{otherwise.} 
\end{array}
\right. 
$$
It is obvious that the function $g_{i+1}$ satisfies conditions (a)\---(d).
To see that condition (e) holds, note that if $q<i$ and $x\in Y_q$, 
then every
vertex $v$ of $\Delta _{x,i}^{\prime }$ is outside 
$\dbigcup\limits_{j\in \QTR{userA}{D}_i}V_i^j$ 
implying that either $g_{i+1}(v)=g_i(v)$ or $g_{i+1}(v)=0$. 
Now it follows from (\ref{eqKCa}) and the inductive hypothesis
that $g_{i+1}(v)\in \left[ -2^q,2^q\right] $ for any vertex $v$ of 
$\Delta_{x,i}^{\prime }$, 
implying that $g_{i+1}(x)\in \left[ -2^q,2^q\right] $.
Finally, it follows from Corollary~\ref{lbac} and inequality (\ref{eqaa})
that the function $g_{i+1}$ satisfies condition (f).


For each $i\in \omega $, let $f_i$ be the restriction of $g_i$ to 
$\limfunc{bd}{\cal K}_i$. If follows from condition (b) 
that $f_{i+1}$ is an extension of $f_i$ for every $i\in\omega$. Let
$$
X=\bigcup_{i\in \omega }\limfunc{bd}{\cal K}_i, 
$$
and let 
$$
f=\bigcup_{i\in \omega }f_i\colon X\rightarrow \QTR{userA}{R.} 
$$
We are going 
to extend the function $f$ to a function on $\QTR{userA}{R}^n$. 
Let $x\in \QTR{userA}{R}^n\setminus X$. If there is an integer $q\ge 0$
such that $x\in Y_q$, then it follows from condition (e) that 
$g_i(x)\in\left[ -2^q,2^q\right] $ for every $i\in\omega$. 
Then let $f(x)$ be the limit of some convergent subsequence of the sequence 
$\la g_i(x)\ra_{i=0}^\infty $. If such $q$ does not exist, then let $f(x)=0$.
This completes the definition of the function $f$. 

We will show first that $f$ is peripherally continuous.

Denote by $X^{\prime }$ the set of points $x\in\QTR{userA}{R}^n\setminus X$ 
for which the integer $q$ as above exists, {\it i.e.}, let
$$
X^{\prime }=\left( \QTR{userA}{R}^n\setminus X\right) 
\cap \bigcup_{q\in\omega }Y_q, 
$$
and put 
$X^{\prime \prime }=
\left( \QTR{userA}{R}^n\setminus X\right)\setminus X^{\prime }$. 
Note that $f(x)=0$ for $x\in X^{\prime \prime }$.

To see that $f$ is peripherally continuous
choose $x\in \QTR{userA}{R}^n\setminus X$ and for each 
$i\in \omega $, let $\Delta _{x,i}$ be the
simplex of ${\cal A}_i$ containing $x$. 
Since the sequence $k_0,k_1,\dots $ is strictly increasing
it follows from Lemma~\ref{lbda} that the diameters 
of $\Delta _{x,i}$ converge to $0$ as $i\rightarrow \infty$. 
If $x\in X^{\prime }$, then the peripheral continuity
of $f$ at $x$ follows from condition (f). If $x\in X^{\prime \prime }$, then
there are infinitely many integers $i$ such that $x$ belongs to 
$\psi_i(\Delta )$ for some $\Delta \in {\cal A}_i$. Since $f(x)=0$, the
peripheral continuity of $f$ at $x$ follows from condition (c). 
If $x\in X$,
then for each $i\in \omega $, let ${\cal E}_{x,i}$ be the set of simplices 
$\Delta \in {\cal A}_i$ such that $x\in \limfunc{cl}\Delta $ and 
$$
Z_{x,i}=\bigcup_{\Delta \in {\cal E}_{x,i}}\limfunc{cl}\Delta . 
$$
Since the diameter of $Z_{x,i}$ is at most twice as large as the maximal
diameter of a simplex in ${\cal E}_{x,i}$, it follows from Lemma \ref{lbda}
that the diameters of $Z_{x,i}$ converge to $0$ as $i\rightarrow \infty $.
Thus it follows from condition (f) 
that $f$ is peripherally continuous at $x$.

By Theorem~\ref{ThHag}
it remains to define the subset $G$ of $\QTR{userA}{R}^n$ that is a dense 
$G_\delta $ set and any function 
$h\colon \QTR{userA}{R}^n\rightarrow\QTR{userA}{R}$ 
with $h(x)=f(x)$ for $x\notin G$ is peripherally continuous. 

So, for each $j\in \QTR{userA}{D}$ define
$$
G_j=\bigcup_{i\in\{k\colon j\in \QTR{userA}{D}_k\}}
\bigcup_{\Delta \in {\cal A}_i}\xi _i(\Delta,j) 
$$
and notice that $G_j$ 
is an open and dense subset of $\QTR{userA}{R}^n$. This implies that 
$$
G=\bigcap_{j\in \QTR{userA}{D}}G_j 
$$
is a dense $G_\delta $ subset of $\real^n$. We will show that $G$
has the desired property.

So, let $h\colon \QTR{userA}{R}^n\rightarrow\QTR{userA}{R}$ 
be any function with $h(x)=f(x)$ for $x\notin G$. 
Function $h$ is
peripherally continuous at any $x\notin G$
by the same reason that $f$ is. 
If $x\in G$, then for any $j\in 
\QTR{userA}{D}$ there is arbitrarily large $i\in \omega $ such that 
$x\in\xi _i(\Delta ,j)$ for some $\Delta \in {\cal A}_i$, thus it follows from
condition (d) that $h$ is peripherally continuous at $x$. The
proof is complete. \qed



\section{Proof of Proposition~\ref{plaa}}\label{secB}

In what follows we will identify a natural number $n$ with the set
of its predecessors, i.e., $n=\{0,\ldots,n-1\}$. 
Let $A\subseteq \real$. We say that $A$ is a {\em thick meager}
set if $A$ is a countable union of nowhere dense perfect sets and $A$ is
dense in $\real $. If $\la A_i\colon i\in n\ra$ is a
family of sets then 
$$
\prod_{i\in n}A_i=A_0\times \dots \times A_{n-1}. 
$$

\begin{lemma}\label{lab}
If $G$ is a dense $G_\delta $ set 
in $\real^n$, then
for each $i\in n$ there is a countable dense set 
$B_i\subseteq\real$ 
and a thick meager set $Y_i\subseteq\real$ such
that $B_i\cap Y_i=\emptyset $ and
$$
\prod_{i\in n}\left(B_i\cup Y_i\right) \subset G. 
$$
\end{lemma}


\TeXButton{\begin{pf}}{\begin{pf}}
Let $G$ be a dense $G_\delta $ set in 
$\real^n$. 
First note that it is enough to prove that
for each $i\in n$ there is 
a thick meager set $Y_i\subseteq\real$ such
that
\begin{equation}\label{KCnewEq}
\prod_{i\in n}Y_i \subset G,
\end{equation}
since then for every $i\in n$ there exists a countable dense  
$B_i\subset Y_i$ 
and a thick meager set $Y_i^\prime\subset Y_i$ such
that $B_i\cap Y_i^\prime=\emptyset$.

We prove (\ref{KCnewEq}) by induction on $n$. If $n=1$,
then it is clear that (\ref{KCnewEq}) holds. Assume that $n\ge 2$
and that (\ref{KCnewEq}) holds for smaller values of $n$. 
We claim that 
\begin{enumerate}
\item[($\dagger$)]  
there is a thick meager set 
$Y\subseteq \real $, and a dense $G_\delta $ set $G^{\prime }$ in 
$\real ^{n-1}$ such that 
$Y\times G^{\prime }\subseteq G$. 
\end{enumerate}
It is obvious that ($\dagger$) and
the induction hypothesis imply that the lemma holds.

To prove ($\dagger$) we will first show that:

\begin{enumerate}
\item[($\star$)]  for every $p<q$ there exists a nowhere dense
perfect set $Y_{p,q}\subseteq \left( p,q\right) $ and a dense $G_\delta$
set $G_{p,q}\subseteq \real ^{n-1}$ such that 
$Y_{p,q}\times G_{p,q}\subseteq G$.
\end{enumerate}

Clearly ($\star$) implies ($\dagger$), since for
${\cal A}=\left\{\la p,q\ra\in\QTR{userA}{Q}^2\colon p<q \right\}$
the sets $Y=\bigcup_{\la p,q\ra\in{\cal A}} Y_{p,q}$
and
$G^{\prime }=\bigcap_{\la p,q\ra\in {\cal A}}G_{p,q}$, 
satisfy ($\dagger$).

Now we show that ($\star$) holds. Assume that
$$
G=\bigcap_{m\in \omega }U_m, 
$$
where $U_m$ is an open dense set in $\real ^n$ for every 
$m\in\omega $, and let $p<q$. Let $J_0$, $J_1$, $\dots $ 
be an enumeration of
some countable basis of the topology of $\real ^{n-1}$, and 
let $\la t_0,u_0\ra $, $\la t_1,u_1\ra $, $\dots $ be an
enumeration of $\omega \times \omega $. Let $T_i$ be the set of all zero-one
sequences $g\colon i\to 2$ of length $i$, and for $g\in T_i$ and $j\in 2$
let $g*j\in T_{i+1}$ be the {\em concatenation} of $g$ and $j$, {\it i.e.}, 
$$
g*j=\left\langle s_0,s_1,\ldots ,s_{n-1},j\right\rangle, 
$$
where $g=\left\langle s_0,s_1.\ldots ,s_{n-1}\right\rangle $. For each 
$i\in\omega $ we define, by induction on $i$, an open set 
$V_i\subseteq\real^{n-1}$ 
and a family $\left\{ W_g\colon g\in T_i\right\} $ of nonempty
open subsets of $\left(p,q\right)$, such that the following conditions
hold for every $i\in\omega$:

\begin{enumerate}
\item[(i)]  $V_i\cap J_{t_i}\neq \emptyset$;

\item[(ii)]  $\left(\dbigcup\limits_{g\in T_i}\limfunc{cl}W_g\right)\times
              V_i\subseteq U_{u_i}$;

\item[(iii)]  $\limfunc{diam}W_g\le 2^{-i}$ for every $g\in T_i$;

\item[(iv)]  $\limfunc{cl}W_{g*0}\cap \limfunc{cl}W_{g*1}=\emptyset$ for
every $g\in T_{i-1}$ provided $i>0$;

\item[(v)]  $\limfunc{cl}W_{g*0}\cup \limfunc{cl}W_{g*1}\subseteq W_g$ for
every $g\in T_{i-1}$ provided $i>0$.
\end{enumerate}

For $i=0$ choose arbitrary $W_\tau\subset(p,q)$,
$\tau$ being an empty sequence, and $V_0\subset J_{t_0}$
such that 
$\limfunc{cl}W_\tau\times V_0\subseteq U_{u_0}$.
Such a choice can be made, since $U_{u_0}$ is dense in $\real^n$. 
It is clear that with such a choice conditions (i)-(v) are satisfied. 

To make the inductive step choose $i<\omega$, $i>0$, such
that $V_{i-1}$ and $W_g$ for each $g\in T_{i-1}$
satisfying (i)-(v) are already defined.
Since $U_{u_i}$ is dense open in $\real ^n$, 
there are nonempty open set $V_i\subseteq J_{t_i}$ and
for every $g\in T_{i-1}$ a nonempty open set 
$W_g^\prime\subseteq W_g$ such that 
$$
\left(\bigcup_{g\in T_{i-1}}
\limfunc{cl}W_g^\prime\right)\times V_i\subseteq U_{u_i}. 
$$
For each $g\in T_{i-1}$ choose nonempty open
sets $W_{g*0},W_{g*1}\subseteq W_g^\prime$ satisfying (iii)-(v).
This completes our construction.

To prove that ($\star $) holds, it suffices to take
$$
Y_{p,q}=\bigcap_{i\in \omega }\bigcup_{g\in T_i}\limfunc{cl}W_g 
\ \ \ \text{ and }\ \ \ 
G_{p,q}=\bigcap_{m\in \omega }H_m, 
$$
where
$$
H_m=\bigcup\{V_i\colon u_i=m\}. 
$$
Then it is clear that $Y_{p,q}$ is a nowhere dense perfect subset of 
$\left(p,q\right) $ and that $G_{p,q}$ is a $G_\delta $ subset of 
$\real^{n-1}$. To see that $G_{p,q}$ is dense in 
$\real^{n-1}$, it is enough to note that for every 
$m\in \omega $ the set $H_m$ intersects every element of 
the basis $\left\{J_i\colon i\in \omega\right\}$ of 
$\real ^{n-1}$. It remains to verify that
$$
Y_{p,q}\times G_{p,q}\subseteq G. 
$$
So, choose arbitrary  
$x\in Y_{p,q}$, $y\in G_{p,q}$ and $m\in\omega$. Then $y\in H_m$ 
and there exists $i\in\omega$ such that $u_i=m$ and $y\in V_i$ implying that
$$
\la x,y\ra \in
\left(\bigcup_{g\in T_i}\limfunc{cl}W_g\right)\times V_i
\subseteq U_{u_i}=U_m. 
$$
Therefore $\la x,y\ra \in \bigcap_{m\in\omega}U_m=G$ 
and so the proof is complete. 
\TeXButton{\end{pf}}{\end{pf}}


\begin{lemma}\label{lac}
If $B\subseteq \QTR{userA}{R} $ is a countable dense set, 
$Y\subseteq \QTR{userA}{R} $ is a thick meager set and 
$Z\subseteq \QTR{userA}{R} $ is a meager set such that 
$B\cap Y=B\cap Z=\emptyset$, then there is an
increasing homeomorphism 
$g\colon \QTR{userA}{R} \rightarrow \QTR{userA}{R}$ 
such that $Z\subseteq g(Y)$ and $g(B)=B$.
\end{lemma}


\TeXButton{\begin{pf}}{\begin{pf}}It is clear that we can
assume that the
set $Z$ is thick meager. Let
$$
Z=\bigcup_{i\in \omega }Z_i, 
$$
where $\left\{ Z_i\colon i\in \omega \right\} $ is a family
of mutually disjoint
nowhere dense perfect sets. Let 
$\left\langle b_i\colon i\in \omega \right\rangle$ 
be an enumeration of $B$ and 
$\left\langle I_i\colon i\in \omega \right\rangle $
be an enumeration of all non-empty open intervals 
$\left(p,q\right) $ with
rational endpoints $p,q\in \QTR{userA}{R} $. We construct,
by induction
on $i\in \omega $, 
%%%%%%%%%
%%%
%(similarly as in the proof of Lemma 3.2 \cite{CiesRec:inv-periph}), 
%%%
% This proof did not make to the final version of the paper. 
%%%%%%%%%
two strictly increasing sequences $\left\langle n_i\in\omega\colon i\in
\omega\right\rangle$ and  
$\left\langle m_i\in\omega\colon i\in \omega \right\rangle$,
and a sequence $\left\langle f_i\colon i\in \omega\right\rangle $ 
of functions
such that the following conditions hold for every $k\in\omega$:

\begin{enumerate}
\item[(i)]  $f_k\colon \bigcup_{i\le k}Z_{n_i}\cup 
               \left\{ b_{m_i}\colon i\le k\right\}\rightarrow Y\cup B$ 
            is a strictly increasing continuous function 
            extending $\bigcup_{i<k}f_i$ such that 
            $f_k\left[\bigcup_{i\le k}Z_{n_i}\right] \subseteq Y$ and 
            $f_k\left[\left\{b_{m_i}\colon i\le k\right\}\right]\subseteq B$;

\item[(ii)]  if $k=4j$, then $\bigcup_{i\le j}Z_i\subseteq \limfunc{dom}f_k$;

\item[(iii)]  if $k=4j+1$, then $f_k\left[ \bigcup_{i\le k}Z_{n_i}\right]
\cap I_j\neq \emptyset $;

\item[(iv)]  if $k=4j+2$, then $\left\{ b_i\colon i\le j\right\} \subseteq 
            \limfunc{dom}f_k$;

\item[(v)]  if $k=4j+3$, then $\left\{ b_i\colon i\le j\right\} \subseteq
            \limfunc{range}f_k$.
\end{enumerate}

Then the function
$$
f=\bigcup_{i\in \omega }f_i\colon Z\cup B\rightarrow Y\cup B 
$$
is strictly increasing, $f\left[ Z\right] \subseteq Y$ is dense in 
$\real$ and $f[B]=B$. Thus $f$ can be extended to a
homeomorphism $h$ from $\real$ to $\real$
and $g=h^{-1}$ satisfies the requirements. 
This completes the proof. \TeXButton{\end{pf}}{\end{pf}}


In the remainder of this section we will use the following
non-standard notation. 
If $\la A_i\colon i\in n\ra$ is a family of sets, $C$ is a
set and
$j\in n$, then let
$$
A_i\vee _jC=\left\{ 
\begin{array}{cl}
C & \text{if }i=j, \\ A_i & \text{if }i\neq j. 
\end{array}
\right. 
$$
If moreover $\la B_i\colon i\in n\ra$ is a family of sets
and $f$ is a
function from $n$ into $2=\left\{ 0,1\right\}$, then define 
$$
A_i\vee _fB_i=\left\{ 
\begin{array}{cl}
A_i & \text{if }f(i)=0, \\ B_i & \text{if }f(i)=1. 
\end{array}
\right. 
$$
We will also use the notation $A_i\vee _fB_i\vee _jC$ to
denote the set 
$D_i\vee _jC$ where $D_i=A_i\vee _fB_i$, that is
$$
A_i\vee _fB_i\vee _jC=\left\{ 
\begin{array}{cl}
C & \text{if }i=j, \\ B_i & \text{if }i\neq j\text{ and
}f(i)=1, \\ A_i & 
\text{if }i\neq j\text{ and }f(i)=0. 
\end{array}
\right. 
$$

\begin{lemma}\label{lad}
Let $G\subseteq \QTR{userA}{R}^n$ be a $G_\delta $ set. If
$f\colon n\to 2$
is a function, $i\in n$ and $\left\langle b_0,\dots ,b_{n-
1}\right\rangle
\in \QTR{userA}{R}^n$, then the set 
$$
\left\{ x\in \QTR{userA}{R}\colon\prod_{t\in n}\left(
\left\{ b_t\right\}
\vee _f\QTR{userA}{R}\vee _i\left\{ x\right\} \right)
\subseteq G\right\}  
$$
is a $G_\delta $ subset of $\QTR{userA}{R}$.
\end{lemma}


\TeXButton{\begin{pf}}{\begin{pf}}Assume that%
$$
G=\bigcap_{k\in \omega }U_k, 
$$
with $U_k\subseteq \QTR{userA}{R}^n$ being open for every
$k\in \omega $.
Let 
$$
D_x^r=\prod_{t\in n}\left( \left\{ b_t\right\} \vee _f\left[
-r,r\right]
\vee _i\left\{ x\right\} \right) \subseteq \QTR{userA}{R}^n, 
$$
for every $x\in \QTR{userA}{R}$ and $r\in \omega $, and let 
$$
V_k^r=\left\{ x\in \QTR{userA}{R}\colon D_x^r\subseteq
U_k\right\} , 
$$
for every $k,r\in \omega $. Then%
$$
\left\{ x\in \QTR{userA}{R}\colon \prod_{t\in n}\left(
\left\{ b_t\right\}
\vee _f\QTR{userA}{R}\vee _i\left\{ x\right\} \right)
\subseteq G\right\}
=\bigcap_{k\in \omega }\bigcap_{r\in \omega }V_k^r. 
$$
To complete the proof it remains to show that the set
$V_k^r$ is open in $%
\QTR{userA}{R}$ for every $k,r\in \omega $.

Suppose that $x\in V_k^r$. Then $D_x^r\subseteq U_k$ and
since $U_k$ is
open, it follows that for every $y\in D_x^r$ there is an
open neighbourhood $%
W_y$ of $y$ in $\QTR{userA}{R}^n$ with $W_y\subseteq U_k$.
Since $D_x^r$ is
compact, there is a finite subfamily of $\left\{ W_y\colon
y\in
D_x^r\right\} $ that covers $D_x^r$ implying that there is
an open
neighbourhood $A\subseteq \QTR{userA}{R}$ of $x$ such that 
$$
\prod_{t\in n}\left( \left\{ b_t\right\} \vee _f\left[ -
r,r\right] \vee
_iA\right) \subseteq U_k. 
$$
So $A\subseteq V_k^r$ implying that $V_k^r$ is open
and hence
completing the proof. \TeXButton{\end{pf}}{\end{pf}}




\medskip


\noindent {\bf Proof of Proposition~\ref{plaa}.} 
Assume that $G\subseteq 
\QTR{userA}{R}^n$ is a dense $G_\delta$. By Lemma~\ref{lab},
for each $i\in n
$ there is a countable dense set $B_i\subseteq
\QTR{userA}{R} $ and a thick
meager set $Y_i\subseteq \QTR{userA}{R} $ such that $B_i\cap
Y_i=\emptyset $
and 
$$
\prod_{i\in n}\left( B_i\cup Y_i\right)\subseteq G. 
$$
We will define homeomorphisms $g_j^i\colon \QTR{userA}{R}
\rightarrow 
\QTR{userA}{R} $ for every $i\in n$ and $j\in\{1,2,\dots
,n\}$ such that if 
$$
h_j=g_j^0\times\dots\times g_j^{n-1}\colon 
\QTR{userA}{R} ^n\rightarrow\QTR{userA}{R} ^n, 
$$
then 
\begin{equation}
\label{eqaa2}\prod_{i\in n}\left( B_i\vee _f\QTR{userA}{R}
\right) \subseteq
G\cup \bigcup_{j=1}^kh_j(G) 
\end{equation}
for every $k\in n+1$ and every function $f\colon n\to 2$
such that $%
\left|f^{-1}(1)\right| =k$. (Here $|X|$ stands for the
cardinality of the
set $X$.) The construction will be done by induction with
respect to $k$.

Note that for $k=0$, the equation (\ref{eqaa2}) is already
satisfied for the
constant function $f\equiv 0$, the only $f\colon n\to 2$
with $\left|
f^{-1}(1)\right| =0$. This gives the starting point for our
induction.
Notice also that if $k=n$, then the equation (\ref{eqaa2})
with the constant
function $f\equiv 1$ implies that 
$$
G\cup \bigcup_{j=1}^nh_j(G)=\QTR{userA}{R}^n. 
$$
Thus it remains to do the inductive step.

Assume that $k\in n$ and that the homeomorphisms
$g_j^i\colon \QTR{userA}{R}%
\rightarrow \QTR{userA}{R} $ have been defined for every
$i\in n$ and $%
j\in\{1,\dots ,k\}$ in such a way that (\ref{eqaa2}) is
satisfied for every $%
f\colon n\to 2$ with $\left| f^{-1}(1)\right| =k$. We are
going to define $%
g_{k+1}^i$ for every $i\in n$ so that the equation
(\ref{eqaa2}) with $k$
replaced by $k+1$ is satisfied for every $f\colon n\to 2$
with $\left|
f^{-1}(1)\right| =k+1$.

For every $i\in n$, let $F_i$ be the set of all functions
$f\colon n\to 2$
such that 
$$
\left| f^{-1}(1)\right| =k\ \text{ and }\ f(i)=0. 
$$
Fix $i\in n$. It follows from Lemma~\ref{lad} that for every
$b=\la %
b_0,\dots ,b_{n-1}\ra \in B_0\times \dots \times B_{n-1}$,
and every $f\in
F_i$ there is a $G_\delta $ set $K_i^{f,b}\subseteq
\QTR{userA}{R}$ such
that 
$$
\prod_{t\in n}\left( \left\{ b_t\right\} \vee
_f\QTR{userA}{R}\vee
_iK_i^{f,b}\right) \subseteq G\cup \bigcup_{j=1}^kh_j(G). 
$$
Notice also that, by (\ref{eqaa2}), $B_i\subseteq
K_i^{f,b}$. So, $K_i^{f,b}$
is a dense $G_\delta $ set. Thus, the set 
$$
K_i=\bigcap \{K_i^{f,b}\colon 
f\in F_i\text{ and }b\in B_0\times \dots \times B_{n-1}\} 
$$
is a dense $G_\delta $ set with $B_i\subseteq K_i$ and 
\begin{equation}
\label{eqac}\prod_{t\in n}\left( B_t\vee
_f\QTR{userA}{R}\vee _iK_i\right)
\subseteq G\cup \bigcup_{j=1}^kh_j(G)
\end{equation}
for every $f\in F_i$. In particular,
$Z_i=\QTR{userA}{R}\setminus K_i$ is a
meager set with $B_i\cap Z_i=\emptyset $. By
Lemma~\ref{lac}, there is a
homeomorphism $g_{k+1}^i\colon \QTR{userA}{R}\rightarrow
\QTR{userA}{R}$
such that $Z_i\subseteq g_{k+1}^i(Y_i)$ and
$g_{k+1}^i(B_i)=B_i$.

Let $h_{k+1}=g_{k+1}^0\times \dots \times g_{k+1}^{n-1}$. We
claim that 
$$
\prod_{i\in n}\left( B_i\vee _f\QTR{userA}{R} \right)
\subseteq G\cup
\bigcup_{j=1}^{k+1}h_j(G) 
$$
for every $f\colon n\to 2$ with $\left| f^{-1}(1)\right|
=k+1$. Indeed, let $%
f\colon
n\to 2$ be any function satisfying $\left| f^{-1}(1)\right|
=k+1$ and pick 
$$
x\in \prod_{i\in n}\left( B_i\vee _f\QTR{userA}{R} \right). 
$$
We will show that 
$$
x\in G\cup \bigcup_{j=1}^{k+1}h_j(G). 
$$
If there is $i\in f^{-1}(1)$ such that 
$$
x\in \prod_{t\in n}\left( B_t\vee _f\QTR{userA}{R} \vee
_iK_i\right), 
$$
then it follows from (\ref{eqac}) that 
$$
x\in G\cup \bigcup_{j=1}^kh_j(G) 
$$
so we can assume that for every $i\in f^{-1}(1)$ we have 
$$
x\notin \prod_{t\in n}\left( B_t\vee _f\QTR{userA}{R} \vee
_iK_i\right). 
$$
Then 
$$
x\in \prod_{i\in n}\left( B_i\vee _f Z_i\right) \subseteq
\prod_{i\in
n}\left( B_i\vee _fg_{k+1}^i(Y_i)\right) . 
$$
Since $g_{k+1}^i(B_i)=B_i$ and 
$$
\prod_{i\in n}\left( B_i\vee _fY_i\right) \subseteq G 
$$
for every $i\in n$, it follows that 
$$
\prod_{i\in n}\left( B_i\vee _fg_{k+1}^i(Y_i)\right)
=h_{k+1}\left( \prod_{i\in
n}\left( B_i\vee _fY_i\right) \right) \subseteq h_{k+1}(G). 
$$
Therefore 
$$
x\in h_{k+1}(G) 
$$
and so the proof is complete. \qed




\section{Proofs of Propositions \ref{Proplca} and \ref{PROPlee}}\label{sec3}

In the proof that follows we will need some additional 
definitions and results from dimension theory. 
(See for example~\cite{HurWall:dimen}). 
 
Given $X\subseteq \QTR{userA}{R}^n$ and an integer $m\ge 1$, we
say that $X$ is an {\em $m$-dimensional Cantor-manifold} if $X$ is compact, 
$\dim X=m$, and for every $Y\subseteq X$ with $\dim Y\le m-2$, the set 
$X\setminus Y$ is connected. Note that an $m$-dimensional Cantor-manifold $X$
is connected and for every $p\in X$
$$
\dim _p X=m,
$$
{\em  i.e.}, 
there exists an open neighborhood
$W$ of $p$ such that $\dim\limfunc{bd}_X U=m-1$
for any open neighborhood $U\subseteq W$ of $p$.

Given $X\subseteq \QTR{userA}{R}^n$ and 
$p,q\in \QTR{userA}{R}^n\setminus X$, 
we say that $X$ {\em separates} $p$ and $q$ if
they are in distinct components of $\QTR{userA}{R}^n\setminus X$. 

The following lemmas are proved in~\cite{HurWall:dimen}.

\begin{lemma}\label{lea}
For any compact $Y\subseteq \QTR{userA}{R}^n$ with $\dim Y\ge m$ 
there exists an $m$-dimensional Cantor manifold $X\subseteq Y$.\qed
\end{lemma}

\begin{lemma}\label{leb}
If $X\subseteq \QTR{userA}{R}^n$ is a compact set that separates 
$p$ and $q$, and no proper closed subset of $X$ does so, then $X$ is an 
$(n-1)$-dimensional Cantor manifold.\qed
\end{lemma}

Using Zorn's Lemma it is easy to prove the following lemma.

\begin{lemma}\label{led}
If $X\subseteq \QTR{userA}{R}^n$ is a compact set that separates 
$p$ and $q$, then there is a compact $X^{\prime }\subseteq X$ that 
separates $p$ and $q$ and no proper closed subset of $X^{\prime }$ does so.
\qed
\end{lemma}

Given a subset $U$ of $\QTR{userA}{R}^n$, we say that $U$ is a 
{\em quasiball} if $U$ is a bounded and connected open set, and 
$\limfunc{bd}U$ 
is an $\left( n-1\right) $-dimensional Cantor manifold. 
The open ball in $\QTR{userA}{R}^n$ with 
center $x\in\real^n$ and radius $\varepsilon>0$ will be denoted by 
$B^n(x,\varepsilon)$.

\begin{lemma}\label{lec}
If $V$ is an open set and 
$$
x\in V\subseteq B^n(x,\delta ) 
$$
for some $x\in \QTR{userA}{R}^n$ and $\delta >0$, then there is a
quasiball $U\subseteq B^n(x,\delta )$ containing $x$ 
with $\limfunc{bd}U\subseteq \limfunc{bd}V$.
\end{lemma}

\TeXButton{\begin{pf}}{\begin{pf}}
Let $y$ be an element of the unbounded
component of $\QTR{userA}{R}^n\setminus \limfunc{cl}V$. Since $V$ is
bounded, $\limfunc{bd}V$ is compact, so it follows from 
Lemmas~\ref{led} and~\ref{leb} 
that there is an $\left( n-1\right) $-dimensional Cantor manifold 
$X\subseteq \limfunc{bd}V$ that separates $x$ from $y$. Let $U$ be the
component of $\QTR{userA}{R}^n\setminus X$ containing $x$. It is clear that 
$U$ satisfies the requirements. 
\TeXButton{\end{pf}}{\end{pf}}

\begin{corollary}\label{lcb}
Let $f\colon \QTR{userA}{R}^n\rightarrow \QTR{userA}{R}$ be a
peripherally continuous function. Then for any $x\in \QTR{userA}{R}^n$, any 
$\varepsilon >0$ and any open set $W$ in $\QTR{userA}{R}^n$ containing $x$,
there is a quasiball $U\subseteq W$ containing $x$ such that $\left|
f(x)-f(y)\right| <\varepsilon $ for any $y\in \limfunc{bd}U$.
\end{corollary}

\TeXButton{\begin{pf}}{\begin{pf}}
Let $\delta>0$ be such that $B^n(x,\delta)\subset W$.
Since $f$ is peripherally continuous there is an open 
neighborhood 
$V\subset \bd V\subset B^n(x,\delta)$ of $x$ such that 
$\left|f(x)-f(y)\right| <\varepsilon $ for any $y\in \bd U$. 
Then $U$ from Lemma~\ref{lec} satisfies the requirements. 
\TeXButton{\end{pf}}{\end{pf}}




Given open sets $U$ and $W$ in $\QTR{userA}{R}^n$, we say that $U$ and $W$
are {\em independent} if all the intersections $U\cap W$, 
$U\cap W^c$, $U^c\cap W$, and $U^c\cap W^c$ are nonempty, where 
$U^c$ and $W^c$ are the complements of the closures of $U$
and $W$, respectively. Given $x\in \QTR{userA}{R}^n$, 
a {\em halfline starting at }$x$ is a set $A$ of the form
$$
A=\left\{ x+\alpha z\colon \alpha \ge 0\right\}  
$$
form some nonzero $z\in \QTR{userA}{R}^n$.

\begin{lemma}\label{lcc}
If $U$ and $W$ are independent quasiballs, then $\limfunc{bd}%
U\cap \limfunc{bd}W\neq \emptyset $.
\end{lemma}

\TeXButton{\begin{pf}}{\begin{pf}}
Let $U^c$ and $W^c$ be the
complements of the closures of $U$ and $W$ respectively. Since $W\cap U$ and 
$W\cap U^c$ are nonempty and $W$ is connected, it follows that 
$W\cap \limfunc{bd}U$ is nonempty. Similarly, $U\cap \limfunc{bd}W$ is
nonempty.

Since $U$ is bounded, any halfline starting at a point in $U$ intersects 
$\limfunc{bd}U$. The analogous statement holds for $W$. 
Let $x\in U\cap W$ and $A$
be a halfline starting at $x$. Since $\limfunc{bd}U\cup \limfunc{bd}W$ is
compact there is 
$$
y\in A\cap \left( \limfunc{bd}U\cup \limfunc{bd}W\right)  
$$
such that the halfline $B$ starting at $y$ that is a subset of $A$ does not
intersect $\limfunc{bd}U\cup \limfunc{bd}W$ except at $y$. Without loss of
generality, we can assume that $y\in \limfunc{bd}U\setminus \limfunc{bd}W$.
Then $B$ does not intersect $\limfunc{bd}W$ implying that 
$B\cap W=\emptyset$. Therefore
$$
y\in W^c\cap \limfunc{bd}U 
$$
implying that $W^c\cap \limfunc{bd}U$ is nonempty. Since
$W\cap \limfunc{bd}U$ is also nonempty and $\limfunc{bd}U$ 
is connected, we
conclude that $\limfunc{bd}U\cap \limfunc{bd}W$ is nonempty. 
\TeXButton{\end{pf}}{\end{pf}}

\bigskip


For $n\in \omega $ let $\omega ^n$ be the set of all sequences of elements
of $\omega $ of length $n$, and let
$$
\omega ^{<\omega }=\bigcup_{n\in \omega }\omega ^n. 
$$
Note that $\omega ^0=\left\{ \emptyset \right\} $. For 
$s\in \omega^{<\omega }$ and $j\in \omega $ 
let $s*j$ be the {\em concatenation} of $s$
and $j$, {\it i.e.}, 
$$
s*j=\left\langle s_0,s_1,\ldots ,s_{n-1},j\right\rangle, 
$$
where $s=\left\langle s_0,s_1.\ldots ,s_{n-1}\right\rangle $. Given 
$T\subseteq \omega ^{<\omega }$ and $n\in \omega $, let 
$$
T_n=T\cap \omega ^n. 
$$
Given $s\in T_n$ and $t\in T_{n+1}$ such that there is $j\in \omega $ with 
$t=s*j$, we say that $s$ is the {\em father} of $t$ and that $t$ is a 
{\em son} of $s$. A nonempty subset $T$ of $\omega ^{<\omega }$ 
is a {\em tree} if
for every $s\in T\setminus \left\{ \emptyset \right\} $ the father of $s$
belongs to $T$ and every element of $T$ has at least one son in $T$. We say
that the tree $T$ is {\em finitely branching} if $T_n$ is finite for every 
$n\in \omega $.

Let $T$ be a finitely branching tree and 
$f\colon\QTR{userA}{R}^m\rightarrow \QTR{userA}{R}$ be a 
peripherally continuous function. A family
$$
{\cal U}=\left\{ U_s\colon s\in T\right\} 
$$
of quasiballs in $\QTR{userA}{R}^m$ will be called a {\em good }
$T${\em -family of quasiballs for } $f$ if there is a function 
$\eta \colon T\rightarrow \QTR{userA}{R}^m$ 
and two sequences $\left\langle q_n\colon n\in \omega\right\rangle $ 
and $\left\langle r_n\colon n\in \omega \right\rangle $ of
positive real numbers such that the series $\sum_{n=0}^\infty q_n$ and 
$\sum_{n=0}^\infty r_n$ converge and the following conditions are
satisfied for any $n\in \omega $, $s\in T_n$ and any son $t$ of~$s$:

\begin{enumerate}
\item[(i)]  $\eta (s)\in U_s$;

\item[(ii)]  the distance from $\eta (s)$ to any element of $U_s$ is at most 
$q_n$;

\item[(iii)]  $\left| f(x)-f(\eta (s))\right| \le r_n$ for any 
$x\in \limfunc{bd}U_s$;

\item[(iv)]  $\eta (t)\in \limfunc{bd}U_s$;

\item[(v)]  the quasiballs $U_s$ and $U_t$ are independent.
\end{enumerate}

\noindent For any $\gamma \in \omega ^\omega $ let $\gamma _n$ be the
initial segment of $\gamma $ of length $n$. Assume that 
${\cal U}=\left\{U_s\colon s\in T\right\} $ is a good $T$-family of 
quasiballs for $f$ and that $\eta \colon T\rightarrow \QTR{userA}{R}^m$,
$\left\langle q_n\colon n\in \omega\right\rangle $ 
and $\left\langle r_n\colon n\in \omega \right\rangle $ satisfy
conditions (i)\---(v). Define 
$$
T^{*}=\left\{ \gamma \in \omega ^\omega \colon \gamma _n\in T\right\}. 
$$
Given $\gamma \in T^{*}$, we say that $x\in \QTR{userA}{R}^m$ is a 
$\gamma${\em -limit} of ${\cal U}$ if for every open neighborhood $V$ of $x$ in
$\QTR{userA}{R}^m$ there is $k\in \omega $ with 
$$
U_{\gamma _n}\cap V\neq \emptyset 
$$
for every $n\ge k$. It follows from condition (ii) that for every $\gamma
\in T^{*}$ there is exactly one $\gamma $-limit $x_\gamma $ of ${\cal U}$.
Define 
$$
L_{{\cal U}}=\left\{ x_\gamma \in \QTR{userA}{R}^m\colon \gamma \in T^{*}\right\} 
$$
to be the set of all limit points of ${\cal U}$.

\begin{lemma}\label{lvaa}
Let $T$ be a finitely branching tree and 
$f\colon \QTR{userA}{R}^m\rightarrow \QTR{userA}{R}$ be a peripherally continuous
function. If ${\cal U}=\left\{ U_s\colon s\in T\right\} $ is a good $T$-family of
quasiballs for $f$, then the restriction of $f$ to $L_{{\cal U}}$ is
continuous.
\end{lemma}

\TeXButton{\begin{pf}}{\begin{pf}}Let $\eta \colon T\rightarrow \QTR{userA}{R}^m$, 
$\left\langle q_n\colon n\in \omega \right\rangle $ and 
$\left\langle r_n\colon n\in\omega \right\rangle $ 
satisfy conditions (i)\---(v). Given $\gamma \in
T^{*} $ and $t\in \omega $, let 
$$
B_{\gamma ,t}=\bigcup_{n=t}^\infty \limfunc{bd}U_{\gamma _n}. 
$$
Let $t\in \omega $. It follows from condition (v) and Lemma~\ref{lcc} that
the set $B_{\gamma ,t}$ is connected. Since the $\gamma $-limit $x_\gamma$
of ${\cal U}$ belongs to $\limfunc{cl}B_{\gamma,t}$, therefore 
$B_{\gamma,t}\cup \left\{ x_\gamma \right\} $ is connected. Since $f$ is a
peripherally continuous function, it is also a Darboux function, implying
that the set $f(B_{\gamma ,t}\cup \left\{ x_\gamma \right\} )$ is connected,
and so $f(x_\gamma )\in \limfunc{cl}f(B_{\gamma ,t})$. Since
$$
\left| f(x_\gamma )-f(\eta (\gamma _t))\right| \le \left| f(\eta (\gamma
_t)-f(\eta (\gamma _{t+1}))\right| +\left| f(\eta (\gamma _{t+1}))-f(\eta
(\gamma _{t+2}))\right| +\dots\,\,, 
$$
it follows from (iii) that 
\begin{equation}
\label{eqsss}\left| f(x_\gamma )-f(\eta (\gamma _t))\right| \le
\sum_{n=t}^\infty r_n, 
\end{equation}
for every $\gamma \in T^{*}$ and $t\in\omega$. 

Now let $x\in L_{{\cal U}}$ and $\varepsilon >0$. Since the series 
$\sum_{n=0}^\infty r_n$ converges, there exists $t\in \omega $ such that 
\begin{equation}
\label{eqsstt}\sum_{n=t}^\infty r_n<\frac{\varepsilon}{2}. 
\end{equation}
For each $s\in T_t$ let 
$$
B_s=\left\{ x_\gamma \colon \gamma _t=s\right\} . 
$$
It is clear that $B_s$ is closed in $\QTR{userA}{R}^n$ for every $s\in T_t$.
Since the set $T_t$ is finite, there is an open neighborhood $V$ of $x$ such
that 
$$
V\cap B_s=\emptyset, 
$$
for every $s\in T_t$ with $x\notin B_s$. It follows that for every 
$y\in V\cap L_{{\cal U}}$ there exists $s\in T_t$ with $x,y\in B_s$, 
implying by 
(\ref{eqsss}) and (\ref{eqsstt}) that 
$$
\left| f(x)-f(y)\right| \le \left| f(x)-f(\eta (s))\right| +
\left|f(y)-f(\eta (s))\right| <\varepsilon. 
$$
Therefore $f$ is continuous at $x$ and so the proof is complete. 
\TeXButton{\end{pf}}{\end{pf}}

\bigskip

\noindent {\bf Proof of Proposition~\ref{Proplca}.} Let $x_0$, $W$ and 
$\varepsilon $ be as in the proposition. Let 
$\left\langle q_i\colon i\in \omega\right\rangle $ 
and $\left\langle r_i\colon i\in \omega \right\rangle $ be any
sequences of positive real numbers such that 
\begin{equation}
\label{eqggf}\sum_{i=0}^\infty r_i<\varepsilon 
\end{equation}
and 
\begin{equation}
\label{eqbjj}B^n\left( x_0,\sum_{i=0}^\infty q_i\right) \subseteq W.
\end{equation}
We will define inductively a finitely branching tree $T$, a good $T$-family 
${\cal U}=\left\{ U_s\colon s\in T\right\} $ of quasiballs for $f$ and a
function $\eta \colon T\rightarrow \QTR{userA}{R}^n$ 
such that conditions (i)--(v)
are satisfied, and moreover:
\begin{equation}
\label{eqffs}\limfunc{bd}\left( \bigcup_{i=0}^m\bigcup_{s\in T_i}U_s\right)
\subseteq \bigcup_{t\in T_{m+1}}U_t. 
\end{equation}

\noindent Let $T_0=\left\{ \emptyset \right\} $ and $\eta (\emptyset )=x_0$.
Since $f$ is peripherally continuous, it follows from Corollary~\ref{lcb}
that there is a $U_\emptyset $ such that conditions (i)--(iii) are satisfied.
Suppose that $m\in \omega $, and that $T_i$ and $U_s$ have been defined for
every $i\le m$ and $s\in \bigcup_{i\le m}T_i$. Let 
\begin{equation}
\label{equtt}C=
\limfunc{bd}\left( \bigcup_{i=0}^m\bigcup_{s\in T_i}U_s\right).
\end{equation}
Since the set $T_m$ is finite, we have%
$$
C\subseteq \limfunc{bd}\left( \bigcup_{i<m}\bigcup_{s\in T_i}U_s\right) \cup
\bigcup_{s\in T_m}\limfunc{bd}U_s, 
$$
and condition (\ref{eqffs}) of the inductive hypothesis implies that
$$
\limfunc{bd}\left( \bigcup_{i<m}\bigcup_{s\in T_i}U_s\right) \subseteq
\bigcup_{s\in T_m}U_s. 
$$
Therefore
$$
C\subseteq \bigcup_{s\in T_m}\limfunc{bd}U_s. 
$$
Let $\left\{ C_s\colon s\in T_m\right\} $ be a partition of $C$ such that 
$C_s\subseteq \limfunc{bd}U_s$ for every $s\in T_m$. Since $f$ is
peripherally continuous, it follows from Corollary~\ref{lcb} that for every 
$y\in C$ there is there is a quasiball $B_y$ containing $y$ such that the
distance from $y$ to any element of $B_y$ is at most $q_n$ and 
$\left|f(x)-f(y)\right| \le r_n$ for any $x\in \limfunc{bd}B_y$. 
Moreover $B_y$ can
be chosen so that $B_y$ and $U_s$ are independent if $y\in C_s$. Since $C$
is compact, there is a finite subset $Y$ of $C$ such that
$$
C\subseteq \bigcup_{y\in Y}B_y. 
$$
Let 
$$
Y_s=C_s\cap Y. 
$$
Then $\left\{ Y_s\colon s\in T_m\right\} $ is a partition of $Y$. Define
$$
T_{m+1}=\left\{ s*j\colon s\in T_m\text{ and }j\in 
\left\{ 0,1,\dots ,\left|Y_s\right| -1\right\} \right\}. 
$$
For $t\in T_{m+1}$ let $\eta (t)$ be such that if $s\in T_m$, then 
$$
\left\{ \eta (t)\colon t\text{ is a son of }s\right\} =Y_s, 
$$
and let
$$
U_t=B_{\eta (t)}. 
$$
This completes the definition of $T$, $\eta $ and ${\cal U}$. Let 
$$
U=\bigcup_{s\in T}U_s. 
$$
Then 
$$
\limfunc{bd}U\subseteq L_{{\cal U}}, 
$$
and so Lemma \ref{lvaa} implies that $f$ is continuous on $\limfunc{bd}U$.
Condition (\ref{eqbjj}) implies that $U\subseteq W$ and condition (\ref
{eqggf}) implies that $\left| f(x_0)-f(y)\right| <\varepsilon $, thus the
proof is complete. \qed

\bigskip

\noindent {\bf Proof of Proposition~\ref{PROPlee}.} Let $T$ be the tree
consisting of all finite zero-one sequences. We are going to define a good 
$T$-family ${\cal U}=\left\{ U_s\colon s\in T\right\} $ of quasiballs for 
$g$. Let $\left\langle r_i\colon i\in \omega \right\rangle $ 
be a sequence of positive real numbers
such that the series $\sum_{i=0}^\infty r_i$
converges. We shall define a sequence
$\left\langle q_i\colon i\in \omega \right\rangle$ 
of positive real numbers with $\sum_{i=0}^\infty q_i<\infty$ 
and a function $\eta \colon T\rightarrow \QTR{userA}{R}^n$
such that conditions (i)--(v) are satisfied. 
We will also define an auxiliary function $\eta^\prime\colon T\to X$.
The construction will be done by induction on $i<\omega$
in such a way that the following additional conditions hold:

\begin{enumerate}
\item[(a)]  $\eta(\emptyset)\in X$ is arbitrary and 
            $q_1=q_0<\diam(X)/2$;

\item[(b)]  $\eta(s*0)=\eta(s*1)=\eta^\prime(s)\in\bd U_s\cap X$ 
            for any $s\in T_i$;

\item[(c)]  $q_i=\frac{1}{4}
            \min_{s\in T_{i-2}}|\eta^\prime(s*0)-\eta^\prime(s*1)|$
            for $i>1$;

\item[(d)]  $\limfunc{cl}U_{s*1}\subseteq U_{s*0}$ for any $s\in T_i$.

\end{enumerate}

To see that the construction can be made, notice that 
the choice of each $U_s$ 
satisfying (i)-(iii), (v) and (d) 
can be guaranteed by Corollary~\ref{lcb}.
We can choose $\eta^\prime(s)\in\bd U_s\cap X$, since 
$\bd U_s\cap X$ is non-empty as $X$ is connected and $U_s$ 
has the diameter smaller than $X$. So, (b) implies (iv). 
Also, $q_i>0$, since the points 
$\eta^\prime(s*0)$ and $\eta^\prime(s*1)$ are different by (d). 
This completes the construction.

Let $P=L_{{\cal U}}$. It is clear that $P$ is a closed subset of $X$, and it
follows from (c) that $x_\gamma\neq x_\delta$ for
distinct $\gamma,\delta\in T^{*}$. This implies that 
$P$ is a perfect set. 
We conclude from Lemma~\ref{lvaa} 
that the restriction of $g$ to $P$ is continuous, completing the
proof. \qed 

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

\bibitem{CM}
 K.~Ciesielski and A.~W.~Miller, {\it Cardinal invariants
 concerning functions, whose sum is almost continuous\/}, Real
 Anal. Exchange {\bf 20} (1994--95), 657--673.

\bibitem{CiesRec:inv-periph}
 K.~Ciesielski and I.~Rec{\l}aw, {\it Cardinal invariants
 concerning extendable and peripherally continuous functions},
 Real Anal. Exchange {\bf 21} (1995--96), 459--472.

\bibitem{Eng} R.~Engelking, {\it General Topology, 
Revised and Completed Edition}, 
Sigma Series in Pure Mathematics, vol. {\bf 6}, 
Heldermann Verlag, Berlin 1989.

\bibitem{GRRnew} R.~G.~Gibson, H.~Rosen, and F.~Roush, 
{\it Compositions and continuous restrictions of connectivity functions},
Topology Proceedings {\bf 13} (1988), 83--91.

\bibitem{GibRoush:ext-conn} R.~G.~Gibson and F.~Roush, 
{\it Concerning the extension of connectivity functions},
Topology Proceedings {\bf 10} (1985), 75--82.

\bibitem{Hagan} 
M.~Hagan, {\it Equivalence of connectivity maps and peripherally continuous
transformations}, Proc. Amer. Math. Soc. {\bf 17} (1966), 175--177.

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

\bibitem{HockYoung:topol} J.~G.~Hocking and G.~S.~Young, 
{\em Topology}, Addison-Wesley, 1961.

\bibitem{HurWall:dimen} W.~Hurewicz and H.~Wallman,
{\em Dimension Theory},  Princeton University Press, 1948.

\bibitem{AC}
 T.~Natkaniec,
 {\it Almost continuity}, Real Anal. Exchange {\bf 17},
 (1991--92), 462--520.
 
\bibitem{Rosen2}
H. Rosen, {\em Every Real Function is the Sum of Two
Extendable Connectivity Functions}, 
Real Anal. Exchange {\bf 21}, (1995-96), 299--303.

\bibitem{RGR} H.~Rosen, R.~G.~Gibson, F.~Roush, {\it Extendable functions
and almost continuous functions with a perfect road},  Real Anal. Exchange
{\bf 17} (1991--92), 248--257. 

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

\end{thebibliography}



\end{document}

