Dimension formula for the space of relative symmetric polynomials of D_n with respect to any irreducible representation

Abstract: We provide a formula and a generating function for the dimension of the vector space of relative symmetric polynomials of D_n for all its irreducible one-dimensional and two-dimensional representations which were defined originally by M. Shahryari.

\section{Introduction}
Every complex representation of a finite group has a canonical decomposition
into direct sum of isotypical components.
Serre's textbook \cite[page 21]{Serre} gives the formula for the
projection map to all these components. We recall the formula here:

Given the isotypical decomposition
$V=\bigoplus_{\chi\in \mathrm{Irr\,}(G)} V_\chi$,
the projection to the component $V_\chi$ is given by
\begin{equation}\label{canproj}
    p= \frac{\deg \chi}{|G|} \sum_{g\in G}\bar {\chi}(g) \rho(g)
\end{equation}
When $\chi$ is the trivial 1-dimensional representation this projection
is the Reynold's operator.

In this paper we focus on the natural action of  $S_n$ (and its subgroups)
on the
complex polynomial algebra of $n$ variables, by permuting the
variables.

We denote by $H_d(x_1,x_2,\ldots, x_n)$ the complex vector space
of all homogeneous polynomials of degree $d$ in the $n$ variables,
$x_1,x_2,\ldots, x_n$, sometimes denoted simply by $H_d$.

The image of the Reynold's operator will be the space of all symmetric
polynomials of degree $d$.

M. Shahryari \cite{Shah1} has introduced the notion of relative symmetric
polynomials for any subgroup $G \subset S_n$ with respect to any
irreducible character $\chi$ of $G$.

The vector space of relative symmetric polynomials  of $G$
relative to $\chi$, denoted by $H_d(G,\chi)$ is defined as the
image of the  projection operator defined in Equation \eqref{canproj}
in this case:
\begin{equation}\label{relproj}
    T(G,\chi) = \frac{\chi(1)} {|G|} \sum_{g \in G}\chi(g) g
\end{equation}

Finding the dimension of this vector space of relative symmetric polynomials for various subgroups of the symmetric group of $S_n$ is a fundamental question.

 In  later papers Babaei, Zamani and Shahryari found the dimension
 of the space of relative invariants for $S_n$ and its subgroup $A_n$ \cite{Shah1} and for Young subgroup \cite{Shah2}

In a series of papers Babaei and Zamani have given corresponding formula for the cyclic group in \cite{ZB1}, for the dicyclic group in \cite{ZB2} and for the dihedral group $D_n$ \cite{ZB3}.

In our work here we relook at the formula for dihedral groups.
Babaei-Zamani formula is a summation involving cosine values which are in general irrational numbers.
So they may be inconvenient to calculate  dimensions which are non-negative integers.
By using appropriate theorems from elementary number theory along with combinatorial counting arguements, we
have provided an alternative dimensional formula as a summation of integer terms.
Another advantage of our formula is that it allows us to write down the generating function.
See theorems \ref{thmdeg2} and \ref{thmdeg1} for the precise statements.

A notable feature is that this formula gives this dimension
as a \textit{summation over the divisors of $n$}
involving the M\"obius and Euer $\phi$-functions, even though this problem
is not apparently connected with number theory.

Our paper is organized  this way: after this introduction, in the second
section a few  number-theoretic preliminaries are assembled,
in Section 3  the character table of the dihedral group is given following
Serre \cite{Serre}.
In the fourth section we state and prove
the formula. Finally Section 5 illustrates how easy it is to compute  with
these formul\ae.
\section{Preliminaries}

First we set up the notations:
\begin{itemize}
\item  We use the standard notations $\phi(n)$ and $\mu(n)$ respectively for the Euler's totient function and
M\"obius function.
\item  For $n$ any positive integer and $r$ a divisor of $n$ we
 denote by $S_r(n)$ the set of integers between 1 and $n$ having $r$ as their
$\gcd$.
\[S_r(n):=\{k:1 \leq k \leq n,\gcd(k,n)=r\}\]
\end{itemize}

We state below, without proofs, some
 well known facts from elementary number theory as lemmas.
These results were known to Ramanujan \cite{Ramanujan} and von Sterneck
\cite{Von}.
\begin{lemma} \label{lemma1}
With the notation as above, we have  $S_r(n)=\{rk:k \in S_1(n/r)\}$.
I.e., $S_r(n)=rS_1(n/r)$. In particular, $|S_r(n)|=|S_1(n/r)|$.
 \end{lemma}

\begin{lemma} \label{lemma2}
The sum of all the   primitive $n^{\rm th}$ roots of unity is $\mu(n)$.
\[
 (ie) \sum_{\textstyle{k=1 \atop \gcd(k,n)=1}} ^n

    \exp (\textstyle {\frac{2\pi ik}{n})}
    = \mu(n)
\]
 \end{lemma}

In fact we need the following variation of Lemma 2:
\begin{lemma} \label{lemma3}
 \[ \sum_{\textstyle{k=1 \atop \gcd(k,n)=1}} ^n
    \cos\, (2\pi k/n) = \mu(n)
\]
\end{lemma}
    \begin{lemma}\label{lemmarjsum}
        For any two positive integers $n$ and $m$
        \[\sum_{k=1}^n \exp\big({\textstyle {\frac{2\pi i mk}{n}}}\big) =\mu \Big(\frac
        n{\gcd(m,n)}\Big) \frac{\phi(n)}{\phi\big(n/\gcd(m,n)\big)}\]
    \end{lemma}

\section{Characters of the Dihedral group $D_n$}

We write  the elements of $D_n$, as
$D_n=\{1,\sigma,\sigma^2,\ldots,\sigma^{n-1},\tau,\tau \sigma,\tau \sigma^2,\ldots,\tau
\sigma^{n-1}\}$
  The dihedral group $D_n$  has only degree 1 and degree 2 irreducible represenations.

\subsection{One-dimensional representations:}
\begin{itemize}
 \item When $n$ is odd there are two irreducible representations of degree 1 namely $\chi_1$ and $\chi_2$ and the
 character table for those represenations is given below:

\begin{center}
\begin{tabular}{|l|l|l|}
\hline
Character & $\sigma^k$ & $\tau \sigma^k$   \\ \hline
$\chi_1$ & $1$ & $1$  \\ \hline
$\chi_2$ & $1$ &$-1$  \\ \hline
\end{tabular}
\end{center}
\item When $n$ is even there are four irreducible representations of degree 1 namely $\chi_1$, $\chi_2$ ,$\chi_3$ and
$\chi_4$ and the character table for those represenations is given below:

\begin{center}
\begin{tabular}{|l|l|l|}
\hline
Character&$\sigma^k$ & $\tau \sigma^k$  \\ \hline
$\chi_1$ & $1$ &$1$  \\ \hline
$\chi_2$ & $1$ &$-1$ \\ \hline
$\chi_3$ & $(-1)^k$ &$(-1)^k$  \\ \hline
$\chi_4$ & $(-1)^k$ & $(-1)^{k+1}$  \\ \hline
\end{tabular}
\end{center}
\end{itemize}

\subsection{Two-dimensional representations}
Let $h$ be a positive integer
with $h< n/2$.
 A representation $\rho_h$ of $D_n$ has the character given by
$\psi_h(\sigma^k)=2 \cos \frac{2\pi hk}{n} $ and  $\psi_h(\tau \sigma^k)=0.$

\noindent \textit{In our paper we follow the  convention that whenever
n or r is not a positive integer the binomial coefficient
${n \choose r}$ is interpreted as zero.}
Now we can state the main result of our paper:
\section{Dimension formul\ae\  and generating functions}
\begin{theorem} \label{thmdeg2}
 Let $\psi_h$ be the irreducible  character of degree 2 of the dihedral group
    $D_n$ as above.
 Then the dimension of $H_d(D_n,\psi)$, the vector space of relative symmetric
    polynomials is described in two cases:\\

\noindent Case(i)
  h is coprime to n:
 \[
  \dim H_d(D_n,\psi_h)=\frac{2}{n}\sum_{r|n} {r+\frac{d}{n/r}-1 \choose r-1} \mu\left(\frac{n}{r}\right)
 \]
 The generating function in this case is given by
 \[
  \sum_{d=0}^\infty \dim H_d(D_n,\psi_h)t^d
    =\frac{2}{n}\sum_{r|n} \mu \left(\frac{n}{r}\right) (1-t^{\frac{n}{r}})^{-r}
  \]

\noindent Case(ii)
 h is not coprime to n:
 \[
    \dim H_d(D_n,\psi_h)
    =\frac{2}{n}\sum_{r|n} {r+\frac{d}{n/r}-1 \choose r-1} \mu\left(\frac{n/r}{g}\right)
  \frac{\phi\left(\frac{n}{r}\right)} {\phi\left(\frac{n/r}{g}\right)}
 \]
 \\
where $\mu(n)$ is the M\"obius function and $g=\gcd (h,\frac{n}{r})$.

The generating function in this case is given by
 \[
  \sum_{d=0}^\infty \dim H_d(D_n,\psi_h)t^d=\frac{2}{n}\sum_{r|n} \mu \left(\frac{n/r}{g}\right)\frac{\phi\left(\frac{n}{r}\right)}
  {\phi\left(\frac{n/r}{g}\right)} (1-t^{\frac{n}{r}})^{-r}
  \]
 \end{theorem}

Proof:

\textit{It suffices to prove the formula for the dimension of $H_d(D_n,\psi)$ for a general $d$. The formula for the generating function is a straight forward consequence.}

Case (i):
For definiteness we fix the embedding of $D_n$ in $S_n$ with the generators of $D_n$ as below:
$D_n=\langle\sigma,\tau\rangle$ where $\sigma$ is the $n$-cycle given by (1 2 3 $\ldots n)$ and
    $\tau(j)=n+1-j$ is the  reversal permutation.
    \textit{In fact, $D_n$ cane be embedded in $S_n$ uniquely upto conjugacy.} Now in the case of a 2-dimensional irreducible character $\chi$  of $D_n$, $\psi(\tau \sigma ^k)=0$ for all $k$. So the dimension formula reduces to the summation over the cyclic
subgroup of all rotations in $D_n$.
\begin{equation}\label{dfrot}
 \dim H_d(D_n,\psi)=\frac{\psi(1)}{|D_n|}\sum^n_{k=1}
    \psi(\sigma^k)\,\mathrm{Tr\,}(\sigma^k)=\frac{2}{2n}\sum_{k=1}^n 2\cos\frac{2 \pi
    k}{n}\,\mathrm{Tr\,}(\sigma^k)
\end{equation}

 Note that $\,\mathrm{Tr\,} (\sigma^k$) is the trace of the $k^{\rm th}$ power of the
    $n$-cycle $\sigma$ in the vector space of homogeneous polynomials
 in $n$ variables, with $\sigma$ permuting the variables cyclically. As  this vector space has all monomials of degree $d$ in $n$
 variables as basis its dimension  is ${n+d-1 \choose n-1}$.
    Being a permutation action $\,\mathrm{Tr\,}(\sigma^k)={}$the number of monomials of
    degree $d$ in $n$ variables fixed by $\sigma^k$.
So the calculation boils down to finding the number of invariant monomials of
    degree $d$. To calculate $\,\mathrm{Tr\,}(\sigma^k)$, let $r=\gcd(n,k)$. Then
$\sigma^k$ decomposes into a product of $r$ number of disjoint cycles of
    length $\frac{n}{r}$. For a monomial to be invariant under
$\sigma^k$, degree of all the variables within an $\frac{n}{r}$-cycle should be constant. Call these degrees $d_1,d_2,\ldots,d_r$.

\indent (ie)
\[
 d=\frac{n}{r}d_1+\frac{n}{r}d_2+\ldots+\frac{n}{r}d_r
\]
Therefore,
\[
 d_1+d_2+\ldots+d_r=\frac{d}{n/r}
\]
A necessary condition is $d$ must be a multiple of $\frac{n}{r}$.
\textit{Let us assume this holds.}
So $\,\mathrm{Tr\,}(\sigma^k)=$ number of ordered partitions of $\frac{d}{n/r}$ into $r$ parts.

 This is well known to be $\displaystyle {r+\frac{d}{n/r}-1 \choose r-1}$. Substituting this value of trace in to (\ref{dfrot}), we
get
\begin{equation}
 \dim H_d(D_n,\psi)=\frac{1}{n}\sum_{k=1}^n 2 {r+\frac{d}{n/r}-1 \choose r-1} \cos\frac{2\pi k}{n}
\end{equation}

Note that for  two terms of the summation on
righthand side  if $1 \leq  k_1,k_2 \leq n$ are such that
$\gcd(k_1,n)=\gcd(k_2,n)$,
then the coefficient of $\cos\frac{2\pi k_1}{n}$ equals that of
$\cos\frac{2\pi k_2}{n}$. As the $\gcd$ of
any number with $n$ is a divisor of $n$, the dimension formula can be rewritten as a summation over the
divisors of $n$.
We treat the above summation as a sum of binomial coefficients ${r+\frac{d}{n/r}-1 \choose r-1}$, one for each divisor $r$ of $n$ with some weights.
These weights are sums of cosine values. So the dimensional formula takes the form
\begin{equation}
 \dim H_d(D_n,\psi)=\frac{1}{n}\sum_{r|n} \Big[\sum_{k \in S_r(n)}
    2 \cos\, \big( 2\pi k/n\big)

    \Big] {r+\frac{d}{n/r}-1 \choose r-1}
\end{equation}
That is,
\begin{equation}
 \dim H_d(D_n,\psi)=\frac{1}{n}\sum_{r|n} \Big[\sum_{a \in S_1(n/r)}
    2 \cos\, \big( 2\pi a \big/{\textstyle\frac nr}\big)

    \Big] {r+\frac{d}{n/r}-1 \choose r-1} \mbox{(by lemma \ref{lemma1})}
\end{equation}

Using lemma \ref{lemma3} the above equation reduces to
\[
\dim H_d(D_n,\psi)=\frac{2}{n} \sum_{r|n} \mu\left(\frac{n}{r}\right) {r+\frac{d}{n/r}-1 \choose r-1}
\]

Proof of case (ii):
Proceeding as in case (i), we have
\begin{equation} \label{hdformula}
  \dim H_d(D_n,\psi)=\frac{2}{n}\sum_{r|n} \left[\sum_{a \in S_1(n/r)}  \cos\frac{ 2\pi ah}{n/r}\right] {r+\frac{d}{n/r}-1 \choose r-1}
 \end{equation}
 The inner summation inside the square brackets in the above equation  is actually the sum of the real parts of $h^{\rm th}$ powers of all primitive $\left(\frac{n}{r}\right)^{\rm th}$
 roots of unity. Defining $g=\gcd(h,n/r)$, we see that the above is same as the sum of all the real parts of $g^{\rm th}$ powers of
 all primitive $\big(\frac{n}{r}\big)^{\rm th}$  roots of unity.
 Now we can apply Lemma  \ref{lemmarjsum} which makes
  equation \eqref{hdformula} to become
 \[
  \dim H_d(D_n,\psi)=\frac{2}{n}\sum_{r|n} \left[\sum_{a \in S_1(n/gr)}  \cos\frac{ 2\pi a}{n/gr}\right] \frac{\phi(n/r)}{\phi(n/gr)} {r+\frac{d}{n/r}-1 \choose r-1}
 \]
 Again using lemma \ref{lemma3}
 \[
   \dim H_d(D_n,\psi)=\frac{2}{n}\sum_{r|n} \mu\left(\frac{n/r}{g}\right) \frac{\phi(n/r)}{\phi(n/gr)}{r+\frac{d}{n/r}-1 \choose r-1}
 \]
