% ===================
% Notation shortcuts:
% ===================

% DATA
% ===============
\newcommand*{\x}{\mathbf{x}}
\newcommand*{\xp}{\mathbf{x}^\prime}
\newcommand*{\X}{\mathbf{X}}
\newcommand*{\y}{\mathbf{y}}
\newcommand*{\w}{{\bm{\omega}}}
\newcommand*{\xobs}{\mathbf{x}_i}
\newcommand*{\K}{\mathbf{K}}
\newcommand*{\Kinv}{\mathbf{K}^{-1}}

% VARIABLES
% ===============
\newcommand*{\wobs}{\bm{\omega}_i}
\newcommand*{\tta}{\bm{\theta}}

% COMPLEXITY
% ==========
\newcommand*{\bigO}[1]{\mathcal{O}(#1)}

% GAUSSIAN PROCESSES
% ==================
\newcommand{\fint}{\langle \Bar{f} \rangle} 

% % RFFs
% ==================
\newcommand*{\ffeatures}{\mathbf{\Phi}_{\X}}    % Fourier features matrix, or design matrix
\newcommand*{\A}{\mathbf{A}}
\newcommand*{\sm}{\pi}


% \newcommand*{\rff}[1]{\tilde{#1}}
% \newcommand*{\ffeature}{\vec{\phi}}     % Fourier feature vector
% \newcommand*{\ffeatures}{\mat{\Phi}}    % Fourier features matrix, or design matrix
% \newcommand*{\frequency}{\vec{\omega}}
% \newcommand*{\error}{\xi}
% \newcommand*{\sbq}[1]{\hat{#1}}

% DIMENSIONS
% ==================
\newcommand*{\xdim}{d}                     % inputs/frequencies dimension

% VI
% ==================
\newcommand*{\variational}{q}               % variational PDF
\newcommand*{\prior}{\pi}

% SVGD
\newcommand*{\tf}{T}
\newcommand*{\regf}{\eta}

% % THEOREMS
% % ========
% \declaretheorem[name=Theorem]{theorem}
% \declaretheorem[name=Proposition]{proposition}
% \declaretheorem[name=Definition]{definition}
% \declaretheorem[name=Lemma]{lemma}

% \newcommand*{\argmax}{\operatornamewithlimits{argmax}}
% \newcommand*{\argmin}{\operatornamewithlimits{argmin}}

% Basic maths
% ===========
\newcommand*{\field}[1]{\mathbb{\MakeUppercase{#1}}}		% scalar field
\newcommand*{\set}[1]{{\mathcal{\MakeUppercase{#1}}}}			% set symbol
\newcommand*{\norm}[1]{\lVert #1 \rVert}	% norm of a vector
\newcommand*{\flexnorm}[1]{\left\lVert #1 \right\rVert}
\newcommand*{\inner}[1]{\langle #1 \rangle}	% inner product between vectors, e.g. \inner{v,w}
\newcommand*{\flexinner}[1]{\left\langle #1 \right\rangle}	% auto-scaling version of \inner{}
\newcommand*{\collection}[1]{{\mathfrak{\MakeUppercase{#1}}}} % collection of sets

\newcommand*{\functional}[1]{{\MakeUppercase{#1}}}
\newcommand*{\functionalof}[1]{[#1]}

\newcommand*{\R}{\field{R}} % field of real numbers, or the real line
\newcommand*{\N}{\field{N}} % the set of natural numbers, not a field

\newcommand*{\operator}[1]{{\operatorname{#1}}}

% \newcommand*{\seq}[1]{\MakeUppercase{#1}}

% \newcommand*{\mean}[1]{\overline{#1}}
% \newcommand*{\diam}{{\operatorname{diam}}}

% Matrices and vectors
% ====================
\renewcommand{\vec}[1]{{\boldsymbol{\mathbf{#1}}}}
\newcommand*{\vectorof}[1]{[#1]}					% contents of a vector
\newcommand*{\mat}[1]{\vec{\MakeUppercase{#1}}}
\newcommand*{\eye}{\mat{I}}							% the identity matrix
\newcommand*{\transpose}{\mathsf{T}}
\newcommand*{\tr}{{\operatorname{Tr}}}						% matrix trace
\newcommand*{\expectation}{\mathbb{E}}
% \newcommand{\fint}{\langle \Bar{f} \rangle}    % estimate of integral of f
% \newcommand{\x}{\bm{x}} % x
% \newcommand{\xpr}{\bm{x}^\prime} % x prime
% \newcommand{\X}{\bm{X}}
% \newcommand{\fintreg}{\langle f \rangle}  % integral of f


% \newcommand*{\dimension}{D}

% Probability and measure theory
% ===============================
% \newcommand*{\measure}[1]{\mathbb{\MakeUppercase{#1}}}
% \newcommand*{\distribution}[1]{\measure{#1}}
% \newcommand*{\pdf}[1]{\MakeLowercase{#1}}
% \newcommand*{\pDensity}{p}
% \newcommand*{\pMeasure}{P}
% \newcommand*{\variance}{\mathbb{V}}
% \newcommand*{\covariance}{\operatorname{Cov}}

\newcommand*{\Pspace}{\set{P}} 					% set of probability measures
% \newcommand*{\prob}[1]{\mathbb{P}\left[ #1 \right]}
% \newcommand*{\pSet}{\set{R}}
\newcommand*{\kl}[2]{D_\mathrm{KL}(#1||#2)}         % KL divergence
\newcommand*{\normal}{\mathcal{N}}					% normal distribution
\newcommand*{\Dirac}{\delta}
% \newcommand*{\indicator}{\mathds{1}} 				% indicator function
\newcommand*{\diff}{{\mathop{}\operatorname{d}}}
% \newcommand*{\algebra}{\collection{a}}
% \newcommand*{\Lebesgue}{\measure{l}}
% \newcommand*{\Borel}{\collection{B}}				% Borel sigma-algebra
% \newcommand*{\as}{\mathrm{(a.s.)}}			% almost surely
% \newcommand*{\rv}[1]{\MakeUppercase{#1}}	% random variable
% \newcommand*{\vecMean}[1]{\vec{\hat{#1}}}
\newcommand*{\entropy}{H}
\newcommand*{\Sm}{\Pi}      % probability distribution of spectral measures
\newcommand*{\Pm}{P}     % a general probability measure on the space of measures
\newcommand*{\Qm}{Q}    % \variational measure over space of measures

% % Gaussian processes
\newcommand{\gp}{\mathcal{GP}}
\newcommand*{\gpMeanFunction}{m}
% \newcommand*{\gpMean}{\mu}
% \newcommand*{\location}{\bm{x}}
% \newcommand*{\locDim}{d}
% \newcommand*{\locDomain}{\set{X}}
% \newcommand*{\observation}{y} 					% noisy output observation
% \newcommand*{\observations}{\vec{\observation}}
% \newcommand*{\obsNoise}{\epsilon}
% \newcommand*{\gpnoisefactor}{\lambda}
\newcommand*{\nll}{\mathcal{L}}

% Stochastic processes
\newcommand{\SP}{\mathcal{SP}}  % a generic stochastic process
\newcommand{\Fh}{{\set{F}}}

% % RFFs
% \newcommand*{\rff}[1]{\tilde{#1}}
% \newcommand*{\ffeature}{\vec{\phi}}     % Fourier feature vector
% \newcommand*{\ffeatures}{\mat{\Phi}}    % Fourier features matrix, or design matrix
% \newcommand*{\frequency}{\vec{\omega}}
% \newcommand*{\error}{\xi}
% \newcommand*{\sbq}[1]{\hat{#1}}

% RKHS
\newcommand*{\Hspace}{\set{H}} 						% Hilbert space
\newcommand*{\stepsize}{\epsilon}
\newcommand*{\hfunction}{h}
\newcommand*{\vhfunction}{\vec{\hfunction}}
\newcommand*{\mhfunction}{\mat{\hfunction}}
\newcommand*{\otherf}{g}
\newcommand*{\othervf}{\vec{\otherf}}
\newcommand*{\gop}{\operator{G}}    % operator
\newcommand*{\sop}{\operator{S}}
\newcommand*{\sfunction}{s}
\newcommand*{\vsfunction}{\vec{\sfunction}}
\newcommand*{\vgfunction}{\vec{g}}

\newcommand*{\identity}{\operator{I}}

% % Quadrature
% \newcommand*{\integrand}{f}

% Indexes
% ==========
\newcommand*{\iterIdx}{t}
% \newcommand*{\obsIdx}{i}
% \newcommand*{\primIdx}{i}	% primary index
% \newcommand*{\secIdx}{j}	% secondary index
% \newcommand*{\tIdx}{t}
% \newcommand*{\thirdIdx}{\ell}

% \newcommand*{\nIterations}{N}
\newcommand*{\nObs}{n}
% \newcommand*{\nSamples}{S}

% \newcommand*{\nFeatures}{R}
% \newcommand*{\indexSet}{\set{I}}

% Misc
% ==========
% \newcommand*{\distance}{\rho} % distance function

% \newcommand*{\Lipschitz}{\ell}	% Lipschitz constant

% \newcommand*{\bound}{b}


% \newcommand*{\factor}{\eta}	% arbitrary scalar factor, only specified here to avoid confusion with other constants

% \newcommand*{\anyconstant}{c}

% \newcommand*{\randomfunction}{\tilde{\anyfunction}}
% \newcommand*{\randomscalar}{\tilde{\anyscalar}}

\newcommand*{\anyvector}{\vec{v}}
\newcommand*{\othervector}{\vec{z}}

% \newcommand*{\anydomain}{\set{W}}
% \newcommand*{\anyalgebra}{\collection{W}}

% \newcommand*{\map}{\operator{M}} % generic linear operator

% \def\mmiddle#1{\mathrel{}\middle#1\mathrel{}} % Automatic-spacing middle command (originally from: https://tex.stackexchange.com/a/431820)

% % Re-defining the empty set symbol
% \let\oldemptyset\emptyset
% \let\emptyset\varnothing

% % Non-maths:
\newcommand*{\iid}{i.i.d.\xspace}
% \newcommand*{\wrt}{w.r.t.\xspace}