% Limits
%----------------------------------------------------------------
\newcommand{\tendsto}{\mathop{\longrightarrow}\limits}
\newcommand{\tendstodown}{\mathop{\longsearrow}\limits}
\newcommand{\tendstoup}{\mathop{\longnearrow}\limits}
%----------------------------------------------------------------

% Scalable delimiters
%----------------------------------------------------------------
\def\({\left(}
\def\){\right)}
\def\[{\left[}
\def\]{\right]}
\def\<{\left\langle}
\def\>{\right\rangle}
\def\lv{\left\lvert}
\def\mv{\middle\vert}
\def\rv{\right\rvert}
\def\lV{\left\lVert}
\def\mV{\middle\Vert}
\def\rV{\right\rVert}
\def\llb{\left\llbracket}
\def\rrb{\right\rrbracket}
%----------------------------------------------------------------

% Common operators
%----------------------------------------------------------------
\DeclareMathOperator{\argmin}{argmin}
\DeclareMathOperator{\argmax}{argmax}
\def\iff{\Longleftrightarrow}
\def\implies{\Longrightarrow}
\def\isimplied{\Longleftarrow}
\newcommand{\floor}[1]{\ensuremath{\left\lfloor#1\right\rfloor}}
\newcommand{\ceil}[1]{\ensuremath{\left\lceil#1\right\rceil}}
\def\divides{\mathrel{\mid}}
\def\notdivides{\mathrel{\nmid}}
\newcommand{\symdiff}{\mathbin{\triangle}}
\newcommand{\comp}{\mathbin{\circ}}
\newcommand{\cond}{\mathbin{\vert}}
\newcommand{\rest}{\vert}
\newcommand{\lxor}{\mathbin{\underline{\lor}}}
\newcommand{\given}[1][]{\mathbin{#1\vert}}
\newcommand{\place}{{{}\cdot{}}}
%----------------------------------------------------------------

% Overwrites
%----------------------------------------------------------------
\let\geq\geqslant
\let\leq\leqslant
\let\ngeq\ngeqslant
\let\nleq\nleqslant
\let\succeq\succcurlyeq
\let\preceq\preccurlyeq
\let\npreceq\npreccurlyeq
\let\nsucceq\nsucccurlyeq
\let\:\colon
\let\oldepsilon\epsilon
\let\epsilon\varepsilon
%\let\oldphi\phi
%\let\phi\varphi
\let\oldemptyset\emptyset
\let\emptyset\varnothing
%----------------------------------------------------------------

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

\def\One{\ensuremath{\mathbbm{1}}}
%----------------------------------------------------------------

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

% Frak letters and symbols
%----------------------------------------------------------------
\def\fA{\ensuremath{\mathfrak{A}}}
\def\fB{\ensuremath{\mathfrak{B}}}
\def\fC{\ensuremath{\mathfrak{C}}}
\def\fD{\ensuremath{\mathfrak{D}}}
\def\fE{\ensuremath{\mathfrak{E}}}
\def\fF{\ensuremath{\mathfrak{F}}}
\def\fG{\ensuremath{\mathfrak{G}}}
\def\fH{\ensuremath{\mathfrak{H}}}
\def\fI{\ensuremath{\mathfrak{I}}}
\def\fJ{\ensuremath{\mathfrak{J}}}
\def\fK{\ensuremath{\mathfrak{K}}}
\def\fL{\ensuremath{\mathfrak{L}}}
\def\fM{\ensuremath{\mathfrak{M}}}
\def\fN{\ensuremath{\mathfrak{N}}}
\def\fO{\ensuremath{\mathfrak{O}}}
\def\fP{\ensuremath{\mathfrak{P}}}
\def\fQ{\ensuremath{\mathfrak{Q}}}
\def\fR{\ensuremath{\mathfrak{R}}}
\def\fS{\ensuremath{\mathfrak{S}}}
\def\fT{\ensuremath{\mathfrak{T}}}
\def\fU{\ensuremath{\mathfrak{U}}}
\def\fV{\ensuremath{\mathfrak{V}}}
\def\fW{\ensuremath{\mathfrak{W}}}
\def\fX{\ensuremath{\mathfrak{X}}}
\def\fY{\ensuremath{\mathfrak{Y}}}
\def\fZ{\ensuremath{\mathfrak{Z}}}
%----------------------------------------------------------------

% Function definition environment
%----------------------------------------------------------------
\newenvironment{functiondef}{%
\begin{tabular}{%
    *{2}{>{$\displaystyle}r<{$}}%
    >{$\displaystyle}c<{$}%
    >{$\displaystyle}l<{$}%
}}{%
  \end{tabular}%
}
%----------------------------------------------------------------

%% Local Variables:
%% mode: latex
%% tab-width: 2
%% auto-fill-function: nil
%% End:
