\documentclass[11pt,oneside]{bidipresentation}
\usepackage{tikz}
\usepackage{tikz-cd}
\usepackage{colortbl}
\usetikzlibrary{shapes,snakes}
\usepackage{pstricks}
\usepackage{eso-pic}
\usepackage{amsthm,amssymb,amsmath}
\usepackage{xepersian}
\def\mathfamilydefault{\rmdefault}
% محیط قضیه
\tikzstyle{myghazye} = [draw=blue!30, fill=none, very thick,
rectangle, rounded corners, inner sep=10pt, inner ysep=20pt]
\tikzstyle{fancytitleghazye} =[fill=yellow!20, text=red]
\newcounter{algcounter}
 \newcommand{\myghazye}[2]{
\begin{tikzpicture}\node [myghazye] (box){\setRTL\begin{minipage}{0.95\textwidth}
{#2}
  \end{minipage}};\node[fancytitleghazye, left=10pt] at (box.north east) {\hboxR{{\Large{قضیه }}\refstepcounter{algcounter}\thealgcounter #1}};
  \end{tikzpicture}}
   
\begin{document}
  \myghazye{\label{1}}{\begin{tikzcd}
A_{S}\times\,_{S}B\arrow{rr}{\beta}\arrow{rd}{\tau}&&Y\\&T\arrow{ur}{\beta^{'}}
\end{tikzcd}}
\end{document}
