\documentclass[12pt, a4paper, twoside]{article}

\usepackage{amsmath, amsthm, amsfonts, array}
\usepackage {amssymb, amscd, latexsym, times, epic, eepic}

\title{A rigidity theorem for two continuous functions}
\author{Matias Dahl}
\date{\today}

\parindent=0cm
\parskip=.2cm

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{proposition}[theorem]{Proposition}

\newcommand {\Set}[1] {\mathbb{#1}}
\newcommand {\sR}[0] {\Set{R}}

\begin{document}

\maketitle

Let $S=\{ v\in \sR^3: \Vert v \Vert =1\}$.

\begin{proposition}
\label{rigidcont}
Suppose $f_1, f_2\colon S\to \sR$ are two continuous functions such 
that $f_1(x)=f_2(x)$ only for finitely many $x\in S$. 
Suppose further that 
   $g_1,g_2\colon S\to \sR$ are continuous functions such that
$$
  \{ f_1,f_2\} =   \{ g_1,g_2\} \ \ \mbox{on}\ S.
$$
Then $f_1=g_1$, $f_2=g_2$ or $f_1=g_2$, $f_2=g_1$.
\end{proposition}

\begin{proof}
Let  $S'\subset S$ be the set where $f_1\neq f_2$.
By assumption there exists a function $\pi\colon S'\to \{1,2\}$ such that
\begin{eqnarray}
\label{eqnlast}
   g_1(x) = f_{\pi(x)}(x), \quad x\in S'.
\end{eqnarray}
To prove that $\pi$ is constant on $S'$, suppose that
    $x,y\in S'$ are such that $\pi(x)\neq \pi(y)$. 
Since $S'$ is path connected, there exists a curve 
   $\gamma\colon[0,1]\to S'$ connecting $x$ to $y$. 
By the intermediate value theorem, there exists a $t\in[0,1]$ 
   where
   $\pi\circ \gamma\colon[0,1]\to \sR$ is not continuous;
for all $\delta>0$ there exists an $s\in [0,1]$ such that 
$|s-t|<\delta$ and $\pi\circ \gamma(t)\neq \pi\circ \gamma(s)$. 
In this way we can construct a sequence $x_1,x_2,\ldots\in S'$ 
  converging to $\gamma(t)$, 
  but such that $\pi(x_i)\neq \pi\circ \gamma(t)$ for all $i$. 
Then
\begin{eqnarray*}
f_{\pi\circ \gamma(t)}(\gamma(t))&=& g_1(\gamma(t))\\
 &=&   \lim_{i\to \infty} g_1(x_i) \\
       &=&  \lim_{i\to \infty} f_{\pi(x_i)}(x_i)\\
       &=& f_{\pi(x_1)}(\gamma(t)),
\end{eqnarray*}
so $\pi$ is must be constant on $S'$. 
On $S\setminus S'$, we have
$$
  f_1=f_2=g_1=g_2
$$
and we can extend $\pi$ to a constant function on $S$
  such that equation \ref{eqnlast} holds.
\end{proof}


\end{document}


