\documentclass[t,aspectratio=169]{beamer}
\usetheme{metropolis}
\metroset{block=fill}

\input{../../_assets/basicslide1}
\input{../../_assets/macros}

\author{Samuel Vaiter}
\date{}
\institute{
Created: 2023-11-07.\\
Last update: 2023-11-07.\\
Status: inprogress.
}
\title{Minimizer and its existence}

\begin{document}

\begin{frame}
  \maketitle
\end{frame}

\begin{frame}
  \frametitle{Local and global minimizers}

  \begin{columns}
    \begin{column}{0.48\linewidth}
      \begin{equation}\label{eq:minpb}
        \min_{x \in \Omega} f(x)
      \end{equation}
      We say that $x^\star \in \Omega$ is
      \begin{itemize}
      \item a {\color{red}local}\tikzmark{localMinTxt} minimizer of \eqref{eq:minpb}, if there exists a neighborhood $\mathcal{O}$ of $x^\star$ such that
        \[ \forall x \in \Omega \cap \mathcal{O}, \quad f(x) \geq f(x^\star) \]
      \item a ({\color{blue}global}\tikzmark{globalMinTxt}) minimizer if
        \[ \forall x \in \Omega, \quad f(x) \geq f(x^\star) \]
      \end{itemize}
    \end{column}%
    \begin{column}{0.48\linewidth}
      \begin{center}
        \begin{tikzpicture}[overlay, remember picture, baseline=3cm]
          \draw[->] (-1,0) -- (3,0) node[right] {$x$};
          \draw[->] (0,0) -- (0,2) node[above] {$f(x)$};
          \draw [thick,draw=mLightBrown] plot [smooth] coordinates { (-1,1) (0.1,0.1) (1,1) (2,0.75) (3,1.5)};
          \coordinate (localMin) at (2,0.75);
          \coordinate (globalMin) at (0.1,0.1);
          \fill[red] (localMin) circle [radius=2pt];
          \fill[blue] (globalMin) circle [radius=2pt];

          \draw[-latex, dashed, line width=0.2mm] (pic cs:localMinTxt) to [bend left=30] (localMin);
          \draw[-latex, dashed, line width=0.2mm] (pic cs:globalMinTxt) to [bend right=25] (globalMin);
      \end{tikzpicture}
      \end{center}
    \end{column}
  \end{columns}
  The set of global minimizers of $f$ is denoted $\argmin f$
\end{frame}


\begin{frame}
  \frametitle{Existence of a minimizer: univariate case}

  \begin{tabular}{ccc}
    $f(x) = x$ & $f(x) = 1/x$ {\tiny ($x > 0$)} & $f(x) = x^{2}$ \\
    \begin{tikzpicture}[scale=0.5]
      \begin{axis}[
        domain=-0.9:0.9,
        xlabel={$x$},
        ylabel={$f(x)$},
        axis y line=center,
        axis x line=center,
        axis on top,
        height=7cm
        ]

        %% The curve
        \addplot [no marks,smooth,name path=curve, thick, draw=mLightBrown] plot {x};
      \end{axis}
    \end{tikzpicture} &
    \begin{tikzpicture}[scale=0.5]
      \begin{axis}[
        domain=0:1,
        xlabel={$x$},
        ylabel={$f(x)$},
        ytick = {5, 15},
        xtick = {0, 0.5, 1},
        xmin = 0, xmax = 1,
        ymin = 0,% ymax = 4,
        axis y line=center,
        axis x line=center,
        axis on top,
        height=7cm
        ]

        %% The curve
        \addplot [no marks,smooth,domain=0.05:0.9,thick, draw=mLightBrown] plot {1/x};
      \end{axis}
     \end{tikzpicture}
     &
     \begin{tikzpicture}[scale=0.5]
       \begin{axis}[
         domain=-1:1,
         xlabel={$x$},
         ylabel={$f(x)$},
         ytick = {0, 1},
         xtick = {-1, 0, 1},
         axis y line=center,
         axis x line=center,
         axis on top,
         height=7cm
         ]

         %% The curve
         \addplot [no marks,smooth,domain=-1:1,thick, draw=mLightBrown] plot {x*x};
       \end{axis}
    \end{tikzpicture} \\
    Unbounded from below & Bounded but not achieved & Bounded and achieved \\
    $\inf f = -\infty$ & $\inf f = 0$ & $\inf f = 0$\\
    $\argmin f = \emptyset$ & $\argmin f = \emptyset$ & $\argmin f = \set{0}$
  \end{tabular}

  \pause

  \begin{tikzpicture}[overlay,remember picture]
    \begin{scope}[shift={(current page.south west)}]
      \draw[draw=mLightBrown, line width=1mm] (10.5,7.85) rectangle (15,2);
    \end{scope}
  \end{tikzpicture}
