
% ===== useful

\newcommand{\inner}[2]{#1 \cdot #2}
\newcommand{\RR}{\mathbb{R}}
\newcommand{\half}{\frac{1}{2}}
\newcommand{\new}{\mathrm{new}}
\newcommand{\const}{\mathrm{const.}}
\newcommand{\dd}{\mathrm{d}}
\newcommand{\ddx}[1]{\frac{\partial}{\partial #1}}
\newcommand{\dfdx}[2]{\textstyle \frac{\partial #1}{\partial #2}}
\DeclareMathOperator*{\argmax}{arg\,max}
\DeclareMathOperator*{\argmin}{arg\,min}
\newcommand\dif{\mathop{}\!\mathrm{d}}

% ===== probability

\newcommand{\g}{\,\vert\,}
\newcommand{\s}{\,;\,}
\newcommand{\indpt}{\protect\mathpalette{\protect\independenT}{\perp}}
\def\independenT#1#2{\mathrel{\rlap{$#1#2$}\mkern2mu{#1#2}}}
\newcommand{\E}[1]{\mathbb{E}\left[#1\right]}
\newcommand{\EE}[2]{\mathbb{E}_{#1}\left[#2\right]}
\newcommand{\var}[1]{\textrm{Var}\left[#1\right]}
\newcommand{\h}[1]{\mathbb{H}\left( #1 \right)}
\newcommand{\kl}[1]{\mathrm{KL}\left(#1\right)}
\newcommand{\ind}{\mathbb{1}}
\newcommand{\rmp}{\mathrm{p}}
\newcommand{\prob}{\mathrm{P}}

% ===== distributions

\newcommand{\mult}{\mathrm{Mult}}
\newcommand{\dir}{\mathrm{Dir}}
\newcommand{\discrete}{\mathrm{Discrete}}
\newcommand{\Bern}{\mathrm{Bernoulli}}
\newcommand{\DP}{\mathrm{DP}}
\newcommand{\GP}{\mathrm{GP}}
\newcommand{\Bet}{\mathrm{Beta}}
\newcommand{\pois}{\mathrm{Pois}}

% ===== calligraphy

\newcommand{\cQ}{{\mathcal Q}}
\newcommand{\cF}{{\mathcal F}}

% ===== bold mathematics

\newcommand{\mbx}{\mathbf{x}}
\newcommand{\mbz}{\mathbf{z}}

\newcommand{\mbtheta}{\boldsymbol \theta}
\newcommand{\mbnu}{\boldsymbol \nu}

% ===== roman mathematics

\newcommand{\rmF}{\mathrm{F}}
\newcommand{\rmA}{\mathrm{A}}
\newcommand{\rmnew}{\mathrm{new}}

\newcommand{\highlight}[1]{%
  \colorbox{blue!15}{$\displaystyle#1$}}
