\documentclass[a4paper,12pt]{article}
\usepackage{amsthm,amssymb,amsmath}
\usepackage{tikz}
\usepackage{xepersian}
\makeatletter
\@ifundefined{Umathcode}{\let\Umathcode\XeTeXmathcode}{}
\@ifundefined{Umathchardef}{\let\Umathchardef\XeTeXmathchardef}{}
\makeatother
\begin{document}




اولی
\tikzset{node distance=2cm, auto}
\begin{tikzpicture}[line width=.5pt]%[style={very thick}]
  \node (a1) {$0$};
    \node (a2) [right of=a1] {$M^u$};
  \node (a3) [right of=a2] {$P^v$};
  \node (b2) [below of=a2] {$F^v$};
  \draw[->] (a1) -- (a2);
    \draw[->] (a2) to node  {$\varphi^*$} (a3);
    \draw[->] (a3) to node  {$g$} (b2);
    \draw[->] (a2) to node[swap] {$f^*$}  (b2); 
    \node at ([shift={(1.7cm,-1.5cm)}]current bounding box.north east) {$\phi^* = \text{Hom} \left(\phi, E\big({R\over m}\big) \right)$};
\end{tikzpicture}
دومی
\tikzset{node distance=2cm, auto}
\begin{tikzpicture}[line width=.5pt]%[style={very thick}]
  \node (a1) {$0$};
    \node (a2) [left of=a1] {$B^u$};
  \node (a3) [left of=a2] {$G^v$};
  \node (b2) [below of=a2] {$L^v$};
  \draw[->] (a1) -- (a2);
    \draw[->] (a2) to node [swap] {$\phi^*$} (a3);
    \draw[->] (a3) to node  {$kg$} (b2);
    \draw[->] (a2) to node {$l$}  (b2); 
    \node at ([shift={(1.7cm,-1.5cm)}]current bounding box.north east) {$\phi^* = \text{Hom} \left(\phi, E\big({R\over m}\big) \right)$};
\end{tikzpicture}


\end{document}