\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{ystheorem}

\@ifundefined{ys@beamer}{
\RequirePackage[thmmarks,  hyperref, amsmath]{ntheorem}
\newtheoremstyle{breakindent}%
  {\item[\rlap{\vbox{\hbox{\hskip\labelsep \theorem@headerfont
          ##1\ ##2\theorem@separator}\hbox{\strut}}}]\hspace*{\parindent}}%
  {\item[\rlap{\vbox{\hbox{\hskip\labelsep \theorem@headerfont
          ##1\ ##2\ (##3)\theorem@separator}\hbox{\strut}}}]\hspace*{\parindent}}
\newtheoremstyle{nonumberbreakindent}%
  {\item[\rlap{\vbox{\hbox{\hskip\labelsep \theorem@headerfont
          ##1\theorem@separator}\hbox{\strut}}}]\hspace*{\parindent}}%
  {\item[\rlap{\vbox{\hbox{\hskip\labelsep \theorem@headerfont
          ##1\ (##3)\theorem@separator}\hbox{\strut}}}]\hspace*{\parindent}}

\newtheoremstyle{demo}%
  {\item[\rlap{\vbox{\hbox{\hskip\labelsep \theorem@headerfont
          ##1\ ##2\theorem@separator}\hbox{\strut}}}]\hspace*{\parindent}}%
  {\item[\rlap{\vbox{\hbox{\hskip\labelsep \theorem@headerfont
          ##1\ ##2\ ##3\theorem@separator}\hbox{\strut}}}]\hspace*{\parindent}}
\newtheoremstyle{nonumberdemo}%
  {\item[\rlap{\vbox{\hbox{\hskip\labelsep \theorem@headerfont
          ##1\theorem@separator}\hbox{\strut}}}]\hspace*{\parindent}}%
  {\item[\rlap{\vbox{\hbox{\hskip\labelsep \theorem@headerfont
          ##1\ ##3\theorem@separator}\hbox{\strut}}}]\hspace*{\parindent}}


\def\rappelnumthm{{\tiny \raisebox{.25ex}{\thetheorem }}}

\theoremstyle{breakindent}
\theorembodyfont{\upshape}
\theoremseparator{. }
\theoremsymbol{\hbox{\hspace{2em}\rappelnumthm$\blacksquare$}}
\newtheorem{theorem}[equation]{Th\'eor\`eme}
\newtheorem{lemma}[equation]{Lemme}
\newtheorem{corollary}[equation]{Corolaire}

\theoremsymbol{\hbox{\hspace{2em}\rappelnumthm$\blacktriangleleft$}}
\newtheorem{definition}[equation]{D\'efinition}
\newtheorem{invariant}[equation]{Invariant}



\theoremheaderfont{\slshape}
\makeatletter
\theoremstyle{demo}
\def\refdem#1{\gdef\numerothm{\ref{#1}}\numerothm}
\def\rappelnumdem{\@ifundefined{numerothm}{}{{\tiny \raisebox{.25ex}{D\'em. de \numerothm\ }}\global\let\numerothm\relax}}
\theoremsymbol{\hbox{\hspace{2em}\rappelnumdem$\square$}}
\newtheorem*{proof}{D\'emonstration}




\theoremsymbol{\hbox{\hspace{2em}\rappelnumthm$\vartriangleleft$}}

\theoremstyle{breakindent}
\newtheorem{example}[equation]{Exemple}
\newtheorem{exo}[equation]{Exercice}


\newtheorem{remark}[equation]{Remarque}

\theoremsymbol{}
\theoremstyle{plain}
}{}

\endinput