%  MACROS FOR THEOREMS, PROOFS, AND DEFINITITONS

\newtheorem{theorem}{Theorem}                   % theorem
\newtheorem{lemma}[theorem]{Lemma}              % lemma
\newtheorem{corollary}[theorem]{Corollary}      % corollary
\newtheorem{proposition}[theorem]{Proposition}  % proposition
\newtheorem{claim}[theorem]{Claim}              % claim
\newtheorem{conjecture}[theorem]{Conjecture}    % conjecture
\newtheorem{fact}[theorem]{Fact}                % fact
\newtheorem{definition}[theorem]{Definition}    % definition
\newtheorem{example}{Example}                   % example

\newcommand{\mythmbeg}[1]{\begin{#1}}
\newcommand{\mythmend}[1]{\end{#1}}
\newcommand{\indtheorems}{
        \renewcommand{\mythmbeg}[1]{\begin{quote}\begin{##1}}
        \renewcommand{\mythmend}[1]{\end{##1}\end{quote}}
 }
 % above supersedes all the \ind macros following

\newcommand{\indtheorem}{\begin{quote}\begin{theorem}}
\newcommand{\indtheoremend}{\end{theorem}\end{quote}}
\newcommand{\indlemma}{\begin{quote}\begin{lemma}}
\newcommand{\indlemmaend}{\end{lemma}\end{quote}}
\newcommand{\indcor}{\begin{quote}\begin{corollary}}
\newcommand{\indcorend}{\end{corollary}\end{quote}}
\newcommand{\indclaim}{\begin{quote}\begin{claim}}
\newcommand{\indclaimend}{\end{claim}\end{quote}}

\newcommand{\thmhead}{\noindent {\bf Theorem:} }
\newcommand{\lemmahead}{\noindent {\bf Lemma:} }
\newcommand{\corhead}{\noindent {\bf Corollary:} }
\newcommand{\claimhead}{\noindent {\bf Claim:} }
\newcommand{\facthead}{\noindent {\bf Fact:} }
\newcommand{\defnhead}{\noindent {\bf Definition:} }
\newcommand{\exhead}{\noindent {\bf Example:} }

\newcommand{\remark}{{\it Remark.}\ \ }
\newcommand{\note}{{\it Note.}\ \ }
\newenvironment{proof}{\noindent {\it Proof.}\ \ }{\qed}
\newenvironment{proofsketch}{\noindent {\it Proof sketch.}\ \ }{\qed}
\newenvironment{proofidea}{\noindent {\it Idea of proof.}\ \ }{\qed}

\newcommand{\Wolog}{Without loss of generality}
\newcommand{\wolog}{without loss of generality}
\makeatletter
\def\qed{%                      Taken from Texlist digest V88, I55
   {%
      \unskip
      \nobreak \hfil
      \penalty 50               % TeX should break here if necessary
      \hskip 3em                % mimium amount of distance
      \null \nobreak \hfil
      \qedbox
      \parfillskip=\z@skip
      \finalhyphendemerits=\z@  % no line break at last line of paragraph
      \endgraf                  % don't know what \par is in this moment...
   }}
\makeatother
\newcommand{\qedbox}{\ \hfill\rule{1.5ex}{1.5ex}\vspace{\smallskipamount}}
