\newcommand{\term}{\emph}

\newcommand{\field}[1]{\mathbb{#1}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\field{Q}}
\newcommand{\R}{\field{R}}
\newcommand{\extR}{\overline \R}
\newcommand{\Complex}{\field{C}}
\newcommand{\B}{\mathbb{B}}
\newcommand{\OB}{\mathbb{O}}
%\newcommand{\UU}{\mathbb{U}}
% Trust regions are just normal balls.
\let\UU\B
\newcommand{\norm}[1]{\|#1\|}
\newcommand{\adaptnorm}[1]{\left\|#1\right\|}
\newcommand{\bignorm}[1]{\bigl\|#1\bigr\|}
\newcommand{\Bignorm}[1]{\Bigl\|#1\Bigr\|}
\newcommand{\abs}[1]{|#1|}
\newcommand{\adaptabs}[1]{\left|#1\right|}
\newcommand{\bigabs}[1]{\bigl|#1\bigr|}
\newcommand{\inv}[1]{#1^{-1}}
\newcommand{\grad}{\nabla}
\newcommand{\freevar}{\,\boldsymbol\cdot\,}
\newcommand{\Union}\bigcup
\newcommand{\Isect}\bigcap
\newcommand{\union}\cup
\newcommand{\isect}\cap
\newcommand{\bigunion}\bigcup
\newcommand{\bigisect}\bigcap
\newcommand{\powerset}{\mathcal{P}}
\newcommand{\defeq}{:=}
\newcommand{\set}[1]{\{#1\}}
\newcommand{\downto}{\searrow}
\newcommand{\upto}{\nearrow}
\newcommand{\subdiff}{\partial}
\newcommand{\pinv}[1]{#1^\dag}
\newcommand{\overbar}[1]{\mkern 1.5mu\overline{\mkern-1.5mu#1\mkern-1.5mu}\mkern 1.5mu}

\DeclareMathOperator*{\lip}{lip}
\DeclareMathOperator*{\argmin}{arg\,min}
\DeclareMathOperator*{\argmax}{arg\,max}
\DeclareMathOperator{\interior}{int}
\DeclareMathOperator{\ri}{ri}
\DeclareMathOperator{\rbd}{rbd}
\DeclareMathOperator{\closure}{cl}
\DeclareMathOperator{\bd}{bd}
\DeclareMathOperator{\sign}{sign}
\DeclareMathOperator{\Sign}{Sign}
\DeclareMathOperator{\rank}{rank}
\DeclareMathOperator{\range}{ran}
\DeclareMathOperator{\dom}{dom}
\DeclareMathOperator{\cod}{cod}
\DeclareMathOperator{\lev}{lev}
\DeclareMathOperator{\conv}{conv}
\DeclareMathOperator{\diam}{diam}
\DeclareMathOperator{\epi}{epi}
\DeclareMathOperator{\tr}{tr}
\DeclareMathOperator{\diag}{diag}
\DeclareMathOperator{\graph}{graph}
\DeclareMathOperator{\cond}{cond}
\DeclareMathOperator{\esssup}{ess\,sup}
\DeclareMathOperator{\support}{supp}
\DeclareMathOperator{\divergence}{div}
\DeclareMathOperator{\Id}{Id}
\DeclareMathOperator{\dist}{dist}
\DeclareMathOperator{\Sym}{Sym}
\DeclareMathOperator{\prox}{prox}
\DeclareMathOperator{\gdesc}{g-desc}
\DeclareMathOperator{\gexp}{g-exp}
\DeclareMathOperator{\desc}{desc}

\newcommand{\mathvar}[1]{\textup{#1}}

\newcommand{\iprod}[2]{\langle #1,#2\rangle}
%\newcommand{\dualprod}[2]{\langle #1 | #2\rangle}
\newcommand{\dualprod}[2]{\langle #1,#2\rangle}
\newcommand{\adaptiprod}[2]{\left\langle #1,#2\right\rangle}

\newcommand{\weakto}{\mathrel{\rightharpoonup}}
%\makeatletter
\def \weaktostarSym{\setbox0=\hbox{$\rightharpoonup$}\rlap{\hbox 
        to\wd0{\hss\raise1ex\hbox{$\scriptscriptstyle{*\,}$}\hss}}\box0}
    \def \weaktostar    {\mathrel{\weaktostarSym}}
%\makeatother

\newcommand{\setto}{\rightrightarrows}

\def\opt#1{\bar #1}
\def\realopt#1{\widehat #1}
\def\dir#1{\Delta #1}
\def\alt#1{\tilde #1}
\def\altalt#1{#1'}
\def\this#1{#1^k}
\def\nexxt#1{#1^{k+1}}
\def\overnext#1{\bar #1^{k+1}}
\def\prev#1{#1^{k-1}}
\def\thisstar#1{#1^k^*}
\def\nextstar#1{#1^{k+1}^*}
\def\optstar#1{\opt{#1}^*}
\def\realoptstar#1{\realopt{#1}^*}

\def\optu{{\opt{u}}}
\def\optv{{\opt{v}}}
\def\optw{{\opt{w}}}
\def\optx{{\opt{x}}}
\def\opty{{\opt{y}}}
\def\optz{{\opt{z}}}

\def\realoptu{{\realopt{u}}}
\def\realoptv{{\realopt{v}}}
\def\realoptw{{\realopt{w}}}
\def\realoptx{{\realopt{x}}}
\def\realopty{{\realopt{y}}}
\def\realoptz{{\realopt{z}}}

\def\nextu{\nexxt{u}}
\def\nextv{\nexxt{v}}
\def\nextw{\nexxt{w}}
\def\nextx{\nexxt{x}}
\def\nexty{\nexxt{y}}
\def\nextz{\nexxt{z}}

\def\thisu{\this{u}}
\def\thisv{\this{v}}
\def\thisw{\this{w}}
\def\thisx{\this{x}}
\def\thisy{\this{y}}
\def\thisz{\this{z}}

\def\prevu{\prev{u}}
\def\prevv{\prev{v}}
\def\prevw{\prev{w}}
\def\prevx{\prev{x}}
\def\prevy{\prev{y}}
\def\prevz{\prev{z}}

\def\overnextu{\overnext{u}}
\def\overnextx{\overnext{x}}

\def\d{\,\mathrm{d}}

\let\altphi\phi
\let\phi\varphi
\let\altepsilon\epsilon
\let\epsilon\varepsilon

\newcommand{\frechetNormal}{\widehat N}
\newcommand{\frechetCod}{\widehat D^*}
\newcommand{\clarkeTangent}{\widehat T}
\newcommand{\clarkeGD}{\widehat D}
\newcommand{\coderivative}{D^*}
\newcommand{\polar}[1]{#1^{\circ}}
\newcommand{\bipolar}[1]{#1^{\circ\circ}}
\newcommand{\upperadj}[1]{#1^{\circ+}}
\newcommand{\loweradj}[1]{#1^{\circ-}}

\def\invstar#1{{#1}^{-1,*}}
\def\pinvstar#1{{#1}^{\dagger*}}
\def\starpinv#1{{#1}^{*\dagger}}

\def\linear{\mathbb{L}}
 
\def\QL{\mathop{QL}\nolimits}

\def\lebesgue{\mathcal{L}}
