%%%%%%%%Macro file for log geometry

% Qile Chen's macros

\usepackage[all,ps,cmtip]{xy} % For commutative diagrams, using xy-pic

\newtheorem{thm}[equation]{Theorem} % For theorems. 
\newtheorem{prop}[equation]{Proposition} % For propositions. 
\newtheorem{lem}[equation]{Lemma} % For lemmas.
\newtheorem{cor}[equation]{Corollary} % For remarks. 
\theoremstyle{remark}
\newtheorem{defn}[equation]{Definition} % For definitions. 
\newtheorem{rem}[equation]{Remark} % For remarks. 
\newtheorem{eg}[equation]{Example} % For examples. 

\newcommand{\Z}{\mathbb{Z}}     % Integers
\newcommand{\N}{\mathbb{N}}     % Natural Numbers
\newcommand{\C}{\mathbb{C}}     % Complex Numbers

\newcommand{\sH}{\mathcal{H}}   % For "H" in the sheaf "Hom" 
\newcommand{\sM}{\mathcal{M}}   % For a log structure
\newcommand{\sN}{\mathcal{N}}   % For a log structure
\newcommand{\sO}{\mathcal{O}}  % For the structure sheaf

% Dan Abramovich's Macros

% a. Dan's long names for theorems and such
\theoremstyle{plain}
\newtheorem{theorem}[equation]{Theorem} % For theorems. 
\newtheorem{proposition}[equation]{Proposition} % For propositions. 
\newtheorem{lemma}[equation]{Lemma} % For lemmas.
\theoremstyle{remark}
\newtheorem{definition}[equation]{Definition} % For definitions. 
\newtheorem{remark}[equation]{Remark} % For remarks. 
\newtheorem{example}[equation]{Example} % For examples. 
\newtheorem{question}[equation]{Question} % For questions. 

% b. Dan's standard sets of characters

\newcommand\cA{\mathcal{A}}
\newcommand\cB{\mathcal{B}}
\newcommand\cC{\mathcal{C}}
\newcommand\cD{\mathcal{D}}
\newcommand\cE{\mathcal{E}}
\newcommand\cF{\mathcal{F}}
\newcommand\cG{\mathcal{G}}
\newcommand\cH{\mathcal{H}}
\newcommand\cI{\mathcal{I}}
\newcommand\cJ{\mathcal{J}}
\newcommand\cK{\mathcal{K}}
\newcommand\cL{\mathcal{L}}
\newcommand\cM{\mathcal{M}}
\newcommand\cN{\mathcal{N}}
\newcommand\cO{\mathcal{O}}
\newcommand\cP{\mathcal{P}}
\newcommand\cQ{\mathcal{Q}}
\newcommand\cR{\mathcal{R}}
\newcommand\cS{\mathcal{S}}
\newcommand\cT{\mathcal{T}}
\newcommand\cU{\mathcal{U}}
\newcommand\cV{\mathcal{V}}
\newcommand\cW{\mathcal{W}}
\newcommand\cX{\mathcal{X}}
\newcommand\cY{\mathcal{Y}}
\newcommand\cZ{\mathcal{Z}}


\renewcommand\AA{\mathbb{A}}
\newcommand\BB{\mathbb{B}}
\newcommand\CC{\mathbb{C}}
\newcommand\DD{\mathbb{D}}
\newcommand\EE{\mathbb{E}}
\newcommand\FF{\mathbb{F}}
\newcommand\GG{\mathbb{G}}
\newcommand\HH{\mathbb{H}}
\newcommand\II{\mathbb{I}}
\newcommand\JJ{\mathbb{J}}
\newcommand\KK{\mathbb{K}}
\newcommand\LL{\mathbb{L}}
\newcommand\MM{\mathbb{M}}
\newcommand\NN{\mathbb{N}}
\newcommand\OO{\mathbb{O}}
\newcommand\PP{\mathbb{P}}
\newcommand\QQ{\mathbb{Q}}
\newcommand\RR{\mathbb{R}}
\renewcommand\SS{\mathbb{S}}
\newcommand\TT{\mathbb{T}}
\newcommand\UU{\mathbb{U}}
\newcommand\VV{\mathbb{V}}
\newcommand\WW{\mathbb{W}}
\newcommand\XX{\mathbb{X}}
\newcommand\YY{\mathbb{Y}}
\newcommand\ZZ{\mathbb{Z}}