\begin{theorem} \label{thmdeg1}
Case (i),  $n$ is odd: \\
Let $\chi_1$ and $\chi_2$ be the two irreducible characters of degree 1 with
    $\chi_1$ being the trivial character and $\psi_2$ taking $+1$ on rotations and $-1$ on reflections.
The dimensions of $H_d(D_n,\chi_1)$ and $H_d(D_n,\chi_2)$ are given by
 \[
  \dim H_d(D_n,\chi_1)=\frac{1}{2n}\left[ \sum_{r|n} {r+\frac{d}{n/r}-1 \choose
    r-1}\phi\left(\frac{n}{r}\right) +n \sum_{l=0}^{ \lfloor d/2 \rfloor} {\frac{n-1}{2}+l-1 \choose l}\right]
 \]
 and

\[
  \dim H_d(D_n,\chi_2)=\frac{1}{2n}\left[ \sum_{r|n} {r+\frac{d}{n|r}-1 \choose r-1}\phi\left(\frac{n}{r}\right) -n \sum_{l=0}^{\lfloor d/2 \rfloor} {\frac{n-1}{2}+l-1 \choose l}\right]
\]

The generating functions for the above two cases are given by
\[
  \sum_{d=0}^\infty \dim H_d(D_n,\chi_1)t^d=\frac{1}{2n}\left[\sum_{r|n} \phi \left(\frac{n}{r}\right)(1-t^{\frac{n}{r}})^{-r} +\frac{ n(1-t^2)^{-(n-1)/2} } {1-t}\right]
 \]
\[
  \sum_{d=0}^\infty \dim H_d(D_n,\chi_2)t^d=\frac{1}{2n}\left[\sum_{r|n} \phi \left(\frac{n}{r}\right)(1-t^{\frac{n}{r}})^{-r} -\frac{ n(1-t^2)^{-(n-1)/2} } {1-t}\right]
 \]
Case (ii) when $n$ is even: \\
Let $\chi_1$,$\chi_2$,$\chi_3$ and $\chi_4$ be the four irreducible characters of degree 1. Let $H_d(D_n,\psi_1),$   $ H_d(D_n,\psi_2), H_d(D_n,\psi_3)$  and
$H_d(D_n,\chi_4)$ be the space of Relative symmetric polynomials with respect to $\psi_1$,$\psi_2$,$\psi_3$ and $\psi_4$. Then the dimensions
$H_d(D_n,\chi_1),$ $H_d(D_n,\chi_2),\allowbreak H_d(D_n,\chi_3)$ and $H_d(D_n,\chi_4)$ are given by
\begin{equation*}
\begin{aligned}
  \dim H_d(D_n,\chi_1)&=\frac{1}{2n}\left\{\sum_{r|n}{r+\frac{d}{n/r}-1 \choose r-1}\phi\left(\frac{n}{r}\right) \right.\\
                       & {}\qquad \left.+\frac{n}{2}\left[{\frac{n}{2}+\frac{d}{2}-1 \choose \frac{d}{2}}+\sum_{l=0}^{ d/2}{\frac{n-2}{2}+l-1 \choose l}(d-2l+1)\right]\right\}
\end{aligned}
\end{equation*}
\begin{equation*}
\begin{aligned}
\dim H_d(D_n,\chi_2)&=\frac{1}{2n}\left\{\sum_{r|n}{r+\frac{d}{n/r}-1 \choose r-1}\phi\left(\frac{n}{r}\right) \right. \\
                     & {}\qquad \left. -\frac{n}{2}\left[{\frac{n}{2}+\frac{d}{2}-1 \choose \frac{d}{2}}+\sum_{l=0}^{d/2}{\frac{n-2}{2}+l-1 \choose l}(d-2l+1)\right]\right\}
\end{aligned}
\end{equation*}
\begin{equation*}
\begin{aligned}
\dim H_d(D_n,\chi_3) &= \frac{1}{2n}\left \{\sum_{r|n} (-1)^r \phi\left(\frac{n}{r}\right){r+\frac{d}{n/r}-1 \choose r-1} \right. \\
                     &{}\qquad+\left.\frac{n}{2}\left [{\frac{n}{2}+\frac{d}{2}-1 \choose \frac{d}{2}} - \sum_{l=0}^{ \lfloor d/2 \rfloor}{\frac{n-2}{2}+l-1 \choose l}(d-2l+1) \right] \right\}
\end{aligned}
\end{equation*}
\begin{equation*}
\begin{aligned}
\dim H_d(D_n,\chi_4) & = \frac{1}{2n}\left \{\sum_{r|n} (-1)^r \phi\left(\frac{n}{r}\right){r+\frac{d}{n/r}-1 \choose r-1} \right. \\
                     & {}\qquad - \left.\frac{n}{2}\left [{\frac{n}{2}+\frac{d}{2}-1 \choose \frac{d}{2}} - \sum_{l=0}^{\lfloor d/2 \rfloor}{\frac{n-2}{2}+l-1 \choose l}(d-2l+1) \right] \right\}
\end{aligned}
\end{equation*}
The generating functions for the above four cases are given by:
\[
  \sum_{d=0}^\infty \dim H_d(D_n,\chi_1)t^d=\frac{1}{2n}\bigg[\sum_{r|n} \phi
    \left(\frac{n}{r}\right)(1-t^{\frac{n}{r}})^{-r} +\frac{n}{2}(1-t^2)^{-(n+2)/2}
    (2+t^2)(1+t)\bigg]
 \]
\[
  \sum_{d=0}^\infty \dim H_d(D_n,\chi_2)t^d=\frac{1}{2n}\left[\sum_{r|n} \phi \left(\frac{n}{r}\right)(1-t^{\frac{n}{r}})^{-r}-\frac{n}{2}(1-t^2)^{-(n+2)/2} (2+t^2)(1+t)\right]
 \]
\begin{equation*}
\begin{aligned}
\sum_{d=0}^\infty & \dim H_d(D_n,\chi_3)t^d \\
                  &{}\qquad =\frac{1}{2n}\left[\sum_{r|n} \phi \left(\frac{n}{r}\right)(-1)^r(1-t^{\frac{n}{r}})^{-r} - \frac{n}{2}(1-t^2)^{-(n+2)/2} (1+t+t^2)\right]
\end{aligned}
 \end{equation*}
\begin{equation*}
\begin{aligned}
\sum_{d=0}^\infty &\dim H_d(D_n,\chi_4)t^d \\
&{}\qquad =\frac{1}{2n}\left[\sum_{r|n} \phi \left(\frac{n}{r}\right)(-1)^r(1-t^{\frac{n}{r}})^{-r} + \frac{n}{2}(1-t^2)^{-(n+2)/2} (1+t+t^2)\right]
\end{aligned}
\end{equation*}
 \end{theorem}

Proof:

Case (i) (when $n$ is odd): \\
By definition:
\[
 \dim H_d(D_n,\chi_1)= \frac{1}{2n}\left[\sum_{k=1}^n \,\mathrm{Tr\,}(\sigma ^k) \psi_1(\sigma ^k) + \sum_{k=1}^n \,\mathrm{Tr\,}(\tau \sigma ^k) \psi_1(\tau \sigma ^k)\right]
\]
(ie)
\[
 \dim H_d(D_n,\chi_1)= \frac{1}{2n}\left[\sum_{k=1}^n \,\mathrm{Tr\,}(\sigma ^k)  + \sum_{k=1}^n \,\mathrm{Tr\,}(\tau \sigma ^k)\right]
\]
When $n$ is odd all the reflections of $D_n$ falls into a single conjugacy class. Hence the above summation becomes
\[
 \dim H_d(D_n,\chi_1)= \frac{1}{2n}\left[n \,\mathrm{Tr\,}(\tau) + \sum_{k=1}^n \,\mathrm{Tr\,}(\sigma ^k) \right]
\]
Now calculation of $\,\mathrm{Tr\,}(\sigma^k)$ is the same as in Theorem 1. It remains to find $\,\mathrm{Tr\,}(\tau)$.
Since $n$ is odd, $\tau$ is the product of $\frac{n-1}{2}$ transpositions and
has one fixed point.
Now $\,\mathrm{Tr\,}(\tau)$ is the count of monomials fixed by $\tau$. We denote the variables by $x_1,x_2,\ldots x_{(n-1)/2},y_1,y_2,\ldots,y_{(n-1)/2},z$.
Without loss of generality, let us assume that $\tau(z)=z$, $\tau(x_i)=y_i$ and $\tau(y_i)=x_i$ for $1 \leq i \leq (n-1)/2$.
Now a monomial of degree $d$ invariant under $\tau$ has to be of the form
\[
 z^{d_0} x_1^{d_1} y_1^{d_1} x_2^{d_2} y_2^{d_2}  x_3^{d_3} y_3^{d_3}\ldots
\]

Number of tuples $(d_0,d_1,\ldots,d_{(n-1)/2})$ such that
\[
 d_0+2(d_1+d_2+\ldots+d_{(n-1)/2})=d
\]
is the total number of ordered partitions of $(d-d_0)/2$ into $(n-1)/2$ parts with all $d_0$ satisfying $d-d_0$ is an even non negative integer.
This is easily verified to be $\sum_{l=0}^{ \lfloor d/2 \rfloor} {\frac{n-1}{2}+l-1 \choose l}$. Hence the formula becomes

\[
 \dim H_d(D_n,\chi_1)= \frac{1}{2n}\left[\sum_{r|n} {r+\frac{d}{n/r}-1 \choose r-1} +n \sum_{l=0}^{\lfloor d/2 \rfloor} {\frac{n-1}{2}+l-1 \choose l}\right]
\]
Using the same arguements as above, we have
\[
 \dim H_d(D_n,\chi_2)= \frac{1}{2n}\left[\sum_{r |n} {r+\frac{d}{n/r}-1 \choose r-1} -n \sum_{l=0}^{ \lfloor d/2 \rfloor} {\frac{n-1}{2}+l-1 \choose l}\right]
\]
case (ii):
By definition
\[
 \dim H_d(D_n,\chi_1)= \frac{1}{2n}\left[\sum_{k=1}^n \,\mathrm{Tr\,}(\sigma ^k) \psi_1(\sigma ^k) + \sum_{k=1}^n \,\mathrm{Tr\,}(\tau \sigma ^k) \psi_1(\tau \sigma ^k)\right]
\]
(ie)
\[
 \dim H_d(D_n,\chi_1)= \frac{1}{2n}\left[\sum_{k=1}^n \,\mathrm{Tr\,}(\sigma ^k)  + \sum_{k=1}^n \,\mathrm{Tr\,}(\tau \sigma ^k)\right]
\]
Now $\,\mathrm{Tr\,}(\sigma^k)$ is the same as in Theorem 1. It remains to find $\,\mathrm{Tr\,}(\tau \sigma^k)$. Since $n$ is even, all the reflections
$\tau \sigma^k$ fall into two conjugacy classes according as  $k$ is even or odd. Hence the formula becomes
\[
 \dim H_d(D_n,\chi_1)= \frac{1}{2n}\left[\sum_{k=1}^n \,\mathrm{Tr\,}(\sigma ^k)  + \frac{n}{2}\,\mathrm{Tr\,}(\tau \sigma)+\frac{n}{2} \,\mathrm{Tr\,}(\tau )\right]
\]
Using the same arguement as we did in case (i) of this theorem, we can find the trace of the reflections in both the
cases (when $n$ is odd or even). Hence the formula becomes

\begin{equation*}
\begin{aligned}
\dim H_d(D_n,\chi_1)&=\frac{1}{2n}\left\{\sum_{r|n}{r+\frac{d}{n/r}-1 \choose r-1} \phi\left(\frac{n}{r}\right) \right. \\
& {}\qquad \left. +\frac{n}{2}\sum_{l=0}^{d/2} \left[{\frac{n-2}{2}+l-1 \choose l}(d-2l+1)+{\frac{n}{2}+l-1 \choose l} \right]     \right\}
\end{aligned}
\end{equation*}
In the same way
\begin{equation*}
\begin{aligned}
\dim H_d(D_n,\chi_2)& =\frac{1}{2n}\left\{\sum_{r|n}{r+\frac{d}{n/r}-1 \choose r-1} \phi\left(\frac{n}{r}\right) \right.\\
&{} \qquad \left. -\frac{n}{2}\sum_{l=0}^{\lfloor d/2 \rfloor}\left[{\frac{n-2}{2}+l-1 \choose l}(d-2l+1)+{\frac{n}{2}+l-1 \choose l} \right] \right\}
\end{aligned}
\end{equation*}

Now again using the definition, we have
\[
 \dim H_d(D_n,\chi_3)= \frac{1}{2n}\left[\sum_{k=1}^n \,\mathrm{Tr\,}(\sigma ^k) \psi_3(\sigma ^k) + \sum_{k=1}^n \,\mathrm{Tr\,}(\tau \sigma ^k) \psi_3(\tau \sigma ^k)\right]
\]
(ie)\[
 \dim H_d(D_n,\chi_3)= \frac{1}{2n}\left[\sum_{k=1}^n (-1)^k) \,\mathrm{Tr\,}(\sigma ^k) + \sum_{k=1}^n (-1)^k \,\mathrm{Tr\,}(\tau \sigma ^k) \right]
\]
Using the same result for $\,\mathrm{Tr\,}(\sigma^k)$ from Theorem 1, we have
\[
 \dim H_d(D_n,\chi_3)= \frac{1}{2n}\left\{ \sum_{r|n} \left[ \left(\sum_{k \in S_r(n)} (-1)^k \right) {r+\frac{d}{n/r}-1 \choose r-1} \right] + \sum_{k=1}^n (-1)^k \,\mathrm{Tr\,}(\tau \sigma ^k) \right\}
\]
Since $n$ is even, all $k$'s in the inner summation are even or odd according as $r$ is even or odd and it sums up to $(-1)^r \phi(\frac{n}{r})$.
Hence the above equation becomes
\[
 \dim H_d(D_n,\chi_3)= \frac{1}{2n}\left\{ \sum_{r|n} \left[ (-1)^r \phi\left(\frac{n}{r}\right){r+\frac{d}{n/r}-1 \choose r-1} \right] + \sum_{k=1}^n (-1)^k \,\mathrm{Tr\,}(\tau \sigma ^k) \right\}
\]
It remains to find $\,\mathrm{Tr\,}(\tau \sigma ^k)$. Using the same arguement as we did in case (i), we can calculate it. Hence the above equation reduces to
\begin{equation*}
\begin{aligned}
\dim H_d(D_n,\chi_3) & = \frac{1}{2n} \left\{\sum_{r|n}(-1)^r \phi \left(\frac{n}{r}\right){r+\frac{d}{n/r}-1 \choose r-1} \right. \\
                     &{}\qquad \left. +\frac{n}{2} \left[{\frac{n}{2}+\frac{d}{2}-1 \choose \frac{d}{2}}-\sum_{l=0}^{d/2}{\frac{n-2}{2}+l-1 \choose l}(d-2l+1)\right] \right\}
