%-----------------------------------------------------------------------------------------
%MATH
\newcommand\bs[1]{{\boldsymbol{#1}}}
\newcommand{\norm}[1]{\left\Vert#1\right\Vert}
\newcommand{\abs}[1]{\left\vert#1\right\vert}
\newcommand{\set}[1]{\left\{#1\right\}}
\newcommand{\Real}{\Re}
\newcommand{\spacep}{\widetilde{V}_{\mathcal{P},a}}

% equations and proofs
\newcommand{\start}{\begin{equation}}
\newcommand{\finish}{\end{equation}}
\newcommand{\s}{\begin{displaymath}}
\newcommand{\f}{\end{displaymath}}
\newcommand{\sproof}{\noindent {\bf Proof.  }}
\newcommand{\fproof}{\hfill $\square$}
\renewcommand{\baselinestretch}{1}
%
\newcommand{\R}{\mathbb{R}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\E}{\mathbb{E}}
\newcommand{\F}{\mathscr{F}}
\newcommand{\x}{\mathbf{x}}
\newcommand{\z}{\mathbf{z}}
\newcommand{\w}{\mathbf{w}}
\newcommand{\y}{\mathbf{y}}
\newcommand{\dx}{\textrm{d}}
\newcommand{\pe}{\psi}
%math italic
\newcommand{\mcF}{{\mathcal F}}
\newcommand{\mcP}{{\mathcal P}}
\newcommand{\mcA}{{\mathcal A}}
\newcommand{\mcB}{{\mathcal B}}
\newcommand{\mcC}{{\mathcal C}_{_{\mcT_\pk}}}
\newcommand{\mcE}{{\mathcal E}}
\newcommand{\mcI}{{\mathcal I}}
\newcommand{\mcJ}{{\mathcal J}}
\newcommand{\mcK}{{\mathcal K}}
\newcommand{\mcL}{{\mathcal L}}
\newcommand{\mcO}{{\mathcal O}}
\newcommand{\mcR}{{\mathcal R}}
\newcommand{\mcS}{{\mathcal S}}
\newcommand{\mcT}{{\mathcal T}}
% shorthand GREEK notation
%\def\a{\alpha} 
%\def\b{\beta}  
%\def\g{\gamma} 
%\def\d{\delta}  
%\def\z{\zeta}
%\def\e{\eta}   
%\def\t{\theta} 
%\def\k{\kappa} 
%\def\l{\lambda} 
%\def\o{\omega} 
%\def\eps{\varepsilon} 
%\def\G{\Gamma} 
%\def\D{\Delta}
%\def\O{\Omega} 
%\def\S{\sum} 
%\def\ee{{\rm{e}}}
%\def\und{\underline}  
%\def\ove{\overline}  
%\def\q{\quad}
%\def\what{\hat} 
%\def\wtild{\tilde}
% misc
\def\x{\mathbf{x}}
\def\y{\mathbf{y}} 
\def\H{\mathbf{H}} 
\def\L{\mathbf{L}}
\def\u{\mathbf{u}} 
\def\w{\mathbf{w}} 
\def\zz{\mathbf{z}} 
\def\U{\mathbf{U}}
\def\T{\Theta}     
\def\X{\mathbf{X}} 
\def\undX{\underline{\mathbf{X}}}
\def\e0{\mathbf{e}_0} 
\def \W{\mathbf{W}}
\def\V{\mathbf{V}}  
\def\spV{\mathcal{V}} 
\def\spW{\mathcal{W}}
\def\calj{\mathcal{J}} 
\def\call{\mathcal{L}}
\def\calh{\mathcal{H}} 
\def\calu{\mathcal{U}}
\def\scrU{\mathscr{U}}
\def\scrI{\mathscr{I}}
\def\scrG{\mathscr{G}}
\def\ohat{\hat{\omega}}
\def\cal{\mathcal}

\def\tol{TOL}

%bold greek
\def\bmalpha{\bm{\alpha}}
\newcommand{\am}{\underline{\alpha}}
\newcommand{\gm}{\underline{g}}
\newcommand{\ii}{\mathbf{i}}
\newcommand{\jj}{\mathbf{j}}
\renewcommand{\gg}{\mathbf{g}}
\newcommand{\aalpha}{\boldsymbol{\alpha}}
\newcommand{\oone}{\boldsymbol{1}}
\newcommand{\zzero}{\boldsymbol{0}}

\newcommand{\grad}{\nabla}

% names
\newcommand{\Loeve}{Lo{\`e}ve }
\newcommand{\Babuska}{Babu{\v{s}}ka}
\newcommand{\KL}{Karhunen-\Loeve}

% spacing commands
\newcommand{\ken}{\ \ }
\newcommand{\kenn}{\hskip0.1truecm}
\newcommand{\mybox}{}


% notation
\newcommand{\lv}{w}  % level w (or m)
\newcommand{\Xa}[1]{{X}_{\bmalpha}(\lv,#1)}
\newcommand{\Ya}[1]{{Y}_{\bmalpha}(\lv,#1)}
\newcommand{\tXa}{\tilde{X}_{\bmalpha}(\lv,d)}   
\newcommand{\tXaone}{\tilde{X}_{\bmalpha}(\lv,1)}   
\newcommand{\As}[1]{\mathscr{A}_{\bmalpha}(\lv,#1)}
\newcommand{\tYa}{\tilde{Y}_{\bmalpha}(\lv,d)}   
\newcommand{\tYap}{\tilde{Y}^+_{\bmalpha}(\lv,d)}   
\newcommand {\lessim} {\ {\raise-.5ex\hbox{$\buildrel<\over\sim$}}\ }