% Packages
\usepackage{amsmath}              % provides \underset, etc.
\usepackage{amssymb}              % provides more symbols like semidirect product
\usepackage{accents}              % provides \accentset, etc.; must be loaded after amsmath
\usepackage{amsopn,amssymb}       % provides \DeclareMathOperator, \mathbb, etc.
\usepackage{bm}                   % provides \bm for math bold greek letters
\usepackage{bbm}                  % provides \mathbbm, eg. for lower-case blackboard bold characters
%%\usepackage{makeidx}              % make an index
\usepackage{enumerate}            % more powerful enumerate environments
%\usepackage[margin=1.5in]{geometry} % margins only
\usepackage{microtype}            % nicer text spacing
\usepackage[intoc,refpage]{nomencl}         % make a symbol list
\usepackage{multicol}             % put lists with many short entries into multiple columns
%%\usepackage[thmmarks]{ntheorem}   % theorem-like environments, configured heavily below
\usepackage{setspace}             % \doublespacing, etc.
\usepackage{shuffle}              % provides \shuffle and \cshuffle
\usepackage{soul}                 % multi-line underlines
\usepackage{thmtools}             % interface to amsthm
\usepackage{mathtools}  		% \coloneqq, etc.
\usepackage{tikz-cd}              % nice commutative diagrams; see cd environment below
\usetikzlibrary{calc}             % allow \let's in tikzpicture environments
\usetikzlibrary{positioning}      % allow "above = 1" syntax
\usepackage{xifthen}              % \ifthenelse, \isempty, etc.
\usepackage{hyperref}            % url's
\usepackage[enableskew]{youngtab}
\usepackage{ytableau}
\usepackage{cleveref}
\usepackage{multirow}
\renewenvironment{bmatrix}{\begin{ytableau}}{\end{ytableau}}