\end{aligned}
\end{equation*}
In the same way, we have
\begin{equation*}
\begin{aligned}
 \dim H_d(D_n,\chi_4) &= \frac{1}{2n}\left \{\sum_{r|n} (-1)^r \phi\left(\frac{n}{r}\right){r+\frac{d}{n/r}-1 \choose r-1} \right. \\
                      & \left.-\frac{n}{2}\left [{\frac{n}{2}+\frac{d}{2}-1 \choose l} - \sum_{l=0}^{\lfloor d/2 \rfloor}{\frac{n-2}{2}+l-1 \choose l}(d-2l+1) \right] \right\}
\end{aligned}
\end{equation*}

\textit{To find the generating functions for $\dim H_d(D_n,\chi_1),$ $\dim H_d(D_n,\chi_2)$, $\dim H_d(D_n,\chi_3)$ and $\dim H_d(D_n,\chi_4)$:}

Let $G_1(t)$ be the generating function for $\sum_{r|n} \phi \left(\frac{n}{r}\right){r+ \frac{d}{n/r}-1 \choose r-1}$ which is easily seen to be
$\sum_{r|n} (-1)^r \phi \left(\frac{n}{r}\right)(1-t^{\frac{n}{r}})^{-r}$. Let $G_2(t)$ and $G_3(t)$ be the generating functions corresponding to
${\frac{n}{2}+\frac{d}{2}-1 \choose l}$ and $\sum_{l=0}^{d/2}{\frac{n-2}{2}+l-1 \choose l}(d-2l+1)$ respectively. Now
$G_2(t)$ is very easily verified to be $(1-t^2)^{\frac{n}{2}}$.
Now the generating functions for $\dim(H_d,\chi_1)$ ,$\dim(H_d,\chi_2)$ ,$\dim(H_d,\chi_3)$ and $\dim(H_d,\chi_4)$ are given by:
\[
\sum_{d=0}^{\infty} \dim H_d(D_n,\chi_1)t^d=\frac{1}{2n}\left\{G_1(t)+\frac{n}{2}\left[G_2(t)+G_3(t)\right]\right\}
\]
\[
\sum_{d=0}^{\infty} \dim H_d(D_n,\chi_2)t^d=\frac{1}{2n}\left\{G_1(t)-\frac{n}{2}\left[G_2(t)+G_3(t)\right]\right\}
\]
\[
\sum_{d=0}^{\infty} \dim H_d(D_n,\chi_3)t^d=\frac{1}{2n}\left\{G_1(t)+\frac{n}{2}\left[G_2(t)-G_3(t)\right]\right\}
\]
\[
\sum_{d=0}^{\infty} \dim H_d(D_n,\chi_3)t^d=\frac{1}{2n}\left\{G_1(t)-\frac{n}{2}\left[G_2(t)-G_3(t)\right]\right\}
\]
Now evaluation of $G_3(t)$ given in the following lemma.

\begin{lemma}
For
\[
\sum_{l=0}^{\lfloor d/2 \rfloor}{\frac{n-2}{2}+l-1 \choose l}(d-2l+1)
\]
the generating function is
\[
G_3(t)=(1-t^2)^{-\frac{n+2}{2}}(1+2t+t^2+t^3)
\]
\end{lemma}
Proof of Lemma:

First consider
\[
 \sum_{l=0}^{\lfloor d/2 \rfloor}{\frac{n-2}{2}+l-1 \choose l}(d-2l+1)
\]
Let
\[
 b_d=\sum_{l=0}^{\lfloor d/2 \rfloor}{m+l-1 \choose l}(d-2l+1)
\]
One easily verifies

\[
 b_{2d+1}=b_{2d}+\sum_{l=0}^d {m+1-1 \choose l}
\]
Now again induction gives

\[
 \sum_{l=0}^d {m+1-1 \choose l}={m+d \choose d}
\]
Therefore,

\[
 b_{2d+1}=b_{2d}+ {m+d \choose d}
\]
Let
\[
\sum_{d=0}^{\infty} b_{2d} t^{2d}=G_5(t)
\]
Now

\[
\sum_{t=0}^{\infty}b_{2d+1}t^{2d+1}=t\sum_{t=0}^{\infty} \left[b_{2d} t^{2d}+{m+d \choose d} t^{2d} \right]=tG_5(t)+t(1-t^2)^{-(m+1)}
\]
Hence

\[
    G_4(t)=\sum_{t=0}^{\infty}b_dt^d=\sum_{t\, \mathrm{even}}+\sum_{t,\mathrm{odd}}=G_5(t)+tG_5(t)+t(1-t^2)^{-(m+1)}
\]
To evaluate $G_5(t)$

\begin{equation*}
\begin{aligned}
 G_5(t)&=\sum_{d=0}^{\infty} \sum_{l=0}^d {m+l-1 \choose l} (2d-2l+1)t^{2d} \\
      &=\sum_{d=0}^{\infty} \sum_{l=0}^d {m+l-1 \choose l} (2d+1)t^{2d}-2 \sum_{l=0}^d l {m+l-1 \choose l}t^{2d}
\end{aligned}
\end{equation*}

Now using induction one can show that
\begin{equation*}
\begin{aligned}
 \sum_{l=0}^d l {m+l-1 \choose l}&=m \sum_{l=0}^d \frac{l+m-m}{m} {m+l-1 \choose l} \\
&=m\sum_{l=0}^d \frac{m+l}{m} {m+l-1 \choose l} - m \sum_{l=0}^d{m+l-1 \choose l}
\end{aligned}
\end{equation*}
(ie)
\begin{equation*}
\begin{aligned}
 \sum_{l=0}^d l {m+l-1 \choose l}&=m \sum_{l=0}^d\frac{m+l}{m}\frac{(m+l-1)!}{l! (m-1)!}-m\sum_{l=0}^d{m+l-1 \choose l} \\
&=m\sum_{l=0}^d{m+l \choose l}- m \sum_{l=0}^d{m+l-1 \choose l}
\end{aligned}
\end{equation*}
After simplification,we have
\[
\sum_{l=0}^d l {m+l-1 \choose l}=m{m+d \choose d-1}
\]
Hence,
\begin{equation*}
\begin{aligned}
 G_5(t)&=\sum_{d=0}^{\infty} {m+d \choose d} (2d+1)t^{2d}-2 \sum_{d=0}^{\infty} m {m+d \choose d-1}t^{2d} \\
       &=\sum_{d=0}^{\infty} {m+d \choose d} 2dt^{2d}+\sum_{d=0}^{\infty} {m+d \choose d}t^{2d}-2 \sum_{d=0}^{\infty} m{m+d \choose d-1}t^{2d}
\end{aligned}
\end{equation*}

Now using
\[
\sum_{d=0}^{\infty} {m+d \choose d} 2d t^{2d}=t \frac{d}{dt}\left[(1-t^2)^{-(m+1)}\right]
\]
and
\[
 \sum_{d=0}^{\infty} m{m+d \choose d}t^{2d}=2mt^2(1-t^2)^{-(m+2)}
\]
Simplifying
\[
 G_5(t)=(1-t^2)^{-(m+2)}(2t^2+1)
\]

Finally
\[
 G_4(t)=(1-t^2)^{-(m+2)}(1+2t+2t^2+t^3)
\]
Replacing $m$ by $\frac{n-2}{2}$ in $G_4(t)$, we have
\[
 G_3(t)=(1-t^2)^{-(n+2)/2}(1+2t+2t^2+t^3)
\]

\section{Examples}
\subsection{The dihedral group $D_{10}$}
Consider the group $D_{10}$. It has 4 one-dimensional irreducible representations and 4 two-dimensional irreducible representations. Here we give the generating functions for all the eight irreducible representations.

Two-dimensional representations:
As $0 < h < \frac{n}{2}$, h can assume 1,2,3 and 4

case (i) when $h$ is coprime with $n$ i.e.,  $ h=1,3$.

The generating function is
\[
\frac{1}{5}\left[\frac{1}{(1-t^{10})}-\frac{1}{(1-t^5)^2}-\frac{1}{(1-t^2)^5}+\frac{1}{(1-t)^{10}}\right]
\]

case (i) when $h$ is not coprime with $n$  i.e., $ h=2,4$

The generating function is
\[
\frac{1}{5}\left[-\frac{1}{(1-t^{10})}-\frac{1}{(1-t^5)^2}+\frac{1}{(1-t^2)^5}+\frac{1}{(1-t)^{10}}\right]
\]

One-dimensional representations:

The generating functions for $\chi_1$ and $\chi_2$ are given by
\[
\frac{1}{20}\left\{\left[\frac{1}{(1-t^{10})}+\frac{4}{(1-t^5)^2}+\frac{1}{(1-t^2)^5}+\frac{1}{(1-t)^{10}}\right] \pm 10 \left[\frac{(2+t^2)(1+t)}{(1-t^2)^{6}}\right]\right\}
\]
The generating functions for $\chi_3$ and $\chi_4$ are given by
\[
\frac{1}{20}\left\{\left[-\frac{1}{(1-t^{10})}+\frac{4}{(1-t^5)^2}-\frac{1}{(1-t^2)^5}+\frac{1}{(1-t)^{10}}\right] \mp 10 \left[\frac{(1+t+t^2)}{(1-t^2)^{6}}\right]\right\}
\]
\section{Existence of relative invariants}
The above formul\ae\  give that the dimension of the space of
relative symmetric polynomials of degree 1 is 2 whatever be the character.
In particular relative invariants for $D_n$ exist in degree 1 always.

One can easily  see that the dimension is positive for $D_n$ for any degree $d$
when $n$ a prime
number. It seems all the dimensions are always positive though we are unable to
prove this.


Lyapunov stability of the subgradient method with constant step size

Abstract: We consider the subgradient method with constant step size for minimizing locally Lipschitz semi-algebraic functions. In order to analyze the behavior of its iterates in the vicinity of a local minimum, we introduce a notion of discrete Lyapunov stability and propose necessary and sufficient conditions for stability.

\section{Introduction}
\label{sec:Introduction}
The subgradient method with constant step size for minimizing a locally Lipschitz function $f:\mathbb{R}^n\rightarrow\mathbb{R}$ consists in choosing an initial point $x_0 \in \mathbb{R}^n$ and generating a sequence of iterates according to the update rule $x_{k+1} \in x_k - \alpha \partial f(x_k), ~ \forall k \in \mathbb{N} := \{0,1,2,\hdots\}$, where $\alpha>0$ is the step size and $\partial f$ is the Clarke subdifferential \cite[Chapter 2]{clarke1990}. While this method is often used in practice to solve nonconvex and nonsmooth problems, there is little theoretical understanding of the behavior of its iterates. To the best of our knowledge, the only known results are in the convex setting, as we next describe.

If $f$ is convex and the Euclidean norm of its subgradients is bounded above by a constant $c$, then $\liminf f(x_k) -\inf f \leqslant c^2\alpha/2$ provided that the infimum is reached \cite[Proposition 3.2.3]{bertsekas2015convex}. In order to get within $\epsilon$ accuracy of that bound, $\lfloor d(x_0,X)^2/(\alpha \epsilon) \rfloor$ iterations suffice where $\lfloor \cdot \rfloor$ denotes the floor of a real number and $d(x_0,X)$ is the distance between the initial iterate $x_0$ and the set of minimizers $X \subset \mathbb{R}^n$ \cite[Proposition 3.2.4]{bertsekas2015convex}. If the objective function grows quadratically (at least as fast as $t\in \mathbb{R} \mapsto\beta t^2$ for some $\beta>0$) around the set of minimizers, then the iterates asymptotically get within $c\sqrt{\alpha}/\sqrt{2\beta}$ distance to the set of minimizers if $\alpha \in (0,1/(2\beta)]$ \cite[Proposition 3.2.5]{bertsekas2015convex}. If we relax the boundedness assumption on the subgradients to $\|s\| \leqslant c \sqrt{1+d(x,X)^2}$ for all $(x,s)$ in the graph of $\partial f$, then we get the slightly weaker bound $\liminf f(x_k) -\inf f \leqslant c^2\alpha/2(1+d(x_0,X))$ \cite[Exercise 3.6]{bertsekas2015convex}.

Given the absence of theoretical results in the nonconvex setting, in this note we take a first step by investigating the behavior of the subgradient method in the vicinity of a local minimum of $f$. In order to do so, we propose a notion of stability akin to Lyapunov stability in dynamical systems \cite{liapounoff1907probleme} \cite[Equation (5.6)]{sastry2013nonlinear}. Informally, a point is stable if all of the iterates of the subgradient method remain in any neighborhood of it, provided that the initial point is close enough to it and that the step size is small enough.

Without any further assumptions on $f$, the notions of stability and local optimality are decorrelated. Indeed, the classical counterexample $f(x) = x^2\sin(1/x)$ admits a stable point which is not a local minimum, while the Rockafellar function \cite[p. 5]{rockafellar1981favorable} (see also \cite[Proposition (1.9)]{lebourg1979generic}) admits a local minimum that is not stable. Assuming sharpness \cite[Assumption A 2]{davis2018subgradient} and weak convexity \cite[Assumption A 1]{davis2018subgradient}, it can easily be shown that strict local minima are stable. These assumptions may not hold in practice however \cite[p. 121]{davis2020stochastic} \cite[2.3.6 Proposition]{clarke1990}, and can be difficult to check \cite[Conjecture 8.7]{charisopoulos2021low}. We thus confine our investigation to locally Lipschitz semi-algebraic functions \cite{bochnak2013real,pham2016genericity}. The tame generalization \cite{van1996geometric} is immediate and captures seemingly all applications of interest nowadays.

When $f$ is locally Lipschitz and semi-algebraic, the set of stable points and local minima coincide in two cases. The first is when $f$ is continuously differentiable with a locally Lipschitz gradient. The fact that local minima are stable in this regime can be deduced using arguments from \cite[Proposition 3.3]{absil2005convergence}. The converse is a consequence of one of our results (Theorem \ref{thm:necessary}). The second case is that of continuous-time subgradient dynamics, where instead of iterates one considers absolutely continuous solutions to the differential inclusion $x' \in -\partial f(x)$. This is a simple generalization of \cite[Theorem 3]{absil2006stable} which holds for real analytic functions. Much of modern numerical optimization however falls outside the scope of these two cases, namely that of smooth objective functions and continuous-time dynamics. It is thus important to determine in the discrete case and when $f$ is merely locally Lipschitz and semi-algebraic, whether local minima are stable, and conversely, whether stable points are local minima. In this note, we show that for a point to be stable, it is necessary for it to be a local minimum and it suffices for it to be a strict local minimum.

\section{Characterizing stability}
\label{sec:Characterizing stability}

