
\documentclass[11pt,fleqn]{book}
\usepackage{amsmath,amssymb,amsthm}
%\usepackage{ntheorem}
\usepackage[framemethod=default]{mdframed}
\usepackage{xepersian}

\makeatletter
\newtheoremstyle{test} 
{17pt}{7pt}{\normalfont}{}{\large\bf}{\;\;}{0.25em}{}%
\renewcommand{\qedsymbol}{$\blacksquare$}%
\makeatother
\theoremstyle{test}
\newtheorem{defi}{تعریف}[chapter]



\makeatletter
\@ifundefined{Umathcode}{\let\Umathcode\XeTeXmathcode}{}
\@ifundefined{Umathchardef}{\let\Umathchardef\XeTeXmathchardef}{}
\makeatother
\begin{document}
\begin{defi}
مثال
\end{defi}

\end{document}