
% Theorem-like environments
%\theoremstyle{margin}
\newtheorem{thm}{Theorem}

\newtheorem{theorem}{Theorem}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{fact}[theorem]{Fact}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{axiom}[theorem]{Axiom}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{porism}[theorem]{Porism}

\newtheorem*{theorem*}{Theorem}
\newtheorem*{thm-defn*}{Theorem and definition}
\newtheorem*{lemma*}{Lemma}
\newtheorem*{fact*}{Fact}
\newtheorem*{corollary*}{Corollary}
\newtheorem*{proposition*}{Proposition}
% \newtheoremstyle{example}%
% {}{}{\sffamily}{}{}{.}{ }{}
% \theoremstyle{example}

\theoremstyle{definition}

\newtheorem{definition}[theorem]{Definition}
\newtheorem{notation}[theorem]{Notation}

%\newtheorem{example}[theorem]{Example}
%\newtheorem{examples}[theorem]{Examples}


\newtheorem{myexample}[theorem]{Example}
\newenvironment{example}{\begin{myexample}}{\hfill$\bullet$\end{myexample}}

\newtheorem{myexamples}[theorem]{Examples}
%\newenvironment{examples}{\begin{myexamples}}{\hfill$\bullet$\end{myexamples}} 
%Since this environment will always contain some kind of list, I am
%making the following adjustment:
\newenvironment{examples}[1]{\begin{myexamples}{#1}\begin{myenum}}%
{\hfill$\bullet$\end{myenum}\end{myexamples}}

\newtheorem*{myexample*}{Example}
\newenvironment{example*}{\begin{myexample*}}{\hfill$\bullet$\end{myexample*}}

\newtheorem*{myexamples*}{Examples}
%\newenvironment{examples*}{\begin{myexamples*}}{\hfill$\bullet$\end{myexamples*}} 
\newenvironment{examples*}[1]{\begin{myexamples*}{#1}\begin{mylist}}%
{\end{mylist}\end{myexamples*}} 

\newtheorem{exercise}[theorem]{Exercise}
\newtheorem{counter}[theorem]{Counter-Example}
\newtheorem{non}[theorem]{Non-Example}
%\newtheorem{exercise}{Exercise}
%\newtheorem{exercise}[theorem]{Exercise}
\newtheorem{problm}{Problem}
\newenvironment{problem}{\begin{problm}
\renewcommand{\theenumi}{\alph{enumi}}
\renewcommand{\labelenumi}{(\alph{enumi})}
\renewcommand{\theenumii}{\roman{enumii}}
\renewcommand{\labelenumii}{\textbf{\roman{enumii}.}}
}{\end{problm}}


\newtheorem*{definition*}{Definition}
\newtheorem*{notation*}{Notation}

%\newtheorem*{example*}{Example}
%\newtheorem*{examples*}{Examples}
\newtheorem*{nons*}{Non-examples}
\newtheorem*{counter*}{Counter-example}
\newtheorem*{exercise*}{Exercise}

\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}

\newenvironment{exercises}%
  {\subsection*{Exercises}\begin{enumerate}}%
  {\end{enumerate}}

\theoremstyle{plain}
\newtheorem*{soln}{Solution}
\newenvironment{solution}{\begin{soln}
\renewcommand{\theenumi}{\alph{enumi}}
\renewcommand{\labelenumi}{(\alph{enumi})}
\renewcommand{\theenumii}{\roman{enumii}}
\renewcommand{\labelenumii}{\textbf{\roman{enumii}.}}
}{\end{soln}}



\newcounter{txtlst}    % For lists written continuously
\renewcommand{\thetxtlst}{(\arabic{txtlst})}
%\newcommand{\next}{\thetxtlst\stepcounter{txtlst} } %incompatible
  %with xy-pic; replace with:
\newcommand{\nxt}{\thetxtlst\stepcounter{txtlst} }
\newcommand{\textlist}{\setcounter{txtlst}{0}\nxt}
