% Math formats
\theoremstyle{definition}
\newtheorem*{defn}{Definition}
\theoremstyle{definition}
\newtheorem*{thm}{Theorem}
\theoremstyle{definition}
\newtheorem*{lem}{Lemma}
\theoremstyle{definition}
\newtheorem{rmrk}{Remark}
\theoremstyle{definition}
\newtheorem{rslt}{Result}[section]
\theoremstyle{definition}
\newtheorem*{expl}{Example}
\theoremstyle{definition}
\newtheorem*{cor}{Corollary}
\theoremstyle{definition}
\newtheorem*{smry}{Summary}

% color
\definecolor{lightblue}{RGB}{173,216,230} 
\definecolor{lightgray}{gray}{.97}
\newcommand{\ww}{\Circle}
\newcommand{\bb}{\CIRCLE}
\newcommand{\bw}{\LEFTcircle}
\newcommand{\wb}{\rotatebox[origin=c]{180}{\LEFTcircle}}
\newcommand{\NL}{\mathrm{NL}}
\renewcommand{\d}{\mathrm{d}}
\newcommand{\MLP}{\mathrm{MLP}}
\newcommand{\ReLU}{\mathrm{ReLU}}
\newcommand{\Sigmoid}{\mathrm{Sigmoid}}
\newcommand{\GeLU}{\mathrm{GeLU}}
\newcommand{\FC}{\mathrm{FC}}

% Math Command
\let\oldforall\forall
\renewcommand{\forall}{\oldforall \, }
\let\oldLeftrightarrow\Leftrightarrow
\renewcommand{\Leftrightarrow}{\oldLeftrightarrow \,\, }
\let\oldexist\exists
\renewcommand{\exists}{\oldexist \: }
\newcommand\existu{\oldexist! \: }
\newcommand{\st}{\mathrm{\,\,s.t.\,\,}}
\newcommand{\and}{\mathrm{\,\,and\,\,}}


% Math functions
\newcommand{\KL}{D_{\mathrm{KL}}}
\newcommand{\proj}{\mathcal{P}}
\newcommand{\cP}{\mathcal{P}}
%\let\oldvec\vec 
%\renewcommand{\vec}{\mathrm{vec}}
\newcommand{\diag}{\mathrm{diag}}
\newcommand{\tr}{\mathrm{tr}}
\newcommand{\indep}{\perp \!\!\! \perp}
\newcommand{\notindep}{\not\!\perp\!\!\!\perp}

% stats & probability
\newcommand{\Normal}{\mathcal{N}}
\newcommand{\IG}{\mathrm{IG}}
\newcommand{\Var}{\mathrm{Var}} % var
\newcommand{\V}{\mathbb{V}} % var
\newcommand{\I}{\mathbb{I}} % Fisher info
\newcommand{\cL}{\mathcal{L}} % Lagrangian & ELBO (curly L)
\newcommand{\E}{\mathbb{E}}
\newcommand{\xhat}{\hat{\mathbf{x}}}
\newcommand{\zhat}{\hat{\mathbf{z}}}
\newcommand{\yhat}{\hat{\mathbf{y}}}
\newcommand{\hhat}{\hat{\mathbf{h}}}
\newcommand{\Ahat}{\hat{A}}
\newcommand{\phat}{\hat{p}}
\newcommand{\qhat}{\hat{q}}
\newcommand{\ptil}{\tilde{p}}
\newcommand{\sigtil}{\tilde{\sigma}}
\newcommand{\ftil}{\tilde{f}}
\newcommand{\qtil}{\tilde{q}}
\newcommand{\Htil}{\tilde{H}}
\newcommand{\htil}{\tilde{h}}
\newcommand{\Jtil}{\tilde{J}}
\newcommand{\xbar}{\bar{\mathbf{x}}}
\newcommand{\ybar}{\bar{\mathbf{y}}}
\newcommand{\thetahat}{\hat{\theta}}
\newcommand{\wmle}{\hat{\mathbf{w}}_{\mathrm{MLE}}}
\newcommand{\what}{\hat{\mathbf{w}}}
\newcommand{\muhat}{{\hat{\mu}}}
\newcommand{\thetatil}{\tilde{\theta}}
\newcommand{\mutil}{\tilde{\mu}}
\newcommand{\tautil}{\tilde{\tau}}
\newcommand{\phibar}{\bar{\phi}}
\newcommand{\Phibar}{\bar{\Phi}}
\newcommand{\Abar}{\bar{A}}
\newcommand{\etabar}{\bar{\eta}}

