\tikzset{
    point/.style={
        thick,
        draw=gray,
        cross out,
        inner sep=0pt,
        minimum width=4pt,
        minimum height=4pt,
    },
}
\begin{tikzpicture}
  
  \draw[->] (-0.5,0) -- (1.5,0) node [below] {$\mathbb{R}$};

  \foreach \x in {0,...,1}
    \draw (\x,0.1) -- (\x,-0.1) node [below] {\x};


  \draw[red] (0.07,0.1) -- (0,0.1) -- (0,-0.1) -- (0.07,-0.1) node [below] {};
  \draw[red] plot [smooth] coordinates{(0.47,0.1) (0.5,0) (0.47,-0.1)};

    \begin{scope}[shift={(4,0)}]
        \draw[thick] (0cm,0cm) circle(1cm);
        \draw[thick, red] ([shift={(180:1cm)}]-0.0,0) arc (180:0:1cm);
        \draw (0:1cm) node[point, label=right:{$0$}] {};
        %\path node[point, blue, label={[blue,above]{$\overline{a}$}}] (posU) at (-252:1cm) {};
        %\path node[label={[red,left]{$U$}}] at (30:1cm) {};
    \end{scope}

    \coordinate (circleUp)       at (2.6, 0.1);
    \coordinate (circleDown)     at (2.6,-0.1);
    \coordinate (numberlineUp)   at (1.7, 0.1);
    \coordinate (numberlineDown) at (1.7,-0.1);

    \path[->] (numberlineUp)   edge  [bend left]  node[label=$f$]  {} (circleUp);
    \path[<-] (numberlineDown) edge  [bend right] node[label=below:$g$]  {} (circleDown);

    %\draw (3.7cm,0cm) node[point, blue, label={[blue,above]{$a$}}] (posA) {};
    %\draw (0.7cm,0cm) node[point, blue, label={[blue,above]{$\pi^{-1}(u)$}}] {};
    %\draw[dashed, blue, thick] plot [smooth] coordinates{(posU) (0.2,-0.8) (2.5,-1) (posA)};

    %\draw[blue, dashed, thick] (3.7cm,0cm) arc (0:180:1.5 and 0.5);

\end{tikzpicture}