\end{frame}

\begin{frame}
  \frametitle{Favorable case: compactness \emph{and} continuity}

  \begin{center}
    \begin{tikzpicture}[scale=0.5]
      \begin{axis}[
        domain=0:1,
        xlabel={$x$},
        ylabel={$f(x)$},
        ytick = {5, 15},
        xtick = {0, 0.5, 1},
        xmin = 0, xmax = 1,
        ymin = 0,% ymax = 4,
        axis y line=center,
        axis x line=center,
        axis on top,
        height=7cm
        ]

        %% The curve
        \fill[fill=gray!50] (axis cs:0.25, 0) rectangle (axis cs:0.8, 20);
        \draw[dashed] (axis cs:0.25, 0) -- (axis cs:0.25, 20);
        \draw[dashed] (axis cs:0.8, 0) -- (axis cs:0.8, 20);
        \addplot [no marks,smooth,domain=0.05:0.9,thick, draw=mLightBrown] plot {1/x};
        \fill[fill=mLightBrown] (axis cs:0.8, 1.25) circle [radius=2pt];
      \end{axis}
    \end{tikzpicture}
  \end{center}

  \begin{theorem}
    If $f$ is \alert{continuous} and $\Omega$ is a \alert{non-empty compact}, then there exists \emph{at least} one global minima of $f$ on $\Omega$.
  \end{theorem}
  \metroset{block=transparent}
  \begin{block}{Proof idea}
    Use \textsc{Bolzano--Weierstrass} theorem
  \end{block}
  \metroset{block=fill}
\end{frame}

\begin{frame}
  \frametitle{Favorable case: coercivity \emph{and} continuity}

  \begin{columns}[T]
    \begin{column}{0.3\linewidth}
      \begin{tikzpicture}[scale=0.5]
        \begin{axis}[
          domain=-1:1,
          xlabel={$x$},
          ylabel={$f(x)$},
          ytick = {0, 1},
          xtick = {-1, 0, 1},
          axis y line=center,
          axis x line=center,
          axis on top,
          height=7cm
          ]

          %% The curve
          \addplot [no marks,smooth,domain=-1:1,thick, draw=mLightBrown] plot {x*x};
        \end{axis}
      \end{tikzpicture}
    \end{column}
    \begin{column}{0.7\linewidth}
      Coercive function: $\lim_{\norm{x} \to +\infty} f(x) = +\infty$.
      \begin{itemize}
      \item $x \mapsto x$ is coercive
      \item $x \mapsto 1/x$ is not coercive
      \item $x \mapsto e^{x}$ is \dots
      \end{itemize}
    \end{column}
  \end{columns}

  \begin{theorem}
    If $f$ is \alert{continuous} and \alert{coercive}, then there exists \emph{at least} one global minima of $f$ on $\RR^{d}$.
  \end{theorem}
  \metroset{block=transparent}
  \begin{block}{Proof idea}
    Apply the compact+continuous thm to a closed ball $\overline{B}(0, M)$ thanks to coercivity.
  \end{block}
  \metroset{block=fill}
\end{frame}

\end{document}