% Bold-face symbols & curly symbols
\newcommand{\bftheta}{\boldsymbol{\theta}}
\newcommand{\bfthetatil}{\tilde{\boldsymbol{\theta}}}
\newcommand{\bfphi}{\boldsymbol{\phi}}
\newcommand{\bfPhi}{\mathbf{\Phi}}
\newcommand{\bfw}{\mathbf{w}}
\newcommand{\bfW}{\mathbf{W}}
\newcommand{\bfx}{\mathbf{x}}
\newcommand{\bfu}{\mathbf{u}}
\newcommand{\bfb}{\mathbf{b}}
\newcommand{\bfq}{\mathbf{q}}
\newcommand{\bfk}{\mathbf{k}}
\newcommand{\bfX}{\mathbf{X}}
\newcommand{\bfz}{\mathbf{z}}
\newcommand{\bfg}{\mathbf{g}}
\newcommand{\bfZ}{\mathbf{Z}}
\newcommand{\bfy}{\mathbf{y}}
\newcommand{\bfalpha}{\bm{\alpha}}
\newcommand{\bfep}{\bm{\epsilon}}
\newcommand{\bfga}{\boldsymbol\gamma}
\newcommand{\bfxi}{\boldsymbol\xi}
\newcommand{\bfnu}{\boldsymbol{\nu}}
\newcommand{\bflam}{\boldsymbol\lambda}
\newcommand{\bfdel}{\boldsymbol\delta}
\newcommand{\bfmu}{\boldsymbol\mu}
\newcommand{\bfK}{\mathbf{K}}
\newcommand{\bfh}{\mathbf{h}}
\newcommand{\bfv}{\mathbf{v}}
\newcommand{\bfr}{\mathbf{r}}
\newcommand{\bfa}{\mathbf{a}}
\newcommand{\bfone}{\mathbf{1}} %bold face 1, indicator counting function
\newcommand{\bfzero}{\mathbf{0}}
\newcommand{\bfM}{\mathbf{M}}
\newcommand{\bbM}{\mathbb{M}}
\newcommand{\bbL}{\mathbb{L}}
\newcommand{\cX}{\mathcal{X}}
\newcommand{\cZ}{\mathcal{Z}}
\newcommand{\cD}{\mathcal{D}}
\newcommand{\cH}{\mathcal{H}}
\newcommand{\cY}{\mathcal{Y}}
\newcommand{\cW}{\mathcal{W}}
\newcommand{\cWbar}{\overline{\mathcal{W}}}
\newcommand{\cM}{\mathcal{M}}
\newcommand{\cI}{\mathcal{I}}
\newcommand{\cF}{\mathcal{F}}
\newcommand{\cB}{\mathcal{B}}
\newcommand{\cA}{\mathcal{A}}
\newcommand{\cR}{\mathcal{R}}
\newcommand{\ccM}{\mathscr{M}}
\newcommand{\cJ}{\mathcal{J}}
\newcommand{\cE}{\mathcal{E}}
\newcommand{\cT}{\mathcal{T}}
\newcommand{\cS}{\mathcal{S}}
\newcommand{\rmH}{\mathrm{H}}
\newcommand{\obs}{\mathrm{obs}}
\newcommand{\rmI}{\mathrm{I}}
\newcommand{\NLL}{\mathrm{NLL}}
\newcommand{\ER}{\mathrm{ER}}
\newcommand{\Atil}{\Tilde{A}}
\newcommand{\Ptil}{{\Tilde{P}}}
\newcommand{\Btil}{{\Tilde{B}}}
\newcommand{\Etil}{\Tilde{\mathbb{E}}}
\newcommand{\Omegatil}{\Tilde{\mathbb{E}}}
\newcommand{\negj}{{\neg j}}
\newcommand{\negi}{{\neg i}}
\newcommand{\zvec}{\vec{\mathbf{z}}}
\newcommand{\xvec}{\vec{\mathbf{x}}}
\newcommand{\gra}{\overrightarrow{\mathbf{g}}}
\newcommand{\gla}{\overleftarrow{\mathbf{g}}}
\newcommand{\Vhat}{\hat{V}}
\newcommand{\Phihat}{\hat{\Phi}}
\newcommand{\Sigmahat}{\hat{\Sigma}}

% Math terms
\newcommand{\MLE}{\mathrm{MLE}}
\newcommand{\MAP}{\mathrm{MAP}}
\newcommand{\EB}{\mathrm{EB}}
\newcommand{\EM}{\mathrm{EM}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\iid}{\mathrm{i.i.d.}}
\newcommand{\conv}{\mathrm{conv}} 
\newcommand{\concat}{\mathrm{Concat}} 
\newcommand{\smax}{\mathrm{softmax}} 
\newcommand{\Attn}{\mathrm{Attn}} 
\newcommand{\mrf}{\mathrm{MRF}}
\newcommand{\bn}{\mathrm{BN}}
\newcommand{\MMD}{\mathrm{MMD}}
\newcommand{\fg}{\mathrm{FG}}
\newcommand{\ow}{\mathrm{otherwise}}
\newcommand{\ri}{\mathrm{ri}}
\newcommand{\hdot}{\dot{h}}

% Graph Theory
\newcommand{\Pa}{\mathrm{Pa}}
\newcommand{\Unif}{\mathrm{Unif}}
\newcommand{\supp}{\mathrm{supp}}
\newcommand{\Ch}{\mathrm{Ch}}
\newcommand{\Lip}{\mathrm{Lip}}
\newcommand{\Nb}{\mathrm{Nb}}
\newcommand{\Anc}{\mathrm{Anc}}
\newcommand{\Desc}{\mathrm{Desc}}
\newcommand{\mc}{\mathrm{mc}}
\newcommand{\smc}{\mathrm{c}}
\newcommand{\cC}{\mathcal{C}} % cliques
\newcommand{\SW}{\mathcal{SW}}
\newcommand{\Para}{\mathrm{Para}}
\newcommand{\ot}{\mathrm{OT}}
\newcommand{\eot}{\mathrm{EOT}}
\newcommand{\law}{\mathrm{Law}}
\newcommand{\cV}{\mathcal{V}}
\newcommand{\leb}{\mathrm{Leb}}


\newcommand{\xdot}{\dot{x}}
\newcommand{\mudot}{\dot{\mu}}
\newcommand{\nablaW}{\nabla_{W_2}}
\newcommand{\law}{\mathrm{Law}}

\newcommand{\DD}{\Delta\!\!\!\!\Delta}
\newcommand{\Grad}{\nabla\!\!\!\!\nabla}

\newcommand{\RNN}{\mathrm{RNN}}

\newcommand{\EC}{\mathrm{EC}}
\newcommand{\EO}{\mathrm{EO}}