% Math operators
\DeclareMathOperator{\Ab}{Ab}
\DeclareMathOperator{\alg}{-alg}
\DeclareMathOperator{\Ann}{Ann}
\DeclareMathOperator{\Asc}{Asc}
\DeclareMathOperator{\asc}{asc}
\DeclareMathOperator{\Ass}{Ass}
\DeclareMathOperator{\cdes}{cdes}
\DeclareMathOperator{\CDes}{CDes}
\DeclareMathOperator{\CDT}{CDT}
\DeclareMathOperator{\Ch}{ch}
\DeclareMathOperator{\Char}{char}
\DeclareMathOperator{\cHom}{\mathcal{H}\textit{om}}
\DeclareMathOperator{\code}{code}
\DeclareMathOperator{\codim}{codim}
\DeclareMathOperator{\coker}{coker}
\DeclareMathOperator{\col}{col}
\DeclareMathOperator{\comaj}{comaj}
\DeclareMathOperator{\cont}{cont}
\DeclareMathOperator{\cmaj}{cmaj}
\DeclareMathOperator{\CT}{CT}
\DeclareMathOperator{\cycle}{cycle}
\DeclareMathOperator{\des}{des}
\DeclareMathOperator{\Des}{Des}
\DeclareMathOperator{\diag}{diag}
\DeclareMathOperator{\End}{End}
\DeclareMathOperator{\exc}{exc}
\DeclareMathOperator{\Ext}{Ext}
\DeclareMathOperator{\fix}{fix}
\DeclareMathOperator{\Fl}{Fl}
\DeclareMathOperator{\Flatten}{Flatten}
\DeclareMathOperator{\FP}{FP}
\DeclareMathOperator{\Flags}{Flags}
\DeclareMathOperator{\fl}{fl}
\DeclareMathOperator{\flex}{flex}
\DeclareMathOperator{\freq}{freq}
\DeclareMathOperator{\id}{id}
\DeclareMathOperator{\im}{im}
\DeclareMathOperator{\GKdim}{GKdim}
\DeclareMathOperator{\gl}{gl}
\DeclareMathOperator{\GL}{GL}
\DeclareMathOperator{\gldim}{gldim}
\DeclareMathOperator{\gr}{gr}
\DeclareMathOperator{\Gr}{Gr}
\DeclareMathOperator{\GUD}{GUD}
\DeclareMathOperator{\hgt}{ht}
\DeclareMathOperator{\Hilb}{Hilb}
\DeclareMathOperator{\Hom}{Hom}
\DeclareMathOperator{\injdim}{injdim}
\DeclareMathOperator{\Int}{int}
\DeclareMathOperator{\inv}{inv}
\DeclareMathOperator{\Kdim}{Kdim}
\DeclareMathOperator{\lcm}{lcm}
\DeclareMathOperator{\lex}{lex}
\DeclareMathOperator{\maj}{maj}
\DeclareMathOperator{\mbs}{mbs}
\DeclareMathOperator{\mmaj}{mmaj}
\DeclareMathOperator{\M}{M}
\DeclareMathOperator{\Mod}{mod}
\DeclareMathOperator{\nil}{nil}
\DeclareMathOperator{\newla}{zqqq}
\DeclareMathOperator{\NSYM}{NSYM}
\DeclareMathOperator{\NF}{NF}
\DeclareMathOperator{\NFD}{NFD}
\DeclareMathOperator{\OFD}{OFD}
\DeclareMathOperator{\ot}{\otimes}
\DeclareMathOperator{\period}{period}
\DeclareMathOperator{\Par}{Par}
\DeclareMathOperator{\Perm}{Perm}
\DeclareMathOperator{\Perms}{Perms}
\DeclareMathOperator{\PN}{PN}
\DeclareMathOperator{\pr}{p}
\DeclareMathOperator{\Pre}{pre}
\DeclareMathOperator{\projdim}{projdim}
\DeclareMathOperator{\pt}{pt}
\DeclareMathOperator{\QH}{QH}
\DeclareMathOperator{\QSYM}{QSYM}
\DeclareMathOperator{\rank}{rank}
\DeclareMathOperator{\RCDT}{RCDT}
\DeclareMathOperator{\Rect}{Rect}
\DeclareMathOperator{\Res}{Res}
\DeclareMathOperator{\Rings}{Rings}
\DeclareMathOperator{\row}{row}
\DeclareMathOperator{\RSK}{RSK}
\DeclareMathOperator{\rv}{rv}
\DeclareMathOperator{\rw}{rw}
\DeclareMathOperator{\sd}{sd}
\DeclareMathOperator{\Sets}{\textit{Sets}}
\DeclareMathOperator{\sgn}{sgn}
\DeclareMathOperator{\sh}{sh}
\DeclareMathOperator{\Sh}{Sh}
\DeclareMathOperator{\SIT}{SIT}
\DeclareMathOperator{\SL}{SL}
\DeclareMathOperator{\SO}{SO}
\DeclareMathOperator{\sort}{sort}
\DeclareMathOperator{\Sp}{Sp}
\DeclareMathOperator{\Span}{Span}
\DeclareMathOperator{\spec}{spec}
\DeclareMathOperator{\spin}{spin}
\DeclareMathOperator{\St}{St}
\DeclareMathOperator{\Stab}{Stab}
\DeclareMathOperator{\str}{str}
\DeclareMathOperator{\Supp}{Supp}
\DeclareMathOperator{\SST}{SST}
\DeclareMathOperator{\SSYT}{SSYT}
\DeclareMathOperator{\stab}{stab}
\DeclareMathOperator{\stat}{stat}
\DeclareMathOperator{\std}{std}
\DeclareMathOperator{\syt}{syt}
\DeclareMathOperator{\SYT}{SYT}
\DeclareMathOperator{\SYM}{SYM}
\DeclareMathOperator{\Sym}{Sym}
\DeclareMathOperator{\ssum}{ssum}
\DeclareMathOperator{\Sum}{sum}
\DeclareMathOperator{\TL}{TL}
\DeclareMathOperator{\Tot}{Tot}
\DeclareMathOperator{\Tr}{Tr}
\DeclareMathOperator{\trdeg}{trdeg}
\DeclareMathOperator{\UD}{UD}
\DeclareMathOperator{\wgt}{wgt}
\DeclareMathOperator{\W}{W}
\DeclareMathOperator{\word}{word}
\DeclareMathOperator{\Words}{Words}
\DeclareMathOperator{\x}{\times}
\DeclareMathOperator{\YUD}{YUD}
% Named ``ilim'' for ``inverse limit'' to avoid conflicting with \lim
\newcommand{\ilim}{\operatornamewithlimits{\underset{\longleftarrow}{lim}}}
% ``dlim'' for ``direct limit''
\newcommand{\dlim}{\operatornamewithlimits{\underset{\longrightarrow}{lim}}}
\newcommand{\mbinom}[2]{\left(\!\!\binom{#1}{#2}\!\!\right)}

% Convenient shortcuts
\newcommand{\bA}{\mathbb{A}}
\newcommand{\bC}{\mathbb{C}}
\newcommand{\bE}{\mathbb{E}}
\newcommand{\bF}{\mathbb{F}}
\newcommand{\bk}{\mathbbm{k}}
\newcommand{\bN}{\mathbb{N}}
\newcommand{\bP}{\mathbb{P}}
\newcommand{\bQ}{\mathbb{Q}}
\newcommand{\bR}{\mathbb{R}}
\newcommand{\bZ}{\mathbb{Z}}
\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{\cL}{\mathcal{L}}
\newcommand{\cM}{\mathcal{M}}
\newcommand{\cO}{\mathcal{O}}
\newcommand{\cP}{\mathcal{P}}
\newcommand{\cR}{\mathcal{R}}
\newcommand{\cS}{\mathcal{S}}
\newcommand{\fg}{\mathfrak{g}}
\newcommand{\fm}{\mathfrak{m}}
\newcommand{\fn}{\mathfrak{n}}
\newcommand{\fp}{\mathfrak{p}}
\newcommand{\fq}{\mathfrak{q}}
\newcommand{\fS}{\mathfrak{S}}
\newcommand{\fU}{\mathfrak{U}}
\newcommand{\tsub}{\mathrel{\unlhd}}

% Convenient general macros
\newcommand{\up}{\mathord{\uparrow}}
\newcommand{\Ind}{\mathord{\uparrow}}
\newcommand{\down}{\mathord{\downarrow}}
\renewcommand{\star}{\mathord{*}}
\newcommand{\too}[1]{\stackrel{#1}{\to}}
\newcommand{\tooo}[2]{\underset{#2}{\overset{#1}{\to}}}
\newcommand{\oo}[3]{\underset{#3}{\overset{#2}{#1}}}
\newcommand{\sline}{\noindent\makebox[\linewidth]{\rule{\linewidth}{0.4pt}}}
\newcommand{\mdy}[1]{\sline\vspace{0.19cm}\\\centering{\Large{\textbf{#1}}}\\\sline}
\newcommand{\ind}{\!\!\uparrow}
\newcommand{\res}{\!\!\downarrow}
\newcommand{\f}{\frac}
\newcommand{\n}{\f{1}{n}}
\newcommand{\lm}{\lambda}
\newcommand{\lam}{\lambda}
\newcommand{\pa}[1]{{\left( {#1}\right)}}
\newcommand{\ha}{\f{1}{2}}
\newcommand{\sub}{\subset}
\newcommand{\al}{\alpha}
\newcommand{\8}{\infty}
\newcommand{\es}{\emptyset}
\newcommand{\bs}{\bigskip}
\newcommand{\D}{\Delta}
\newcommand{\de}{\delta}
\newcommand{\be}{\beta}
\newcommand{\w}{\omega}
\newcommand{\s}{\sigma}
\newcommand{\si}{\sigma}
\newcommand{\g}{\gamma}
\newcommand{\dd}{\cdot}
\newcommand{\zhat}{\widehat{0}}
\newcommand{\ohat}{\widehat{1}}
\newcommand{\idd}{\accentset{\bullet}{\iota}}
\newcommand{\nur}{\overset{\to}{\nu}}
\newcommand{\nul}{\overset{\gets}{\nu}}
\newcommand{\wt}[1]{\widetilde{#1}}
\newcommand{\tx}{\text}
\newcommand{\ti}{\tilde}
\newcommand{\sm}{\setminus}
\newcommand{\lp}{\left(}
\newcommand{\rp}{\right)}
\newcommand{\lb}{ \left\{}
\newcommand{\rb}{ \right\} }
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}
\newcommand{\ch}{\binom}
\newcommand{\imp}{\implies}
\newcommand{\va}{\varphi}
\newcommand{\udot}{\dot{\,}}
\newcommand{\mch}[2]{%
  \left.\mathchoice%
    {\left(\kern-0.48em\ch{#1}{#2}\kern-0.48em\right)}
    {\big(\kern-0.30em\ch{\smash{#1}}{\smash{#2}}\kern-0.30em\big)}
    {\left(\kern-0.30em\ch{\smash{#1}}{\smash{#2}}\kern-0.30em\right)}
    {\left(\kern-0.30em\ch{\smash{#1}}{\smash{#2}}\kern-0.30em\right)}
  \right.
}
\newcommand{\ms}{\medskip}
\newcommand{\sube}{\subseteq}
\newcommand{\byt}{\begin{ytableau}}
\newcommand{\eyt}{\end{ytableau}}

% rc-graph macros
\font\co=lcircle10
\def\petit#1{{\scriptstyle #1}}
\def\pes#1#2{\hbox{\rlap{$\petit {#1}_{\scriptscriptstyle #2}$}}
    \phantom{\petit 1}}
\def\plb{\smash{\lower2pt\hbox{\rlap{\vrule height12pt}}
                \raise2pt\hbox{\rlap{\hskip-4pt
                \vrule height.4pt depth0pt width14.7pt}}}}
\def\py{\smash{\raise2pt\hbox{\co \rlap{\rlap{\char'005} \char'007}}
               \raise6pt\hbox{\rlap{\vrule height4.5pt}}
               \raise2pt\hbox{\rlap{\hskip4pt \vrule height0.4pt depth0pt 
                              width6.5pt}}}}
\def\pe{\smash{\raise2pt\hbox{\co \rlap{\rlap{\char'005}
                 \phantom{\char'007}}}
               \raise6pt\hbox{\rlap{\vrule height4.5pt}}}}

% Mark Haiman's tableaux macro, modified to put dashed lines around empty boxes
\setlength{\unitlength}{0.06em}
\newlength{\cellsize} \setlength{\cellsize}{18\unitlength}
\newsavebox{\cell}
\sbox{\cell}{\begin{picture}(18,18)
\put(0,0){\line(1,0){18}}
\put(0,0){\line(0,1){18}}
\put(18,0){\line(0,1){18}}
\put(0,18){\line(1,0){18}}
\end{picture}}
\newsavebox{\dashedcell}
\sbox{\dashedcell}{\begin{picture}(18,18)
\multiput(0,0)(5,0){4}{\line(1,0){3}}
\multiput(0,0)(0,5){4}{\line(0,1){3}}
\multiput(18,0)(0,5){4}{\line(0,1){3}}
\multiput(0,18)(5,0){4}{\line(1,0){3}}
\end{picture}}
\newcommand\cellify[1]{\def\thearg{#1}\def\nothing{}%
\ifx\thearg\nothing
\hbox to 0pt{\usebox{\dashedcell} \hss}\else%
\hbox to 0pt{\usebox{\cell} \hss}\fi%
\vbox to \cellsize{
\vss
\hbox to \cellsize{\hss$#1$\hss}
\vss}}
\newcommand\tableau[1]{\vtop{\let\\\cr
\baselineskip -16000pt \lineskiplimit 16000pt \lineskip 0pt
\ialign{&\cellify{##}\cr#1\crcr}}}

\newenvironment{cd}[1][]
  {\begin{center}\begin{tikzcd}[#1]}
  {\end{tikzcd}\end{center}}

% Index/nomenclature configuration and macros
\renewcommand\nomname{List of Symbols}
\newcommand{\bu}[2][]{\framebox{#2}\ifthenelse{\isempty{#1}}{\index{#2}}
    {\index{#1@#2}}}
\newcommand{\mbu}[3][]{\boxed{#2}\nomenclature[$#1$]{$#2$}{#3}}

% Section macros
\newcommand{\Section}[1]{\begin{samepage}\sline\vspace{-0.5cm}\section*{\centering{#1}}\vspace{-0.5cm}\sline
  \addcontentsline{toc}{subsection}{#1}\end{samepage}}
\newcommand{\Subsection}[1]{\subsection*{\centering\color{teal}#1}
  \addcontentsline{toc}{subsection}{#1}}
\newcommand{\Subsubsection}[1]{\subsubsection*{\centering\color{teal}#1}
  \addcontentsline{toc}{subsubsection}{#1}}

% Modify standard distance between paragraphs; makes them look much better inside
%   ntheorem environments
%\setlength{\parskip}{0.3cm}

\theoremstyle{definition}
\newtheorem{Theorem}{Theorem}[section]
\newtheorem*{Theorem*}{Theorem}
\newtheorem{Thm}[Theorem]{Theorem}
\newtheorem{Lemma}[Theorem]{Lemma}
\newtheorem{Proposition}[Theorem]{Proposition}
\newtheorem{Corollary}[Theorem]{Corollary}
\newtheorem{Claim}[Theorem]{Claim}
\newtheorem{Fact}[Theorem]{Fact}
\newtheorem{Conjecture}[Theorem]{Conjecture}
\newtheorem{Question}[Theorem]{Question}
\newtheorem{Problem}[Theorem]{Open Problem}

\newtheorem{Notation}[Theorem]{Notation}
\declaretheorem[style=definition,sibling=Theorem]{Definition}
%\newtheorem{Definition}[Theorem]{Definition}
\newtheorem{Example}[Theorem]{Example}
\newtheorem{Remark}[Theorem]{Remark}
\newtheorem{Aside}[Theorem]{Aside}
\newtheorem*{Summary}{Summary}
\newtheorem*{Outline}{Outline}
