\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{eucal}
%\usepackage{amscd}
%\usepackage{amsxtra}
%\usepackage{upref}

%\usepackage{oneinchmargins}

%\usepackage{cite}      % macro for automatic sorting of citations
%\usepackage{pspicture} % use PostScript for LaTeX picture commands
%\usepackage{quote}     % automatically replace " with `` or '' as appropriate
%\begindoublequotes
%\usepackage{setspace}  % enable easy toggle between different line spacings

\usepackage[all]{xy}
\CompileMatrices

\DeclareFontFamily{OT1}{rsfs}{}
\DeclareFontShape{OT1}{rsfs}{n}{it}{<-> rsfs10}{}
\DeclareMathAlphabet{\mathscr}{OT1}{rsfs}{n}{it}

\DeclareMathOperator{\Hom}{Hom}
\DeclareMathOperator{\Ext}{Ext}
\DeclareMathOperator{\Gal}{Gal}
\DeclareMathOperator{\GL}{GL}
\DeclareMathOperator{\PGL}{PGL}
\DeclareMathOperator{\Aut}{Aut}
\DeclareMathOperator{\Spec}{Spec}
\DeclareMathOperator{\Proj}{Proj}
\DeclareMathOperator{\Mod}{mod}
\DeclareMathOperator{\coker}{coker}
\DeclareMathOperator{\et}{\acute{e}t}
\newcommand*{\invlim}{\varprojlim}                               % invlimit
\newcommand*{\tensorhat}{\widehat{\otimes}}                      %compl. tensor
\newcommand*{\R}{\ensuremath{\mathbf{R}}}                        % reals
\newcommand*{\Z}{\ensuremath{\mathbf{Z}}}                        % integers
\newcommand*{\Q}{\ensuremath{\mathbf{Q}}}                        % rationals
\newcommand*{\F}{\ensuremath{\mathbf{F}}}                        % field
\newcommand*{\C}{\ensuremath{\mathbf{C}}}                        % complex's
\newcommand*{\A}{\ensuremath{\mathbf{A}}}                        % affine/adele
\newcommand*{\N}{\ensuremath{\mathbf{N}}}                        % naturals
\renewcommand*{\P}{\ensuremath{\mathbf{P}}}                        % proj space
\newcommand*{\m}{\mathfrak{m}}                                   % gothic m
\newcommand*{\n}{\mathfrak{n}}                                   % gothic n
\newcommand*{\p}{\mathfrak{p}}                                   % gothic p
\newcommand*{\q}{\mathfrak{q}}                                   % gothic q
\renewcommand*{\r}{\mathfrak{r}}                                 % gothic r
\newcommand*{\barrho}{\overline{\rho}}                           % rho bar
\newcommand*{\Qbar}{\overline{\Q}}                               % alg clos Q
\newcommand*{\Fbar}{\overline{\F}}                               % alg clos F
\renewcommand*{\O}{\mathcal{O}}                                  % 'sheaf' O
\newcommand*{\calA}{\mathcal{A}}
\newcommand*{\calE}{\mathcal{E}}                               % `sheaf' E
\newcommand*{\calF}{\mathcal{F}}                               % 'sheaf' F
\newcommand*{\calG}{\mathcal{G}}                               % 'sheaf' G
\newcommand*{\calH}{\mathcal{H}}                               % 'sheaf' H
\newcommand*{\calI}{\mathcal{I}}                               % 'sheaf' I
\newcommand*{\calJ}{\mathcal{J}}                               % 'sheaf' J
\newcommand*{\calL}{\mathcal{L}}                               % `sheaf' L
\newcommand*{\calS}{\mathcal{S}}                               % `sheaf' S
\newcommand*{\calHom}{\mathcal{H}\mathit{om}}                  % `sheaf' Hom
\newcommand*{\calExt}{\mathcal{E}\mathit{xt}}                  % `sheaf' Ext
\renewcommand*{\qedsymbol}{\ensuremath{\blacksquare}}            % end of proof
\newcommand*{\eqdef}{\stackrel{\text{def}}{=}}     % definition

% \swapnumbers
\theoremstyle{plain}
  \newtheorem{theorem}[subsection]{Theorem}
  \newtheorem{proposition}[subsection]{Proposition}
  \newtheorem{lemma}[subsection]{Lemma}
  \newtheorem{corollary}[subsection]{Corollary}

\theoremstyle{definition}
  \newtheorem{definition}[subsection]{Definition}
  \newtheorem{notation}{Notation}

\theoremstyle{remark}
  \newtheorem{example}[subsection]{Example}
  \newtheorem{remark}[subsection]{Remark}
  \newtheorem{remarks}[subsection]{Remarks}
  \newtheorem{exercise}[subsection]{Exercise}
  \newtheorem{warning}[subsection]{Warning}







