% Theory structuring elements.
\newtheorem{theorems}{Theorem}[section]
\newtheorem{lemmas}[theorems]{Lemma}
\newtheorem{corollaries}[theorems]{Corollary}
\newtheorem{propositions}[theorems]{Proposition}
\newtheorem{conjectures}[theorems]{Conjecture}
\newtheorem{definitions}[theorems]{Definition}
\newtheorem{informitions}[theorems]{Informal Definition}
%\newtheorem{restrictions}[theorems]{Restriction}
\newtheorem{algorithms}[theorems]{Algorithm}
\newtheorem{examples}[theorems]{Example}
\newtheorem{remarks}[theorems]{Remark}
\newtheorem{exercises}{Exercise}[section]
\newtheorem{problems}[theorems]{Problem}
\newtheorem{conventions}[theorems]{Notational Convention}
\newtheorem{stellingen}[theorems]{Stelling}

\newenvironment{theorem}{\begin{theorems} \begin{em}}
                        {\end{em} \end{theorems}}
\newenvironment{lemma}{\begin{lemmas} \begin{em}}
                        {\end{em} \end{lemmas}}
\newenvironment{corollary}{\begin{corollaries} \begin{em} }
                        {\end{em} \end{corollaries}}
\newenvironment{proposition}{\begin{propositions} \begin{em}}
                            {\end{em} \end{propositions}}
\newenvironment{conjecture}{\begin{conjectures} \begin{em}}
                            {\end{em} \end{conjectures}}
\newenvironment{definition}{\begin{definitions} \begin{em}} 
                           {\end{em} \deproof \end{definitions}} 
%\newenvironment{restriction}{\begin{restrictions} }
%                            {\end{restrictions}}
\newenvironment{algorithm}{\begin{figure}[htp]\begin{algorithms}%
                \renewcommand{\baselinestretch}{0.5}\small\normalsize\small%
                                 \begin{em}\begin{tt} }%
                          {\end{tt}\end{em}%
                   \renewcommand{\baselinestretch}{1.0}%
                           \end{algorithms}\end{figure}}%
\newenvironment{example}{\begin{examples} \begin{em}}
                        {\end{em} \end{examples}}
\newenvironment{remark}{\begin{remarks} \begin{em}}
                       {\end{em} \end{remarks}}
\newenvironment{exercise}{\begin{exercises} \begin{em} }
                         {\end{em} \end{exercises}}
\newenvironment{informition}{\begin{informitions} \begin{em}}
                            {\end{em} \end{informitions}}
\newenvironment{problem}{\begin{problems} \begin{em}}
                        {\end{em} \end{problems}} 
\newenvironment{stelling}{\begin{stellingen} \begin{em}}
                        {\end{em} \end{stellingen}} 
\newenvironment{convention}{\begin{conventions}}
                        {\end{conventions}} 
