\documentclass[a4paper,12pt]{report}
\usepackage{graphicx} % inserting images
\usepackage{hyperref} % PDF links
\usepackage{setspace} % for switching between double/single space in document
\usepackage{fancyhdr} % package for changing Headings style
% setting the margins of page
\usepackage[top=3cm,right=3cm,bottom=2.5cm,left=2.5cm]{geometry}                 
%\usepackage{amsthm,amssymb,amsmath}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{titlesec}
\usepackage{xepersian}
\numberwithin{figure}{section}
% tell tex engine address of folder containing your pictures
\graphicspath{{images/}}
% commands to print the page number in header
\pagestyle{fancy}
\cfoot{}
\lhead{\thepage}

% commands related to XePersian package
\settextfont[Scale=1.1]{XB Zar}
\setdigitfont{XB Zar}
%\setlatintextfont{LinLibertine}
% -------------------------------------
%\input{commands}
\input{jeld_info}
%\theoremstyle{definition}
\newtheorem{definition}{تعریف}[chapter]
%\theoremstyle{theorem}
\newtheorem{theorem}[definition]{قضیه}
\newtheorem{lemma}[definition]{لم}
\newtheorem{proposition}[definition]{گزاره}
\newtheorem{corollary}[definition]{نتیجه}
\newtheorem{remark}[definition]{ملاحظه}
%\theoremstyle{definition}
\newtheorem{example}[definition]{مثال}
\renewcommand*{\baselinestretch}{1.5}

\makeatletter
\renewcommand*\l@chapter[2]{%
  \ifnum \c@tocdepth >\m@ne
    \addpenalty{-\@highpenalty}%
    \vskip 1.0em \@plus\p@
    \setlength\@tempdima{1.5em}%
    \begingroup
      \parindent \z@ \if@RTL\leftskip\else\rightskip\fi \@pnumwidth
      \parfillskip -\@pnumwidth
      \leavevmode \bfseries
      \advance\if@RTL\rightskip\else\leftskip\fi\@tempdima
      \hskip -\if@RTL\rightskip\else\leftskip\fi
      #1\nobreak\leaders\hbox{$\m@th
        \mkern \@dotsep mu\hbox{.}\mkern \@dotsep
        mu$}\hfill \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
      \penalty\@highpenalty
    \endgroup
  \fi}
  
\renewcommand\tableofcontents{%
    \if@twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
    \centerline{\huge\bfseries\contentsname
        \@mkboth{%
           \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
    \vskip 40\p@
    \@starttoc{toc}%
    \if@restonecol\twocolumn\fi
    }
    
    \renewcommand{\@starttoc}[1]{%
  \hboxR to \textwidth{عنوان \hfill صفحه} 
  \begingroup
    \makeatletter
    \@input{\jobname.#1}%
    \if@filesw
      \expandafter\newwrite\csname tf@#1\endcsname
      \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax
    \fi
    \@nobreakfalse
  \endgroup}
  
\makeatother

%%%%%%%%%%%%%%%%%%%%%%%%%%
\titleformat{\chapter}[display]
  {\normalfont\huge\bfseries\centering}{\chaptertitlename\ \thechapter}{20pt}{\Huge}
  \titlespacing{\chapter}{7pc}{7cm}{5cm}[5pc]
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

%\include{cover_fa}
%\settextfont[Scale=2.5]{IranNastaliq}
%\include{besm}
%\doublespacing
%\settextfont[Scale=1.1]{XB Zar}
%\setdigitfont{XB Zar}
%\include{abstract_fa}

%\pagenumbering{harfi}
%\tableofcontents
%\listoffigures
%\listoftables
%\include{Intro}
% insert each of your chapters with a \inlcude{filename} command as below
%\singlespacing
%\settextfont[Scale=2]{XB Zar}
%\include{chap1b}
\settextfont[Scale=1.1]{XB Zar}
\setdigitfont{XB Zar}
\include{chap1}
%\settextfont[Scale=1.1]{XB Zar}
%\setdigitfont{XB Zar}
%\include{chap2}
% -----------------------------------------------------------------------

% If do not have appendix then comment following 3 lines
\appendix
%\include{peyvast1}
%\include{peyvast2}
% -------------------------------------------------------

\singlespacing
%\include{references}
%\include{abstract_en}
%\include{cover_en}

\end{document}