\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{math_notations}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{siunitx}
\usepackage{ stmaryrd }

% Non-standard units
\DeclareSIUnit{\mph}{mph}
\DeclareSIUnit{\rpm}{rpm}
\DeclareSIUnit{\year}{y}

% A random variable is upcase.
% An observation of a random variable (or a real number) is downcase.
% A random vector is in latin, upcase, letter.
% A vector is in latin, downcase, letter.
% A set is in latin, caligraphic, upcase, letter.

% The physical model
\newcommand{\model}{g}
\newcommand{\inputDim}{d}  % The input dimension of the model
\newcommand{\outputDim}{{d_Y}}  % The output dimension of the model
\newcommand{\metaModel}{\widetilde{\model}}  % The surrogate model

% Probabilistic modeling
\newcommand{\inputRV}{\vect{X}}  % The input random vector of the model
\newcommand{\outputRV}{\vect{Y}}  % The output random vector of the model
\newcommand{\inputMeasure}{\mu_{\inputRV}}  % The distribution of the input random vector of the model
\newcommand{\outputMeasure}{\mu_{\outputRV}}  % The distribution of the output random vector of the model
\newcommand{\standardRV}{\vect{Z}}  % The standard random vector (e.g. for polynomial chaos expansion)
\newcommand{\RVU}{\vect{U}}

\newcommand{\pdf}{\inputMeasure(\inputReal)}

% Realization of the random vector
\newcommand{\inputReal}{\vect{x}}  % An observation of the input random vector of the model
\newcommand{\outputReal}{\vect{y}}  % An observation of the output random vector of the model