Let $\|\cdot\|$ be the induced norm of an inner product $\langle \cdot, \cdot\rangle$ on $\mathbb{R}^n$. Let $B(a,r)$ and $\mathring{B}(a,r)$ respectively denote the closed ball and the open ball of center $a\in \mathbb{R}^n$ and radius $r>0$. We next define the notion of discrete Lyupanov stability.

\begin{definition}
\label{def:discrete_lyapunov}
We say that $x^*\in \mathbb{R}^n$ is a stable point of a locally Lipschitz function $f:\mathbb{R}^n\rightarrow\mathbb{R}$ if for all $\epsilon>0$, there exist $\delta>0$ and $\bar{\alpha}>0$ such that for all $\alpha \in (0,\bar{\alpha}]$, the subgradient method with constant step size $\alpha$ initialized in $B(x^*,\delta)$ has all its iterates in $B(x^*,\epsilon)$.
\end{definition}

In order to characterize stability, we rely on the theory of differential inclusions \cite{aubin1984differential}. However, existing results cannot directly be applied, mainly because the locally Lipschitz assumption is too weak. We thus adapt them to our setting via Lemma \ref{lemma:euler_method}. Note that the analysis of the stochastic subgradient method also involves differential inclusions \cite{benaim2005stochastic,bianchi2019constant,davis2020stochastic,bolte2020conservative,bianchi2022convergence}.

\begin{lemma}
\label{lemma:euler_method}
    Let $F:\mathbb{R}^n\rightrightarrows\mathbb{R}^n$ be an upper semicontinuous mapping with nonempty, compact, and convex values. Let $X_0$ be a compact subset of $\mathbb{R}^n$ and let $T>0$. Assume that there exist $\bar{\alpha},r>0$ such that for all $\alpha \in (0,\bar{\alpha}]$ and for all sequence $(x_k)_{k\in\mathbb{N}}$ such that
    \begin{equation}
    \label{eq:Euler}
                x_{k+1} \in x_k + \alpha F(x_k), ~~~ \forall k \in \mathbb{N},~~~ x_0 \in X_0,
    \end{equation}
    we have that $x_0,\hdots,x_{\lfloor T/\alpha \rfloor+1} \in B(0,r)$. For all $\epsilon>0$, there exists $\hat{\alpha}\in (0,\bar{\alpha}]$ such that for all $\alpha \in (0,\hat{\alpha}]$ and for all sequence $(x_k)_{k\in\mathbb{N}}$ satisfying \eqref{eq:Euler}, there exists an absolutely continuous function $x:[0,T]\rightarrow\mathbb{R}^n$ such that
    \begin{equation}
    \label{eq:ivp}
                x'(t) \in F(x(t)),~~~ \text{for a.e.}~
                t \in (0,T), ~~~ x(0) \in X_0,
    \end{equation}
    for which $\|\bar{x}(t) - x(t) \| \leqslant \epsilon$ for all $t \in [0,T]$, where $\bar{x}:[0,T]\rightarrow\mathbb{R}^n$ is defined by $\bar{x}(t) := x_k + (t-\alpha k)/\alpha  (x_{k+1}-x_k)$ for all $t\in [\alpha k , \min\{\alpha(k+1),T\}]$ and $k\in \{0,\hdots,\lfloor T/\alpha\rfloor\}$.
\end{lemma}

