\documentstyle[12pt,amsfonts]{article}
%\documentstyle{add}
%\documentstyle{gothic}
\date{\today}
\author{Yurii M. Burman
\thanks{Mathematics Department, Technion --- Israel Institute of
Technology, 32000, Haifa, Israel;
e-mail: mat9304@technion.technion.ac.il}
\thanks{1980 Mathematics Subject Classification 55Q52}
}
\title{Morse theory for functions of two variables without critical points}
%ADD.STY Version 2.41

%New theorem-like environments
% ------------------Numbered-------------------

\newtheorem {theorem}{Theorem}
\newtheorem {lemma}{Lemma}
\newtheorem {corollary}{Corollary}
\newtheorem {statement}{Statement}
\newcounter {rem}
\newenvironment {remark} {\refstepcounter{rem}\par\medskip\noindent{\bf
Remark \arabic{rem}\,\,} }{\par}
\newcounter {exa}
\newenvironment {example} {\refstepcounter{exa}\par\medskip\noindent{\bf
Example \arabic{exa}\,\,} }{\par}
\newcounter {def}
\newenvironment {definition} {\refstepcounter{def}\par\medskip\noindent{\bf
Definition \arabic{def}\,\,}} {\par}
\newcounter {prbl}
\newenvironment {problem} {\refstepcounter{prbl}\par\medskip\noindent{\bf
Problem \arabic{prbl}\,\,} }{\par}

% -----------------Not numbered---------------

\newtheorem {Theorem}{Theorem}
\newtheorem {Lemma}{Lemma}
\newtheorem {Corollary}{Corollary}
\newtheorem {Statement}{Statement}
\newenvironment {Remark} {\par\medskip\noindent{\bf Remark\,\,}} {\par}
\newenvironment {Example} {\par\medskip\noindent{\bf Example\,\,}} {\par}
\renewcommand \theTheorem {}
\renewcommand \theLemma {}
\renewcommand \theCorollary {}
\renewcommand \theStatement {}
\newenvironment {proof} {\par\medskip\noindent{\bf Proof\,\,}}
{\qed\par}
\newenvironment {Proof} {\par\medskip\noindent{\bf Proof\,\,}}
{\par}
\newenvironment {Definition} {\par\medskip\noindent{\bf 
Definition\,\,}}{\par}
\newenvironment {Answer} {\par\medskip\noindent{\bf Answer\,\,}} {\par}
\newenvironment {Hint} {\par\medskip\noindent{\bf Hint\,\,}} {\par}

% ------------------ Apparent symbols -----------------

\def \Real {{I\!\!R}}
\def \Integer {{Z\!\!\!Z}}
\def \Complex {{\,\prime\mskip-2.5\thinmuskip C}}
\def \Rational {{\,\prime\mskip-2.5\thinmuskip Q}}
\def \Torus {{T\!\!\!T}}

% ------------------ Norm and absolute value ------------

\def \lnorm#1\rnorm {\vphantom{#1}\left\|\smash{#1}\right\|}
\def \lmod#1\rmod {\vphantom{#1}\left|\smash{#1}\right|}

% ------------------- More symbols ----------------------

\newcommand \bydef {\stackrel{\mbox{\scriptsize def}}{=}}
\newcommand \qed {\,\rule[-.23ex]{1.6ex}{1.6ex}}
\newcommand \Planck {{h^{\mskip-4.5\thinmuskip{-}}}}

% ------------------ Style conventions ------------------

\newcommand \eps {\varepsilon}
%\renewcommand \kappa {\varkappa}
\renewcommand \phi {\varphi}
\renewcommand \rho {\varrho}
%\renewcommand \emptyset {\varnothing}