\newcommand\bA{\mathbf{A}}
\newcommand\bB{\mathbf{B}}
\newcommand\bC{\mathbf{C}}
\newcommand\bD{\mathbf{D}}
\newcommand\bE{\mathbf{E}}
\newcommand\bF{\mathbf{F}}
\newcommand\bG{\mathbf{G}}
\newcommand\bH{\mathbf{H}}
\newcommand\bI{\mathbf{I}}
\newcommand\bJ{\mathbf{J}}
\newcommand\bK{\mathbf{K}}
\newcommand\bL{\mathbf{L}}
\newcommand\bM{\mathbf{M}}
\newcommand\bN{\mathbf{N}}
\newcommand\bO{\mathbf{O}}
\newcommand\bP{\mathbf{P}}
\newcommand\bQ{\mathbf{Q}}
\newcommand\bR{\mathbf{R}}
\newcommand\bS{\mathbf{S}}
\newcommand\bT{\mathbf{T}}
\newcommand\bU{\mathbf{U}}
\newcommand\bV{\mathbf{V}}
\newcommand\bW{\mathbf{W}}
\newcommand\bX{\mathbf{X}}
\newcommand\bY{\mathbf{Y}}
\newcommand\bZ{\mathbf{Z}}

%Dan's other commands
\newcommand{\ocM}{{\overline{\mathcal{M}}}}
\DeclareMathOperator{\Lift}{Lift}
%Matt's macros

\newtheorem*{philosophy}{Philosophy}

