\newtheorem{dummy}{Dummy}%[section]
\def\newthm#1#2{\newtheorem{#1}[dummy]{#2}%
  \expandafter\def\csname#2\endcsname##1{\hyperref[#1:##1]{#2~\ref*{#1:##1}}}}
\newthm{thm}{Theorem}
\newthm{lemma}{Lemma}
\newthm{prop}{Proposition}
\newthm{cor}{Corollary}
\newthm{conj}{Conjecture}
\newthm{cons}{Consequence}
\newthm{fact}{Fact}
\newthm{obs}{Observation}
\newthm{guess}{Guess}
\theoremstyle{definition}
\newthm{defn}{Definition}
\newthm{remark}{Remark}
\newthm{example}{Example}
\newthm{question}{Question}
\newthm{notation}{Notation}

\makeatletter
\def\namedlabel#1#2{\begingroup
  #2%
  \def\@currentlabel{#2}%
  \phantomsection\label{#1}\endgroup
}
\makeatother

\newcommand{\Section}[1]{\hyperref[sec:#1]{Section~\ref*{sec:#1}}}
\newcommand{\Table}[1]{\hyperref[tab:#1]{Table~\ref*{tab:#1}}}
\newcommand{\eqn}[1]{\hyperref[eqn:#1]{(\ref*{eqn:#1})}}
\newcommand{\Figure}[1]{\hyperref[fig:#1]{Figure~\ref*{fig:#1}}}
\renewcommand\thesubfigure{\textsc{\alph{subfigure}}}

\DeclareMathOperator{\GL}{GL}
\DeclareMathOperator{\SL}{SL}
\DeclareMathOperator{\Sp}{Sp}
\DeclareMathOperator{\SO}{SO}
\DeclareMathOperator{\Gr}{Gr}
\DeclareMathOperator{\Fl}{Fl}
\DeclareMathOperator{\LG}{LG}
\DeclareMathOperator{\SG}{SG}
\DeclareMathOperator{\SF}{SF}
\DeclareMathOperator{\OG}{OG}
\DeclareMathOperator{\OF}{OF}
\DeclareMathOperator{\Mat}{Mat}
\DeclareMathOperator{\Hom}{Hom}
\DeclareMathOperator{\Aut}{Aut}
\DeclareMathOperator{\Ker}{Ker}
\DeclareMathOperator{\Span}{Span}
\DeclareMathOperator{\Spec}{Spec}
\DeclareMathOperator{\Sing}{Sing}
\DeclareMathOperator{\QH}{QH}
\DeclareMathOperator{\QK}{QK}
\DeclareMathOperator{\K}{K}
\DeclareMathOperator{\pt}{pt}
\DeclareMathOperator{\chr}{char}
\DeclareMathOperator{\codim}{codim}
\DeclareMathOperator{\Lie}{Lie}
\DeclareMathOperator{\Pic}{Pic}
\DeclareMathOperator{\Rep}{Rep}
\DeclareMathOperator{\diag}{diag}
\DeclareMathOperator{\dist}{dist}
\def\poly{{\mathrm{poly}}}
\DeclareMathOperator{\Ch}{ch}

\DeclareMathOperator{\ch}{\ch}
\newcommand{\Oh}{\mathcal{O}}
\DeclareMathOperator{\QKTpoly}{QK^{poly}_{\mathit{T}}}
\DeclareMathOperator{\Tor}{\textbf{\textrm{\underline{Tor}}}}
%\usepackage{soul}
%\setul{}{0.5pt}
\usepackage{bm}
\newcommand{\lbr}{\bm{[}}
\newcommand{\rbr}{\bm{]}}


\newcommand{\ssm}{\smallsetminus}
\newcommand{\bP}{{\mathbb P}}
\renewcommand{\P}{{\mathbb P}}
\newcommand{\C}{{\mathbb C}}
\newcommand{\R}{{\mathbb R}}
\newcommand{\Q}{{\mathbb Q}}
\newcommand{\Z}{{\mathbb Z}}
\newcommand{\N}{{\mathbb N}}
\newcommand{\cE}{{\mathcal E}}
\newcommand{\cF}{{\mathcal F}}
\newcommand{\cL}{{\mathcal L}}
\newcommand{\cM}{{\mathcal M}}
\newcommand{\cO}{{\mathcal O}}
\newcommand{\cP}{{\mathcal P}}
\newcommand{\cD}{{\mathcal D}}
\newcommand{\cS}{{\mathcal S}}
\newcommand{\cT}{{\mathcal T}}
\newcommand{\cZ}{{\mathcal Z}}
\newcommand{\ds}{\displaystyle}
\newcommand{\gw}[2]{\langle #1 \rangle^{\mbox{}}_{#2}}
\newcommand{\egw}[2]{\langle #1 \rangle^T_{#2}}
\newcommand{\euler}[1]{\chi_{_{#1}}}
\newcommand{\id}{\text{id}}
\newcommand{\bull}{{\scriptscriptstyle \bullet}}
\newcommand{\al}{{\alpha}}
\newcommand{\be}{{\beta}}
\newcommand{\ga}{{\gamma}}
\newcommand{\vep}{{\varepsilon}}
\newcommand{\ka}{{\kappa}}
\newcommand{\la}{{\lambda}}
\newcommand{\La}{{\Lambda}}

\newcommand{\Bl}{\text{B$\ell$}}
\newcommand{\sh}{\operatorname{shape}}
\DeclareMathOperator{\ev}{ev}
\newcommand{\wt}{\widetilde}
\newcommand{\wh}{\widehat}
\newcommand{\wb}{\overline}
\newcommand{\ov}{\overline}
\newcommand{\pic}[2]{\includegraphics[scale=#1]{#2}}
\newcommand{\ignore}[1]{}
\newcommand{\fixme}[1]{{\bf (*** #1 ***)}}
\newcommand{\Mb}{\wb{\mathcal M}}

\newcommand{\Gq}{\Gamma\llbracket q\rrbracket}
\newcommand{\noin}{\noindent}
\newcommand{\lex}{{\operatorname{lex}}}

\newcommand{\M}{\overline{M}}

\newcommand{\todo}[1]{\vspace{5 mm}\par \noindent
  \marginpar{\textsc{ToDo}}
  \framebox{\begin{minipage}[c]{0.95 \textwidth}
      \tt #1 \end{minipage}}\vspace{5 mm}\par}

\DeclarePairedDelimiter{\bracks}{\lbrack}{\rbrack}

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: t
%%% End: 