%Auxiliary definitions
\newcommand \Crit {{\cal C}}
\newcommand \NoCrit {C^2_{\#}(\Real^2)}
\newcommand \Set {{\cal S}}
\newcommand \Lev {{\cal L}}
\newcommand \Orbit {{\cal O}}
\newcommand \DIFF {C^2_{\#}(\Real^n,\Real^n)}
\newcommand \Diff {{\cal D}}
\newcommand \RL {{\cal R}{\cal L}}
\newcommand \M {\frak{M}}
\newcommand \Poly {{\cal P}}
\newcommand \Diag {\mathop{\rm Diag}}
\newcommand \RDiag {\mathop{\rm RDiag}}
\newcommand \DDiag {\mathop{\rm DDiag}}
\newcommand \Field {\mathop{\cal F}}
\newcommand \rot {\mathop{\rm rot}\nolimits}
\newcommand \rrot {\mathop{\rm rrot}\nolimits}
\newcommand \curl {\mathop{\rm curl}\nolimits}
\newcommand \between[3] {#1 \mid #2 \mid #3\relax}
\newcommand \restr[2] {\left.\vphantom{\frac12}#1\right|_{#2}}
\newcommand \der[2] {\frac{d #1}{d #2}}
\newcommand \pder[2] {\frac{\partial #1}{\partial #2}}

\begin{document}
\maketitle

\begin{abstract}
The paper considers topology of level sets for functions of two real
variables having no critical points. It gives rise to a Morse-type theory
for these functions, with no Palais--Smale condition imposed. Finally, a
topological classification of such functions is given: each function is
related with a combinatorial object, a so-called rigged diagram, which
appears to be its complete topological invariant.
\end{abstract}

\subsubsection*{Acknowledgments}
Author is grateful to Ya.~Eliashberg and A.~Ioffe for fruitful discussions.
Special thanks are to be delivered to E.~Schwartzmann who greatly
influenced not only the contents but the very style of the work.

Author is using an opportunity to express his gratitude to French
Mathematical Society who provided him a financial assistance in the early
stages of the work.

\section*{Introduction}

The shape of Morse theory was considerably changing with time.  Originally
Morse considered a compact manifold $\M$ and a smooth function $f:\M \to
\Real$ having nondegenerate critical points only ({\em Morse function}). He
related to such a function a complex of $\Integer$-modules (called {\em
Morse complex}) and proved that its homologies coincide with homologies of
the manifold $\M$. This implied in particular that these homologies are the
same for all the Morse functions $f:\M \to \Real$.

This latter fact can however be proved independently. Namely, given two
Morse functions $f_0,f_1:\M \to \Real$, we can join them by a continuous
path $f_t:\M \to \Real$. It can be proved using Thom's transversality
theorem (see \cite{Thom}) that if the path $f_t$ is generic then $f_t$ are
Morse functions for all $t$, except a finite number of them in which easily
describable ``catastrophes'' occur.  Therefore Morse complex is preserved
along the path $f_t$, except for the finite number of points where it
changes in a controllable way --- its homologies appear to remain the same.

This perspective is especially fruitful in case when the manifold $\M$ is
not compact. Morse functions and their complexes can be defined in the
same way (see review \cite{Chang} for details; it reflects the today's
state of art in Morse theory as well), but the main statement fails to
be true --- homologies of Morse complexes do not coincide with the
homologies of the manifold, and are different for different functions $f:
\M \to \Real$.

To handle this situation one should restrict the set of functions under
study. It is common to consider functions satisfying {\em Palais--Smale
condition\/}:
\begin{itemize}
\item if the sequence $x_n$ is such that $\nabla f(x_n) \to 0$ as $n \to
\infty$ and $f(x_n)$ has a limit, then the set $\{x_n \mid n = 1,2,\dots\}$
is pre-compact.
\end{itemize}
Then the main result is partially restored: now, given a path $f_t$ such
that all the functions $f_t$ are Palais--Smale (uniformly in $t$), the
homologies of Morse complex are preserved along this path. This implies
that two functions $f_0$ and $f_1$ whose Morse complexes have different
homologies cannot be joined by such a path, i.e. belong to different
connected components of the space of Palais--Smale functions. So, Morse
complex does not more reflect the topology of manifold but the topology of
the functional space itself, namely the space of Palais--Smale functions.

Palais--Smale condition proved to be very convenient in both finite- and
infinite-dimensional situation. It also allows some variations (see e.g.
\cite{FimZarik}). The purpose of this paper however is to study the
opposite case --- topology of the set of functions without critical points.
It is easy to see that such functions cannot obey Palais--Smale condition
except for trivial cases. Nevertheless the topology appears to be
nontrivial even in the simplest case of dimension two (i.e. for functions
of two real variables).

Denote $\NoCrit$ the set of twice continuously differentiable functions on
$\Real^2$ without critical points. It is equipped with a compact-open
topology: the sequence $f_n$ converges to $f$ if $f_n$ converges to $f$
uniformly in every compact set $K \subset \Real^2$ along with its partial
derivatives of the first and second order.

For the functions $f \in \NoCrit$ the following notation will be used:
$\Lev_{a,b}(f)$ will stand for $f^{-1}([a,b]) = \{ x \in \Real^2 \mid a
\leq f(x) \leq b\}$, so $\Lev_a(f) \bydef \Lev_{a,a}(f)$ will be a level
set of the function $f$. The connected components of $\Lev_a(f)$ will be
referred to as {\em level lines\/} (of the level $a$) of the function $f$.

Despite having no critical points the functions from $\NoCrit$ may have
{\em critical levels\/}. We call the level $a \in \Real$ {\em critical\/}
for a function $f \in \NoCrit$ if there is a sequence $x_n \in \Real^2$
such that $f(x_n) \to a$ and $\nabla f(x_n) \to 0$ as $n \to \infty$. The
set of all critical levels of function $f$ will be denoted $\Crit(f)
\subset \Real$. Critical levels play a crucial role in our considerations
due to the following well-known fact (see e.g. \cite{Milnor} for proof):

\begin{theorem}\label{ConsTop}
Let the segment $[a,b] \subset \Real$ not contain critical levels of the
function $f$. Then $\Lev_a(f)$ and $\Lev_b(f)$ are diffeomorphic.
\end{theorem}

The plane is a noncompact manifold, and this sometimes allows the functions
from $\NoCrit$ to behave in a very unpleasant way. To handle these
functions we should impose on them a condition which to some extent will
make up for lack of Palais--Smale condition.

Let $\Omega \subset \Real^2$ be a unit disk centered in the origin. Denote
$\Set_{0,1}$ the set of all the functions having the following properties:

\begin{enumerate}

\item \label{Comp1} All the critical levels of $f$ lie strictly between $0$
and $1$:
%*
\begin{equation}\label{Cond01}
\Crit(f) \subset (0,1).
\end{equation}
%*

\item \label{Comp2} All the level lines of levels $0$ and $1$ intersect
$\Omega$.

\end{enumerate}

Let now $\DIFF$ be a topological group of all one-to-one mappings $\Real^n
\to \Real^n$ which belong to $C^2$ as well as their inverse. The topology
in $\DIFF$ will also be compact-open. Denote $\Diff_n \subset \DIFF$ a
connected component of the unit. Obviously all the mappings $T \in \Diff_n$
preserve orientation. Using the results from the famous Gromov's book
\cite{PDR} one can show that $\Diff_n$ is exactly the group of all
orientation-preserving mappings $\Real^n \to \Real^n$ twice continuously
differentiable along with their inverse. This fact will not be used here,
but we will refer the elements of $\Diff_n$ to as ``orientation-preserving
diffeomorphisms'' of $\Real^n$.

The group $\Diff_1 \times \Diff_2$ acts in the set $\NoCrit$ by a natural
right-left action. $\Orbit_f$ will stand for the orbit of the function $f
\in \Set$ under this action. Functions $f,\,g \in \Set$ will be called {\em
RL-equivalent\/} if $g \in \Orbit_f$. Also speaking about R- and
L-equivalence we will always assume actions of groups $\Diff_2$ and
$\Diff_1$, respectively.

The set $\Set_{0,1}$ is not invariant under RL-action of $\Diff_1 \times
\Diff_2$. Take
%*
\begin{displaymath}
\Set = \bigcup_{f \in \Set_{0,1}} \Orbit_f \subset \NoCrit.
\end{displaymath}
%*
The set $\Set$ inherits from $\NoCrit$ a compact-open topology, but for our
purposes we will endow in with another one, called $01$-topology. The base
of $01$-topology in $\Set$ is constituted by the sets $\RL(U,V_1,V_2)
\subset \Set$ defined as
%*
\begin{equation}\label{DefRL}
\RL(U,V_1,V_2) = \{p \circ g \circ T \mid p \in V_1,\,g \in U,\,T \in V_2\}
\end{equation}
%*
where $U \subset \Set_{0,1},\, V_1 \subset \Diff_1$, and $V_2 \subset
\Diff_2$ are open sets in relevant topologies.

The paper is devoted to the topological properties of $\Set$ in the
$01$-topology. It is possible to prove that the set $\Set$ equipped with
the $01$-topology is homeomorphic to the set $\Set_{0,1}$ with the
compact-open topology, so, in fact we are dealing with the $\Set_{0,1}$.
The proof, however, is not given here. It involves some technique from
\cite{PDR}.

A $01$-topology in $\Set$ does not coincide with the compact-open one. For
example, it will be shown that in the compact-open topology $\Set$ is
connected while in the new topology it is not the case. Description of the
linear connected components of $\Set$ will be done in Sections
\ref{RgCurSec}--\ref{ComplSec}. Section \ref{RgCurSec} contains some
preliminary results on a topology of $\Real^2$. In Section \ref{InvarSec} a
concept of a {\em rigged diagram} is introduced for a function $f \in \Set$
and is shown to be an invariant of connected components of $\Set$. The
values of this invariant appear to give a complete enumeration of connected
components of $\Set$ --- this is shown in Sections \ref{DDiagSec} and
\ref{ComplSec}. Section \ref{GraSec} is devoted to a related topological
classification problem.

\section{Regular curves}\label{RgCurSec}
\subsection{Definition and main properties}\label{DefSbSec}

\begin{definition} \label{DefReg}
A $C^1$-mapping $p: \Real \to \Real^2$ is called a {\em regular curve\/} if
its image $p(\Real) \subset \Real^2$ is closed, and for any point $x \in
p(\Real)$ and for its sufficiently small neighborhood $U \subset \Real^2$
the preimage $p^{-1}(U) \subset \Real$ is an open segment.
\end{definition}

As usual we consider curves up to a change of a parameter. The group
$\Diff_2$ acts on the set of regular curves by a natural right action.

It follows immediately from the definition that a regular curve is a smooth
regular imbedding of $\Real$ to $\Real^2$, i.e. $t_1 \ne t_2$ implies
$p(t_1) \ne p(t_2)$, and for any compact $K \subset \Real^2$ its preimage
$p^{-1}(K) \subset \Real$ is compact.

Regular curves are of special significance for us due to the following

\begin{theorem}\label{LevLin}
Each level line of a function $f \in \NoCrit$ is (an image of) a regular
curve.
\end{theorem}

\begin{proof}
Level lines of the function $f \in \NoCrit$ are of course closed. Consider
in $\Real^2$ two smooth vector fields, $A(x,y) = \nabla f(x,y)$ and $B(x,y)
= A^\perp(x,y)$ (i.e. obtained from $A(x,y)$ by counterclockwise rotation
to the angle of $\pi/2$). The integral curves of the fields $A(x,y)$ and
$B(x,y)$ form a local coordinate system in a small neighborhood
$N(x_*,y_*)$ of an arbitrary point $(x_*,y_*) \in \Real^2$ because the
appropriate change of variables has a Jacobian equal to $\lmod\nabla
f(x_*,y_*)\rmod^2 \ne 0$. The neighborhood $N(x_*,y_*)$ is exactly that
required by Definition \ref{DefReg}.
\end{proof}

We will make use of neighborhoods $N(x,y)$ and fields $A(x,y)$ and $B(x,y)$
once more in Section \ref{GraSec}.

In what follows we will need some topological properties of regular plane
curves:

\begin{lemma}\label{LinPla}
Let $p \subset \Real^2$ be a regular curve. Then there exists a
diffeomorphism $T \in \Diff_2$ of the $\Real^2$ carrying $p$ to a straight
line $\ell$.
\end{lemma}

\begin{proof}
Let $\ell$ be an $x$-axis of an $(x,y)$-plane. Denote $B_n,\ n = 0, \pm 1,
\pm 2, \dots$ disks with diameters $[n,n+1] \subset \ell$. Without loss of
generality we can assume that $p(0) = 0 \in \ell$. The preimage
$p^{-1}(B_0)$ is compact, so let $t_0 \bydef \max p^{-1}(B_0)$. It is clear
from Fig. \ref{Disc} that there exists a set $\widetilde{B_0} \supset B_0$,
diffeomorphic to a disk and containing the whole set $p([0,t_0])$.
\begin{figure}[p]
%\input Disc.pic
\vspace*{15cm}
\caption{Set $D$ (gray-shaded)}\label{Disc}
\end{figure}

The set $\widetilde{B_0}$ is contractible and contains the disk $B_0$, so
we are able to find a diffeomorphism $T_0 \in \Diff_2$ identical outside a
small neighborhood of $\widetilde{B_0}$ and placing the curve $p(t)$ for $t
\in [0,t_0]$ inside the disk $B_0$. Moreover, applying diffeomorphisms
localized near the points $0 \in \ell$ and $1 \in \ell$ we can make the
curve $p$ touch $\ell$ in those points.

The latter means that having left (at the moment $t_0$ of time) the disk
$B_0$, the curve enters $B_1$. So, we can repeatedly apply the previous
construction to disks $B_{\pm 1},\,B_{\pm 2}$, etc., to get a
diffeomorphism $T = T_0 \circ T_1 \circ T_{-1} \circ \dots$ mapping the
curve $p$ to a new curve which touches the $x$-axis in points $0,\, \pm
1,\, \pm 2,\, \dots$, and for $t \in [t_n,t_{n+1}]$ stays inside the disk
$B_n$. Due to the regularity of the curve the above infinite composition is
well-defined because it stabilizes at any point after a finite number of
terms. The new curve evidently remains regular, so we may still denote it
$p$.

Consider now a curve $q(t),\ t \in [0,1]$ lying in a unit disk $B \subset
\Real^2$ and touching the endpoints $a$ and $b$ of its diameter at the
moments $t = 0$ and $t = 1$ respectively, (see Fig. \ref{Curveq}; it
illustrates the following reasoning also). Our aim is to carry the curve
$q$ to the diameter $ab$ by a diffeomorphism $T \in \Diff_2$ identical
outside the ball $B$. Applying then the construction to balls $B_n$, we
will obtain the assertion of the lemma.
\begin{figure}[p]
%\input Curveq.pic
\vspace*{15cm}
\caption{Carrying curve $ab$ to the diameter}\label{Curveq}
\end{figure}
Without loss of generality the curve $q$ may be assumed lying in the upper
half-disk. Let us cut two small domains (see Fig. \ref{Curveq}) from a disk
such that the partial derivative $\partial q/\partial x$ would preserve its
(positive) sign while the curve remains in those domains. So in the domains
we can map the curve $q$ to the diameter moving the points of the curve
straightly downward.

Consider now the set $klmn$ (see Fig. \ref{Curveq}). Its boundary is a
piecewise smooth curve without self-intersections, so by Sch\"omflies
theorem (see e.g. \cite{RouSan}) it is diffeomorphic to a disk. This shows
that there exists an orientation-preserving diffeomorphism carrying $kl$ to
$mn$ because this is true for a disk.

This completes the construction of diffeomorphism $T \in \Diff_2$.
\end{proof}

An obvious consequence of the lemma is that any two regular plane curves
are R-equivalent (i.e. mapped to each other by diffeomorphisms from
$\Diff_2$).

A similar reasoning allows to prove
\begin{lemma}\label{LinHalf}
Let $H \subset \Real^2$ be a half-plane, and $p \subset H$ be a regular
curve not intersecting the boundary $\partial H$. Then there exists an
orientation-preserving diffeomorphism $T$ of $H$ mapping $p$ to a straight
line $\ell$ parallel to $\partial H$ and such that for any $x \in \partial
H$
%*
\begin{equation}\label{Fix1}
T(x) = x
\end{equation}
%*
and
%*
\begin{equation}\label{Fix2}
DT(x) = {\rm id}.
\end{equation}
%*
\end{lemma}

In formula (\ref{Fix2}) $D$ stands for a derivative of the diffeomorphism
$T$ in the point $x$.

So, using Lemmas \ref{LinPla} and \ref{LinHalf} one can find a
diffeomorphism from $\Diff_2$ mapping any two nonintersecting regular plane
curves into two parallel straight lines, and therefore there holds

\begin{corollary}[of Lemmas \ref{LinPla} and \ref{LinHalf}] \label{TrPair}
The group $\Diff_2$ acts transitively on ordered pairs of mutually
nonintersecting regular plane curves.
\end{corollary}

\subsection{Cyclic ordering}\label{OrdSbSec}

Lemma \ref{LinPla} shows that any regular curve divides the plane into two
sets diffeomorphic to half-planes, so we are free to use expressions like
``two points are/are not separated by a regular curve $p$''. Call a {\em
circular $N$-tuple\/} of regular curves a finite set $\{p_1,\,p_2,\,
\dots,\, p_N\}$ of pairwise nonintersecting regular plane curves such that
no two of them are separated by a third one.

The group $\Diff_2$ maps a circular $N$-tuple to a circular $N$-tuple, and
our goal is to prove that this action is transitive.

Consider two ordered circular triples $\{a_1,\,b_1,\,c_1\}$ and
$\{a_2,\,b_2,\,c_2\}$. By Corollary \ref{TrPair} there exists a
diffeomorphism $T \in \Diff_2$ mapping $a_1$ to $a_2$ and $c_1$ to $c_2$.
Let $b'_2 = T(b_1)$. The triples $\{a_2,\,b_2,\,c_2\}$ and
$\{a_2,\,b'_2,\,c_2\}$ are circular, so there exists a curve $\gamma$
connecting $a_2$ with $c_2$ and not intersecting $b_2$ and $b'_2$. The
triples $\{a_1,\,b_1,\,c_1\}$ and $\{a_2,\,b_2,\,c_2\}$ will be called {\em
co-oriented\/} if such $\gamma$ does not separate $b_2$ and $b'_2$.

Lemma \ref{LinHalf} implies

\begin{lemma}\label{Class3}
Two ordered circular triples $\{a_1,\,b_1,\,c_1\}$ and $\{a_2,\,b_2,\,c_2\}$
are co-oriented if and only if there exists a diffeomorphism $T \in
\Diff_2$ mapping $a_1$ to $a_2$, $b_1$ to $b_2$, and $c_1$ to $c_2$.
\end{lemma}

\begin{figure}[p]
%\input 3line.pic
\vspace*{15cm}
\caption{$b'_2$ is mapped to $b_2$}\label{3line}
\end{figure}
\begin{proof}
The ``if'' part is obvious. To prove the ``only if'' part, consider a
diffeomorphism $T_0 \in \Diff_2$ mapping $a_1$ to $a_2$, $c_1$ to $c_2$,
and $b_1$ to $b'_2$, and draw a curve $\gamma$ connecting $a_2$ with $c_2$
(see Fig. \ref{3line}). The curves $\gamma,\, a_2$, and $c_2$ bound a set
diffeomorphic to a half-plane and containing the curves $b_2$ and $b'_2$.
Lemma \ref{LinHalf} shows that there exists a diffeomorphism $T_1$ of this
set mapping $b'_2$ to $b_2$ and not touching the lines $a_2$ and $c_2$.
Equations (\ref{Fix1}) and (\ref{Fix2}) show that $T_1$ may be extended to
a diffeomorphism of the whole plane by assuming it identity in the points
lying outside the original domain of definition. Composition $T = T_1 \circ
T_0$ is the necessary diffeomorphism.
\end{proof}

\begin{corollary}
``To be co-oriented'' is an equivalence relation in the set of ordered
circular triples of regular plane curves.
\end{corollary}

Consider now regular plane curves
%*
\begin{displaymath}
\begin{array}{l}
a_0 \colon \quad y^2 - x^2 = 1,\; y > 0,\\
b_0 \colon \quad y^2 - x^2 = -1,\; x > 0,\\
c_0 \colon \quad y^2 - x^2 = 1,\; y < 0,\\
d_0 \colon \quad y^2 - x^2 = -1,\; x < 0.
\end{array}
\end{displaymath}
%*
We will call an ordered circular triple positively oriented if it is
co-oriented with a triple $\{a_0,\,b_0,\,c_0\}$.

\begin{lemma}\label{NegOrie}
If the circular triple $\{a,\,b,\,c\}$ is not positively oriented then it
is co-oriented with the triple $\{a_0,\,d_0,\,c_0\}$
\end{lemma}

\begin{proof}
Consider a diffeomorphism $T_0 \in \Diff_2$ mapping $a$ to $a_0$, $c$ to
$c_0$, and $b$ to $b'$ (it exists by Corollary \ref{TrPair}). Since
$\{a,\,b,\,c\}$ is not positively oriented, there exists a curve $\gamma$
joining $a_0$ with $c_0$ and separating $b'$ from $b_0$. It is easy to see
that the curve may be chosen to separate $b_0$ from $d_0$ also. Thus the
curves $b'$ and $d_0$ lie in the set bounded by $a_0,\,c_0$, and $\gamma$.
This set is diffeomorphic to half-plane, so reasoning analogous to that
used in the proof of Lemma \ref{Class3} shows that there exists a
diffeomorphism $T_1 \in \Diff_2$ mapping $b'$ to $d_0$ and leaving $a_0$
and $c_0$ untouched. A diffeomorphism $T = T_1 \circ T_0$ therefore maps $a
\mapsto a_0,\,b \mapsto d_0,\,c \mapsto c_0$.
\end{proof}

A set ${\cal R}$ is called {\em cyclically ordered\/} if it is equipped with
a three-relation $\between abc$ (``$b$ lies between $a$ and $c$'') having
the following properties:

\begin{enumerate}

\item \label{CyclOrd1} For any three points $a,\,b,\,c \in {\cal R}$
either $\between abc$ or $\between acb$ holds.

\item \label{CyclOrd2} $\between abc$ is incompatible with $\between acb$.

\item \label{CyclOrd3} $\between abc$ implies $\between bca$ (and
therefore $\between cab$).

\item \label{CyclOrd4} $\between abc$ and $\between adb$ implies $\between
adc$.

\end{enumerate}

\begin{lemma}\label{CyclOrd}
Any circular $N$-tuple of regular plane curves is a cyclically ordered set
with respect to the following cyclic ordering:
%*
\begin{displaymath}
\between abc \bydef \mbox{the ordered triple $\{a,\,b,\,c\}$ is
positively oriented.}
\end{displaymath}
%*
\end{lemma}

\begin{Proof}
We are to prove that the properties \ref{CyclOrd1}--\ref{CyclOrd4} hold.

\begin{enumerate}

\item Let $\between abc$ not hold. Then by Lemma \ref{NegOrie} there exists
an orientation-preserving diffeomorphism $T_0$ mapping $a \mapsto a_0,\,b
\mapsto d_0,\,c \mapsto c_0$. There exists also a diffeomorphism $T_1 \in
\Diff_2$ mapping $a_0 \mapsto a_0,\,d_0 \mapsto c_0,\,c_0 \mapsto b_0$. So
a composition $T = T_1 \circ T_0$ maps $a \mapsto a_0,\,c \mapsto b_0,\,b
\mapsto c_0$.

\item By Lemma \ref{NegOrie} it is enough to prove that there is no
orientation-preserving diffeomorphism mapping $a_0$ and $c_0$ to themselves
and $b_0$ to $d_0$. Let such a diffeomorphism $T \in \Diff_2$ exist, and
let $T_t,\; t \in [0,1]$ be a path joining $T = T_1$ in $\Diff_2$ with the
identity mapping ${\rm id} = T_0$ ($\Diff_2$ is linearly connected by
definition). Let us draw a curve $\gamma$ which touches the curves
$a_0,\,b_0$, and $c_0$ in exactly this order, and has no more intersection
points with these curves.  Then it is easy to see that the rotation of the
curve $\gamma$ is necessarily $1$. Let $\gamma_t = T_t \circ \gamma$, so
$\gamma = \gamma_0$. The curve $\gamma_1$ touches $a_0,\,d_0$, and $c_0$
(in exactly this order), and has no more intersection points with those
curves, which implies that its rotation should be $-1$.  But $\gamma_t$ is
a continuous deformation of a smooth curve, so the rotation cannot change.

\item There exists a diffeomorphism $T \in \Diff_2$ mapping $a_0 \mapsto
b_0 \mapsto c_0 \mapsto a_0$.

\item Consider a diffeomorphism $T \in \Diff_2$ mapping $a$ to $a_0$, $b$
to $c_0$, and $d$ to $b_0$. The relation $\between abc$ holds, so $\between
acb$ does not, and $T$ maps $c$ to a curve $c'$ which may be separated from
$b_0$ by a curve $\gamma$. Let us join $a_0$ and $b_0$ by a curve $\kappa$
not intersecting $\gamma$ and thus not separating $c'$ and $c_0$. Applying
Lemma \ref{LinHalf} to the set bounded by the curves $a_0,\,b_0$, and
$\kappa$, we find a diffeomorphism mapping $c'$ to $c_0$ and not touching
$a_0$ and $b_0$. This shows that $\between adc$ holds.\qed

\end{enumerate}
\end{Proof}

Let ${\cal R}$ be a finite cyclically ordered set, and $x \in {\cal R}$. It
follows immediately from properties \ref{CyclOrd1}--\ref{CyclOrd4} that the
2-relation
%*
\begin{equation}\label{2rel}
a < b \buildrel\mbox{\scriptsize def}\over{\Longleftrightarrow} \between
axb
\end{equation}
%*
introduces a linear ordering in the set ${\cal R} \setminus \{x\}$.

Now we are ready to prove

\begin{theorem}\label{OrdSet}
Any two circular $N$-tuples (with the same $N$) are R-equivalent.
\end{theorem}

In other words, the group $\Diff_2$ acts transitively in the set of
(non-ordered) circular $N$-tuples of regular plane curves.

\begin{proof}
All the linear orderings of a finite set are isomorphic. Formula
(\ref{2rel}) shows then that the same is true for cyclic orderings.  Thus
given two circular $N$-tuples $\{a_1,\,\dots,\,a_N\}$ and
$\{b_1,\,\dots,\,b_N\}$ we may suppose that they are numbered in
concordance with their cyclic orderings introduced by Lemma \ref{CyclOrd}.

To prove the theorem we use induction by $N$. Lemma \ref{Class3}
constitutes its base. By induction hypothesis there exists a diffeomorphism
$T_0 \in \Diff_2$ mapping $a_i$ to $b_i,\ i = 1,2,\dots,N-1$. Let $b'_N =
T_0(a_N)$. There hold $\between {b_{N-1}}{b'_N}{b_1}$ and $\between
{b_{N-1}}{b_N}{b_1}$, and for all $i,\ 2 \leq i \leq N-2$ the relation
$\between {b_{N-1}}{b_i}{b_1}$ does not take place. So there exists a curve
$\gamma$ joining $b_{N-1}$ with $b_1$ and separating $b_N$ and $b'_N$ from
all the other $b_i$. By Lemma \ref{LinHalf} there exists a diffeomorphism
$T_1 \in \Diff_2$ mapping $b'_N$ to $b_N$ and not touching $b_i\ i =
1,2,\dots,N-1$ (here we simply copy the proof of Lemma \ref{Class3} !). The
composition $T = T_1 \circ T_0$ maps $a_i$ to $b_i$ for all $i =
1,2,\dots,N$ which proves the theorem.
\end{proof}

It follows immediately from the definition of a circular $N$-tuple and
Lemma \ref{LinPla} that a circular $N$-tuple divides the plane into $N+1$
parts. $N$ of them are diffeomorphic to half-planes and each is bounded
exactly by one line of the tuple. The $N+1$-th is bounded by all the
$N$ lines. We call the set $\M \subset \Real^2$ {\em circular $N$-set\/} if
its boundary is a circular $N$-tuple of regular plane curves. It follows
from Theorem \ref{OrdSet} that

\begin{corollary}\label{NSet}
Any two circular $N$-sets are R-equivalent.
\end{corollary}

\begin{proof}
Let first $\M$ be a circular $1$-set. Then by Lemma \ref{LinPla} there
exists a diffeomorphism $T \in \Diff_2$ mapping its boundary $\partial\M$
to a straight line $\ell$. Let $H_0$ and $H_1$ be half-planes
bounded by $\ell$, then, obviously, either $T(\M) = H_0$ or $T(\M) = H_1$
holds. There exists an element $T_* \in \Diff_2$ such that $T_*(\ell) =
\ell,\,T_*(H_0) = H_1$, and $T_*(H_1) = H_0$, so we are always able to map
$\M$ to $H_0$. Since $\M$ is an arbitrary circular $1$-set, lemma is proved
for $N = 1$.

Let now $N \geq 2$, and $\M_1$ and $\M_2$ be two circular $N$-sets.
Consider a diffeomorphism $T \in \Diff_2$ mapping $\partial\M_1$ to
$\partial\M_2$ (it exists by Theorem \ref{OrdSet}). $T(\M_1)$ is one of the
parts to which $\partial\M_2$ divides the plane. But among these parts only
$\M_2$ has a boundary consisting of $N$ components (as $\M_1$ does !).
\end{proof}

\section{The invariant} \label{InvarSec}
\subsection{Diagrams}
\begin{Definition}
A Lebesgue triple $\Lev(f,a,b)$ where $a,\,b \in \Real$ and $f$ is a
function $\Real^2 \to \Real$, is an ordered triple $\bigl(\Lev_{a,b}(f),
\Lev_a(f), \Lev_b(f)\bigr)$.
\end{Definition}

The group $\Diff_2$ acts (componentwise) on the set or Lebesgue triples, so
we are able to speak about their R-equivalence.

Let $f \in \Set$. It means by definition that there exists a function $g
\in \Set_{0,1}$ and diffeomorphisms $p \in \Diff_1,\,T \in \Diff_2$ such
that $f(x,y) = p(g(T(x,y)))$. Let us denote
%*
\begin{equation}\label{DefM}
\M(f) \bydef \Lev(f,p(0),p(1)) = T^{-1}\Lev(g,0,1).
\end{equation}
%*
$\M^0(f)$ will stand for the first member of the triple, the set
$\Lev_{p(0),p(1)}(f)$.

A typical triple $\M(f)$ is shown in Fig. \ref{M-of-f}. The meaning of the
lines $\tau_i$ will be explained later.

\begin{figure}[p]
%\input M-of-f.pic
\vspace*{15cm}
\caption{Typical shape of $\M(f)$}\label{M-of-f}
\end{figure}

\begin{lemma}\label{Circ}
For any $f \in \Set$ the set $\M^0(f)$ is a circular $N$-set for some $N$.
\end{lemma}

\begin{proof}
The second equality in (\ref{DefM}) implies that it is enough to prove that
the set $\Lev_{0,1}(g)$, with $g \in \Set_{0,1}$, is a circular $N$-set.

The boundary $\partial\Lev_{0,1}(g) = \Lev_0(g) \cup \Lev_1(g)$ is a union
of regular plane curves. All these curves, by Condition \ref{Comp2},
intersect a unit disk $\Omega$. The gradient of the function $g$ is bounded
away from zero in $\Omega$, therefore the distance between different curves
is also. So, the overall number of these curves is finite.

To prove that no two of level lines of levels $0$ and $1$ are separated by
a third one, let us prove that the set $\Lev_{0,1}(g)$ is a homotopy
retract of the plane. If it is the case, then $\Lev_{0,1}(g)$ is linearly
connected, and therefore any two components of its boundary $\Lev_0(g) \cup
\Lev_1(g)$ can be joined by a curve going inside it and thus not
intersecting other components of the boundary.

To obtain a homotopy retraction, consider for any $(x,y) \notin
\Lev_{0,1}(g)$ a curve $u(t;x,y)$ given by the equation
%*
\begin{eqnarray}
\frac{d}{dt}u(t;x,y) &=& \pm\frac{\nabla g(u(t;x,y))}{\lmod \nabla
g(u(t;x,y))\rmod^2}, \label{DifCurv}\\
u(0;x,y) &=& (x,y). \nonumber
\end{eqnarray}
%*
Here $+$ sign is chosen for the points $(x,y)$ with $g(x,y) < 0$, and $-$
sign is chosen for the points $(x,y)$ with $g(x,y) > 1$. It is easy to see
that
%*
\begin{equation}\label{GrowG}
g(u(t;x,y)) = g(x,y) \pm t,
\end{equation}
%*
with the same choice of a sign. Now the formula
%*
\begin{equation}\label{Retr}
T_t(x,y) = \left\{ \begin{array}{ll}
(x,y), &\mbox{if }(x,y) \in \Lev_{0,1}(g), \\
u(tg(x,y);x,y), &\mbox{if }(x,y) \notin \Lev_{0,1}(g)
\end{array}\right.
\end{equation}
%*
defines the necessary retraction.
\end{proof}

The representation $f = p \circ g \circ T$ is generally not unique, so the
triple $\M(f)$ is not uniquely defined. However, there takes place
\begin{theorem}\label{MSound}
Any two triples $\M(f)$ (for the same function $f$) are R-equivalent.
\end{theorem}

\begin{proof}
Let
%*
\begin{equation}\label{TwoRepr}
f(x,y) = p_1(g_1(T_1(x,y))) = p_2(g_2(T_2(x,y))),
\end{equation}
%*
and $\M_1(f)$ and $\M_2(f)$ be corresponding Lebesgue triples. The
diffeomorphisms $p_1,\,p_2 \in \Diff_1$ are in fact strictly increasing
$C^2$-functions $\Real \to \Real$. Suppose $p_1(0) < p_2(0)$. Then it
follows from (\ref{TwoRepr}) and (\ref{DefM}) that
%*
\begin{equation}\label{P1P2}
\Lev(f,p_1(0),p_2(0)) = T_2^{-1}\Lev(g,p_2^{-1}p_1(0),0).
\end{equation}
%*
It follows from the inequality $p_1(0) < p_2(0)$ that $p_2^{-1}p_1(0) < 0$,
and therefore the segment $[p_2^{-1}p_1(0),0]$ does not contain critical
values of the function $g \in \Set_{0,1}$. So, Theorem \ref{ConsTop}
implies that there exists a diffeomorphism $\tau_0 \in \Diff_2$ localized
in the vicinity of the set $\Lev_{p_2^{-1}p_1(0),0}(g)$ (i.e. identical
outside a small neighborhood of this set) mapping
$\Lev_{p_2^{-1}p_1(0)}(g)$ to $\Lev_0(g)$. A diffeomorphism $T_2 \circ
\tau_0$ thus maps $\Lev_{p_1(0)}(f)$ to $\Lev_{p_2(0)}(f)$ and is localized
in the vicinity of $\Lev_{p_1(0),p_2(0)}(g)$. In the same way we construct
another diffeomorphism mapping $\Lev_{p_1(1)}(f)$ to $\Lev_{p_2(1)}(f)$ and
localized in the vicinity of $\Lev_{p_1(1),p_2(1)}(g)$. Since the sets
$\Lev_{p_1(0),p_2(0)}(g)$ and $\Lev_{p_1(1),p_2(1)}(g)$ do not intersect,
the composition of these two diffeomorphisms provides the necessary
R-equivalence.
\end{proof}

So, it is shown that the definition of Lebesgue triple $\M(f)$ is sound up
to R-equivalence. Moreover, the following theorem holds:
\begin{theorem}\label{MInvar}
Let the two functions $f_0,\,f_1$ belong to the same connected component of
the set $\Set$. Then $\M(f_0)$ and $\M(f_1)$ are R-equivalent.
\end{theorem}

\begin{proof}
Let $f_t \in \Set$ be a continuous path joining $f_0$ with $f_1$. By
definition of the topology in $\Set$ it means that there exist continuous
curves $g_t \in \Set_{0,1},\,p_t \in \Diff_1$, and $T_t \in \Diff_2$ such
that $f_t(x,y) = p_t(g_t(T_t(x,y)))$. Thus to prove the theorem it is
enough to prove that for any $t_* \in [0,1]$ and for sufficiently small
$\eps > 0$ the Lebesgue triples $\Lev(g_{t_*},0,1)$ and
$\Lev(g_{t_*+\eps},0,1)$ are R-equivalent.

Using considerations similar to that used in the proof of Lemma
\ref{LinPla} (see Fig. \ref{Disc}) one can show that there exists a
compact set $\Omega_0$ containing a unit disk $\Omega$, diffeomorphic to
it, and such that intersection of any level line $\ell \subset \Lev_0(g_t)
\cup \Lev_1(g_t)$ with $\Omega_0$ is connected (and, of course, nonempty,
by Condition \ref{Comp2}), for all $t \in [t_*,t_*+\eps]$. Since the disk
$\Omega$ is contractible, we may even assume without loss of generality
that $\Omega_0 = \Omega$ (see proof of Lemma \ref{LinPla} for similar
reasoning). So, we are able now to consider instead of the level lines
$\ell$ their intersections with the unit disk $\Omega$ --- there is a
natural one-two-one correspondence.

It follows from the classical implicit function theorem, that the set
$\Lev_{0,1}(g_t) \linebreak[0] \cap \Omega$ changes continuously with $t$.
This means that there exists $\eps > 0$ such that for any level line $\ell
\subset \Lev_0(g_{t_*}) \linebreak[0] \cup \Lev_1(g_{t_*})$ there exists
its small neighborhood containing exactly one level line of $g_{t_*+\eps}$
of the same level.  Hence there is a one-two-one correspondence between
connected components of $\Lev_0(g_{t_*}) \cup \Lev_1(g_{t_*})$ and
$\Lev_0(g_{t_*+\eps}) \cup \Lev_1(g_{t_*+\eps})$. This correspondence is
obtained by a small perturbation of lines and therefore preserves their
cyclic order. It follows now from Theorem \ref{NSet} that the sets
$\Lev_{0,1}(g_{t_*})$ and $\Lev_{0,1}(g_{t_*+\eps})$ are R-equivalent, and
it is easy to see from its proof that the R-equivalence constructed is in
fact an R-equivalence of triples $\Lev(g_{t_*},0,1)$ and
$\Lev(g_{t_*+\eps},0,1)$.
\end{proof}

Theorem \ref{MInvar} introduces an important invariant of the connected
component of the set $\Set$, a class of R-equivalence of Lebesgue triple
$\M(f)$. It follows from results of the previous Section that this class
can be represented by $N$ black and white points on a circle. Black points
here represent lines of level $p(0)$, and white, of level $p(1)$.  The
cyclic order of the points correspond to the natural cyclic order of the
level lines, described in the previous Section. Such a set of black and
white points in a circle will be called a {\em diagram\/} of the function $f
\in \Set$ and will be denoted $\Diag(f)$. The set of all functions $f \in
\Set$ having a diagram $A$ will be denoted $\Set(A)$.

\subsection{Rigged diagrams}\label{RigSec}

Let $\gamma(t),\ t \in [0,1]$ be a smooth curve in the plane, and $V(x) =
(V_1(x),V_2(x))$ be a nonzero continuous plane vector field. Let us call
the number
%*
\begin{equation}\label{DefRot}
\rot_\gamma(V) = \int_0^1 \frac{V_1(\gamma(t))\dot V_2(\gamma(t)) -
V_2(\gamma(t))\dot V_1(\gamma(t))}{V_1^2(\gamma(t)) + V_2^2(\gamma(t))}\,dt
\end{equation}
%*
a {\em rotation\/} of the field $u$ on the curve $\gamma$ (a dot means
differentiation with respect to $t$). This is a complete analog of a usual
notion of rotation of a vector field but since we apply it not to closed
$\gamma$ only, it is not generally an integer, but an element of the set
$\Integer + \frac{1}{2\pi}\angle(V(\gamma(0)),V(\gamma(1)))$ where $\angle$
means an angle between vectors. Let us also introduce a {\em relative
rotation \/} by the formula
%*
\begin{equation}\label{DefRRot}
\rrot_\gamma(V) = \rot_\gamma(V) - \rot_\gamma(\dot\gamma)
\end{equation}
%*

The rotation of the vector field is additive with respect to a curve.
Namely, let a point $a \in \gamma$ divide $\gamma$ into two curves,
$\gamma_1$ and $\gamma_2$. Then it is obvious from (\ref{DefRot}) that
%*
\begin{equation}\label{AddRot}
\rot_\gamma(V) = \rot_{\gamma_1}(V) + \rot_{\gamma_2}(V)
\end{equation}
%*
The same applies for relative rotations:
%*
\begin{equation}\label{AddRRot}
\rrot_\gamma(V) = \rrot_{\gamma_1}(V) + \rrot_{\gamma_2}(V)
\end{equation}
%*

Let $A$ be a nonempty diagram, and $f \in \Set(A)$. Diagram $A$ consists of
the points $a_i,\, i = 1,2,\dots$ (some of them white, some black). The
corresponding lines of levels $0$ and $1$ will be denoted $\ell_i,\, i =
1,2,\dots$. For each $i$ and $j$ let us draw a smooth non-selfintersecting
curve $\gamma_{ij}(t)$ such that
\begin{enumerate}
\item $\gamma_{ij}(t) \subset \M^0(f)$,
\item $\gamma_{ij}(0) \in \ell_i,\ \gamma_{ij}(1) \in \ell_j$,
\item $\nabla\gamma_{ij}(0) \perp \ell_i,\ \nabla\gamma_{ij}(1) \perp
\ell_j$,
\end{enumerate}
(the existence of such $\gamma_{ij}$ follows easily from Lemma \ref{Circ}),
and denote
%*
\begin{equation}\label{DefNij}
n_{ij}(f) = \rrot_{\gamma_{ij}}(\nabla f).
\end{equation}
%*

\begin{lemma}\label{SoundRot}
The previous definition is sound, i.e. does not depend on a choice of a
curve $\gamma_{ij}$.
\end{lemma}

\begin{proof}
The number $\rot_{\gamma_{ij}}(\nabla f)$ belongs to the set
%*
\begin{displaymath}
\Integer + \frac{1}{2\pi}\angle(\nabla f(\gamma(0)),\nabla f(\gamma(1))),
\end{displaymath}
%*
and
$\rot_{\gamma_{ij}}(\dot\gamma_{ij})$ is an element of
%*
\begin{displaymath}
\Integer + \frac{1}{2\pi}
\angle(\dot\gamma_{ij}(\gamma(0)),\dot\gamma_{ij}(\gamma(1))).
\end{displaymath}
%*
The curve $\gamma_{ij}$ in its endpoints $\gamma_{ij}(0)$ and
$\gamma_{ij}(0)$ is normal to the lines $\ell_i$ and $\ell_j$,
respectively, as well as the vectors $\nabla f(\gamma_{ij}(0))$ and $\nabla
f(\gamma_{ij}(1))$ are.  Therefore the number $n_{ij}$ is either an integer
or a half-integer (i.e.  an element of $\Integer + 1/2$). It is evident
from (\ref{DefRot}) and (\ref{DefNij}) that if $\gamma_{ij}$ is affected by
a smooth homotopy then $n_{ij}$ changes continuously and is therefore
constant. To conclude the proof, one should only notice that any two smooth
curves lying in $\M(f)$, joining $\ell_i$ with $\ell_j$, and normal to
$\partial\M(f)$ in their endpoints, are smoothly homotope --- this is
proved in a way similar to the proofs of theorems from Section
\ref{RgCurSec}.
\end{proof}

The properties of $n_{ij}$ are summarized in the following
\begin{theorem}\label{PropRot}

\begin{enumerate}
\item $n_{ij}$ is an integer if the colors of the points $a_i$ and $a_j$
are different, and a half-integer (i.e. an element of $\Integer + 1/2$), if
the colors are the same. \label{HalfInt}
\item $n_{ij} = -n_{ji}.$ \label{Minus}
\item
%*
\begin{equation}\label{SumTria}
n_{ij} + n_{jk} + n_{ki} = \left\{ \begin{array}{ll}
1/2, &\mbox{if the triangle $a_ia_ja_k$ is oriented} \\
&\mbox{\phantom{if the triangle} counterclockwise,}\\
-1/2, &\mbox{if the it is oriented clockwise.}
\end{array}\right.
\end{equation}
%*
\label{SumTriIt}
\end{enumerate}
\end{theorem}

\begin{proof}
For Property \ref{HalfInt} see the proof of Lemma \ref{SoundRot}. Property
\ref{Minus} is evident. To prove property \ref{SumTriIt} let us draw the
curves $\gamma_{ij},\, \gamma_{jk},\, \gamma_{ki}$ to have common endpoints
and smoothen a resulting closed curve in the vicinity of those endpoints to
obtain a smooth curve $\gamma$. The overall rotation of the vector field
$\nabla f$ on the curve $\gamma$ is zero since the function $f$ has no
critical points. If the triangle $a_ia_ja_k$ is oriented counterclockwise
then $\rot_\gamma(\dot\gamma) = 1$ and therefore $\rrot_\gamma(\nabla f) =
-1$. It follows from formula (\ref{AddRRot}) that $\rrot_\gamma(\nabla f)$
is a sum of six terms. Three of them are relative rotations of $\nabla f$
on the nonsmoothened parts of $\gamma_{ij},\, \gamma_{jk}$, and
$\gamma_{ki}$, and are arbitrarily close (with appropriately small
neighborhoods in which smoothening has been undertaken) to
$n_{ij},\,n_{jk}$, and $n_{kj}$, respectively, while the other three are
relative rotations of $\nabla f$ in the neighborhoods of endpoints (where
the curve has been smoothened). The neighborhoods are small, so the field
$\nabla f$ is almost constant in them. But the curves $\gamma_{ij},\,
\gamma_{jk},\, \gamma_{ki}$ have opposite directions in their common
endpoints, so the relative rotation in each neighborhood is arbitrarily
close to $-1/2$. Thus (\ref{AddRRot}) implies that
%*
\begin{displaymath}
-1 \approx n_{ij} + n_{jk} + n_{ki} - 3/2
\end{displaymath}
%*
(where $\approx$ means ``arbitrarily close to'') which is equivalent to the
first clause of (\ref{SumTria}). The second clause is proved in the same
way.
\end{proof}

The diagram $A$ along with the numbers $n_{ij}$ constitute a {\em rigged
diagram\/} $(A,n_{ij}) \bydef \RDiag(f)$.

Assume now that the diagram $A$ consists of the points $a_1,\,\dots,\,a_N$
in exactly this (counterclockwise) cyclic order. Denote $n_i = n_{i,i+1}$
where $N+1 = 1$ is assumed. It follows immediately from (\ref{SumTria})
that
%*
\begin{equation}\label{SumPoly}
n_1 + n_2 + \dots + n_N = N/2 - 1.
\end{equation}
%*

The numbers $n_i$ with (\ref{SumPoly}) determine the rigged diagram
$(A,n_{ij})$ completely, by the following
\begin{lemma}\label{SimpDiag}
For any set of numbers $n_i$ with $n_i$ being an integer if the colors of
the points $a_i$ and $a_{i+1}$ are different, and a half-integer otherwise,
and such that (\ref{SumPoly}) holds, there exists a unique rigged diagram
$(A,n_{ij})$ satisfying $n_i = n_{i,i+1}$.
\end{lemma}

\begin{Proof}
Take
%*
\begin{equation}\label{Nij}
n_{i,i+k} = n_i + \dots + n_{i+k-1} - \frac{k-1}{2}.
\end{equation}
%*
where $k > 0$ and the subscripts are numbered $\bmod\, N$. We are to prove
the properties \ref{HalfInt}--\ref{SumTriIt}.

\begin{enumerate}

\item Let the points $a_i$ and $a_{i+k}$ have different colors. Thus there
is an even number of the segments $a_ja_{j+1}\ i \leq j \leq i+k-1$ such
that their endpoints have different colors. Therefore the parity of the
number $2n_i + \dots + 2n_{i+k-1}$ coincides with that of $k-1$, and
$n_{ij}$ is an integer. The case when the colors of the points $a_i$ and
$a_{i+k}$ are the same, is analogous.

\item
%*
\begin{displaymath}
\begin{array}{ll}
n_{i,i+k} + n_{i+k,i} &= n_{i,i+k} + n_{i+k,i+k+(N-k)}\\
&= n_1 + \dots + n_N - (k-1)/2 - (N-k-1)/2 \\
&= N/2 - 1 - (N-2)/2 = 0.
\end{array}
\end{displaymath}
%*

\item Let the triangle be counterclockwise oriented. Thus its vertices can
be named $a_i,\,a_{i+k},$ and $a_{i+k+l}$ with $k,l > 0$. Thus,
%*
\begin{equation}\label{CompTria}
\begin{array}{ll}
n_{i,i+k} &+ n_{i+k,i+k+l} + n_{i+k+l,i} \\
&= n_{i,i+k} + n_{i+k,i+k+l} +
n_{i+k+l,i+k+l+(N-k-l)} \\
&= n_1 + \dots + n_N - (k-1)/2 - (l-1)/2 - (N-k-l-1)/2\\
&= 1/2.
\end{array}
\end{equation}
%*
For clockwise oriented triangles the necessary equation follows from
(\ref{CompTria}) and property \ref{Minus}.\qed

\end{enumerate}
\end{Proof}

The rigged diagram is an invariant of a connected component of the set
$\Set$, as states

\begin{theorem}\label{Invar}
Let $f_0$ and $f_1$ belong to the same connected component of the set
$\Set$. Then their rigged diagrams coincide.
\end{theorem}

\begin{proof}
The theorem is in fact obvious: equality $\Diag(f_0) = \Diag(f_1)$ is
Theorem \ref{MInvar}, and coincidence of the numbers $n_i$ follows from the
fact that as the function $f_t \in \Set$ changes continuously, the numbers
$n_i(f_t)$ also change continuously and are therefore constant, as follows
from Property \ref{HalfInt} (Theorem \ref{PropRot}).
\end{proof}

In the next two Sections we will prove that this invariant is complete: if
$\RDiag(f_0) = \RDiag(f_1)$ then the functions $F_0$ and $f_1$ can be
joined by a continuous homotopy $f_t \in \Set$.

\section{Dual diagrams} \label{DDiagSec}
\subsection{Compactification}

Start with an important remark. Since the group $\Diff_1 \times \Diff_2$ is
by definition linearly connected, and its right-left action in $\Set$ is
continuous, it is true that two RL-equivalent functions from $\Set$ belong
to the same connected component.  So in what follows we will not
distinguish RL-equivalent functions, and all the phrases like ``the
function is uniquely determined'' should be understood as ``uniquely up to
RL-equivalence''.

The purpose of the current Subsection is to prove that the connected
component which $f \in \Set$ belongs to, is determined by the behavior of
$f$ in some {\em compact\/} (and explicitly given) subset of $\Real^2$.

\begin{theorem}\label{Suff01}
Let $f_0,\, f_1 \in \Set$ be such that $\M^0(f_0) = \M^0(f_1) \bydef \M$,
and $f_0(x) = f_1(x)$ for any $x \in \M$. Then the functions $f_0$ and
$f_1$ are RL-equivalent.
\end{theorem}

\begin{proof}
Again, as in Lemma \ref{Circ}, it is enough to consider the case when
$f_0,\,f_1 \in \Set_{0,1}$ and $\M = \Lev_{0,1}(f_0) = \Lev_{0,1}(f_1)$.

The theorem is trivial if $\M = \Real^2$, so suppose that $\M$ has a
nonempty boundary $\partial\M = \Lev_0(f_0) \cup \Lev_1(f_0)$. Let us
define mappings $u_0(t;x,y)$ and $u_1(t;x,y)$ by formula (\ref{DifCurv})
using instead $g$ functions $f_0$ and $f_1$, respectively. Then formula
(\ref{GrowG}) implies that the mapping
%*
\begin{equation}\label{REquiv}
T(x,y) = \left\{ \begin{array}{ll}
(x,y), &\mbox{if } (x,y) \in \M, \\
u_1(u_0^{-1}(x,y)), &\mbox{if } (x,y) \in \M
\end{array}\right.
\end{equation}
%*
is the required R-equivalence.
\end{proof}

Let $f \in \Set(A)$ where $A = \{a_1,\, \dots,\, a_N\}$. As usual, $\ell_i$
means a connected component of $\partial \M(f)$ corresponding to $a_i$. For
each $i = 1,\dots,N$ let us draw a curve $\tau_i$ (inside $\M(f)$)
connecting $\ell_i$ with $\ell_{i+1}$. The curves $\tau_1,\,\dots,\,\tau_N$
divide $\M(f)$ to the compact ``curved $2N$-gon'' which will be called a
{\em fundamental polygon\/} of the function $f$, and $N$ ``sheets''
diffeomorphic to $[0,1] \times [0,\infty)$ (see Fig. \ref{M-of-f} above).

\begin{theorem}\label{FundPoly}
Let two functions $f,\,g \in \Set$ have the same fundamental polygon
and coincide in it. Then they belong to the same connected component of the
set $\Set$.
\end{theorem}

\begin{proof}
It may be supposed without loss of generality that $\M^0(f) = \M^0(g)
\bydef \M$. The fundamental polygon is a homotopy retract of $\M$, moreover
the homotopy $h_t$ may be chosen such that
%*
\begin{equation}\label{PreBou}
h_t(\partial\M) \subset \partial\M
\end{equation}
%*
for all $t$. The function
%*
\begin{equation}\label{Defft}
f_t(x) \bydef \left\{\begin{array}{ll}
f(h_t(x)), &x \in \M^0(f), \\
f(x), &x \notin \M^0(f)
\end{array}
\right.
\end{equation}
%*
belongs to $\Set$ (its smoothness is guaranteed by (\ref{PreBou})).  Let us
define function $g_t(x)$ in the same way, and observe that $f_1(x) \equiv
g_1(x)$ because $h_1$ maps $\M$ to the fundamental polygon. So $f$ and $g$
are joined by a continuous curve in $\Set$.
\end{proof}

\subsection{Crucial lines}

So we need only classify the functions from $\Set$ with respect to their
behavior in their fundamental polygons. All the functions $f \in \Set(A)$
may be supposed to have the same fundamental polygon $\Poly = \Poly(A)$.
We will hereafter assume all the functions restricted to their fundamental
polygons, so $f \bydef \restr{f}{\Poly}$.

Recall (see Fig. \ref{M-of-f}) that $\Poly$ is a curved $2N$-gon with the
sides $\ell_1,\,\linebreak[0] \tau_1,\,\linebreak[0]\dots,\,\linebreak[0]
\ell_N,\,\linebreak[0] \tau_N$.  Call the level line of the function $f \in
\Set(A)$ (i.e., of its restriction to $\Poly$ !) {\em crucial\/} if it is
tangent to some side of $\Poly$. The touching points are exactly critical
points of the restriction of $\restr{f}{\partial\Poly}$.  Thus, all the
lines $\ell_1,\,\dots,\,\ell_N$ are crucial (we will call them {\em
boundary\/} crucial lines), and all the other crucial lines touch some
$\tau_i$. We will call the function $f \in \Set(A)$ {\em regular\/} if the
restriction $\restr{f}{\bigcup_i\tau_i}$ is a Morse function, i.e. all its
critical points are nondegenerate, and all the critical levels are
different. The last condition means that each non-boundary crucial line
touches only one $\tau_i$ and in one point only.  By Tom's transversality
theorem (see \cite{Thom}) we can make any function regular by an
arbitrarily small perturbation, so, considering the connected components of
$\Set(A)$ we may suppose all the functions to be regular. The number of
crucial lines of a regular function is obviously finite.

A non-boundary crucial line may amount to a single point (see Fig.
\ref{CrLiEx}). We will call such lines {\em negative\/}, and all the other
non-boundary crucial lines, {\em positive\/}. The positive line who
touches $\tau_j$, and then intersects $\tau_i$ and $\tau_k$ will be
referred to as an $(ijk)$-line (see Fig. \ref{CrLiEx}).
\begin{figure}[p]
%\input CrLiEx.pic
\vspace*{15cm}
\caption{Crucial lines}\label{CrLiEx}
\end{figure}
Let $a \in \tau_i$ be a critical point of a restriction of
$\restr{f}{\tau_i}$, i.e. some crucial line touches $\tau_i$ in this point.
We will write $r(a) = 1$ if this line is positive, and $r(a) = -1$ if it is
negative. Now, given a set of crucial lines, we can compute the invariants
$n_i$ from Subsection \ref{RigSec} by the following obvious formula:
%*
\begin{equation}\label{CompRot}
n_i = \frac{1}{2}\sum r(a)
\end{equation}
%*
where the sum is taken over the (finite) set of all the critical points of
the restriction of $f$ to $\tau_i$. This allows us to reconstruct a rigged
diagram of the function by its set of crucial lines. In fact, crucial lines
(and even positive crucial lines only) determine a connected component $f$
belongs to, as shows the following

\begin{theorem}\label{CruLin}
Let the two functions $f,\,g \in \Set(A)$ have R-equivalent sets of
positive crucial lines. Then the functions belong to the same connected
component of $\Set(A)$.
\end{theorem}

The proof of Theorem \ref{CruLin} is given in the end of the current
Subsection, and uses some lemmas.

The crucial lines cut the fundamental polygon into a finite number of
domains $\Poly_i$. The behavior of the function inside them is very simple,
it is RL-equivalent to a linear function $f(x,y) = x$ in a square $(0,1)
\times (0,1)$, as shows
\begin{lemma}\label{InDom}
For each $\Poly_i$ there exists a diffeomorphism $T_i =
\bigl(T_i^{(1)},T_i^{(2)}\bigr) : \Poly_i \to (0,1) \times (0,1)$ such that
the function $\restr{f}{\Poly_i}$ is L-equivalent to $T_i^{(1)}$.
\end{lemma}

\begin{proof}
The boundary of $\Poly_i$ consists of segments of several crucial lines
$\lambda_j$, and segments of several $\tau_j$. Each restriction
$\restr{f}{\tau_j}$ must be a monotone function because it cannot have
critical points. Therefore each level line of the function
$\restr{f}{\Poly_i}$ intersect each $\tau_j$ not more than once, i.e. it
connects $\tau_j$ with some another $\tau_k$. Denote $\Poly_{jk}$ the union
of all the level lines of $\restr{f}{\Poly_i}$ joining $\tau_j$ with
$\tau_k$. The sets $\Poly_{jk}$ are open and don't intersect, so, since
$\Poly_i$ is by definition connected, it amounts to a single $\Poly_{jk}$.
Thus the boundary of $\Poly_i$ consists of two segments of some $\tau_i$s,
and of two level lines (of the levels $m_i = \min_{\Poly_i} f$ and $M_i =
\max_{\Poly_i} f$, see $\Poly_1,\,\Poly_2$ in Fig. \ref{CrLiEx}).

These considerations show that each level set $\restr{f}{\Poly_i} = a$ is
connected, and is therefore a solution of the differential equation
%*
\begin{eqnarray}
\frac{du}{dt} &=& \pder{f(u(t),v(t))}{y}, \label{LinPoly1}\\
\frac{dv}{dt} &=& -\pder{f(u(t),v(t))}{x}.\label{LinPoly2}
\end{eqnarray}
%*
for $0 < t < t_*$ where $t_* = t_*(a)$. Thus we define
%*
\begin{displaymath}
T_i^{(2)}(x) = t(x)/t_*(f(x))
\end{displaymath}
%*
where $t(x)$ is a (unique) $t$ such that $x = (u(t),v(t))$ with
$(u(t),v(t))$ being a solution of (\ref{LinPoly1})--(\ref{LinPoly2}) going
through $x$. Take also
%*
\begin{displaymath}
T_i^{(1)}(x) = (f(x) - m_i)/(M_i - m_i),
\end{displaymath}
%*
and the pair $T_i = \bigl(T_i^{(1)},T_i^{(2)}\bigr)$ constitutes a
necessary diffeomorphism.
\end{proof}

\begin{corollary}\label{Coincide}
Let the two functions $f,\,g \in \Set(A)$ have the same crucial lines and
coincide on them. Then the functions are RL-equivalent.
\end{corollary}

\begin{proof}
Let $T_i^f$ and $T_i^g$ be diffeomorphisms $\Poly_i \to (0,1) \times (0,1)$
constructed in Lemma \ref{InDom}. Then by the Lemma the functions $f(x)$
and $g(T_i^*(x))$, where $T_i^* = T_i^g\circ (T_i^f)^{-1}$, are
L-equivalent. To prove the Corollary it's enough to note that the
diffeomorphisms $T_i^*$ preserve the orientation and are correctly glued in
the boundaries of different $\Poly_i$ to form a global diffeomorphism $T^*:
\Poly \to \Poly$.
\end{proof}

Moreover, the positive crucial lines appear to determine the positions of
negative crucial lines (which by definition amount to single points), as
shows

\begin{corollary}\label{NegLin}
Given two functions $f,\,g \in \Set(A)$ with the same positive crucial
lines, there exists a diffeomorphism $T \in \Diff_2$ having all the points
of positive crucial lines fixed and mapping negative crucial lines of $f$
to those of $g$.
\end{corollary}

\begin{proof}
It is clear from the proof of Lemma \ref{InDom} that any negative line is
``embraced'' by exactly one positive (see Fig. \ref{CrLiEx}). Evidently,
any two points in the segment $AB$ can be mapped to each other by an
orientation-preserving diffeomorphism of $\Poly$.
\end{proof}

Let us correspond to a set of crucial lines some graph $\Gamma$. Its
vertices are crucial lines, and two vertices are joined by an edge, if
there exists a domain $\Poly_i$ bounded by corresponding lines (we know
from the proof of Lemma \ref{InDom} that the boundary of each $\Poly_i$
contains exactly two crucial lines).

\begin{lemma}\label{Tree}
Graph $\Gamma$ is a binary tree.
\end{lemma}

\begin{proof}
As clearly shows Fig. \ref{CrLiEx}, the vertices of $\Gamma$ corresponding
to positive crucial lines are incident to three edges each, and all the
other vertices (corresponding to negative and boundary crucial lines) are
incident to one edge only. Each positive line divides $\Poly$ into three
parts, so, the graph $\Gamma$ splits into three parts if such a vertex is
taken from it. This proves that $\Gamma$ is a tree.
\end{proof}

Now we are ready to prove Theorem \ref{CruLin}.
\begin{proof}
Let functions $f,\,g$ belong to $\Set(A)$. By Corollary \ref{NegLin} we may
assume that the functions have the same set of crucial lines in their
fundamental polygon $\Poly$. Let $\Poly(p,q)$ stand for an element of the
partition $\Poly = \bigcup_i \Poly_i$ bounded by the crucial lines $p$ and
$q$. Let $a_0$ be a boundary crucial line of level $0$, and $a_1$ be
adjacent crucial line.

Define a deformation $f_t$ of the function $f_0 = f$ by the formula
%*
\begin{displaymath}
f_t(x) = u_{p,q}(f(x),t), \qquad x \in \Poly(p,q)
\end{displaymath}
%*
where the set of functions $u_{p,q}(y,t),\ y,t \in [0,1]$ is supposed to
have the following properties:
\begin{enumerate}

\item \label{ItBeg} $u_{p,q}(y,0) \equiv y$.

\item \label{ItMonot} $u_{p,q}(y,t)$ is monotone increasing with respect to
$y$.

\item \label{ItBound} $u_{p,q}(0,t) \equiv 0,\ u_{p,q}(1,t) \equiv 1$.

\item \label{ItGlue} $u_{p,q}(f(q),t)$ and $u_{q,r}(f(q),t)$ coincide for
all $t$, as well as their derivatives with respect to $y$ do.

\item \label{ItStart} $u_{a_0,a_1}(f(a_1),1) = g(a_1)$.

\end{enumerate}

Of course, the functions $u_{p,q}(y,t)$ are to be defined only if
$\Poly(p,q) \ne \emptyset$, i.e. if $p$ and $q$ are joined by an edge in
$\Gamma$. To obtain such set of functions, take $u_{a_0,a_1}(y,t) = y((1-t)
+ t\bigl(f(a_1)/g(a_1)\bigr)$, and then define the functions $u_{p,q}(y,t)$
successively moving along the graph $\Gamma$. The definition depends on the
function already defined for the adjacent edge, and can always be done
since by Lemma \ref{Tree} $\Gamma$ contains no cycles.

By property \ref{ItBeg}, $f_0 \equiv f$. It follows easily from properties
\ref{ItMonot}--\ref{ItGlue} that $f_t \in \Set(A)$. Property \ref{ItStart}
shows that $f_1$ and $g$ coincide in $a_0$ and $a_1$. Now we are able to
repeat the construction for all $\Poly_i$ except $\Poly(a_0,a_1)$, to
obtain equality $f = g$ for one more crucial line $a_2$ (adjacent to
$a_1$), and so on. Finally $f$ becomes equal to $g$ in all the crucial
lines, and we use Corollary \ref{Coincide}.
\end{proof}

So the question is, how a continuous deformation of function $f_t \in
\Set(A)$ can affect its set of crucial lines.

\subsection{Construction of a dual diagram}

To facilitate studying the possible transformations let us encode the
positions of the (positive) crucial lines by a {\em dual diagram\/} of the
function $f \in \Set(A)$. A dual diagram $\DDiag(f)$ is an $N$-gon
$d_1d_2\dots d_N$ provided that $A$ consists of $N$ points. For any
$(ijk)$-line of the function $f$ with $i \ne k$ let us join the vertices
$d_i,\,d_j$, and $d_k$ by diagonals and mark the vertex $d_j$ of the
triangle obtained with a star.

\begin{lemma}\label{Triang}
The resulting picture will be a triangulation of $d_1\dots d_N$.
\end{lemma}

\begin{proof}
Show first that no two triangles of the dual diagram have common internal
points. Let this not be true for the triangles $ijk$ and $i'j'k'$, with $j$
and $j'$ being the starred vertices. Then it is easy to see that each
triangle has at least two sides intersecting the sides of the other
triangle.  So at least one of the following intersections is nonempty: $ij
\cap i'j'$, $ij \cap j'k'$, $jk \cap i'j'$, $jk \cap j'k'$. Hence the
$(ijk)$- and $(i'j'k')$-lines necessarily intersect, which is impossible.

Show then that all the polygon is split into triangles. To do this, observe
that if among the indices $i,\,j,\,k$ two are equal then the $(ijk)$-line
embraces exactly one negative crucial line, and if all the three indices
are different, the $(ijk)$-line does not embrace negative lines (see Fig.
\ref{CrLiEx} for illustration).

This observation combined with the formulas (\ref{CompRot}) and
(\ref{SumPoly}) shows that the overall number of $(ijk)$-lines with three
different indices is exactly $N-2$. But $N-2$ nonintersecting triangles
always form a triangulation of an $N$-gon.
\end{proof}

Now we are to introduce to the diagram lines with two and three coinciding
indices. As for $(ijj)$-lines (including the case $i=j$), we will not draw
them at all because there is a ``sweeping'' transformation of the function
(see Fig.  \ref{Sweep}) deleting such lines (all the crucial lines touching
$\tau_j$ between $P$ and $Q$ also disappear, but it is obvious that the
transformation does not touch any $(ijk)$-line with $i \ne j \ne k$) and
preserving the function $f$ in the same connected component of $\Set(A)$.
\begin{figure}[p]
%\input Sweep.pic
\vspace*{15cm}
\caption{``Sweeping'' of $(ijj)$-line}\label{Sweep}
\end{figure}
As to $(iji)$-lines (with $i \ne j$), we will attach to the edge $d_id_j$
of the triangulation a sequence of $+$ and $-$, each $+$ meaning an
$(iji)$-line, and each $-$ an $(jij)$-line, in the left-to-right order. (To
do this, we are to show that if there exists an $(iji)$-line, the edge
$d_id_j$ is present in a triangulation --- this is done by the way similar
to the proof of Lemma \ref{Triang}). Obviously, if an edge $d_id_j$ is
endowed with a sequence $\sigma_1\dots\sigma_s$, then the opposite edge
$d_jd_i$ is endowed with a sequence $\sigma'_1\dots\sigma'_s$ where
$\sigma'_i = -\sigma_{s+1-i}$. This completes the drawing of a dual diagram
(see Fig. \ref{DDExampl}; the diagram drawn in it corresponds to the
picture in Fig. \ref{CrLiEx}).
\begin{figure}[p]
%\input DDExampl.pic
\vspace*{15cm}
\caption{Dual diagram}\label{DDExampl}
\end{figure}

\begin{theorem}\label{DualComp}
Let $f \in \Set(A)$ be a function having no crucial $(ijj)$-lines. Then
$\DDiag(f)$ determines its set of crucial lines completely up to an
orientation-preserving diffeomorphism of $\Poly(f)$.
\end{theorem}

To prove Theorem \ref{DualComp} we need a technical result. Let $\Omega
\subset \Real^2$ be a unit disk with its boundary $\partial\Omega$ split
into several segments $\omega_1,\,\dots,\,\omega_N$. Let ${\cal A}_{ijk}$
denote the set of all smooth curves $\gamma \subset \Omega$ with their
endpoints in $\omega_i$ and $\omega_k$, having a first order touch with
$\partial\Omega$ in a point of $\omega_j$. The group of
orientation-preserving diffeomorphisms of $\Omega$ acts on ${\cal
A}_{ijk}$, and the result we need is

\begin{lemma}\label{Sectors}
This action is transitive.
\end{lemma}

\begin{proof}
Let $\gamma_1,\,\gamma_2 \in {\cal A}_{ijk}$. By means of an
orientation-preserving diffeomorphism of $\Omega$ we can make the curves
intersect $\partial\Omega$ in the same points $a \in \omega_i,\,b \in
\omega_j,\,c\in\omega_k$. Using Morse lemma (see e.g. Milnor's book
\cite{Milnor}) we can achieve the coincidence of the curves in a vicinity of
the point $b$. To map eventually $\gamma_1$ to $\gamma_2$ we can use a
cobordism technique similar to that used for proving Lemma \ref{LinPla}.
\end{proof}

\begin{proof} {\bf (of Theorem \ref{DualComp})}
Given a dual diagram, our goal is to reproduce the set of crucial lines of
a function uniquely up to a diffeomorphism. To do this, draw first
$(ijk)$-lines with pairwise different $i,\,j$, and $k$. These lines
constitute triangles of a triangulation, and we will be drawing them
sequentially in a random order. The next step consists in drawing
$(iji)$-lines. If an edge a string $\sigma_1\dots\sigma_N$ is attached to
the edge $d_id_j$ of $\DDiag(f)$, then the corresponding $(iji)$- and
$(jij)$-lines will be drawn in left-to-right order. Any line drawn divides
$\Poly(f)$ into three parts diffeomorphic to a disk. Thus drawing these
lines we are always falling into conditions of Lemma \ref{Sectors}, and the
positions of lines are determined uniquely up to an orientation-preserving
diffeomorphism.
\end{proof}

\begin{Corollary}
If $\DDiag(f_0) = \DDiag(f_1)$ then $f_0$ and $f_1$ belong to the same
connected component of $\Set$.
\end{Corollary}

\section{Completeness of the invariant} \label{ComplSec}
\subsection{Transformations of a dual diagram}

Possible transformations of crucial lines and corresponding transformations
of a dual diagram are described below. We are not giving an exhaustive
list, but a minimal one sufficient for our purposes (i.e. for proving the
completeness of invariant $\RDiag$).  All the transformations are of course
invertible, it will not be specially emphasized each time.

\subsubsection{Cancellation} \label{OpCancel} Two neighboring positive
lines, $(iji)$ and $(jij)$, can be cancelled by means of a continuous
deformation. This is shown in Fig. \ref{Cancel}.
\begin{figure}[p]
%\input Cancel.pic
\vspace*{15cm}
\caption{Cancellation}\label{Cancel}
\end{figure}
The corresponding transformation of a dual diagram is a cancellation of
neighboring $+$ and $-$ written on some edge of a diagram. So the only
invariant of cancellation operation is the difference $e_{ij}$ between
numbers of pluses and minuses written on the edge $d_id_j$, and hereafter
we will be marking edges with the numbers $e_{ij}$ only. Evidently, $e_{ji}
= -e_{ij}$.

\subsubsection{Moving the star} \label{OpMove}
\begin{figure}[p]
%\input MvStar.pic
\vspace*{15cm}
\caption{Moving the star}\label{MvStar}
\end{figure}
For any triangle of the dual diagram we can move the star from one its
angle to another, changing the numbers $e_{ij}$ written on the sides of the
triangle as shown on Fig. \ref{MvStar}. The middle picture illustrates the
critical moment when the function is not regular (the crucial line touches
two sides of the fundamental polygon).

\subsubsection{Whitney's operation} \label{OpWhit}
\begin{figure}[p]
%\input Whit.pic
\vspace*{15cm}
\caption{Whitney's operation}\label{Whit}
\end{figure}
This operation is shown in Fig. \ref{Whit}.

\subsection{The main theorem}

The main result of the paper is the following theorem converse to Theorem
\ref{Invar}.

\begin{theorem}\label{Complete}
Let $f_0,\,f_1 \in \Set$ be two functions with $\RDiag(f_0) = \RDiag(f_1)$.
Then $f$ and $g$ belong to the same connected component of the set $\Set$.
\end{theorem}

To prove the theorem we first need a formula restoring the rigged diagram
of the function by its dual diagram, i.e. computing the invariant $n_i$
corresponding to the vertex $d_i$ of the dual diagram. This formula,
obviously, is
%*
\begin{equation}\label{DuToRig}
n_i = \sum_j e_{ij} + s_i.
\end{equation}
%*
Here the sum is taken over all the $j$ such that $d_i$ is connected with
$d_j$, and $s_i$ is the number of triangles in which the star is placed at
the vertex $d_i$. One can easily check that operations
\ref{OpCancel}--\ref{OpWhit} do not change the numbers $n_i$.

\begin{proof}
Let $f_0,\,f_1$ be functions from $\Set(A)$ with $\RDiag(f_0) =
\RDiag(f_1)$. Using cancellation operation \ref{OpCancel} we can eliminate
from $\RDiag(f_0)$ (and $\RDiag(f_1)$) all the $(ijj)$-lines. Our goal is
to find a sequence of operations \ref{OpMove}, \ref{OpWhit} turning the
dual diagram of $f_0$ into a dual diagram of $f_1$ --- then Theorems
\ref{DualComp} and \ref{CruLin} complete the proof.

Let $d_1,\,\dots,\,d_N$ be vertices of $\DDiag(f_0)$. Our first step is to
transform a triangulation so that all the triangles would have a common
vertex $d_1$. If it is not yet the fact, then $\DDiag(f_0)$ contains a
tetragon $d_1d_id_jd_k$, with an edge $d_id_k$ drawn. Out goal now is
achieve an equality $e_{ij} = 0$ in order to use for this tetragon
Whitney's operation \ref{OpWhit}. If we succeeded to do so, the numbers of
edges incident to the vertex $d_1$ would increase by one. Since the overall
number of edges in the diagram is finite, this process will necessarily
stop, and the required triangulation will be obtained.

To use operation \ref{OpWhit} we first move the stars in the triangles
$d_id_id_k$ and $d_jd_id_k$ to the vertices $d_1$ and $d_j$, respectively.
Now, moving the star in the triangle $d_1d_id_k$ three times in an
appropriate direction, we are able to increase or decrease the number
$e_{ik}$ by one preserving positions of stars. Repeating these
transformations as many times as necessary, we can achieve the equation
$e_{ik} = 0$ and use operation \ref{OpWhit}. So, the necessary
triangulation is obtained. In addition to it, let us move the stars in all
the triangles to the vertex $d_1$.

Then let us do the same thing with $\DDiag(f_1)$. The result is the same
triangulation but generally $e_{ij} \ne e'_{ij}$ where $e_{ij}$ and
$e'_{ij}$ are numbers written on the edges of $\DDiag(f_0)$ and
$\DDiag(f_1)$, respectively. Formula (\ref{DuToRig}) shows that to achieve
coincidence of the diagrams, it is enough to obtain equality
$e_{1i}=e'_{1i},\;i = 2,\dots,N-1$. This can be done step-by step using
operation \ref{OpMove}. First, moving the star in the triangle $d_1d_2d_3$
of $\DDiag(g)$ three times in an appropriate direction, we can reduce the
difference $e_{12} - e'_{12}$ by one preserving triangulation and positions
of the stars.  Repeating this, we can equalize $e_{12}$ and $e'_{12}$. Then
doing the same thing in the triangles
$d_1d_3d_4,\,d_1d_4d_4,\,\dots,\,d_1d_{N-2}d_{N-1}$ we will successively
obtain equalities $e_{13}= e'_{13},\,e_{14}= e'_{14},\,\dots e_{1,N-1}=
e'_{1,N-1}$, and all the equalities already obtained will be preserved.
Thus, all the necessary equalities will be achieved, and the dual diagrams
of $f_0$ and $f_1$ will be brought to the same form. Since all the
operations used are invertible, this means that the original dual diagrams
of $f_0$ and $f_1$ can be joined by a sequence of operations \ref{OpMove},
\ref{OpWhit}.
\end{proof}

By the way, Theorem \ref{Complete} proves the result mentioned in the
Introduction: the set $\Set(\emptyset)$ ($\emptyset$ is an ``empty''
diagram, containing no points at all) which it proves to be connected, is,
as it is easy to see, homeomorphic to the set $\Set$ with the compact-open
topology.

\section{Gradient fields} \label{GraSec}
\subsection{Multiplying by a function}

The gradient fields $\nabla f$ of functions $f \in \Set_{0,1}$ are nonzero
continuous vector fields in the real plane. The following theorem shows
that there is a close connection between gradient and arbitrary nonzero
vector fields:

\begin{theorem}\label{Mult}
Let $A(x,y)$ be a $C^1$-smooth nonzero vector field in $\Real^2$.  Then
there exist functions $f,\,\phi \in C^1(\Real^2)$ such that
%*
\begin{equation}\label{Grad}
\nabla f(x,y) = \phi(x,y) A(x,y)
\end{equation}
%*
and $\phi(x,y) > 0$ everywhere.
\end{theorem}

\begin{proof}
The integral curves of the fields $A(x,y)$ and $B(x,y) \bydef
A^{\perp}(x,y)$ form a local coordinate system $(t,s)$ in a small
neighborhood $N(x_*,y_*)$ of an arbitrary point $(x_*,y_*) \in \Real^2$
because the appropriate change of variables has a Jacobian equal to $\lmod
A(x_*,y_*)\rmod^2 \ne 0$ (compare the proof of Theorem \ref{LevLin}). It is
easily checked by a direct computation that the function $\phi$ given in
$(t,s)$-coordinates as
%*
\begin{equation}\label{ExprPhi}
\phi(t,s) = c(s)\exp\int_0^t\rho(\tau,s)\,d\tau.
\end{equation}
%*
with $c(s)$ being an arbitrary smooth function and
%*
\begin{displaymath}
\rho(x,y) \bydef \curl A(x,y) = \pder{A_x}{y} - \pder{A_y}{x}
\end{displaymath}
%*
meets the requirements of the Theorem for $(x,y) \in N(x_*,y_*)$. Moreover,
$\phi$ is positive if $c(s) > 0$.

Neighborhoods $N(x,y)$ form an open covering $\frak{N}$ of the plane.  The
plane is a paracompact space, so $\frak{N}$ contains a locally finite
subcovering $\{N_1,\,\dots,\,N_n,\,\dots\}$. We will be constructing a
necessary function $\phi(x,y) > 0$ successively in neighborhoods
$N_1,\,\dots,\,N_n,\,\dots$. In $N_1$ let us take an arbitrary function of
the form (\ref{ExprPhi}) with positive $c(s)$.  Suppose now that the
function $\phi(x,y) > 0$ is already chosen for $(x,y) \in \bigcup_{i =
1}^{k-1} N_i$, and let us choose it for $(x,y) \in N_k$. Our task is to
find an appropriate $c(s)$. If a point $(0,s)$ belongs to an integral curve
of the field $B$ which intersects one of $N_i,\;i = 1,2,\dots,k-1$, then
let us prolong the appropriate function (\ref{ExprPhi}) from $N_i$ to $N_k$
to determine necessary $c(s)$. Otherwise $c(s)$ may be taken arbitrary,
taking care on positiveness and smoothness only.

It is easy to see that no obstacles arise in this process. Really, let
corresponding integral curve intersect with neighborhoods $N_i$, and
$N_j,\;i < j < k$. In principle there are two possibilities to choose
$c(s)$, but it is easy to see that they are not in contradiction because
the solution in $N_j$ was chosen on the $j$-th step of construction in
accordance with solution which had been chosen in $N_i$ on the $i$-th step.

So we are able to define $\phi(x,y) > 0$ globally which proves the theorem.
\end{proof}

\subsection{Classification of nonzero vector fields}

Theorems from previous Sections show that the topological nature of a
function $f \in \Set$ is determined by the behavior of its gradient field
in the set $\M^0(f)$. Since, as it was shown in Theorem \ref{Mult}, the
class of gradient fields on $\M^0(f)$ does not in fact differ from the
class of arbitrary nonzero vector fields on $\M^0(f)$, so it seems worth
giving a topological classification of such fields.

Let $f \in \Set(A)$ and $\M = \M^0(f)$. Consider the set $\Field(A)$ of all
continuous nonzero vector fields defined in $\M$, normal to its boundary
$\partial\M = \Lev_{p(0)}(f) \cup \Lev_{p(1)}(f)$ (as usual, $f = p \circ g
\circ T$ for $p \in \Diff_1,\,g \in \Set_{0,1}$, and $T \in \Diff_2$) and
such that in the points of $\Lev_{p(0)}(f)$ it is directed inside $\M$, and
in the points of $\Lev_{p(1)}(f)$ it is directed outside $\M$. Obviously
the set $\Field(A)$ depends on the diagram $A$ only, and the vector field
$\nabla f(x)$ belongs to $\Field(A)$.

Let us equip the set $\Field(A)$ with a compact-open topology, and
determine what connected components it has. The invariants $n_i$ introduced
in Section \ref{RigSec} for gradient fields can be defined for fields from
$\Field(A)$ as well, and Theorem \ref{PropRot} still holds. The connected
components of $\Field(A)$ are then described by the following theorem:

\begin{theorem}\label{ClasFie}
Two vector fields $V_0,\, V_1 \in \Field(A)$ belong to the same connected
component if and only if all their invariants $n_i$ coincide.
\end{theorem}

The Theorem follows immediately from three lemmas. They are dealing with
classification of nonzero vector fields in manifolds with boundary, and in
all the three the word ``homotope'' means ``can be connected by a smooth
homotopy identical in the boundary''. Without loss of generality we may
assume that the fields $V_0$ and $V_1$ have unit length, i.e. they are
mappings to a unit circle $S^1$.

\begin{lemma}\label{Hom1}
Let $V_0,\,V_1$ be two plane nonzero vector fields defined in a segment
$[a,b]$ and such that $V_0(a) = V_1(a),\,V_0(b) = V_1(b)$, and rotations of
the fields in the segment $[a,b]$ are the same. Then these fields are
homotope.
\end{lemma}

\begin{proof}
Let us lift the mappings $V_0,\,V_1:[a,b] \to S^1$ to the universal covering
$\ell$ of $S^1$. The coincidence of rotations means that the liftings,
$\widetilde{V_0}$ and $\widetilde{V_1}$, will have the same endpoints.
Since $\ell$ is simply connected, $\widetilde{V_0}$ can be homotoped to
$\widetilde{V_1}$ with the endpoints fixed. Projecting this homotopy to
$S^1$, we obtain homotopy joining $V_0$ and $V_1$.
\end{proof}

\begin{lemma}\label{Hom2}
Let $V_0,\,V_1$ be two plane nonzero vector fields defined in a plane disk
$\Omega$ and coinciding in its boundary. Then these fields are homotope.
\end{lemma}

\begin{proof}
Let us lift the mappings $V_0,\,V_1:[a,b] \to S^1$ to the universal covering
$\ell$ of $S^1$. Since $\ell$ is contractible, these liftings may be
homotoped to each other with their values on the boundary $\partial\Omega$
fixed.
\end{proof}

\begin{lemma}\label{Hom3}
Let $V_0,\,V_1$ be two plane nonzero vector fields defined in the set
$[0,1] \times [0, +\infty)$ and coinciding in its boundary. Then these
fields are homotope.
\end{lemma}

The proof copies that of Lemma \ref{Hom2}. Now we are ready to prove
Theorem \ref{ClasFie}.

\begin{proof}
Let us draw curves $\tau_1,\,\dots,\,\tau_N$ dividing (like in Section
\ref{DDiagSec}) $\M = \M^0(f)$ into the fundamental polygon $\Poly(f)$ and
$N$ ``sheets'' diffeomorphic to $[0,1] \times [0, +\infty)$. Without loss
of generality we may assume the fields $V_0$ and $V_1$ to have unit length
in any point. Therefore the fields $V_0$ and $V_1$ coincide in the boundary
$\partial\M$.

By Lemma \ref{Hom1} there exists a homotopy joining $V_0$ with $V_1$ in all
$\tau_i$. Now, a homotopy joining $V_0$ with $V_1$ can be constructed in
$\Poly(f)$ using Lemma \ref{Hom2}, and in each ``sheet'', using Lemma
\ref{Hom3}.
\end{proof}

\subsection{Counterexample}\label{CouSbSec}

The classification of nonzero vector fields in $\M(f)$ given in the
previous Subsection amazingly resembles classification of functions from
$\Set$ obtained in Sections \ref{InvarSec}--\ref{ComplSec}. Moreover, it is
known from Theorem \ref{Mult} that the fields $\nabla f,\; f \in \Set(A)$
and the fields from $\Field(A)$ are connected by a multiplication by a
positive function. But classification of functions {\em is not\/} a
corollary of the classification of fields due to the following
circumstance.

The correspondence between nonzero vector fields and functions from $\Set$
given by Theorem \ref{Mult} is not unique --- there is some freedom in the
choice of a function $\phi$. To derive Theorem \ref{Complete} from Theorems
\ref{Mult} and \ref{ClasFie} we need to choose the functions $\phi$ so that
this correspondence is continuous --- it would give us a homotopic
equivalence between topological spaces $\Field(A)$ and $\Set(A)$. This is
however impossible, as the following example shows.

Consider the diagram $A$ consisting of two points, one of them black and
one white. The corresponding set $\M$ let be realized as a sheet $\{(x,y)
\mid 0 \leq x \leq 5\}$. Define a family of vector fields $V_\eps =
(X_\eps(x,y),Y_\eps(x,y))$ such that $\lmod V_\eps(x)\rmod = 1$,
$Y_\eps(x,y) \geq 0$, and $X_\eps(x,y)$ is given by
%*
\begin{displaymath}
X_\eps(x,y) = \left\{ \begin{array}{ll}
1, &0 \leq x \leq 1,\\
(3-\eps) - (2-\eps)x, &1 \leq x \leq 2,\\
-1 + \eps, &2 \leq x \leq 3,\\
(3\eps - 5) + (2-\eps)x, &3 \leq x \leq 4,\\
1, &4 \leq x \leq 5.
\end{array}\right.
\end{displaymath}
%*

The level lines of the functions $f_0$ and $f_\eps,\,\eps > 0$
(corresponding to $V_\eps$ by Theorem \ref{Mult}) are shown in
Fig. \ref{Counter}).

\begin{figure}[p]
%\input Counter.pic
\vspace*{15cm}
\caption{Level lines of $f_0$ and $f_\eps$}\label{Counter}
\end{figure}
Evidently $V_\eps \to V_0$ as $\eps \to 0$. But for the functions
$f_\eps,\, \eps > 0$ the equation $f_\eps(1,0) = f_\eps(4,0)$ holds, while
for $f_0$ there is a strict inequality $f_0(1,0) > f_0(4,0)$. So $f_\eps
\not\to f_0$ as $\eps \to 0$ (in a compact-open topology) regardless of the
choice of the factor $\phi(x,y)$ in Theorem \ref{Mult}.

\subsection*{Further questions}
Let us briefly sketch unsolved problems arising in connection with the
material of the paper. The connected components of the set $\Set$ were
described, so, the first natural question is, what is their internal
topology looks like. In other words, having described the $H^0(\Set)$, one
might be interested to pass to higher homologies. This pass is especially
tempting in view of Section \ref{GraSec}. The thing is that, almost
evidently, the sets $\Field(A)$ are homotopically trivial, but Subsection
\ref{CouSbSec} suggests (though not proves) that the sets $\Set(A)$ are
not. The technique introduced in the paper seems to be suitable for
computing $H^n(\Set)$, at least for small $n$.

Replacement of $\Real^2$ by another noncompact manifold is much more
challenging. Passage to other two-dimensional manifolds (e.g., to an
infinite cylinder) seems relatively easy (though not completely trivial),
but increasing the dimension poses more serious problems (e.g., Lemma
\ref{LinPla} which constitutes an analytical base for all the
considerations, relies heavily upon dimension 2).

One more interesting question arises if we consider embedding $\NoCrit 
\subset C^2(\Real^2)$. Almost all the set $\NoCrit$ is ``thin'': if a 
function $f \in \NoCrit$ has at least one critical level, a 
general-position perturbation does not preserve it in $\NoCrit$. It seems 
interesting to investigate what can be said about critical points of such 
perturbations.

\newpage
\bibliographystyle{plain}
\begin{thebibliography}{1}

\bibitem{FimZarik}
{Z}.~Balanov, {E}.~Schwartzmann,
\newblock {\em Morse complex, even functionals, and the buckling of thin elastic
  plate},
\newblock preprint of Haifa Technion, 1994.

\bibitem{Chang}
{K}.-{C}h. Chang,
\newblock {\em Infinite dimensional Morse theory and multiple solution
  problems},
\newblock Birkh\"auser, 1993.

\bibitem{PDR}
{M}. Gromov,
\newblock {\em Partial differential relations},
\newblock in Ergebnisse der Matematik und ihre Grenzgebiete,
  Birkh\"auser, Berlin, 1986.

\bibitem{Milnor}
{J}. Milnor,
\newblock {\em Morse theory},
\newblock Princeton University Press, Princeton, 1963.

\bibitem{RouSan}
{C}. {P}.~{R}ourke, {B}. {J}.~{S}anderson,
\newblock {\em Introduction to piecewise linear topology},
\newblock in Ergebnisse der Matematik und ihre Grenzgebiete,
  Springer, 1972.

\bibitem{Thom}
{R}. Thom,
\newblock {\em Les singularit\'es des applications diff\'erentiables},
\newblock Ann. Inst. Fourier {\bf 6} (1956), 43--87.

\end{thebibliography}

\newpage
\listoffigures


\end{document}