\newcommand{\til}[1]{\tilde{#1}}
\newcommand{\mf}[1]{\mathfrak{#1}}
\newcommand{\mgn}{\mathcal{M}_{g,n}}
\newcommand{\mgnb}{{\overline{\mathcal{M}}}_{g,n}}
\newcommand{\lmgnb}{{\overline{\mathcal{M}}}_{g,n}^{log}}

\newcommand{\sI}{\mathcal{I}}
\newcommand{\sS}{\mathcal{S}}
\newcommand{\sZ}{\mathcal{Z}}


\DeclareMathOperator{\Spec}{Spec}
\DeclareMathOperator{\im}{im}
\DeclareMathOperator{\coker}{coker}


%Yuhao Huang's Macros

%%%%%%%%%%%%%%% alphabet %%%%%%%%%%%%%%%%%%%%%%%%%%%%%


%%%%%%%%%%%%%        very basic macros       %%%%%%%%%%%%

\newcommand{\nc}{\newcommand}%DONE
\newcommand{\enm}{\ensuremath}%DONE

\nc{\m}{\enm}

\nc{\doc}{\begin{document}}%DONE
\nc{\docd}{\end{document}}%DONE
% Mathcal with DHLR redefined. ??
\nc{\mA}{\enm{\mathcal{A}}}
\nc{\mB}{\enm{\mathcal{B}}}
\nc{\mC}{\enm{\mathcal{C}}}
\nc{\mD}{\enm{\mathcal{D}}}
\nc{\mE}{\enm{\mathcal{E}}}
\nc{\mF}{\enm{\mathcal{F}}}
\nc{\mG}{\enm{\mathcal{G}}}
\nc{\mH}{\enm{\mathcal{H}}}
\nc{\mI}{\enm{\mathcal{I}}}
\nc{\mJ}{\enm{\mathcal{J}}}
\nc{\mK}{\enm{\mathcal{K}}}
\nc{\mL}{\enm{\mathcal{L}}}
\nc{\mM}{\enm{\mathcal{M}}}
\nc{\mN}{\enm{\mathcal{N}}}
\nc{\mO}{\enm{\mathcal{O}}}
\nc{\mP}{\enm{\mathcal{P}}}
\nc{\mQ}{\enm{\mathcal{Q}}}
\nc{\mR}{\enm{\mathcal{R}}}
\nc{\mS}{\enm{\mathcal{S}}}
\nc{\mT}{\enm{\mathcal{T}}}
\nc{\mU}{\enm{\mathcal{U}}}
\nc{\mV}{\enm{\mathcal{V}}}
\nc{\mW}{\enm{\mathcal{W}}}
\nc{\mX}{\enm{\mathcal{X}}}
\nc{\mY}{\enm{\mathcal{Y}}}
\nc{\mZ}{\enm{\mathcal{Z}}}

%%%%%%%%%%     writing words for short       %%%%%%%%%%%%%%

\nc{\bg}{\begin}%DONE
\nc{\ed}{\end}%DONE

\nc{\mcal}{\mathcal}%DONE

\nc{\elt}{element }

\nc{\enum}{\enumerate}
\nc{\eq}{\equation}
\nc{\etale}{\'etale }

\nc{\geom}{geometric }
\nc{\gpd}{groupoid }

\nc{\isom}{isomorphism }

\nc{\ladic}{$l$-adic}
\nc{\les}{long exact sequence }

\nc{\nbhd}{neighborhood }
\nc{\nth}{\ensuremath{n}-th }

\nc{\padic}{\ensuremath{p}-adic}
\nc{\pt}{point }

\nc{\scr}{\mathscr}%DONE
\nc{\ses}{short exact sequence }
\nc{\std}{standard }
\nc{\str}{structure }

\nc{\Thm}{Theorem }

\nc{\xet}{\enm{X_{\acute{e}t}}}
%\nc{\mX}{\enm{X}}

\nc{\zz}{\vspace{3ex}} % gives a blank line. 



%%%%%     Declaration of Math operators     %%%%%
\nc{\dc}{\DeclareMathOperator}
\dc{\Aut}{Aut}

\dc{\Coh}{Coh}
\dc{\Coker}{Coker}

\dc{\Div}{Div}

\dc{\End}{End}
\dc{\Exal}{Exal}
\dc{\Ext}{Ext}
\dc{\sExt}{} %sheafy ext

\dc{\GL}{GL}

%\dc{\H}{H} %for cohomology
\dc{\Hom}{Hom}
\dc{\sHom}{} %sheafy hom

\dc{\iso}{\cong}

\dc{\Ker}{Ker}

\dc{\PGL}{PGL}
\dc{\Pic}{Pic}
\dc{\Proj}{Proj}

\dc{\Tor}{Tor}

%%%%%%%%%%%%%% Arrows %%%%%%%%%%%%%%
\nc{\into}{\hookrightarrow}
\nc{\onto}{\twoheadrightarrow}
\nc{\ra}{\rightarrow}

%%%%%     Writing Math for short     %%%%%

\nc{\Aone}{\enm{\mathbb{A}^1}} 
\nc{\An}{\enm{\mathbb{A}^n}} 

\nc{\Ga}{\enm{\mathbb{G}_\text{a}}} 
\nc{\Gm}{\enm{\mathbb{G}_\text{m}}} 
\nc{\Het}[1]{\enm{H^{#1}_\text{\'et}}} 

\nc{\oo}{\enm{\mathcal{O}}} 
\nc{\ox}{\enm{\mathcal{O}_X}} 
\nc{\osub}[1]{\enm{\mcal{O}_{#1}}} 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\nc{\algn}{\begin{aligned}} 
\nc{\algnd}{\end{aligned}}

%%%%%%%%%%%%%%%%%%% some fancy macros %%%%%%%%%%%%%%%%%%%%
\nc{\quot}[3][\Big/]{\raisebox{.6ex}{\enm{#2}}\!\!\ensuremath{#1}\!\raisebox{-1.3ex}{\ensuremath{#3}}}
%example: \quot{S}{G} gives the quotient of S by G

\nc{\globalquotient}[2]{\left[\quot{#1}{#2}\right]}
%example: \globalquotient{\text{Space}}{\text{\Group}}

\nc{\mor}[3]{\xymatrix{#1\ar[r]^{#2}&#3}}

\nc{\squarediagram}[8]{\xymatrix{
#1  \ar[r]^{#5}\ar[d]_{#7} &    #2  \ar[d]^{#8}  \\
#3  \ar[r]^{#6}            &    #4}}
%example: \squarediagram{A}{B}{C}{D}{f}{g}{u}{v} gives a square diagram with objects ABCD and arrows f,g,u,v.

\nc{\simplediagram}[4]{\xymatrix{
#1  \ar[r]\ar[d] &    #2  \ar[d]  \\
#3  \ar[r]       &    #4}}
%example: \simplediagram{A}{B}{C}{D} gives a simple square diagram.

%Table:
\nc{\tab}[2][tbp]{\begin{table}[#1]\begin{center}\begin{tabular}{#2}}
\nc{\tabd}[1][]{\end{tabular}\caption{#1}\end{center}\end{table}} 

% End of Yuhao Huang's Macros

%Yuhao's theoremstyles
%\newtheorem{cor}[thm]{Corollary}

\theoremstyle{remark}
\newtheorem{rmk}{Remark}
\newtheorem*{conv}{Convention}
%end of Yuhao's theoremstyles

%begin Gillam's commands
\newcommand{\be}{\begin{eqnarray*}}   % saves some typing                        
\newcommand{\ee}{\end{eqnarray*}}
\newcommand{\B}{\operatorname{B}}     % preliminary oriented real blowup         
\newcommand{\Blo}{\operatorname{Blo}} % oriented real blowup                     
\newcommand{\Id}{\operatorname{Id}}   % identity                                 
\renewcommand{\H}{\operatorname{H}}   % (co)homology                             
\renewcommand{\O}{\mathcal O}         % structure sheaf                          



