
\newcommand{\beq}{\begin{equation}}
\newcommand{\eeq}{\end{equation}}

\newcommand{\htn}{\hat{\theta}_{\lambda_n}}
\newcommand{\hdn}{\hat{\Delta}_n}

\newcommand{\mr}[1]{\textcolor{red}{#1}}
\newcommand{\mb}[1]{\textcolor{blue}{#1}}

\newcommand\norm[1]{\left\lVert#1\right\rVert}
\renewcommand\vec[1]{\operatorname{vec}#1}


%% ========================================================
\newcommand\B{\mathbb{B}}
\newcommand\E{\mathbb{E}}
\renewcommand\P{\mathbb{P}}
\newcommand\I{\mathbb{I}}
\newcommand\N{\mathbb{N}}
\newcommand\s{\mathbb{S}}
\newcommand\R{\mathbb{R}}
\newcommand\W{\mathbb{W}}
\newcommand\X{\mathbb{X}}
\newcommand\Y{\mathbb{Y}}

\newcommand\1{\mathbbm{1}}
\newcommand\0{\mathbbm{0}}

\newcommand{\bz}{\mathbf{0}}
\newcommand{\bo}{\mathbf{1}}

\newenvironment{packed_enum}{
\begin{enumerate}
  \setlength{\itemsep}{1pt}
  \setlength{\parskip}{0pt}
  \setlength{\parsep}{0pt}
}{\end{enumerate}}

%% ========================================================
%% Some useful commands. Note the dangerous \r command!
%% ========================================================



\newcommand{\bd}{\boldsymbol}
\newcommand{\mf}{\mathbf}


\newcommand{\g}{\mathbf{g}}



\renewcommand{\a}{\mathbf{a}}
\renewcommand{\b}{\mathbf{b}}
\renewcommand{\c}{\mathbf{c}}
\newcommand{\f}{\mathbf{f}}
\renewcommand{\r}{\mathbf{r}} % since \r was already defined in altex
\renewcommand{\u}{\mathbf{u}}
\renewcommand{\v}{\mathbf{v}}
\newcommand{\V}{\mathbf{V}}
\newcommand{\es}{\mathbf{s}}
\newcommand{\w}{\mathbf{w}}
\newcommand{\x}{\mathbf{x}}
\newcommand{\y}{\mathbf{y}}
\newcommand{\z}{\mathbf{z}}
\newcommand{\p}{\mathbf{p}}
\newcommand{\q}{\mathbf{q}}
\renewcommand{\I}{\mathbb{I}}




%----------------------------------------
%      THE SETS
%----------------------------------------
\newcommand{\cC}{{\cal C}}
\newcommand{\cH}{{\cal H}}
\newcommand{\cI}{{\cal I}}
\newcommand{\cL}{{\cal L}}
\newcommand{\cM}{{\cal M}}
%\newcommand{\M}{\mathcal{M}}
\newcommand{\cN}{{\cal N}}
\newcommand{\cP}{{\cal P}}
\newcommand{\cQ}{{\cal Q}}
\newcommand{\cS}{{\cal S}}
\newcommand{\cT}{{\cal T}}
\newcommand{\cW}{{\cal W}}
\newcommand{\cX}{{\cal X}}
\newcommand{\cY}{{\cal Y}}
\newcommand{\cF}{{\cal F}}
\newcommand{\cZ}{{\cal Z}}

\newcommand{\cA}{{\cal A}}
\newcommand{\cB}{{\cal B}}
\newcommand{\cD}{{\cal D}}
\newcommand{\cG}{{\cal G}}
\newcommand{\cE}{{\cal E}}


%--------------------------------------------
%         THE VARIABLES & APPROXIMATES
%--------------------------------------------

% Bold variables for vectors, matrices
\newcommand{\bA}{\mathbf{A}}
\newcommand{\bB}{\mathbf{B}}
\newcommand{\bC}{\mathbf{C}}
\newcommand{\bD}{\mathbf{D}}
\newcommand{\bE}{\mathbf{E}}
\newcommand{\bI}{\mathbf{I}}
\newcommand{\bM}{\mathbf{M}}
\newcommand{\bR}{\mathbf{R}}
\newcommand{\bU}{\mathbf{U}}
\newcommand{\bV}{\mathbf{V}}
\newcommand{\bW}{\mathbf{W}}
\newcommand{\bX}{\mathbf{X}}
\newcommand{\bY}{\mathbf{Y}}
%\newcommand{\bZ}{\mathbf{Z}}

\newcommand{\bgg}{\mathbf{g}}

%\newcommand{\bz}{\mathbf{z}}
\newcommand{\hZ}{\hat{Z}}
\newcommand{\hbZ}{\hat{\bZ}}
\newcommand{\hz}{\hat{z}}

\newcommand{\hU}{\hat{U}}
\newcommand{\hV}{\hat{V}}
\newcommand{\hu}{\hat{u}}
\newcommand{\hv}{\hat{v}}


\newcommand{\hX}{\hat{X}}
\newcommand{\hY}{\hat{Y}}
\newcommand{\hatx}{{\hat{x}}}
\newcommand{\haty}{{\hat{y}}}

%---------MISC-----------------------------



\newcommand{\m}{\boldsymbol{\mu}}
\newcommand{\bmu}{\boldsymbol{\mu}}
\newcommand{\llambda}{\boldsymbol{\lambda}}
\newcommand{\bchi}{\boldsymbol{\chi}}
\newcommand{\btheta}{\boldsymbol{\theta}}
\newcommand{\Eta}{\boldsymbol{\eta}}
\newcommand{\oomega}{\boldsymbol{\omega}}
\newcommand{\ppi}{\boldsymbol{\pi}}
\newcommand{\pphi}{\boldsymbol{\phi}}
\newcommand{\ggamma}{\boldsymbol{\gamma}}
\newcommand{\bbeta}{\boldsymbol{\beta}}
\newcommand{\aalpha}{\boldsymbol{\alpha}}
\newcommand{\eepsilon}{\boldsymbol{\epsilon}}

\newcommand{\bxi}{\boldsymbol{\xi}}
\newcommand{\bzeta}{\boldsymbol{\zeta}}
\newcommand{\beeta}{\boldsymbol{\eta}}

%\newcommand{\norm}[2]{\ensuremath \|#1\|_{#2}}
\newcommand{\no}[1]{\norm{#1}{}}
\newcommand{\myref}[1]{(\ref{#1})}
\newcommand{\del}[2]{\frac{\partial #1}{\partial #2}}


%----------------------------------------------
%        NEW OPERATORS
%----------------------------------------------
\DeclareMathOperator{\argsup}{argsup}
\DeclareMathOperator{\arginf}{arginf}
\DeclareMathOperator{\argmax}{argmax}
\DeclareMathOperator{\argmin}{argmin}
\DeclareMathOperator{\avg}{avg}
\DeclareMathOperator{\Int}{int}
\DeclareMathOperator{\cl}{cl}
\DeclareMathOperator{\bnd}{bd}
\DeclareMathOperator{\epi}{epi}
\DeclareMathOperator{\dom}{dom}
\DeclareMathOperator{\ri}{ri}
\DeclareMathOperator{\co}{co}
\DeclareMathOperator{\sgn}{sign}
\DeclareMathOperator{\supp}{supp}
\DeclareMathOperator{\discrete}{Discrete}
\DeclareMathOperator{\gam}{GAM}
\DeclareMathOperator{\uni}{Uniform}
\DeclareMathOperator{\dir}{Dir}
\DeclareMathOperator{\gaam}{GAM}
\DeclareMathOperator{\Beta}{Beta}
\DeclareMathOperator{\tr}{Tr}
\DeclareMathOperator{\cone}{cone}
\DeclareMathOperator{\gen}{gen}
\DeclareMathOperator{\lsd}{LSD}
\DeclareMathOperator{\euc}{Euc}
\DeclareMathOperator{\spec}{Spec}
\DeclareMathOperator{\diag}{diag}
\DeclareMathOperator{\poly}{poly}
\DeclareMathOperator{\polylog}{polylog}


\DeclareMathOperator{\gelu}{GELU}
\DeclareMathOperator{\erf}{erf}
\DeclareMathOperator{\ntk}{ntk}

%---------------------------------------------
% EQUATION, FIGURE, TABLE NUMBERS
%---------------------------------------------

%\renewcommand{\theequation}{\thesection.\arabic{equation}}
%\renewcommand{\thefigure}{\thesection.\arabic{figure}}
%\renewcommand{\thetable}{\thesection.\arabic{table}}
%\numberwithin{equation}{section}



%---------------------------------------------
% THEOREMS, EXAMPLES ETC.
%---------------------------------------------

% \newcounter{exampleI}
% \setcounter{exampleI}{1}
% \renewcommand{\theexampleI}{\arabic{exampleI}}

% {\theorembodyfont{\rmfamily} \theoremstyle{plain} \newtheorem{subexampleI}{Example}[exampleI]}
% \renewcommand{\thesubexampleI}{\theexampleI.\Alph{subexampleI}}

% \newcounter{exampleII}
% \setcounter{exampleII}{2}
% \renewcommand{\theexampleII}{\arabic{exampleII}}

% {\theorembodyfont{\rmfamily} \theoremstyle{plain} \newtheorem{subexampleII}{Example}[exampleII]}
% \renewcommand{\thesubexampleII}{\theexampleII.\Alph{subexampleII}}

% \newcounter{exampleIII}
% \setcounter{exampleIII}{3}
% \renewcommand{\theexampleIII}{\arabic{exampleIII}}

% {\theorembodyfont{\rmfamily} \theoremstyle{plain} \newtheorem{subexampleIII}{Example}[exampleIII]}
% \renewcommand{\thesubexampleIII}{\theexampleIII.\Alph{subexampleIII}}


%{\theorembodyfont{\rmfamily} \newtheorem{exam}{Example}}
% {\theorembodyfont{\rmfamily} \newtheorem{defn}{Definition}}
%{\theorembodyfont{\rmfamily} \newtheorem{remark}{Remark}}
\newtheorem{theo}{Theorem}[section]
\newtheorem{prop}{Proposition}[section]
\newtheorem{lemm}{Lemma}[section]
\newtheorem{corr}{Corollary}[section]
\newtheorem{clm}{Claim}
\newtheorem{asmp}{Assumption}
\newtheorem{defn}{Definition}[section]

\theoremstyle{definition} 
\newtheorem{exam}{Example}[section]
\newtheorem{remark}{Remark}[section]

% \newcommand{\proof}{\noindent{\itshape Proof:}\hspace*{1em}}
% \newcommand{\proofsketch}{\noindent{\itshape Proof Sketch:}\hspace*{1em}}
% \newcommand{\qed}{\nolinebreak[1]~~~\hspace*{\fill} \rule{5pt}{5pt}\vspace*{\parskip}\vspace*{1ex}}



\newcommand{\cx}{{\hat{x}}}
\newcommand{\cy}{{\hat{y}}}
\newcommand{\bp}{{\bar{p}}}
\newcommand{\eqn}[1]{(\ref{eq:#1})}
\newcommand {\commentout}[1] {}

%------------------------------------------

%%%%%%%%%%%Definitions and Macros

\def\ints{{{\rm Z} \kern -.35em {\rm Z} }}  % ints
\def\smallints{{{\rm Z} \kern -.3em {\rm Z} }}  % small ints
\def\pints{{{\rm I} \kern -.15em {\rm N} }}      % pints
\newcommand{\reals}{\mathbb R}
\newcommand{\integers}{\mathbb Z}

\newcommand{\lapn}{\lessapprox_{\,n}}
\newcommand{\gapn}{\gtrapprox_{\,n}}
\newcommand{\apn}{\approx_n}

%\def\reals{{{\rm I} \kern -.2em {\rm R} }} % reals
\newcommand{\RR}{\mathbb R}
\def\cplx{{{\rm I} \kern -.45em {\rm C} }}       % complex
\def\l2{\rm {\mathcal L}^{2}(\reals)}            % l2

\newcommand{\seqz}[2]{\mbox{$\{#1_{#2}\}$}_{#2 \in \smallints }}
\newcommand{\seqn}[2]{\mbox{$\{#1_{#2}\}$}_{#2 \in \pints }}
%\renewcommand{\norm}[1]{\lVert#1\rVert}
\newcommand{\abs}[1]{\left|#1\right|}


\newtheorem{problem}{Problem}
\newtheorem{definition}{Definition}[section]
\newtheorem{nad}{Notation and Definitions}[section]
\newtheorem{notation}{Notation}[section]
%\newtheorem{remark}{Remark}[section]
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{claim}{Claim}[theorem]
\newtheorem{proposition}{Proposition}[section]
\newtheorem{corollary}{Corollary}
\newtheorem{example}{Example}
\newtheorem{conjecture}{Conjecture}
%\newtheorem{algorithm}{Algorithm}
\newtheorem{exercise}{Exercise}
\newtheorem{step}{Step}

\newcommand{\nr}{\nonumber}
\newcommand{\be}{\begin{eqnarray}}
\newcommand{\ee}{\end{eqnarray}}
\newcommand{\bea}{\begin{eqnarray}}
\newcommand{\eea}{\end{eqnarray}}
\newcommand{\beaa}{\begin{eqnarray*}}
\newcommand{\eeaa}{\end{eqnarray*}}
\newcommand{\bnad}{\begin{nad}}
\newcommand{\enad}{\end{nad}}


\newcommand{\gb}{\beta_{\infty}}
\newcommand{\mgb}{\tilde{\beta}_{\infty}}
\newcommand{\gbb}{\beta_{2}}
\newcommand{\mgbb}{\tilde{\beta}_{2}}
\newcommand{\Jf}{J_{\infty}}
\newcommand{\mmJf}{\overline{J}_{\infty}}
\newcommand{\mJf}{\tilde{J}_{\infty}}
\newcommand{\Jff}{J_{2}}
\newcommand{\mJff}{\tilde{J}_{2}}
\newcommand{\Jc}{{\calJ_{\infty}}}
\newcommand{\mJc}{{\tilde{\calJ}_{\infty}}}
\newcommand{\Jcc}{{\calJ_{2}}}
\newcommand{\ptq}{P_{3 \overline{Q}}}
\newcommand{\pq}{P_{Q}}


\newcommand{\di}{{\,\mathrm{d}}}
\newcommand{\latop}[2]{\genfrac{}{}{0pt}{}{#1}{#2}}


%\newcommand{\Th}[1]{Theorem~\ref{#1}} % when starting a sentence
%\renewcommand{\th}[1]{Theorem~\ref{#1}}
%\newcommand{\ths}[2]{Theorems~\ref{#1} and~\ref{#2}}
%\newcommand{\thst}[2]{Theorems~\ref{#1}-\ref{#2}}
%\newcommand{\lem}[1]{Lemma~\ref{#1}}
%\newcommand{\prop}[1]{Proposition~\ref{#1}}
%\newcommand{\defin}[1]{Definition~\ref{#1}}
%\newcommand{\eq}[1]{equation~(\ref{#1})}
%\newcommand{\ineq}[1]{inequality~(\ref{#1})}
%\newcommand{\Ineq}[1]{Inequality~(\ref{#1})}
%\newcommand{\ineqs}[2]{inequalities~(\ref{#1}) and~(\ref{#2})}
%\newcommand{\Eq}[1]{Equation~(\ref{#1})}
%\newcommand{\eqs}[2]{equations~(\ref{#1}) and~(\ref{#2})}
%\newcommand{\eqss}[3]{equations~(\ref{#1}), (\ref{#2}) and~(\ref{#3})}
%\newcommand{\eqst}[2]{equations~(\ref{#1})-(\ref{#2})}
%\newcommand{\sect}[1]{Section~\ref{#1}}
%\newcommand{\subsect}[1]{Subsection~\ref{#1}}

\newcommand{\lip}{\langle}
\newcommand{\rip}{\rangle}
\newcommand{\uu}{\underline}
\newcommand{\oo}{\overline}
\newcommand{\La}{\Lambda}
\newcommand{\la}{\lambda}
%\newcommand{\eps}{\epsilon}
\newcommand{\eps}{\varepsilon}
\newcommand{\veps}{\varepsilon}
\newcommand{\rmT}{{\rm T}}
\newcommand{\rmW}{{\rm W}}
\newcommand{\Ga}{\Gamma}

\newcommand{\sign}{{\mbox{\rm sign}}}
\newcommand{\ang}{{\mbox{\rm ang}}}
%\newcommand{\supp}{{\mbox{\rm supp}}}
\newcommand{\dist}{{\mbox{\rm dist}}}

\newcommand{\nin}{\in\!\!\!\!\!/\,}

\newcommand{\calA}{{\cal A}}
\newcommand{\calB}{{\cal B}}
\newcommand{\calC}{{\cal C}}
\newcommand{\calD}{{\cal D}}
\newcommand{\tcD}{{\tilde{\cal D}}}
\newcommand{\calE}{{\cal E}}
\newcommand{\calF}{{\cal F}}
\newcommand{\calG}{{\cal G}}
\newcommand{\calH}{{\cal H}}
\newcommand{\calI}{{\cal I}}
\newcommand{\calJ}{{\cal J}}
\newcommand{\calK}{{\cal K}}
\newcommand{\calL}{{\cal L}}
\newcommand{\calM}{{\cal M}}
\newcommand{\calN}{{\cal N}}
\newcommand{\calO}{{\cal O}}
\newcommand{\calP}{{\cal P}}
\newcommand{\calQ}{{\cal Q}}
\newcommand{\calR}{{\cal R}}
\newcommand{\calS}{{\cal S}}
\newcommand{\calT}{{\cal T}}
\newcommand{\calU}{{\cal U}}
\newcommand{\calV}{{\cal V}}
\newcommand{\calW}{{\cal W}}
\newcommand{\calX}{{\cal X}}
\newcommand{\calY}{{\cal Y}}
\newcommand{\calZ}{{\cal Z}}

\newcommand{\RE}{{\cal R}e}
%\newcommand{\IM}{{\cal I}m}


\newcommand{\Prob}{{\rm Prob\,}}
\newcommand{\diam}{{\rm diam\,}}
\renewcommand{\mod}{{\rm mod\,}}
\newcommand{\sinc}{{\rm sinc\,}}
\newcommand{\ctg}{{\rm ctg\,}}
\newcommand{\ifff}{\mbox{\ if and only if\ }}
%\newcommand{\proof}{\noindent {\bf Proof:\ }}

% %\renewcommand{\bar}{\overline}
% \renewcommand{\overline}{\bar}
% %\renewcommand{\tilde}{\widetilde}
% \renewcommand{\widetilde}{\tilde}
% %\renewcommand{\ell}{l}
% %\renewcommand{\hat}{\widehat}
% \renewcommand{\widehat}{\hat}




