%%%% iurteaga definitions and macros
% Dolor definitions
%\def\bluecolor#1{\textcolor[rgb]{0,0,1}{\bf #1}}
%\def\greencolor#1{\textcolor[rgb]{0,1,0}{\bf #1}}
%\def\redcolor#1{\textcolor[rgb]{1,0,0}{\bf #1}}

% TODO
\newcommand{\TODO}[1]{\textcolor{red}{TODO: #1}}
% IU
\newcommand{\IU}[1]{\textcolor{green}{#1}}
\newcommand{\IUq}[2]{\textcolor{red}{(#1)} \textcolor{green}{#2}}
% QN
\newcommand{\QN}[1]{\textcolor{blue}{#1}}

% Abbreviations
\newcommand{\iid}{i.i.d. }
\newcommand{\ie}{i.e., }
\newcommand{\Ie}{I.e., }
\newcommand{\eg}{e.g., }
\newcommand{\Eg}{E.g., }
\newcommand{\etAl}{et al.\xspace}

% Real line
\newcommand{\Real}{{I\!\!R}} 
\newcommand{\RR}{I\!\!R}
% Natural numbers
\newcommand{\Natural}{{I\!\!N}} 
\newcommand{\Nat}{I\!\!N}

% Probability related
\newcommand{\Prob}[1]{\mathbb{P}\left( #1 \right)}
% with 2 arguments, for probability model in subscript
\newcommand{\myProb}[2]{\mathbb{P}_{#1}\left( #2 \right)}
% q and p
\newcommand{\p}[1]{p{\left( #1 \right)}}
%\newcommand{\prob}[1]{p{\left( #1 \right)}}

\newcommand{\q}[1]{q{\left( #1 \right)}}
\newcommand{\qstar}[1]{q^*{\left( #1 \right)}}
% conditionals
\newcommand{\cp}[2]{p{\left( #1 \mid #2 \right)}}
\newcommand{\cq}[2]{q{\left( #1 \mid #2 \right)}}

%Expected value
\newcommand{\eValue}[2]{\mathbb{E}_{#1}\left\{ #2 \right\}}
\newcommand{\Ex}[2]{\mathbb{E}_{#1}\left\{ #2 \right\}}

\newcommand{\Var}[1]{\mathbb{V}\mathrm{ar} \left\{ #1 \right\}}
\newcommand{\indep}{{\;\bot\!\!\!\!\!\!\bot\;}}
% Kullback-Leibler
\newcommand{\kl}[2]{\mathrm{KL}\left[#1 \| #2\right]}
% Distributions
\newcommand{\N}[1]{\mathcal{N}\left( #1\right)}
\newcommand{\MN}[1]{\mathcal{MN}\left( #1\right)}
%\newcommand{\T}[1]{\mathcal{T}\left( #1\right)}
\newcommand{\T}[1]{t\left( #1\right)}
%\newcommand{\MT}[1]{\mathcal{MT}\left( #1\right)}
\newcommand{\MT}[1]{\mathcal{T}\left( #1\right)}
\newcommand{\Dir}[1]{\mathcal{Dir}\left( #1\right)}
\newcommand{\Mult}[1]{{\rm Mult}\left( #1\right)}
\newcommand{\Cat}[1]{{\rm Cat}\left( #1\right)}
\newcommand{\Bin}[1]{{\rm Bin}\left( #1\right)}
%\newcommand{\IG}[1]{\mathcal{IG}\left( #1\right)}
\newcommand{\IG}[1]{\Gamma^{-1}\left( #1\right)}
\newcommand{\NIG}[1]{\mathcal{NIG}\left( #1\right)}
\newcommand{\NIX}[1]{\mathcal{NIX}\left( #1\right)}
\newcommand{\IW}[1]{\mathcal{IW}\left( #1\right)}
\newcommand{\NIW}[1]{\mathcal{NIW}\left( #1\right)}
\newcommand{\Beta}[1]{\mathcal{B}eta\left( #1\right)}
\newcommand{\Ber}[1]{{\rm Ber}\left( #1\right)}
\newcommand{\U}[1]{\mathcal{U}\left( #1\right)}

% My small matrix
\newcommand{\mySmallMatrix}[1]{\left(\begin{smallmatrix} #1 \end{smallmatrix}\right)}
%Determinant
\newcommand{\mydet}[1]{\left| #1 \right|}
\newcommand{\tr}[1]{\mathrm{tr}\left\{ #1 \right\}} % trace
\newcommand{\diag}[1]{\mathrm{diag}\left\{ #1 \right\}}
% My indicator function
\newcommand{\myind}[1]{\mathds{1}\left[#1\right]}
% d in integral
\newcommand{\dd}[1]{\mathrm{d} #1}
% Big-O notation
\newcommand{\bigO}[1]{\mathcal{O}\left( #1 \right)}

% GP
\newcommand{\gp}{\mathcal{GP}}
\newcommand{\GP}[1]{\mathcal{GP}\left( #1\right)}
\newcommand{\fb}{\mathbf{f}}
\newcommand{\fbi}[1]{f^{\left( #1 \right)}}
\newcommand{\kb}{\mathbf{k}}
\newcommand{\Kb}{\mathbf{K}}
\newcommand{\mub}{\mathbf{\mu}}
\newcommand{\Sigmab}{\mathbf{\Sigma}}
\newcommand{\mb}{\mathbf{m}}
\newcommand{\Qb}{\mathbf{Q}}
% Approximations via tildes
\newcommand{\mtildeb}{\mathbf{\tilde{m}}}
\newcommand{\Ktildeb}{\mathbf{\tilde{K}}}
\newcommand{\mbtilde}[1]{\widetilde{\mathbf{m}}_{#1}}
\newcommand{\Kbtilde}[2]{\widetilde{\mathbf{K}}_{#1,#2}}
\newcommand{\Sbtilde}[2]{\widetilde{\mathbf{S}}_{#1,#2}}
% optimal via stars
\newcommand{\mbstar}[1]{\mathbf{m}_{#1}^*}
\newcommand{\Kbstar}[2]{\mathbf{K}_{#1,#2}^*}

% Dataset points
\newcommand{\XbD}{\mathbf{X}_{D}}
\newcommand{\fbD}{\mathbf{f}_{D}}
% Data points
\newcommand{\fbx}{\mathbf{f}_{x}}
\newcommand{\fbxprime}{\mathbf{f}_{x^\prime}}
\newcommand{\fbX}{\mathbf{f}_{X}}
% Inducing points
\newcommand{\XbZ}{\mathbf{X}_{M}}
\newcommand{\fbZ}{\mathbf{f}_{M}}
% Coresets
\newcommand{\ybC}{\mathbf{y}_{M}}
\newcommand{\XbC}{\mathbf{X}_{M}}
\newcommand{\fbC}{\mathbf{f}_{M}}
\newcommand{\betabC}{\ensuremath{\boldsymbol{\beta}_{M}}}
\newcommand{\SigmabetaC}{\Sigmab_{\betabC}}
% Explicit covariance-kernels
\newcommand{\SigmabZZ}{\Sigmab_{\fbZ,\fbZ}}
\newcommand{\SigmabCC}{\Sigmab_{\fbC,\fbC}}
\newcommand{\KbXX}{\mathbf{K}_{NN}}
\newcommand{\KbZZ}{\mathbf{K}_{MM}}
\newcommand{\KbCC}{\mathbf{K}_{MM}}
\newcommand{\KbXZ}{\mathbf{K}_{NM}}
\newcommand{\KbZX}{\mathbf{K}_{MN}}
\newcommand{\KbXC}{\mathbf{K}_{NM}}
\newcommand{\KbCX}{\mathbf{K}_{MN}}
\newcommand{\KbSX}{\mathbf{k}_{*N}}
\newcommand{\KbXS}{\mathbf{k}_{N*}}

\newcommand{\Ab}{\mathbf{A}}

% Losses and VI
\newcommand{\Loss}{\mathcal{L}}
\newcommand{\Lossf}[2]{\Loss_{#1} \left( #2 \right)}
\newcommand{\betab}{\ensuremath{\boldsymbol{\beta}}}
% Boldface vector/matrices
\newcommand{\xb}{\mathbf{x}}
\newcommand{\xbstar}{\mathbf{x}^\star}
\newcommand{\Xb}{\mathbf{X}}
\newcommand{\xbi}[1]{\xb^{\left( #1 \right)}}
\newcommand{\zb}{\mathbf{z}}
\newcommand{\Zb}{\mathbf{Z}}
\newcommand{\zbi}[1]{\zb^{\left( #1 \right)}}
\newcommand{\yb}{\mathbf{y}}
\newcommand{\Yb}{\mathbf{Y}}
\newcommand{\yi}[1]{{y^{\left( #1 \right)}}}
\newcommand{\wb}{\mathbf{w}}

\newcommand{\Sb}{\mathbf{S}}
\newcommand{\zerob}{\mathbf{0}}
\newcommand{\epsilonb}{\mathbf{\epsilon}}
\newcommand{\Ib}{\mathbf{I}}
\newcommand{\ub}{\mathbf{u}}
\newcommand{\Ub}{\mathbf{U}}
\newcommand{\vb}{\mathbf{v}}
\newcommand{\Vb}{\mathbf{V}}

% spaces
\newcommand{\hilbert}{\mathcal{H}}
\DeclareMathOperator{\xspace}{\mathcal{X}}
\DeclareMathOperator{\yspace}{\mathcal{Y}}
\newcommand{\logl}{\mathcal{L}}
\newcommand{\data}{\mathcal{D}}

% Useful in Bandits
\newcommand{\A}{\mathcal{A}}
\newcommand{\Astar}{A^*}
\newcommand{\astar}{a^*}
\newcommand{\pstar}{p^*}
\newcommand{\pistar}{\pi^*}
\newcommand{\Atilde}{\tilde{A}}
\newcommand{\atilde}{\tilde{a}}
\newcommand{\ptilde}{\tilde{p}}
\newcommand{\pitilde}{\tilde{\pi}}
\newcommand{\thetastar}{\theta^*}
\newcommand{\thetatilde}{\tilde{\theta}}
\newcommand{\varphitilde}{\tilde{\varphi}}
\newcommand{\varPhitilde}{\widetilde{\varPhi}}
\newcommand{\Y}{\mathcal{Y}}
\newcommand{\HH}{\mathcal{H}}

\newcommand{\myPi}[2]{\pi_{#1}\left( #2 \right)}
%\newcommand{\myPistar}[1]{\pi_{p^*}^*\left( #1 \right)}
\newcommand{\myPistar}[1]{\pi_{p^*}\left( #1 \right)}
%\newcommand{\myPitilde}[1]{\tilde{\pi}_{\ptilde}\left( #1 \right)}
\newcommand{\myPitilde}[1]{\pi_{\ptilde}\left( #1 \right)}

%Others
\newcommand{\eqd}{\stackrel{d}{=}} % equal in distribution/law/measure
\newcommand{\deq}{:=} % Define equality
\newcommand{\abs}[1]{|{#1}|}
\newcommand{\argmax}{\mathop{\mathrm{argmax}}}
\newcommand{\argmin}{\mathop{\mathrm{argmin}}}
\newcommand{\eps}{\varepsilon}
\newcommand{\Cov}{\mathrm{Cov}}
\newcommand{\map}[1]{\Phi\left( #1 \right)}
\newcommand{\Dist}[1]{{\rm Dist}\left( #1\right)}
\newcommand{\expp}[1]{\exp\left\{ #1 \right\}}

%diff
\newcommand*\diff{\mathop{}\!\mathrm{d}}

%misc
\newcommand{\cmark}{\ding{51}}%
\newcommand{\xmark}{\ding{55}}%
%colors
\newcommand{\red}[1]{\textcolor{red}{#1}}
\newcommand{\green}[1]{\textcolor{ForestGreen}{#1}}
\newcommand{\blue}[1]{\textcolor{blue}{#1}}
\definecolor{darkgreen}{rgb}{0,0.5,0} % Adjust the rgb values as needed

%%%%%%%% end iurteaga %%%%%%%% 