\begin{proof}
Let $(\alpha_m)_{m \in \mathbb{N}}$ denote a sequence of positive numbers that converges to zero. Without loss of generality, we may assume that the sequence is bounded above by $\bar{\alpha}$. To each term in the sequence, we attribute a sequence $(x_k^{m})_{k\in\mathbb{N}}$ generated by the Euler method with step size $\alpha_m$ and initialized in $X_0$, that is to say, which satisfies \eqref{eq:Euler} with $\alpha:=\alpha_m$. By assumption, $x_0^{m},\hdots,x_{\lfloor T/\alpha_m \rfloor+1}^{m} \in B(0,r)$. Consider the linear interpolation of those iterates, that is to say, the function $\bar{x}^{m}:[0,T]\rightarrow\mathbb{R}^n$ defined by $\bar{x}^{m}(t) := x_k^{m} + (t-\alpha_m k)(x_{k+1}^{m}-x_k^{m})/\alpha_m$ for all $t\in [\alpha_m k , \min\{\alpha_m(k+1),T\}]$ and $k\in \{0,\hdots,\lfloor T/\alpha_m \rfloor\}$. Since $B(0,r)$ is convex, it holds that $\|\bar{x}^{m}(t)\| \leqslant r $ for all $t\in [0,T]$. In addition, since $F$ is upper semicontinuous and compact valued, by \cite[Proposition 3 p. 42]{aubin1984differential} there exists $r'>0$ such that $F(B(0,r)) \subset B(0,r')$. Observe that $(\bar{x}^{m})'(t) = (x_{k+1}^{m}-x_k^{m})/\alpha_m \in F(x_k^{m})$ for all $t\in (\alpha_m k , \min\{\alpha_m(k+1),T\})$ and $k\in \{0,\hdots,\lfloor T/\alpha_m \rfloor\}$. Hence, we have that $\|(\bar{x}^{m})'(t)\| \leqslant r'$ for almost every $t\in (0,T)$. By successively applying the Arzel\`a-Ascoli and the Banach-Alaoglu theorems (see \cite[Theorem 4 p. 13]{aubin1984differential}), there exists a subsequence (again denoted $(\alpha_{m})_{m\in \mathbb{N}}$) and an absolutely continuous function $x:[0,T]\rightarrow \mathbb{R}^n$ such that $\bar{x}^{m}(\cdot)$ converges uniformly to $x(\cdot)$ and $(\bar{x}^{m})'(\cdot)$ converges weakly to $x'(\cdot)$ in $L^1([0,T],\mathbb{R}^n)$. Furthermore, for all $t\in (\alpha_{m} k , \min\{\alpha_{m}(k+1),T\})$ and $k \in \{0,\hdots,\lfloor T/\alpha_m \rfloor\}$, observe that
\begin{subequations}
\begin{align*}
    (\bar{x}^{m}(t),(\bar{x}^{m})'(t))
    & = \left(x_k^{m} + (t-\alpha_m k)\frac{x_{k+1}^{m}-x_k^{m}}{\alpha_m},\frac{x_{k+1}^{m}-x_k^{m}}{\alpha_m}\right) \\
    & \in \left(\{x_k^{m}\} + (t-\alpha_m k)F(x_k^{m})\right) \times F(x_k^{m})  \\
    & = \{x_k^{m}\} \times F(x_k^{m}) + (t-\alpha_m k)F(x_k^{m}) \times \{0\}  \\
    & \subset \mathrm{graph}(F) + B(0,r'\alpha_m)\times \{0\}.
\end{align*}
\end{subequations}
According to \cite[Convergence Theorem p. 60]{aubin1984differential}, it follows that $x'(t) \in F(x(t))$ for almost every $t\in (0,T)$. The sequence of initial points $(x^{m}(0))_{m\in\mathbb{N}}$ lies in the closed set $X_0$, hence its limit $x(0)$ lies in $X_0$ as well. As a result, $x(\cdot)$ is a solution to the differential inclusion \eqref{eq:ivp}.

To sum up, we have shown that for every sequence $(\alpha_m)_{m \in \mathbb{N}}$ of positive numbers converging to zero, there exists a subsequence for which the corresponding linear interpolations uniformly converge towards a solution of the differential inclusion \eqref{eq:ivp}. The conclusion of the theorem now easily follows. To see why, one can reason by contradiction and assume that there exists $\epsilon>0$ such that for all $\hat{\alpha} \in (0,\bar{\alpha}]$, there exist $\alpha \in (0,\hat{\alpha}]$ and a sequence $(x_k^\alpha)_{k \in \mathbb{N}}$ generated by the Euler method with step size $\alpha$ and initialized in $X_0$ such that, for any solution $x(\cdot)$ to the differential inclusion \eqref{eq:ivp}, it holds that $\|\bar{x}^{\alpha}(t) - x(t) \| > \epsilon$ for some $t \in [0,T]$. We can then generate a sequence $(\alpha_m)_{m \in \mathbb{N}}$ of positive numbers converging to zero such that, for any solution $x(\cdot)$ to the differential inclusion \eqref{eq:ivp}, it holds that $\|\bar{x}^{m}(t) - x(t) \| > \epsilon$ for some $t \in [0,T]$. Since there exists a subsequence $(\alpha_{\varphi(m)})_{m \in \mathbb{N}}$ such that $\bar{x}^{\varphi(m)}$ uniformly converges to a solution to the differential inclusion \eqref{eq:ivp}, we obtain a contradiction.
\end{proof}

We will apply Lemma \ref{lemma:euler_method} to the case where the set-valued mapping $F$ is the opposite of the Clarke subdifferential of a locally Lipschitz function $f:\mathbb{R}^n\rightarrow\mathbb{R}$. Recall that a point $x^* \in \mathbb{R}^n$ is a local minimum (respectively strict local minimum) of a function $f:\mathbb{R}^n\rightarrow\mathbb{R}$ if there exists a positive constant $\epsilon$ such that $f(x^*) \leqslant f(x)$ for all $x \in B(x^*,\epsilon)\setminus \{x^*\}$ (respectively $f(x^*) < f(x)$). Using Lemma \ref{lemma:euler_method}, we obtain the following necessary condition for stability.

\begin{theorem}
\label{thm:necessary}
Stable points of locally Lipschitz semi-algebraic functions are local minima.
\end{theorem}

\begin{proof}
Let $x^* \in \mathbb{R}^n$ denote a stable point of a locally Lipschitz semi-algebraic function $f:\mathbb{R}^n\rightarrow\mathbb{R}$. We reason by contradiction and assume that $x^*$ is not a local minimum of $f$. Given $x\in \mathbb{R}^n$ and $S \subset \mathbb{R}^n$, let $d(x,S) := \inf \{\|x - y\| : y \in S\}$. According to the Kurdyka-\L{}ojasiewicz inequality \cite[Theorem 14]{bolte2007clarke} (see also \cite[Theorem 4.1]{attouch2010proximal}), there exist $r,\rho>0$ and a strictly increasing concave continuous semi-algebraic function $\psi:[0,\rho) \rightarrow [0,\infty)$ that is continuously differentiable on $(0,\rho)$ with $\psi(0) = 0$ such that $d(0,\partial f(x)) \geqslant 1/\psi'(|f(x) - f(x^*)|)$ for all $x \in B(x^*,r)$ whenever $0<|f(x)-f(x^*)|< \rho$. After possibly reducing $r$, the inequality holds for all $x \in B(x^*,r)$ such that $f(x) \neq f(x^*)$.

Let $\epsilon \in (0,r/2)$. By the definition of stability (Definition \ref{def:discrete_lyapunov}), there exist $\delta>0$ and $\bar{\alpha}>0$ such that for all $\alpha \in (0,\bar{\alpha}]$, the subgradient method with constant step size $\alpha$ initialized in $B(x^*,\delta)$ has all its iterates in $B(x^*,\epsilon)$. Since $x^*$ is not a local minimum, we can take an initial iterate $x_0$ in $B(x^*,\delta)$ such that $f(x_0)<f(x^*)$. Let $L>0$ denote a Lipschitz constant of $f$ on $B(x^*,r)$ and let $T := (2\epsilon + \delta)L\psi'(f(x^*) - f(x_0))^2>0$.
Consider the differential inclusion
\begin{equation}
\label{eq:ivp_x_0}
     x'(t) \in - \partial f(x(t)), ~~~ \text{for a.e.}~
     t \in (0,T),~~~ x(0) = x_0.
\end{equation}
Since $f$ is locally Lipschitz, the set-valued function $-\partial f$ is upper semicontinuous \cite[2.1.5 Proposition (d)]{clarke1990} with nonempty, compact and convex values \cite[2.1.2 Proposition (a)]{clarke1990}. By Lemma \ref{lemma:euler_method}, there exists $\hat{\alpha} \in (0,\bar{\alpha}]$ such that, for all $\alpha \in (0,\hat{\alpha}]$  and for all sequence $(x_k^\alpha)_{k\in \mathbb{N}}$ generated by the subgradient method with constant step size $\alpha$ and initialized at $x_0$, there exists a solution $x^{\alpha}(\cdot)$ to the differential inclusion \eqref{eq:ivp_x_0} for which $\|\bar{x}^{\alpha}(t) - x^\alpha(t)\| \leqslant \epsilon/2$ for all $t \in [0,T]$, where $\bar{x}^{\alpha}:[0,T]\rightarrow\mathbb{R}^n$ is the piecewise linear function defined by $\bar{x}^{\alpha}(t) := x_k^{\alpha} + (t-\alpha k)/\alpha  (x_{k+1}^{\alpha}-x_k^{\alpha})$ for all $t\in [\alpha k , \min\{\alpha(k+1),T\}]$ and $k\in \{0,\hdots,\lfloor T/\alpha\rfloor\}$.

Let us fix some $\alpha \in (0,\min\{\hat{\alpha},T/10\}]$ from now on. Consider a sequence $(x_k)_{k\in\mathbb{N}}$ generated by the subgradient method with constant step size $\alpha$ and initialized at $x_0$. Consider also the linear interpolation $\bar{x}(\cdot)$ of those iterates up to iteration $K+1$ where $K := \lfloor T/\alpha \rfloor$, as well as a solution $x(\cdot)$ to the differential inclusion \eqref{eq:ivp_x_0} such that $\|\bar{x}(t)-x(t)\| \leqslant \epsilon/2$ for all $t\in [0,T]$. Since $f$ is semi-algebraic, by \cite[Lemma 5.2]{davis2020stochastic} (see also \cite{drusvyatskiy2015curves}) it holds that
\begin{equation}
\label{eq:lyapunov}
    f(x(t)) - f(x(0)) = - \int_0^t d(0,\partial f(x(\tau)))^2 d\tau, ~~~ \forall t \in [0,T].
\end{equation}
As a result, $f(x(t)) \leqslant f(x(0)) = f(x_0)$ for all $t \in [0,T]$. Also, $\|x(t) - x^*\| \leqslant \|x(t) - \bar{x}(t)\| + \|\bar{x}(t) - x^*\| \leqslant \epsilon/2 + \epsilon = 3\epsilon/2 \leqslant r$, where the inequality $\|\bar{x}(t) - x^*\| \leqslant \epsilon$ follows from the convexity of $B(x^*,\epsilon)$. Hence $0<f(x^*) - f(x_0) \leqslant f(x^*) - f(x(t))$ and $d(0,\partial f(x(t))) \geqslant  1/\psi'(f(x^*)-f(x(t))) \geqslant 1/\psi'(f(x^*)-f(x_0))$ for all $t\in[0,T]$ by concavity of $\psi$. Together with \eqref{eq:lyapunov}, it follows that $f(x(K\alpha)) - f(x_0) \leqslant -K\alpha M^2$ where $K := \lfloor T/\alpha \rfloor$ and $M:= 1/\psi'(f(x^*)-f(x_0))$. Recall that $L$ is a Lipschitz constant of $f$ on $B(x^*,r)$, so that we have $|f(x(K\alpha))-f(x_0)| \leqslant L \|x(K\alpha)-x_0\|$. We thus obtain the lower bound $\|x(K\alpha)-x_0\| \geqslant K\alpha M^2/L = \lfloor T/\alpha \rfloor \alpha M^2/L \geqslant (T-\alpha)M^2/L \geqslant (T-T/10)M^2/L = 9/10( 2\epsilon + \delta) $ (recall that $T = (2\epsilon + \delta)L/M^2$). Hence $\|x(K\alpha)-x^*\| \geqslant \|x(K\alpha)-x_0\| - \|x_0-x^*\| \geqslant 9/10(2\epsilon + \delta) - \delta = 9 \epsilon/5 - \delta/10 \geqslant 9 \epsilon/5 - \epsilon/10 = 17\epsilon/10$ and finally $\|x_K-x^*\| \geqslant \|x(K\alpha)-x^*\| -\|x_K-x(K\alpha)\| \geqslant 17\epsilon/10 - \epsilon/2 = 6\epsilon/5>\epsilon$. However, since $0<\alpha \leqslant \hat{\alpha} \leqslant \bar{\alpha}$ and $x_0 \in B(x^*,\delta)$, by stability of $x^*$ we have $x_K \in B(x^*,\epsilon)$. We have reached a contradiction.
\end{proof}

By appealing to Lemma \ref{lemma:euler_method} again, we obtain the following sufficient condition for stability.

\begin{theorem}
\label{thm:sufficient_strict}
Strict local minima of locally Lipschitz semi-algebraic functions are stable.
\end{theorem}
\begin{proof}
Let $x^*$ denote a strict local minimum of locally Lipschitz semi-algebraic function $f:\mathbb{R}^n\rightarrow\mathbb{R}$. Since $x^*$ is a strict local minimum, by the \L{}ojasiewicz inequality \cite[Theorem 0]{kurdyka1998gradients} (see also \cite[\S 2]{lojasiewicz1958}, \cite[\S 17]{lojasiewicz1959}, \cite[(2.1)]{hormander1958division}) and the Kurdyka-\L{}ojasiewicz inequality \cite[Theorem 14]{bolte2007clarke}, there exist $r, \rho>0$ and strictly increasing continuous semi-algebraic functions $\sigma,\psi:[0,\rho)\rightarrow[0,\infty)$ such that $f(x)-f(x^*) \geqslant  \sigma(\|x-x^*\|)$ and $d(0,\partial f(x)) \geqslant 1/\psi'(f(x) - f(x^*))$ for all $x \in B(x^*,r)$ whenever $0<f(x)-f(x^*)< \rho$. In addition, $\sigma$ and $\psi$ are continuously differentiable on $(0,\rho)$ with $\sigma(0) = \psi(0) = 0$ and $\psi$ is concave. After possibly reducing $r$, the two inequalities above hold for all $x \in B(x^*,r)\setminus \{x^*\}$. In order to prove stability, it suffices to prove the statement in Definition \ref{def:discrete_lyapunov} for all $\epsilon>0$ sufficiently small. We may thus restrict ourselves to the case where $0<\epsilon < r$. Given such a fixed $\epsilon$, we next describe a possible choice for $\delta$.

Given $\Delta \geqslant f(x^*)$, let $L_{x^*}(f,\Delta)$ denote the connected component of the sublevel set $L(f,\Delta) := \{ x \in \mathbb{R}^n : f(x) \leqslant \Delta \}$ containing $x^*$. By taking $\Delta_\epsilon:= f(x^*) + \sigma(\epsilon/2)$, we find that $L_{x^*}(f,\Delta_\epsilon)$ is contained in $B(x^*,\epsilon/2)$. Indeed, one can reason by contradiction and assume that there exists $x \in L_{x^*}(f,\Delta_\epsilon) \setminus B(x^*,\epsilon/2)$. Then $x\notin B(x^*,r)$, otherwise $\sigma(\|x-x^*\|) \leqslant f(x)-f(x^*) \leqslant \sigma(\epsilon/2)$ and thus $\|x-x^*\| \leqslant \epsilon/2$. Therefore $L_{x^*}(f,\Delta_\epsilon)$ is the disjoint union of $L_{x^*}(f,\Delta_\epsilon) \cap \mathring{B}(x^*,r)$ and $L_{x^*}(f,\Delta_\epsilon) \setminus B(x^*,r)$, both of which are nonempty and open in $L_{x^*}(f,\Delta_\epsilon)$. This contradicts the connectedness of $L_{x^*}(f,\Delta_\epsilon)$, which yields that $L_{x^*}(f,\Delta_\epsilon) \subset B(x^*,\epsilon/2)$. By continuity of $f$ we may choose $\delta>0$ such that

\begin{equation}
\label{eq:inclusions}
    B(x^*,\delta) ~ \subset ~ L_{x^*}(f,\Delta_\epsilon) ~ \subset ~ B(x^*,\epsilon/2).
\end{equation}

We next describe a possible choice for $\bar{\alpha}$. Let $L>\sup\{\|s\|:s\in \partial f(x), x\in B(x^*,\epsilon)\}$ be a Lipschitz constant of $f$ on $B(x^*,\epsilon)$ and let $T := \epsilon/(3L)$, where the supremum is finite due to \cite[Proposition 3 p. 42]{aubin1984differential}. Consider the differential inclusion
\begin{equation}
\label{eq:ivp:levelset}
     x'(t) \in - \partial f(x(t)), ~~~ \text{for a.e.}~
     t \in (0,T), ~~~ x(0) \in L_{x^*}(f,\Delta_\epsilon).
\end{equation}
Since $f$ is continuous, the set of initial values $L_{x^*}(f,\Delta_\epsilon)$ is closed. By virtue of the second inclusion in \eqref{eq:inclusions}, $L_{x^*}(f,\Delta_\epsilon)$ is in fact a compact set. Let $\alpha \in (0,T/2]$ and consider a sequence $(x_k)_{k\in\mathbb{N}}$ generated by the subgradient method with constant step size $\alpha$ and initialized in $L_{x^*}(f,\Delta_\epsilon)$. According to the second inclusion in \eqref{eq:inclusions}, the initial iterate $x_0$ lies in $B(x^*,\epsilon/2)$. Hence $\|x_1-x^*\| = \|x_0 - \alpha s_0 - x^*\| \leqslant \|x_0-x^*\| + \|\alpha s_0\| \leqslant \epsilon/2 + L \alpha$ for some $s_0 \in \partial f(x_0)$. Repeating this process until iteration $K+1$ where $K:=\lfloor T/\alpha\rfloor$, we find that $\|x_k-x^*\| \leqslant \epsilon/2 + kL\alpha \leqslant \epsilon/2 + (K+1) L\alpha \leqslant \epsilon/2 + ( T/\alpha+1) L\alpha = \epsilon/2 + (\epsilon/(3L\alpha)+1) L\alpha = 5\epsilon/6+L\alpha \leqslant 5\epsilon/6+LT/2 = 5\epsilon/6+L\epsilon/(3L)/2 = \epsilon$. In other words, the iterates $x_0,\hdots,x_{K+1}$ lie in $B(x^*,\epsilon)$. Let $\epsilon' := \min\{\epsilon L,\sigma(\epsilon/2),\xi^2 T\}/(2L)>0$ where $\xi:= 1/\psi'(\sigma(\epsilon/2)/2)>0$. All of the conditions of Lemma \ref{lemma:euler_method} are met, hence there exists $\bar{\alpha} \in (0,T/2]$ such that, for all $\alpha \in (0,\bar{\alpha}]$ and for all sequence $(x_k)_{k\in\mathbb{N}}$ generated by the subgradient method with constant step size $\alpha$ and initialized in $L_{x^*}(f,\Delta_\epsilon)$, there exists a solution to the differential inclusion \eqref{eq:ivp:levelset} for which $\|\bar{x}(t) - x(t)\| \leqslant \epsilon'$ for all $t\in [0,T]$ where $\bar{x}:[0,T]\rightarrow\mathbb{R}^n$ is the piecewise linear function defined by $\bar{x}(t) := x_k + (t-\alpha k)/\alpha  (x_{k+1}-x_k)$ for all $t\in [\alpha k , \min\{\alpha(k+1),T\}]$ and $k\in \{0,\hdots,\lfloor T/\alpha\rfloor\}$. In particular, it holds that
\begin{equation}
\label{eq:uniform_bound_iterates}
    \|x_k - x(k\alpha)\| \leqslant \epsilon',~~~ k = 0,\hdots,\lfloor T/\alpha \rfloor.
\end{equation}

Having chosen $\delta$ and $\bar{\alpha}$, let us fix some $\alpha \in (0,\bar{\alpha}]$ from now on. Consider a sequence $(x_k)_{k\in\mathbb{N}}$ generated by the subgradient method with constant step size $\alpha$ and initialized in $B(x^*,\delta)$. Our goal is to show that all the iterates lie in $B(x^*,\epsilon)$. According to the first inclusion in \eqref{eq:inclusions}, the initial iterate $x_0$ lies in $L_{x^*}(f,\Delta_\epsilon)$. A previous argument shows that the iterates $x_0,\hdots,x_K$ lie in $B(x^*,\epsilon)$ where $K:=\lfloor T/\alpha \rfloor$. In order to show that the ensuing iterates also lie in $B(x^*,\epsilon)$, we will show that $x_K \in L_{x^*}(f,\Delta_\epsilon)$. The same argument used previously then yields that $x_{K+1},\hdots,x_{2K} \in B(x^*,\epsilon)$. Since $K = \lfloor T/\alpha \rfloor \geqslant \lfloor T/\bar{\alpha}  \rfloor \geqslant 2$, we may conclude by induction that all the iterates belong to $B(x^*,\epsilon)$. This is illustrated in Figure \ref{fig:inclusions}.

\begin{figure}[ht]
\centering
    \begin{tikzpicture}[scale=3
    \draw[blue,opacity=0.2] (4.4,0.4) -- (5.5,.508);
    \fill[gray!50] (5.5,.9) circle (38pt);
    \draw[line width=.2mm] (5.5,.9) circle (38pt);
    \draw[line width=.2mm, name path=A] plot [smooth,tension=0.689] coordinates {(4.4,0.4) (5.1,0.1) (5.8,0.48) (6.4967,0.5682)};
    \draw[line width=.2mm, name path=B] plot [smooth,tension=0.689] coordinates {(6.4967,0.5682)(6.5829,1.0505)(6.0727,1.4115) (5.3159,1.4086) (4.6,1) (4.4,0.4)};
    \tikzfillbetween[of=A and B]{blue, opacity=0.2};
    \fill (4.87,0.79)  node {\normalsize $B(x^*,\delta)$};
    \fill (5.9,1.57)  node {\normalsize $L_{x^*}(f,\Delta_\epsilon)$};
    \draw[line width=.2mm] (5.5,.9) circle (10pt);
    \fill (4.6,2.2)  node {\normalsize $B(x^*,\epsilon/2)$};
    \filldraw (5.5,.9) circle (.2pt);
    \fill (5.61,.92)  node {\normalsize $x^*$};
    \draw[magenta,line width=.3mm] plot [smooth, tension=0.689] coordinates {(6.55,.95) (6.4,.85) (6.2918,.639)};
    \draw[magenta,line width=.3mm] plot [smooth, tension=0.689] coordinates {(6.3,.64) (6.1,.69) (5.85,.7)  (5.6,.6) (5.4,.64)};
 \draw[dashed,line width=.2mm] plot [smooth, tension=0.689] coordinates {(6.6,.8) (6.49,.69) (6.42,.44)};
    \draw[dashed,line width=.2mm] plot [smooth, tension=0.689] coordinates {(6.42,.44) (6.1,.51) (5.85,.52)  (5.6,.42) (5.4,.44)};
    \draw[dashed,line width=.2mm] plot [smooth, tension=0.689] coordinates {(6.5,1.1) (6.32,1) (6.2,.84)};
    \draw[dashed,line width=.2mm] plot [smooth, tension=0.689] coordinates {(6.2,.84) (6.1,.87) (5.85,.88)  (5.6,.78) (5.4,.82)};
    \filldraw[yellow] (6.5,.87) circle (.5pt);
    \filldraw[yellow] (6.33,.84) circle (.5pt);
    \filldraw[yellow] (6.37,.667) circle (.5pt);
    \filldraw[yellow] (6.38,.5) circle (.5pt);
    \filldraw[yellow] (6.23,.52) circle (.5pt);
    \filldraw[yellow] (6.06,.62) circle (.5pt);
    \filldraw[yellow] (5.88,.74) circle (.5pt);
    \filldraw[yellow] (5.65,.68) circle (.5pt);
    \filldraw[yellow] (5.5,.51) circle (.5pt);
    \fill (7.03,.803)  node {\normalsize $x_K$};
    \draw[->] (6.9,.82) -- (6.54,.864);
    \fill (5.0,.385)  node {\normalsize $x_{2K}$};
    \draw[->] (5.15,.405) -- (5.45,.493);
    \end{tikzpicture}
\caption{Induction step}
\label{fig:inclusions}
\end{figure}

For the remainder of the proof, we seek to show that $x_K \in L_{x^*}(f,\Delta_\epsilon)$. In order to do so, we prove that  $B(x(K\alpha),\epsilon')$ is a connected subset of $L(f,\Delta_\epsilon)$ that has nonempty intersection with $L_{x^*}(f,\Delta_\epsilon)$. Since $L_{x^*}(f,\Delta_\epsilon)$ is a connected component of $L(f,\Delta_\epsilon)$, by maximality and \eqref{eq:uniform_bound_iterates} we then have $x_K \in B(x(K\alpha),\epsilon') \subset L_{x^*}(f,\Delta_\epsilon)$.

We begin by showing that $x(K\alpha) \in B(x(K\alpha),\epsilon') \cap L_{x^*}(f,\Delta_\epsilon)$. Since $f$ is semi-algebraic, by \cite[Lemma 5.2]{davis2020stochastic} (see also \cite{drusvyatskiy2015curves}) it holds that
\begin{equation}
\label{eq:dist}
    f(x(t)) - f(x(0)) = - \int_0^t d(0,\partial f(x(\tau)))^2 d\tau, ~~~ \forall t \in [0,T].
\end{equation}
As a result, $f(x(t)) \leqslant f(x(0)) \leqslant \Delta_\epsilon$ for all $t \in [0,T]$. We thus have that $x(0) \in L_{x^*}(f,\Delta_\epsilon)\cap x([0,T])$, both of which are connected subsets of the sublevel set $L(f,\Delta_\epsilon)$. By maximality of $L_{x^*}(f,\Delta_\epsilon)$, it follows that
$x(K\alpha)\in x([0,T]) \subset L_{x^*}(f,\Delta_\epsilon)$.

We next show that $B(x(K\alpha),\epsilon') \subset L(f,\Delta_\epsilon)$. For all $\tilde{x} \in B(x(K\alpha),\epsilon')$, we have
\begin{subequations}
    \begin{align}
        	f(\tilde{x}) - f(x^*) & = f(\tilde{x}) - f(x(K\alpha)) + f(x(K\alpha)) - f(x^*) \label{level_a} \\
	        & \leqslant L\|\tilde{x} - x(K\alpha)\| + \max\{\sigma(\epsilon/2)/2,\sigma(\epsilon/2) - \xi^2 T/2\} \label{level_b} \\
	        & \leqslant L\epsilon' + \sigma(\epsilon/2) - \min\{\sigma(\epsilon/2)/2,\xi^2 T/2\} \label{level_c} \\
            & \leqslant \sigma(\epsilon/2). \label{level_d}
    \end{align}
\end{subequations}
Indeed, $\tilde{x}$ and $x(K\alpha)$ belong to $B(x^*,\epsilon)$ so we may invoke the Lipschitz constant $L$ of $f$ on $B(x^*,\epsilon)$ in order to bound the first term in \eqref{level_a}. Recall from the previous paragraph that $x(K\alpha)\in L_{x^*}(f,\Delta_\epsilon) \subset B(x^*,\epsilon/2)$ and, since $\epsilon' \leqslant \epsilon/2$, we have $\tilde{x} \in B(x(K\alpha),\epsilon') \subset B(x^*,\epsilon)$. As for the second term in \eqref{level_a}, if it is greater than or equal to $\sigma(\epsilon/2)/2$, then for all $t \in [0,K\alpha]$, we have $\sigma(\epsilon/2)/2 \leqslant  f(x(K\alpha)) - f(x^*) \leqslant  f(x(t)) - f(x^*)$ and thus $d(0,\partial f(x(t))) \geqslant 1/\psi'(f(x(t)) - f(x^*)) \geqslant 1/\psi'(\sigma(\epsilon/2)/2) = \xi$. By \eqref{eq:dist}, it follows that $f(x(K\alpha)) - f(x^*) \leqslant f(x(0)) - f(x^*) - \int_{0}^{K\alpha} \xi^2 d\tau \leqslant f(x(0)) - f(x^*) - K\alpha \xi^2 \leqslant \sigma(\epsilon/2) - \xi^2 T/2$. The last inequality is due to the fact that $x(0) \in L_{x^*}(f,\Delta_\epsilon)$ and $K\alpha = \lfloor T/\alpha\rfloor \alpha \geqslant T-\alpha \geqslant T-\bar{\alpha} \geqslant T/2$. In \eqref{level_c}, we use the fact that $\tilde{x} \in B(x(K\alpha),\epsilon')$ and rewrite the maximum into a minimum. Finally, \eqref{level_d} holds because $\epsilon' \leqslant \min\{\sigma(\epsilon/2),\xi^2 T\}/(2L)$.
\end{proof}

Observe that non-strict local minima need not be stable. While the strict local minimum in Figure \ref{fig:stable} is stable by Theorem \ref{thm:sufficient_strict}, the non-strict local minimum in Figure \ref{fig:unstable} is unstable. In the former, both continuous and discrete subgradient dynamics are stable, with the continuous trajectory converging to the local minimum, while the discrete trajectory hovers around it. In the latter, continuous and discrete trajectories become decoupled as they approach the local minimum; the continuous dynamics are stable but the discrete dynamics are not.

We conclude this note by proving that the local minimum in Figure \ref{fig:unstable} is unstable. We show that there exists $\epsilon>0$ such that for all but finitely many constant step sizes $\alpha>0$ and for almost every initial point in $B(x^*,\epsilon)$, at least one of the iterates of the subgradient method does not belong to $B(x^*,\epsilon)$. Let $\epsilon\in (0,1/2]$ and consider the set $S:=\{(x_1,x_2) \in \mathbb{R}^2:x_1x_2=0\}$. By the cell decomposition theorem \cite[(2.11) p. 52]{van1998tame} and \cite[Claim 3]{bolte2020mathematical}, there exist $\alpha_1,\hdots,\alpha_m>0$ such that for all constant step sizes $\alpha \in (0,\infty) \setminus \{\alpha_1,\hdots,\alpha_m\}$, there exists a null subset $I_\alpha \subset \mathbb{R}^2$ such that, for every initial point $(x_1^0,x_2^0) \in \mathbb{R}^2 \setminus I_\alpha$, none of the iterates $(x_1^k,x_2^k)_{k\in \mathbb{N}}$ of the subgradient method belong to the semi-algebraic null set $S$. In this case, the update rule of the subgradient method is given for all $k\in \mathbb{N}$ by
\begin{subequations}
    \begin{align*}
        x_1^{k+1} & = x_1^k - \frac{3}{2} \alpha |x_1^k|^{1/2}|x_2^k|^{3/2} \mathrm{sign}(x_1^k), \\[1mm]
        x_2^{k+1} & = x_2^k - \frac{3}{2} \alpha |x_1^k|^{3/2}|x_2^k|^{1/2} \mathrm{sign}(x_2^k),
    \end{align*}
\end{subequations}
where $\mathrm{sign}(x):=-1$ if $x<0$ and $\mathrm{sign}(x):=1$ if $x>0$. Assume that $(x_1^k,x_2^k) \in B((1,0),\epsilon)$ for all $k\in \mathbb{N}$. Since $\epsilon\leqslant 1/2$, we have $x_1^k \geqslant 1/2$. If $0<|x_2^k|\leqslant \alpha^2/32$ for some $k\in \mathbb{N}$, then $|x_2^{k+1}| = |x_2^k - 3\alpha/2 |x_1^k|^{3/2}|x_2^k|^{1/2} \mathrm{sign}(x_2^k)| \geqslant 3\alpha/2 |x_1^k|^{3/2}|x_2^k|^{1/2} - |x_2^k| \geqslant (3 \alpha /\sqrt{32|x_2^k|} - 1 )|x_2^k| \geqslant 2|x_2^k|$. As a result, $x_2^k$ does not converge to zero. This yields the following contradiction:
\begin{equation*}
    \frac{1}{2} \leqslant x_1^{k+1} = x_1^0 - \frac{3\alpha}{2} \sum_{i=0}^{k} |x_1^i|^{1/2}|x_2^i|^{3/2} \leqslant x_1^0 - \frac{3\alpha}{2\sqrt{2}} \sum_{i=0}^{k} |x_2^i|^{3/2} \rightarrow -\infty.
\end{equation*}

\begin{figure}[ht]
\centering
\begin{subfigure}{.49\textwidth
  \centering
  \includegraphics[width=1\textwidth]{stable_point.jpg}
  \caption{Stable local minimum.}
  \label{fig:stable}
\end{subfigure}
\begin{subfigure}{.49\textwidth
  \centering
  \includegraphics[width=1\textwidth]{unstable_point.jpg}
  \caption{Unstable local minimum.}
  \label{fig:unstable}
\end{subfigure}
\caption{Continuous and discrete subgradient trajectories in magenta and yellow respectively.}
\end{figure}

\noindent\textbf{Acknowledgements} We thank Assen Dontchev for fruitful discussions, as well as Salar Fattahi, Richard Zhang, the reviewers, and the editors for their valuable feedback.


Delta-epsilon functions and uniform continuity on metric spaces

Abstract: Under certain general conditions, an explicit formula to compute the greatest delta-epsilon function of a continuous function is given. From this formula, a new way to analyze the uniform continuity of a continuous function is given. Several examples illustrating the theory are discussed.

\section{Introduction}\label{epsilon}

Directly or indirectly most results in mathematical analysis use the concept of continuity in order to extend a property of a function $f$ that is satisfied at a point $p$ to a property satisfied in a neighborhood of $p$. A well known example that illustrates that fact is the Inverse function theorem, which we recall here:
\begin{itemize}
\item[] Roughly speaking, the Inverse function theorem states that a continuously differentiable mapping $f:\mathbb{R}^n\rightarrow \mathbb{R}^n$ is invertible on a certain open ball $B(p,\delta)$ where the linear transformation $f'(p)$ is invertible.
\end{itemize}

In this example, the invertibility of $f'$ at $p$ is extended to an open ball via the continuity of the mapping $x\rightarrow f'(x)$ at $p$. Now, we notice that in the statement of the Inverse function theorem, nothing is said about the size of the ball where the function $f$ is invertible.
However, it is not difficult to check, see for instance \cite{Rudin}, that the radius of the open ball depends on the norm of the linear transformation $[f'(p)]^{-1}$ and on the positive number delta appearing in the definition of continuity of the function $x\rightarrow f'(x)$ at the point $p$. More exactly, for $2\lambda||[f'(p)]^{-1}||=1$, then $\delta$ is such that
$$
\text{If,}\hspace{0.5cm}||x-p||<\delta,\hspace{0.5cm}\text{then},\hspace{0.5cm}||f'(x)-f'(p)||<\lambda.
$$
So, inspired by the previous discussion, we would like to deal with the following questions:
\begin{enumerate}
\item[1.]\label{Otrica} Let $X,Y$ be metric spaces, $p\in X$ and $f:X\to Y$ a continuous function at $p$, and let $\epsilon>0$ be fixed, which is the greatest positive $\delta(p,\epsilon)$ such that the epsilon-delta definition of continuity is satisfied? Is there a formula to compute it?
\end{enumerate}

The previous questions has been solved indirectly in \cite{Hernandez} under simple assumptions on the function $f$. In fact, considering
\begin{equation}\label{efe}
f:[b,\infty)\rightarrow [f(b),\infty)\hspace{0.4cm}\text{an increasing bijective function,}
\end{equation}
$p\in[b,\infty)$, $\epsilon>0$ fixed, $p_0=f^{-1}(f(b)+\epsilon)$, $\delta_1(p,\epsilon)=p-f^{-1}(f(p)-\epsilon)$, and $\delta_2(p,\epsilon)=f^{-1}(f(p)+\epsilon)-p$, then the positive number
\begin{equation}\label{deltinha}
\delta(p,\epsilon)=
\begin{cases}
\delta_2(p,\epsilon) & b\leq p<p_0\\
\min\{\delta_1(p,\epsilon),\delta_2(p,\epsilon)\} & p_0\leq p
\end{cases}
\end{equation}
satisfies the definition of continuity of $f$ at the point $p$. More precisely
\begin{equation}\label{conf}
\text{If,}\hspace{0.3cm}x\in[b,\infty)\hspace{0.2cm}\text{and}\hspace{0.2cm} |x-p|<\delta(p,\epsilon),\hspace{0.3cm}\text{then}\hspace{0.3cm}|f(x)-f(p)|<\epsilon.
\end{equation}In addition, $\delta(p,\epsilon)$ is the maximum positive number satisfying the previous condition. One of the aims of this paper is to generalize the formula (\ref{deltinha}) to the case of functions defined on metric spaces.\\

Now, it is also shown in \cite{Hernandez}, that the function $p\in[b,\infty)\rightarrow\delta(p,\epsilon)$ in (\ref{deltinha}) provides a way to study the uniform continuity of increasing bijective functions defined on unbounded intervals. Indeed, it is proven in \cite{Hernandez} that an increasing bijective function $
f:[b,\infty)\rightarrow [f(b),\infty)$ is not uniformly continuous on $[b,\infty)$,
if and only if,
there exists $\epsilon_0>0$, such that
$$
\displaystyle{\inf_{x\in[b,\infty)}}\delta(x,\epsilon_0)=0.
$$
\\
Thus, other natural questions we are interested in are the followings:
\begin{enumerate}
\item[2.]\label{Otra} Is it possible to study the uniform continuity of a continuous function $f:X\rightarrow Y$ in terms of the function $p\in X\rightarrow\delta(p,\epsilon)$? Are there other mathematical problems where the function $p\in X\rightarrow\delta(p,\epsilon)$ is useful?
\end{enumerate}

Finally, it is important to point out that the question 1 and 2 are related to the concept of modulus of continuity
which has been extensively used in approximation theory,
see for instace \cite{GSG}, \cite{AP} and the references therein.\\

This manuscript will be divided as follows, in the section \ref{reta}, we deal with the question \ref{Otrica}, more exactly, for continuous functions defined on certain metric spaces, an explicit formula to compute the greatest positive number $\delta(p,\epsilon)$ is given, see theorem \ref{Delta} and its corollaries. On the other hand, in the section \ref{uniform}, the question \ref{Otra} is discussed. Specifically, the theorems 2.1 and 2.2 proved in \cite{Hernandez} are generalized, see theorems \ref{intuitive} and \ref{beleza}. Additionally, some examples are discussed in the section \ref{Four}.

\section{A formula to compute delta-epsilon numbers}\label{reta}

In this section, we give an explicit formula to compute delta-epsilon numbers of continuous functions.
\begin{Definition}\label{definition}
Let $X,Y$ be metric spaces, $f:X\rightarrow Y$ a continuous function at $p\in X$, and $\epsilon>0$. A positive number $\delta$ is said to be a \textbf{delta-epsilon number} for $f$ at $p$, if $\delta$ satisfies the $\epsilon$-$\delta$ definition of continuity of $f$ at the point $p$. In other words, $\delta$ is such that
\begin{equation}\label{def}
\text{if}\hspace{0.2cm} x\in X\hspace{0.2cm}\text{and}\hspace{0.2cm}d_X(x,p)<\delta, \hspace{0.4cm}\text{then}\hspace{0.4cm}d_Y(f(x),f(p))<\epsilon.
\end{equation}
\end{Definition}
The following theorem provides a theoretical formula to compute the greatest delta-epsilon number for a wide class of functions. Namely,
\begin{Theorem}\label{Delta}Let $f:X\rightarrow Y$ be a continuous function on $X$, $p\in X$ and $\epsilon>0$, then we have:
\begin{enumerate}
\item\label{Item1} If $f^{-1}(S[f(p),\epsilon])\neq\emptyset$, then the quantity
\begin{equation}\label{Formula1}
\delta(p,\epsilon)=\text{dist}(p,f^{-1}(S[f(p),\epsilon])),
\end{equation}
is well defined and represents a positive number. Here, $S[f(p),\epsilon]$ denotes the sphere with center at $f(p)$ and radius $\epsilon$, thats is to say, $S[f(p),\epsilon]=\{y\in Y|d_Y(f(p),y)=\epsilon\}$.
\item\label{Item2}Furthermore, if the open ball $B(p,\delta(p,\epsilon))$ is path-connected then the number $\delta(p,\epsilon)$ is a delta-epsilon number for $f$ at $p$. More exactly, for every $x\in X$ such that, $d_X(x,p)<\delta(p,\epsilon)$, then $d_Y(f(x),f(p))<\epsilon$.
\item\label{Item3} $\delta(p,\epsilon)$ is the greatest delta-epsilon number at $p$
\item\label{Item4} Finally, if we define the set $D_{p,\epsilon}$ as:
\begin{equation}\label{D}
D_{p,\epsilon}=\{\beta\in\mathbb{R}^+|(\forall x\in X)(d_X(x,p)<\beta\Rightarrow d_Y(f(x),f(p))<\epsilon)\},
\end{equation}
then, $\delta(p,\epsilon)=\max D_{p,\epsilon}$ and of course $D_{p,\epsilon}=(0,\delta(p,\epsilon)]$.
\end{enumerate}
\end{Theorem}
\begin{Proof} The proof of this theorem proceed as follows:
\begin{enumerate}
\item We first observe that since $f^{-1}(S[f(p),\epsilon])$ is a nonempty set, then the number
\begin{equation}\label{Formula2}
\delta(p,\epsilon)=\inf\{\text{ }d_X(x,p)\text{ }| x\in X,\text{ }d_Y(f(x),f(p))=\epsilon\text{ }\},
\end{equation}
is well defined. Now, if $\delta(p,\epsilon)=0$, there exists a sequence $x_n\in X$ so that $\lim d_X(x_n,p)=0$ with $\lim d_Y(f(x_n),f(p))=\epsilon$. Being $f$ continuous at $p$, we can conclude that $\lim d_Y(f(x_n),f(p))=0$, since $\epsilon>0$, we have a contradiction. Thus, $\delta(p,\epsilon)$ have to be a positive number
\item Let $x\in X$, we want to prove that,
\begin{equation}
\text{if},\hspace{0.3cm}d_X(x,p)<\delta(p,\epsilon)\hspace{0.3cm}\text{then}\hspace{0.3cm}d_Y(f(x),f(p))<\epsilon.
\end{equation}
In fact, because of the definition of $\delta(p,\epsilon)$, clearly $d_Y(f(x),f(p))\neq\epsilon$. So, to finish the proof of our statement, we must show that the inequality $d_Y(f(x),f(p))>\epsilon$ is not possible. Now, we argue by contradiction. If $d_Y(f(x),f(p))>\epsilon$, since the open ball $B(p,\delta(p,\epsilon))$ is path-connected, there exists a continuous function $\gamma:[0,1]\rightarrow B(p,\delta(p,\epsilon))$ such that $\gamma(0)=p$ and $\gamma(1)=x$. Therefore, the function $g:[0,1]\rightarrow\mathbb{R}$ given by $g(t)=d_Y(f(\gamma(t)),f(p))$ is continuous and satisfies that $g(0)=0$ and $g(1)>\epsilon$, so by the intermediate value theorem, there exists $t_0\in(0,1)$ such that $g(t_0)=d_Y(f(\gamma(t_0)),f(p))=\epsilon$. Thus, $\gamma(t_0)$ satisfies that $d_X(\gamma(t_0),p)<\delta(p,\epsilon)$ and $d_Y(f(\gamma(t_0)),f(p))=\epsilon$, the last affirmation contradicts the definition of $\delta(p,\epsilon)$. Hence, we can conclude that the number $\delta(p,\epsilon)$ given in (\ref{Formula1}) is a delta-epsilon number for $f$ at $p$. As we wanted to prove
\item If $\alpha$ is such that $\delta(p,\epsilon)<\alpha$ then by definition of $\delta(p,\epsilon)$ there exists $x\in X$ so that $\delta(p,\epsilon)\leq d_X(x,p)<\alpha$ with $ d_Y(f(x),f(p))=\epsilon$, so $\alpha$ is not a delta-epsilon number for $f$ at $p$.
\item Now we proceed to prove item \ref{Item4}. From items \ref{Item1} and \ref{Item2}, we deduce that $\delta(p,\epsilon)\in D_{p,\epsilon}$. From item \ref{Item3}, we obtain that any other number greater than $\delta(p,\epsilon)$ is not in $D_{p,\epsilon}$. Hence, we can conclude that $\delta(p,\epsilon)=\max D_{p,\epsilon}$. This finishes the proof of the theorem.
\end{enumerate}
\cqd
\end{Proof}\\

\begin{Remark}
 In the item \ref{Item2} of the previous theorem, the connexity of the open ball $B(p,\delta(p,\epsilon))$ is a sufficient condition to get that $\delta(p,\epsilon)$ is a delta-epsilon number for $f$ at $p$. In fact, if there exists $x_0\in B(p,\delta(p,\epsilon))$ such that $d_Y(f(x_0),f(p))>\epsilon$, then, the  function $h$ given by
 $$
 h:B(p,\delta(p,\epsilon))\rightarrow \mathbb{R},\hspace{0.5cm} h(x)=d_Y(f(x),f(p))
 $$
is continuous and satisfies $h(p)=0<\epsilon<h(x_0)$, then by the intermetiate value theorem, there exists $x_1\in B(p,\delta(p,\epsilon))$ such that $d_Y(f(x),f(p))=\epsilon$, which contradicts the definition of $\delta(p,\epsilon)$.
\end{Remark}

The following results give us sufficient conditions to compute delta-epsilon numbers for points $p,x\in X$ which are connected by a path and such that $f(p)\neq f(x)$. More accurately,
\begin{Corollary}\label{Corollary1}
Let $f:X\rightarrow Y$ be a continuous function on $X$, suppose that there exist
$p,x\in X$ such that $d_Y(f(x),f(p))=:\beta>0$ and there exists a path connecting the points $p$ and $x$, then for every $\epsilon$ such that $0<\epsilon\leq\beta$ we have that $f^{-1}(S[f(p),\epsilon])\neq\emptyset$ and $f^{-1}(S[f(x),\epsilon])\neq\emptyset$. Particularly, for every $\epsilon$ satisfying $0<\epsilon\leq\beta$, the numbers $\delta(p,\epsilon)$ and $\delta(x,\epsilon)$ given by the formula (\ref{Formula1}) are well defined and positives.
\end{Corollary}
\begin{Proof}
Since there exists a path $\gamma:[0,1]\rightarrow X$ connecting $p$ and $x$, then the function $g(t):[0,1]\rightarrow \mathbb{R}$ given by $d_Y(f(\gamma(t),f(p)))$ is continuous
and satisfies $[0,\beta]\subset g([0,1])$. Thus, for every $\epsilon$ such that $0<\epsilon<\beta$ there exists $t_0\in(0,1)$ satisfying $d_Y(f(\gamma(t_0),f(p)))=\epsilon$, which proves that $f^{-1}(S[f(p),\epsilon])\neq\emptyset$. Similarly, it is shown that $f^{-1}(S[f(x),\epsilon])\neq\emptyset$. The rest of the proof follows from the item \ref{Item1} in the theorem \ref{Delta}.
\cqd
\end{Proof}
\begin{Corollary}\label{Corollary2}
Let $f:X\rightarrow Y$ be a continuous function on $X$, suppose that there exist
$p,x\in X$ such that $d_Y(f(x),f(p))=:\beta>0$, and there exists a path connecting the points $p$ and $x$, if for every $\epsilon$ with $0<\epsilon\leq\beta$, the open balls $B(p,\delta(p,\epsilon))$, $B(x,\delta(x,\epsilon))$  are path-connected, then the numbers $\delta(p,\epsilon)$, $\delta(x,\epsilon)$ are delta-epsilon numbers for $f$ at $p$ and $x$ respectively.
\end{Corollary}
\begin{Proof}
The proof of this result follows from the corollary \ref{Corollary1} and the proof of the item \ref{Item2} in the theorem \ref{Delta}.
\cqd
\end{Proof}\\

The following theorem allows us to compute delta-epsilon numbers in a neighborhood of a point $p$ which admits a delta-epsilon number. Namely,
\begin{Theorem}\label{Open}
Let $f:X\rightarrow Y$ be a continuous function on $X$, suppose that there exist
$p,x\in X$ such that $d_Y(f(x),f(p))=:\beta>0$, suppose that the open ball $B(p,\delta(p,\beta))$ is path connected and that there exists a path connecting the points $p$ and $x$.
Then, for every $\epsilon$, with $0<\epsilon<\beta$, there exists $\delta$ satisfying $0<\delta\leq\delta(p,\beta)$, such that if $d_X(q,p)<\delta$ then the numbers $\delta(q,\epsilon)$ given in (\ref{Formula1}) are well defined an positives. If in addition, the open balls $B(q,\delta(q,\epsilon))$ are path-connected, then for all $q\in B(p,\delta)$, the numbers $\delta(q,\epsilon)$ are delta-epsilon numbers.
\end{Theorem}
\begin{Proof} We divide the proof of this theorem into two parts:

\begin{enumerate}
\item First all of, we shall prove that there exists $\delta$ with $0<\delta\leq\delta(p,\beta)$ and such that if $d_X(q,p)<\delta$ then $\epsilon<d_Y(f(x),f(q))$. In fact, since $f^{-1}(S[f(p),\beta])\neq\emptyset$ and the open ball $B(p,\delta(p,\beta))$ is path connected, then from the theorem \ref{Delta}, we conclude that the number $\delta(p,\beta)$ is the maximum delta-epsilon number at $p$. On the other hand, since $f$ is continuous at $p$ and $\beta-\epsilon$ is positive, there exists $\delta>0$ such that if $d_X(q,p)<\delta$ then $d_Y(f(q),f(p))<\beta-\epsilon<\beta$. So, since $\delta(p,\beta)$ is the maximum delta-epsilon number at $p$, we deduce that $\delta\leq\delta(p,\beta)$. Now, by taking $q\in B(p,\delta)$ and from triangular inequality, we obtain that
\begin{equation}
\begin{aligned}
\beta=d_Y(f(x),f(p))&\leq d_Y(f(x),f(q))+d_Y(f(q),f(p))
\\&<d_Y(f(x),f(q))+\beta-\epsilon,
\end{aligned}
\end{equation}
so, if $d_X(q,p)<\delta$ then $\epsilon<d_Y(f(x),f(q))$. As we wanted to show.
\item Final part, the conclusion of the proof. As each point $q$ in the ball $B(p,\delta)$ can be connected with $x$ using a path and since $\epsilon<d_Y(f(x),f(q))$, then the corollary \ref{Corollary1} leads us to conclude that $f^{-1}(S[f(q),\epsilon])\neq\emptyset$. So the numbers $\delta(q,\epsilon)$ are well defined in the ball $B(p,\delta)$. Finally, since the open balls $B(q,\delta(q,\epsilon))$ are path-connected then the item \ref{Item2} in the theorem \ref{Delta} allows us to conclude that the numbers $\delta(q,\epsilon)$ are delta-epsilon numbers. This finishes the proof of the theorem.
\end{enumerate}
\cqd
\end{Proof}\\

Finally, the next corollary gives us sufficient conditions to calculate delta-epsilon numbers in all of the domain of the function $f$.
\begin{Corollary}\label{Corollary3}
Let  $f:X\rightarrow Y$ be a nonconstant continuous function defined on a metric space $X$. If for all $p\in X$ and $r>0$ the open balls $B(p,r)$ are path-connected, then there exists $\beta>0$ such that, the delta-epsilon numbers $\delta(p,\epsilon)$ are well defined on the set $X\times(0,\beta)$.
\end{Corollary}
\begin{Proof}
According to the corollary \ref{Corollary1}, to show this result, it is necessary to find out a positive number $\beta$ such that for every $p\in X$ there exists $x\in X$ satisfying that $d_Y(f(p),f(x))=\beta$. In fact, since $f$ is a nonconstant function, then the diameter of $f(X)$ is positive, namely, $diam(f(X))>R$ for some $R>0$. So, there exist $a,b\in X$ with $R/2<d_Y(f(a),f(b))$. Now, for $p\in X$, we have that $$R/2<d_Y(f(a),f(b))\leq d_Y(f(a),f(p))+d_Y(f(p),f(b)),$$ thus, we can conclude that either $R/4<d_Y(f(a),f(p))$ or $R/4<d_Y(f(p),f(b))$. On the other hand, since $X$ is path-connecting, then there exists $x\in X$ such that $d_Y(f(x),f(p))=R/4$. Finally, the proof of the corollary follows from direct application of the corollaries \ref{Corollary1}, \ref{Corollary2} by taking $\beta:=R/4$.
\cqd
\end{Proof}\\

Now, we establish some properties of the delta-epsilon numbers,
\begin{Theorem}\label{Properties}
Let  $f:X\rightarrow Y$ be a nonconstant continuous function defined on a compact metric space $X$. Suppose that for all $p\in X$, $r>0$ the open balls $B(p,r)$ are path-connected,  let $\beta$ be the positive number obtained in the corollary \ref{Corollary3}, then the function $\delta:X\times(0,\beta)\rightarrow \mathbb{R}^+$ defined by $(p,\epsilon)\rightarrow \delta(p,\epsilon)$ satisfies the following properties:
\begin{enumerate}
\item\label{A} For all $p\in X$ and $\epsilon>0$ there exists $x\in X$ such that $\delta(p,\epsilon)=d_X(p,x)$, and $d_Y(f(p),f(x))=\epsilon$.
\item\label{B} If $a<b<\beta$, then $\delta(p,a)\leq\delta(p,b)$.
\item\label{D} $\lim_{n\to\infty} \delta(p,\epsilon-1/n)=\delta(p,\epsilon)$.
\item\label{C} Let $x_n$ a sequence in $X$ such that $\lim_{n\to\infty} x_n=p$, then for all $r>0$, there exists $n_0\in\mathbb{N}$, so that for all $n>n_0$ $$\delta(p,\epsilon-r)-r\leq\delta(x_n,\epsilon)\leq\delta(p,\epsilon+r)+r.$$
\end{enumerate}
\end{Theorem}
\begin{Proof}
\begin{enumerate}
\item Since $f$ is a nonconstant continuous function, and $X$ is a compact path-connected set, then $f^{-1}(S[f(p),\epsilon])$ is a nonempty compact set that not contains $p$. So the distance between $p$ and $f^{-1}(S[f(p),\epsilon])$ is reached at some point $x\in f^{-1}(S[f(p),\epsilon])$. That is to say,
$$\delta(p,\epsilon)=dist(p,f^{-1}(S[f(p),\epsilon])=d_X(p,x),$$
with $d_Y(f(p),f(x))=\epsilon$.
\item In terms of the notation of the theorem \ref{Delta}, since $a<b$, then $\delta(p,a)\in D_{p,b}$, and since $\delta(p,b)=\max D_{p,b}$, then we conclude that $\delta(p,a)\leq\delta(p,b)$.
 \item From the item \ref{B}, the sequence $\delta(p,\epsilon-1/n)$ is increasing and bounded from above by $\delta(p,\epsilon)$. On the other hand, from the item \ref{A}, there exists a sequence $x_n\in X$ such that
$$
\delta(p,\epsilon-1/n)=d_X(p,x_n),\hspace{0.3cm}\text{and}\hspace{0.3cm}d_Y(f(p),f(x_n))=\epsilon -\frac{1}{n}.
$$
Now, since $X$ is compact, then there exists $q\in X$ such that $\lim_{k\to\infty}x_{n_k}=q$ where $x_{n_k}$ is a subsequence of the sequence $x_n$. So, by the continuity of the function $f$, we have that $\lim_{n\to\infty}\delta(p,\epsilon-1/n)=d_X(p,q)$ with $d_Y(f(p),f(q))=\epsilon$, then we have tha $d_X(p,q)\leq\delta(p,\epsilon)\leq d_X(p,q)$, thus, we obtain that $\lim_{n\to\infty} \delta(p,\epsilon-1/n)=\delta(p,\epsilon)$. This finishes the proof of item \ref{D}.
\item Since $f$ is continuous at $p\in X$ and $\lim_{n\to\infty}x_n=p$, then $\lim_{n\to\infty}f(x_n)=f(p)$. So, for $r>0$ there exists $n_0\in\mathbb{N}$ such that for all $n>n_0$, $d_X(x_n,p)<r$ and $d_Y(f(x_n),f(p))<r$. Now, we prove that $\delta(p,\epsilon-r)-r\in D_{x_n,\epsilon}$. In fact, let $y\in X$ with $d_X(y,x_n)<\delta(p,\epsilon-r)-r$, then from triangular inequality, we obtain that $d_X(y,p)<\delta(p,\epsilon-r)$ and so, $d_Y(f(y),f(p))<\epsilon-r$. Finally, $d_Y(f(y),f(x_n))\leq d_Y(f(y),f(p))+d_Y(f(p),f(x_n))<\epsilon$. This finishes the proof of the first inequality of item \ref{C}. The proof of the second inequality can be done similarly.

\end{enumerate}
\end{Proof}

\section{Uniform continuity and $\delta$-$\epsilon$ functions}\label{uniform}

In this section, we extend the concept of \textit{delta-epsilon function} introduced in \cite{Hernandez} and use it to study the relationship between continuity and uniform continuity.
\begin{Definition}\label{contunif}
Let $X$ be a nonempty set, a function $f:X\rightarrow Y$ is called uniformly continuous on $X$, if for every $\epsilon>0$, there exists $\delta>0$ such that
for every $x,y\in X$ with $d_X(x,y)<\delta$, then $d_Y(f(x),f(y))<\epsilon$.
\end{Definition}
\begin{Definition}\label{Delta-Epsilon}
Let $X$ be a nonempty set, $f:X\rightarrow Y$ a continuous function. Let $\epsilon>0$ fixed, we say that a function $g_{\epsilon}:X\rightarrow \mathbb{R}^+$ is a \textbf{delta-epsilon function} for $f$,  if $g_{\epsilon}(x)$ is a delta-epsilon number for $f$ at $x\in X$.
\end{Definition}
\begin{Example}\label{Unico}\rm{
Let  $f:X\rightarrow Y$ be a nonconstant continuous function defined on a metric space $X$, and suppose that for all $p\in X$ and $r>0$ the open balls $B(p,r)\subset X$ are path-connected. Then from the corollary \ref{Corollary3} and the item \ref{Item3} in the theorem \ref{Delta}, we have that for any $\epsilon\in(0,\beta)$ fixed, the function
$\delta(\cdot,\epsilon):X\rightarrow \mathbb{R}^+$, given by
\begin{equation}\label{hatem}
\delta(x,\epsilon)=\text{dist}(x,f^{-1}(S[f(x),\epsilon])),
\end{equation}
is a delta-epsilon function for $f$ that is greater that any other delta-epsilon function for $f$.
}
\end{Example}
The following theorem gives a characterization of the uniform continuity concept in terms of delta-epsilon functions,
\begin{Theorem}\label{intuitive} Let $X$ a nonempty set and $f:X\rightarrow Y$ a continuous function. Then, $f$ is continuous uniformly on $X$ if and only if there exists a family $\left\{g_{\epsilon}\right\}_{\epsilon>0}$ of delta-epsilon functions for $f$ such that,
\begin{equation}\label{posi}
\eta_{\epsilon}:=\inf_{x\in X} g_{\epsilon}(x)>0,
\end{equation} for every $\epsilon>0$.
\end{Theorem}
\begin{Proof}
If $f:X\rightarrow Y$ is continuous uniformly on $X$, then for $\epsilon>0$ there exists $\delta>0$, such that
for every $x,y\in X$ with $d_X(x,y)<\delta$, then  $d_Y(f(x),f(y))<\epsilon$. Thus,
the constant function $g_{\epsilon}:X\rightarrow \mathbb{R}^+$, $g_{\epsilon}(x)=\delta$, is a delta-epsilon function for $f$ that clearly satisfies the condition (\ref{posi}).
\\Conversely, let $\left\{g_{\epsilon}\right\}_{\epsilon>0}$ a family of delta-epsilon functions for the continuous function $f$ that satisfies the condition (\ref{posi}). Hence, for $\epsilon>0$ and $x,y\in X$, we have that if $d_X(x,y)<\eta_{\epsilon}\leq g_{\epsilon}(x)$, then, since $f$ is continuous at $x$ and $g_{\epsilon}(x)$ satisfies the continuity definition at $x$, we can conclude that $d_Y(f(x),f(y))<\epsilon$.
\cqd
\end{Proof}
\begin{Remark}\rm{
Roughly speaking, the previous theorem says us that a continuous function $f$ that admits a family of constant delta-epsilon functions $\left\{\eta_{\epsilon}\right\}_{\epsilon>0}$ is continuous uniformly.
}
\end{Remark}
\begin{Remark}\rm{
In terms of the theorem \ref{intuitive}, to show that a continuous function $f$ is not continuous uniformly, we must verify that any family $\left\{g_{\epsilon}\right\}_{\epsilon>0}$ of delta-epsilon functions has an element $g_{\epsilon_0}$
such that, $\inf_{x\in X} g_{\epsilon_0}(x)=0$,
what seems to be a difficult task. For a certain class of functions the following theorem simplify this work.
}
\end{Remark}
Now, we give a characterization of the concept of uniform continuity in terms of the optimal  delta epsilon function given in (\ref{hatem}).
\begin{Theorem}\label{beleza}
Let $f:X\rightarrow Y$ be a nonconstant continuous function defined on a metric space $X$. Suppose that for all $p\in X$ and $r>0$ the open balls $B(p,r)$ are path-connected. Then, the following three conditions are equivalents:
\begin{enumerate}
\item\label{fc} $f$ is not uniformly continuous on X.
\item\label{co} There exists $\epsilon_0$ such that, $\displaystyle{\inf_{x\in X} \delta(x,\epsilon_0)=0}$.
\item\label{nv} There exist $\epsilon_0$ and sequences $x_n,y_n\in X$, such that, $\lim_{n\to\infty}d_X(x_n,y_n)=0$ and $d_Y(f(x_n),f(y_n))=\epsilon_0$.
\end{enumerate}
\end{Theorem}
\begin{Proof}
\begin{itemize}
\item First, we prove that \textit{\ref{fc}} implies \textit{\ref{co}}. It is clear that if $f$ is not continuous uniformly on $X$, then from the theorem \ref{intuitive}, the family of delta-epsilon functions $\left\{\delta(\cdot,\epsilon)\right\}_{\epsilon\in(0,\beta)}$ must have an element satisfying the condition \textit{\ref{co}}.
\item Now, we prove that \textit{\ref{co}} implies \textit{\ref{fc}}. Let $\left\{ \rho_{\epsilon}\right\}_{\epsilon>0}$ be a family of delta-epsilon functions for $f$.
Then, from the item \ref{Item3} of theorem \ref{Delta} and item \ref{B} of theorem \ref{Properties}, we have that
$$
\rho_{\epsilon}(x)\leq\delta(x,\epsilon)\leq \delta(x,\epsilon_0),\hspace{0.3cm}\text{fol all}\hspace{0.3cm} x\in X,
$$
where, $0<\epsilon\leq\epsilon_0$. Hence, from the condition \textit{\ref{co}} above, we obtain that $\inf_{x\in X}\rho_{\epsilon}(x)=0.$
So, from theorem \ref{intuitive}, we can conclude that $f$ is not continuous uniformly on $X$.
\item Next, we prove that \textit{\ref{co}} implies \textit{\ref{nv}}. Since $\inf_{x\in X}\delta(x,\epsilon_0)=0$, then for all $n\in\mathbb{N}$, there exists $x_n\in X$ such that
$0<\delta(x_n,\epsilon_0)<1/n$. By the definition of $\delta(x_n,\epsilon_0)$ there exist $y_n\in X$, satisfying, $0<\delta(x_n,\epsilon_0)\leq d_X(x_n,y_n)<1/n$ and $d_Y(f(x_n),f(y_n))=\epsilon_0$. Thus, we obtain two sequences of elements $x_n,y_n\in X$, such that, $\lim_{n\to\infty}d_X(x_n,y_n)=0$ and $d_Y(f(x_n),f(y_n))=\epsilon_0$.
\item Finally, we prove that \textit{\ref{nv}} implies \textit{\ref{co}}. If the condition \textit{\ref{nv}} holds, then, we deduce that $0<\delta(x_n,\epsilon_0)\leq d_X(x_n,y_n)$. Hence, $\lim_{n\to\infty}\delta(x_n,\epsilon_0)=0$, what implies that $\inf_{x\in X}\delta(x,\epsilon_0)=0$. As we wanted to show.
\cqd
\end{itemize}
\end{Proof}
\section{Examples}\label{Four}
In this section, from some specific examples, we illustrate the theory developed in sections \ref{reta} and \ref{uniform}. The first example is elementary, however, it explains our principal results clearly.

\begin{Example}\rm{Consider $f:\mathbb{R}\rightarrow\mathbb{R}$ defined by $f(x)=x^2$, according to the theorem \ref{Delta}, it is clear that
$$
f^{-1}(S[f(p),\epsilon])\supset\{\sqrt{p^2+\epsilon},-\sqrt{p^2+\epsilon}\}\neq\emptyset,
$$
then, the hypothesis 1 in the theorem \ref{Delta} is satisfied. After some calculations, we obtain that:
$$
\delta(p,\epsilon)=\text{dist}(p,f^{-1}(S[f(p),\epsilon]))=\sqrt{p^2+\epsilon}-|p|.
$$
Now, since $B(p,\delta(p,\epsilon))$ is connected, then, we can conclude that the numbers $\delta(p,\epsilon)$ are maximum delta-epsilon numbers for $f$,  that is:
\begin{equation*}
\text{if}\hspace{0.5cm}|x-p|<\sqrt{p^2+\epsilon}-|p|, \hspace{0.5cm}\text{then}\hspace{0.5cm} |x^2-p^2|<\epsilon.
\end{equation*}
In addition, we obtain that
$$
D_{p,\epsilon}=\left(0,\sqrt{p^2+\epsilon}-|p|\right].
$$
On the other hand, as the function $p\to \delta(p,\epsilon)$ is even a decreassing for $p>0$, then, we deduce that for $M>0$
$$
\inf_{p\in B(0,M)}\delta(p,\epsilon)\geq\sqrt{M^2+\epsilon}-M>0 ,
$$
thus, from the theorem \ref{intuitive}, $f$ is continuous uniformly over bounded domains. In contrast, due to the fact that
$$
\lim_{|p|\to\infty}\delta(p,\epsilon)=0,
$$
then, from the theorem \ref{beleza}, we obtain that $f$ is not continuous uniformly over unbounded domains.
}
\end{Example}
The following lemmas allow us to study uniform continuity of radial functions defined on normed vector spaces,
\begin{Lemma}\label{interame}
Let $I\subset\mathbb{R}$ be a nondegenerate interval, $g:I\rightarrow\mathbb{R}$ an increasing bijective function. Then the numbers
\begin{equation}\label{certa}
\delta(p,\epsilon)=\min\{g^{-1}(g(p)+\epsilon)-p, p-g^{-1}(g(p)-\epsilon)\},
\end{equation}
are maximum delta-epsilon numbers for the function $g$. Here, $\epsilon$ has to be chosen in such a way that some of the numbers $g^{-1}(g(p)+\epsilon)-p$,
$p-g^{-1}(g(p)-\epsilon)$ be well defined.
\end{Lemma}
\begin{Proof}
Under these hypothesis, we can conclude that the function $g$ is continuous and nonconstant. Hence, since $I$ is connected, then the corollary \ref{Corollary3} implies the conclusion of the lemma. We point out that this lemma is exactly the lemma 1.2 in \cite{Hernandez}.
\cqd
\end{Proof}

\begin{Lemma}\label{inter}
Let $V$ be a normed vector space, $I\subset\mathbb{R}^+$ be a nondegenerate interval, $g:I\rightarrow\mathbb{R}$ a nonconstant continuous function and $$\Omega=\{x\in V|\text{ } ||x||\in I\text{ }\},$$ if we define
$f:\Omega\rightarrow\mathbb{R}$ by $f(x)=g(||x||)$ then, for $p\in\Omega$, we have that $\delta(||p||,\epsilon)\in D_{p,\epsilon}$. That is, the maximum delta-epsilon number $\delta(||p||,\epsilon)$ for $g$ at $||p||$ is a delta-epsilon number for the radial function $f$ at $p$.
 \end{Lemma}
\begin{Proof}
First of all, we note that since $g$ is nonconstant and it is defined on an interval, then the corollary \ref{Corollary3} allows us to conclude
that the numbers $\delta(||p||,\epsilon)$ are well defined in the sense of the formula (\ref{hatem}). Now, suppose that $$||x-p||<\delta(||p||,\epsilon),$$ then, $|||x||-||p|||<\delta(||p||,\epsilon)$, and thus, $$|f(x)-f(p)|=|g(||x||)-g(||p||)|<\epsilon,$$
as we wanted to proof.
\cqd
\end{Proof}
\begin{Example}\rm{
Let $V$ be a normed vector space, if we consider the function $f:V\rightarrow\mathbb{R}$, defined by
$$
f(p)=e^{||p||},
$$
then, from the example 6 in \cite{Hernandez} and the previous lemma, we can infer that the family
\begin{equation}\label{dois}
\eta(p,\epsilon)=\ln(e^{||p||}+\epsilon)-||p||,
\end{equation}
is a family of delta-epsilon functions for $f$. In addition, since for $p\neq 0$, the function
$$
t\to g(t)=e^{t||p||},
$$
is an homeomorphism from $[0,\infty)$ to $[1,\infty)$, then from the lemma \ref{interame}, we obtain that
$$
\delta(t,\epsilon)=\frac{\ln(e^{t||p||}+\epsilon)-t||p||}{||p||},
$$
is a family of maximum delta-epsilon functions for $g$. Now, as
$$
\lim_{t\to\infty} \frac{\ln(e^{t||p||}+\epsilon)-t||p||}{||p||}=0,
$$
we conclude that
$$
\inf_{t\in[0,\infty)} \delta(t,\epsilon)=0,
$$
and from the theorem \ref{beleza}, the function $g$ is not continuous uniformly on $[0,\infty)$. As a result of this analysis, we also obtain that the function $f$ is not continuous uniformly on any domain containing the set $\{tp|t\in[0,\infty)\}\subset V$. On the other hand, it is not difficult to show that the delta-epsilon functions given in (\ref{dois}) satisfy
$$
\inf_{p\in B(0,M)} \eta(p,\epsilon)\geq \ln(e^{M}+\epsilon)-M>0,
$$
hence, from the theorem \ref{intuitive}, we deduce that $f$ is continuous uniformly on bounded domains.
}
\end{Example}

\begin{Example}\rm{
Similarly, from the example 7 in \cite{Hernandez} and the lemma \ref{inter}, we can deduce that the function
$f:V-\{0\}\rightarrow\mathbb{R}$, defined by
$$
f(p)=\ln(||p||),
$$
has the following family of delta-epsilon functions:
\begin{equation}\label{treis}
\eta(p,\epsilon)=||p||(1-e^{-\epsilon}),
\end{equation}
thus, from the theorem \ref{intuitive}, we obtain that for any $M>0$, $f$ is continuous uniformly on the domain $V-B(0,M)$. On the other hand, following the ideas of the previous example it is possible to conclude that $f$ is not continuous uniformly on $V-\{0\}$.
}
\end{Example}

\renewcommand{\refname}{References}