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

\newtheorem{theorem}{Theorem}[chapter]
\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{example}[theorem]{Example}
\newtheorem{examples}[theorem]{Examples}
\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}{\textnormal{(\alph{enumi})}}
\renewcommand{\theenumii}{\roman{enumii}}
\renewcommand{\labelenumii}{\textbf{\roman{enumii}.}}
}{\end{problm}}


\newtheorem*{definition*}{Definition}
\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{definition}
\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}
