%%%-------------------------------------------------------------------
%%%-------------------------------------------------------------------
%%%-------------------------------------------------------------------
%%% Frequently used math symbols.
%%%
% New improved Euler fonts instead of Caligraphy fonts.
%\newmathalphabet*{\eul}{eus}{m}{n}
\newcommand{\eul}{\EuScript}
%
\newcommand{\bdm}{\begin{displaymath}}
\newcommand{\edm}{\end{displaymath}}
\newcommand{\fr}[2]{{ \displaystyle \frac{#1}{#2} }}
\newcommand{\lm}{\lim_{N\to\infty}}
\newcommand{\Int}[2]{{\displaystyle \int_{#1}^{#2}}}
\newcommand{\Pro}[1]{{\displaystyle \prod_{#1}}}
\newcommand{\Sum}[1]{{\displaystyle \sum_{#1}}}
\newcommand{\Sm}[2]{{\displaystyle \sum_{#1}^{#2}}}
\newcommand{\Lim}{{\displaystyle \lim_{N\to\infty}}}
\newcommand{\intsqrt}[3]{\int_{#1}^{#2} \sqrt{#3}}
\newcommand{\IntSqrt}[3]{\displaystyle \int_{#1}^{#2} \sqrt{#3}}
\newcommand{\hypot}[2]{\sqrt{{#1}^{2} + {#2}^{2}}}
\newcommand{\Hypot}[2]{\displaystyle \sqrt{{#1}^{2} + {#2}^{2}}}
\newcommand{\inner}[2]{\left\langle {#1}, {#2} \right\rangle}
%\newcommand{\Vec}[1]{{\em{\bf {#1}}}}
\newcommand{\dif}[2]{{\displaystyle\frac{\mathrm{d}{#1}}{\mathrm{d}{#2}}}}
\newcommand{\difh}[3]{{\displaystyle\frac{\mathrm{d}^{#1}{#2}}{\mathrm{d}\,{#3}^{#1}}}}
\newcommand{\pdif}[2]{{\displaystyle\frac{\partial{#1}}{\partial{#2}}}}
\newcommand{\pdifh}[3]{{\displaystyle\frac{\partial^{#1}{#2}}{\partial\,{#3}^{#1}}}}
\newcommand{\normalderiv}[1]{\pdif{#1}{\nu}}
\newcommand{\normalderivv}[2]{\pdif{#1}{\nu({#2})}}
\newcommand{\normalderivs}[2]{\pdif{#1}{\nu_{#2}}}
\newcommand{\normalderivh}[2]{\pdifh{#1}{#2}{\nu}}
\newcommand{\normalderivvh}[3]{\pdifh{#1}{#2}{\nu({#3})}}
\newcommand{\normalderivsh}[3]{\pdifh{#1}{#2}{\nu_{#3}}}
\newcommand{\half}{\frac{1}{2}}
\newcommand{\Half}{\fr{1}{2}}
\renewcommand{\(}{\left(}
\renewcommand{\)}{\right)}
%\newcommand{\N}{{\Bbb N}}
%\newcommand{\Z}{{\Bbb Z}}
%\newcommand{\Q}{{\Bbb Q}}
%\newcommand{\R}{{\Bbb R}}
%\newcommand{\C}{{\Bbb C}}
\newcommand{\N}{{\mathbb N}}
\newcommand{\Z}{{\mathbb Z}}
\newcommand{\Q}{{\mathbb Q}}
\newcommand{\Rf}{{\mathbb R}}
\newcommand{\C}{{\mathbb C}}
\newcommand{\Tor}{{\mathbb T}}
\newcommand{\Norm}{{\eul N}}
\newcommand{\im}{{\mathrm i}}
\newcommand{\e}{{\mathrm e}}
\newcommand{\dd}[1]{\, {\mathrm d}{#1}}
\newcommand{\argmin}{\operatornamewithlimits{arg \, min}}
\newcommand{\argmax}{\operatornamewithlimits{arg \, max}}
\newcommand{\erf}{\operatorname{erf}}
\newcommand{\erfc}{\operatorname{erfc}}
\newcommand{\mean}{\operatorname{mean}}
\newcommand{\ave}{\operatorname{ave}}
\newcommand{\smean}[1]{\overline{#1}}
\newcommand{\var}{\operatorname{var}}
\newcommand{\median}{\operatorname{med}}
\newcommand{\mad}{\operatorname{mad}}
\newcommand{\diag}{\operatorname{diag}}
\newcommand{\diam}{\operatorname{diam}}
\newcommand{\tr}{\operatorname{tr}}
\newcommand{\sinc}{\operatorname{sinc}}
\newcommand{\define}{\overset{\Delta}{=}}
\newcommand{\Prob}[1]{\mathrm{Pr}\{ #1 \}}
\newcommand{\udots}{
  \mathinner {\mkern 1mu\raise 1pt \vbox {\kern 7pt \hbox {.}}\mkern 2mu
  \raise 4pt \hbox {.}\mkern 2mu\raise 7pt \hbox {.}\mkern 1mu}}
\renewcommand{\Re}{\mathrm{Re}}
\renewcommand{\Im}{\mathrm{Im}}
\newcommand{\iprod}[2]{\langle {#1}, {#2} \rangle}
% a good version of hat and tilde for a bold vector font variable.
\newcommand{\widehatbv}[1]{\,\widehat{\!{#1}}}
\newcommand{\widetildebv}[1]{\,\widetilde{\!{#1}}}
%
\newcommand{\ba}{{\boldsymbol a}}
\newcommand{\bb}{{\boldsymbol b}}
\newcommand{\bc}{{\boldsymbol c}}
\newcommand{\bd}{{\boldsymbol d}}
\newcommand{\be}{{\boldsymbol e}}
\newcommand{\f}{{\boldsymbol f}} % \bf is already used, so this is special.
\newcommand{\bg}{{\boldsymbol g}}
\newcommand{\bh}{{\boldsymbol h}}
\newcommand{\bi}{{\boldsymbol i}}
\newcommand{\bj}{{\boldsymbol j}}
\newcommand{\bk}{{\boldsymbol k}}
\newcommand{\bl}{{\boldsymbol l}}
\newcommand{\bell}{{\boldsymbol \ell}}
\newcommand{\bm}{{\boldsymbol m}}
\newcommand{\bn}{{\boldsymbol n}}
\newcommand{\bo}{{\boldsymbol o}}
\newcommand{\bp}{{\boldsymbol p}}
\newcommand{\bq}{{\boldsymbol q}}
\newcommand{\br}{{\boldsymbol r}}
\newcommand{\bs}{{\boldsymbol s}}
\newcommand{\bt}{{\boldsymbol t}}
\newcommand{\bu}{{\boldsymbol u}}
\newcommand{\bv}{{\boldsymbol v}}
\newcommand{\bw}{{\boldsymbol w}}
\newcommand{\bx}{{\boldsymbol x}}
\newcommand{\by}{{\boldsymbol y}}
\newcommand{\bz}{{\boldsymbol z}}
\newcommand{\bA}{{\boldsymbol A}}
\newcommand{\bB}{{\boldsymbol B}}
\newcommand{\bC}{{\boldsymbol C}}
\newcommand{\bD}{{\boldsymbol D}}
\newcommand{\bE}{{\boldsymbol E}}
\newcommand{\bF}{{\boldsymbol F}}
\newcommand{\bG}{{\boldsymbol G}}
\newcommand{\bH}{{\boldsymbol H}}
\newcommand{\bI}{{\boldsymbol I}}
\newcommand{\bJ}{{\boldsymbol J}}
\newcommand{\bK}{{\boldsymbol K}}
\newcommand{\bL}{{\boldsymbol L}}
\newcommand{\bM}{{\boldsymbol M}}
\newcommand{\bN}{{\boldsymbol N}}
\newcommand{\bO}{{\boldsymbol O}}
\newcommand{\bP}{{\boldsymbol P}}
\newcommand{\bQ}{{\boldsymbol Q}}
\newcommand{\bR}{{\boldsymbol R}}
\newcommand{\bS}{{\boldsymbol S}}
\newcommand{\bT}{{\boldsymbol T}}
\newcommand{\bU}{{\boldsymbol U}}
\newcommand{\bV}{{\boldsymbol V}}
\newcommand{\bW}{{\boldsymbol W}}
\newcommand{\bX}{{\boldsymbol X}}
\newcommand{\bY}{{\boldsymbol Y}}
\newcommand{\bZ}{{\boldsymbol Z}}
%
\newcommand{\balpha}{{\boldsymbol \alpha}}
\newcommand{\bbeta}{{\boldsymbol \beta}}
\newcommand{\bgamma}{{\boldsymbol \gamma}}
\newcommand{\bdelta}{{\boldsymbol \delta}}
\newcommand{\beps}{{\boldsymbol \epsilon}}
\newcommand{\bveps}{{\boldsymbol \varepsilon}}
\newcommand{\bzeta}{{\boldsymbol \zeta}}
\newcommand{\boldeta}{{\boldsymbol \eta}}	% \beta is already used.
\newcommand{\btheta}{{\boldsymbol \theta}}
\newcommand{\bvtheta}{{\boldsymbol \vartheta}}
\newcommand{\biota}{{\boldsymbol \iota}}
\newcommand{\bkappa}{{\boldsymbol \kappa}}
\newcommand{\bvkappa}{{\boldsymbol \varkappa}}
\newcommand{\blambda}{{\boldsymbol \lambda}}
\newcommand{\bmu}{{\boldsymbol \mu}}
\newcommand{\bnu}{{\boldsymbol \nu}}
\newcommand{\bxi}{{\boldsymbol \xi}}
\newcommand{\bpi}{{\boldsymbol \pi}}
\newcommand{\bvpi}{{\boldsymbol \varpi}}
\newcommand{\brho}{{\boldsymbol \rho}}
\newcommand{\bvrho}{{\boldsymbol \varrho}}
\newcommand{\bsigma}{{\boldsymbol \sigma}}
\newcommand{\bvsigma}{{\boldsymbol \varsigma}}
\newcommand{\btau}{{\boldsymbol \tau}}
\newcommand{\bupsilon}{{\boldsymbol \upsilon}}
\newcommand{\bphi}{{\boldsymbol \phi}}
\newcommand{\bvphi}{{\boldsymbol \varphi}}
\newcommand{\bchi}{{\boldsymbol \chi}}
\newcommand{\bpsi}{{\boldsymbol \psi}}
\newcommand{\bomega}{{\boldsymbol \omega}}
\newcommand{\bGamma}{{\boldsymbol \Gamma}}
\newcommand{\bDelta}{{\boldsymbol \Delta}}
\newcommand{\bTheta}{{\boldsymbol \Theta}}
\newcommand{\bLambda}{{\boldsymbol \Lambda}}
\newcommand{\bXi}{{\boldsymbol \Xi}}
\newcommand{\bPi}{{\boldsymbol \Pi}}
\newcommand{\bSigma}{{\boldsymbol \Sigma}}
\newcommand{\bUpsilon}{{\boldsymbol \Upsilon}}
\newcommand{\bPhi}{{\boldsymbol \Phi}}
\newcommand{\bPsi}{{\boldsymbol \Psi}}
\newcommand{\bOmega}{{\boldsymbol \varOmega}}
\newcommand{\bvGamma}{{\boldsymbol \varGamma}}
\newcommand{\bvDelta}{{\boldsymbol \varDelta}}
\newcommand{\bvTheta}{{\boldsymbol \varTheta}}
\newcommand{\bvLambda}{{\boldsymbol \varLambda}}
\newcommand{\bvXi}{{\boldsymbol \varXi}}
\newcommand{\bvPi}{{\boldsymbol \varPi}}
\newcommand{\bvSigma}{{\boldsymbol \varSigma}}
\newcommand{\bvUpsilon}{{\boldsymbol \varUpsilon}}
\newcommand{\bvPhi}{{\boldsymbol \varPhi}}
\newcommand{\bvPsi}{{\boldsymbol \varPsi}}
\newcommand{\bvOmega}{{\boldsymbol \varOmega}}