\newcommand{\standardDim}{d_Z}  % The dimension of the standard random vector
\newcommand{\dimU}{d_U}
\newcommand{\standardReal}{\vect{z}}  % An observation of the standard random vector
\newcommand{\realU}{\vect{u}}
\newcommand{\supp}[1] {\operatorname{supp}\left(#1\right)}  % The support of a distribution
\newcommand{\sampleSize}{n}  % The sample size

\newcommand{\scalarproduct}[2]{\left\langle #1, #2 \right\rangle}

% A set
\newcommand{\set}[1]{\mathcal{#1}}
% The set of standard input variables
\newcommand{\standardInputSpace}{\set{Z}}
% The input domain of the physical model
\newcommand{\physicalInputSpace}{\set{X}}
% The output domain of the physical model
\newcommand{\physicalOutputSpace}{\set{Y}}

% The probability density function of the input random vector
\newcommand{\inputProbabilityDensityFunction}{f}

% For matrixes and vectors
\newcommand{\vect}[1]{{\mathbf{\boldsymbol{{#1}}}}}
\newcommand{\mat}[1]{{\vect{\vect{#1}}}}
\newcommand{\Tr}[1]{{#1}^\top}


% Probabilistic operators
\newcommand{\muX}{\vect{\mu}_{\:X}}
\newcommand{\Var}[1]{{\rm Var}\left( #1 \right)}
\newcommand{\Cov}[1]{{\rm Cov}\left( #1 \right)}
\newcommand{\Expect}[1]{{\mathbb E}\left[ #1 \right]}
\newcommand{\Econd}[2]{{\mathbb E}_{#1}\left[ #2 \right]}
\newcommand{\Prob}[1]{{\mathbb P}\left( #1 \right)}
\newcommand{\ProbCond}[2]{{\mathbb P}_{#1}\left( #2 \right)}
\newcommand{\ech}{\left\{ x_1, \, \dots\,, x_N  \right\}}
\newcommand{\matcov} {\mathbf C}
\newcommand{\matcor} {\mathbf R}
\newcommand{\fcar}[2] {{\mathbf 1}_{#1}(#2)}

% Mathematics operators
\newcommand{\di}[1] {{\,\mathrm{d}#1}}
\newcommand{\norm}[1] {\left\|#1\right\|}
\newcommand{\tendto}[2]{\xrightarrow[#1\rightarrow#2]{}}
\newcommand{\matr}[1]{\vect{\vect{#1}}}
\newcommand{\idx}{\vect{\alpha}}
\newcommand{\Cor}[1]{{\rm Cor}\left[ #1 \right]}
\newcommand{\NM}{\Nset^{\inputDim}}


% Bold letters 
\newcommand{\bdA}{{\boldsymbol{A}}}
\newcommand{\bdB}{{\boldsymbol{B}}}
\newcommand{\bdC}{{\boldsymbol{C}}}
\newcommand{\bdD}{{\boldsymbol{D}}}
\newcommand{\bdE}{{\boldsymbol{E}}}
\newcommand{\bdF}{{\boldsymbol{F}}}
\newcommand{\bdG}{{\boldsymbol{G}}}
\newcommand{\bdH}{{\boldsymbol{H}}}
\newcommand{\bdI}{{\boldsymbol{I}}}
\newcommand{\bdJ}{{\boldsymbol{J}}}
\newcommand{\bdK}{{\boldsymbol{K}}}
\newcommand{\bdL}{{\boldsymbol{L}}}
\newcommand{\bdM}{{\boldsymbol{M}}}
\newcommand{\bdN}{{\boldsymbol{N}}}
\newcommand{\bdO}{{\boldsymbol{O}}}
\newcommand{\bdP}{{\boldsymbol{P}}}
\newcommand{\bdQ}{{\boldsymbol{Q}}}
\newcommand{\bdR}{{\boldsymbol{R}}}
\newcommand{\bdS}{{\boldsymbol{S}}}
\newcommand{\bdT}{{\boldsymbol{T}}}
\newcommand{\bdU}{{\boldsymbol{U}}}
\newcommand{\bdV}{{\boldsymbol{V}}}
\newcommand{\bdW}{{\boldsymbol{W}}}
\newcommand{\bdX}{{\boldsymbol{X}}}
\newcommand{\bdY}{{\boldsymbol{Y}}}
\newcommand{\bdZ}{{\boldsymbol{Z}}}
\newcommand{\bda}{{\boldsymbol{a}}}
\newcommand{\bdb}{{\boldsymbol{b}}}
\newcommand{\bdc}{{\boldsymbol{c}}}
\newcommand{\bdd}{{\boldsymbol{d}}}
\newcommand{\bde}{{\boldsymbol{e}}}
\newcommand{\bdf}{{\boldsymbol{f}}}
\newcommand{\bdg}{{\boldsymbol{g}}}
\newcommand{\bdh}{{\boldsymbol{h}}}
\newcommand{\bdi}{{\boldsymbol{i}}}
\newcommand{\bdj}{{\boldsymbol{j}}}
\newcommand{\bdk}{{\boldsymbol{k}}}
\newcommand{\bdl}{{\boldsymbol{l}}}
\newcommand{\bdm}{{\boldsymbol{m}}}
\newcommand{\bdn}{{\boldsymbol{n}}}
\newcommand{\bdo}{{\boldsymbol{o}}}
\newcommand{\bdp}{{\boldsymbol{p}}}
\newcommand{\bdq}{{\boldsymbol{q}}}
\newcommand{\bdr}{{\boldsymbol{r}}}
\newcommand{\bds}{{\boldsymbol{s}}}
\newcommand{\bdt}{{\boldsymbol{t}}}
\newcommand{\bdu}{{\boldsymbol{u}}}
\newcommand{\bdv}{{\boldsymbol{v}}}
\newcommand{\bdw}{{\boldsymbol{w}}}
\newcommand{\bdx}{{\boldsymbol{x}}}
\newcommand{\bdy}{{\boldsymbol{y}}}
\newcommand{\bdz}{{\boldsymbol{z}}}

% special caracters
\newcommand{\cA}{{\mathcal A}}
\newcommand{\cB}{{\mathcal B}}
\newcommand{\cC}{{\mathcal C}}
\newcommand{\cD}{{\mathcal D}}
\newcommand{\cE}{{\mathcal E}}
\newcommand{\cF}{{\mathcal F}}
\newcommand{\cG}{{\mathcal G}}
\newcommand{\cH}{{\mathcal H}}
\newcommand{\cI}{{\mathcal I}}
\newcommand{\cJ}{{\mathcal J}}
\newcommand{\cK}{{\mathcal K}}
\newcommand{\cL}{{\mathcal L}}
\newcommand{\cM}{{\mathcal M}}
\newcommand{\cN}{{\mathcal N}}
\newcommand{\cO}{{\mathcal O}}
\newcommand{\cP}{{\mathcal P}}
\newcommand{\cQ}{{\mathcal Q}}
\newcommand{\cR}{{\mathcal R}}
\newcommand{\cS}{{\mathcal S}}
\newcommand{\cT}{{\mathcal T}}
\newcommand{\cU}{{\mathcal U}}
\newcommand{\cV}{{\mathcal V}}
\newcommand{\cW}{{\mathcal W}}
\newcommand{\cX}{{\mathcal X}}
\newcommand{\cY}{{\mathcal Y}}
\newcommand{\cZ}{{\mathcal Z}}
\newcommand{\Cset}{{\mathbb C}}
\newcommand{\Eset}{{\mathbb E}}
\newcommand{\Nset}{{\mathbb N}}
\newcommand{\Pset}{{\mathbb P}}
\newcommand{\Qset}{{\mathbb Q}}
\newcommand{\Rset}{{\mathbb R}}
\newcommand{\Zset}{{\mathbb Z}}
\newcommand{\Diff}{{\mathrm{d}}}

% short commands
\newcommand{\un}[1]{\vect{#1}}
\newcommand{\dpl}[1]{\displaystyle{#1}}
\newcommand{\uw}{\vect{w}}
\newcommand{\uW}{\vect{W}}
\newcommand{\ux}{\vect{x}}
\newcommand{\uX}{\vect{X}}
\newcommand{\uy}{\vect{y}}
\newcommand{\uY}{\vect{Y}}
\newcommand{\uz}{\vect{z}}
\newcommand{\uZ}{\vect{Z}}

\DeclareMathOperator*{\argmin}{argmin}
\DeclareMathOperator*{\argmax}{argmax}
\DeclareMathOperator*{\diag}{diag}
\DeclareMathOperator{\sgn}{sgn}
