%% mlmath.sty
%% Copyright 2020 by Zheng Ma, Zhiqin Xu, Tao Luo and Yaoyu Zhang
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
% of this license or (at your option) any later version.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
% 
% The Current Maintainer of this work is Zheng Ma.
%
% This work consists of the main source files mlmath.sty, mlmath.tex, mlmath.md,
% and the derived documentation mlmath.pdf, README.md as well as the resource
% files (they are svg file) of README.md under the folder svgs/.

\ProvidesPackage{mlmath}[2020/06/15 v1.0.0 zyboys]

\RequirePackage{amsmath}
\RequirePackage{amsthm}
\RequirePackage{amssymb}
\RequirePackage{bm}
\RequirePackage{bbm}


\newcommand{\mat}[1]{\bm{#1}}
\renewcommand{\vec}[1]{\bm{#1}}
\newcommand{\D}{\mathrm{d}}
\newcommand{\I}{\mathrm{i}}
\newcommand{\E}{\mathrm{e}}
\newcommand{\eps}{\varepsilon}
\newcommand{\sgn}{\mathrm{sgn}}
\newcommand{\cc}{\mathrm{c.c.}}
\newcommand{\T}{\intercal}
\newcommand{\Exp}{\mathbb{E}}
\newcommand{\Prob}{\mathbb{P}}
\newcommand*\diff{\mathop{}\!\D}
\newcommand*\Diff[1]{\mathop{}\!\mathrm{d^#1}}
\newcommand{\abs}[1]{\lvert#1\rvert} 
\newcommand{\Abs}[1]{\left\lvert#1\right\rvert} 
\newcommand{\norm}[1]{\lVert#1\rVert}
\newcommand{\Norm}[1]{\left\lVert#1\right\rVert}
\newcommand{\ceil}[1]{\lceil#1\rceil}
\newcommand{\floor}[1]{\lfloor#1\rfloor}
\newcommand{\lsim}{\lesssim}
\newcommand{\gsim}{\gtrsim}

% Random variables
\newcommand{\ralpha}{\textnormal{\alpha}}
\newcommand{\rbeta}{\textnormal{\beta}}
\newcommand{\rgamma}{\textnormal{\gamma}}
\newcommand{\rdelta}{\textnormal{\delta}}
\newcommand{\repsilon}{\textnormal{\epsilon}}
\newcommand{\reps}{\textnormal{\varepsilon}}
\newcommand{\rzeta}{\textnormal{\zeta}}
\newcommand{\reta}{\textnormal{\eta}}
\newcommand{\rtheta}{\textnormal{\theta}}
\newcommand{\rvartheta}{\textnormal{\vartheta}}
\newcommand{\riota}{\textnormal{\iota}}
\newcommand{\rkappa}{\textnormal{\kappa}}
\newcommand{\rlambda}{\textnormal{\lambda}}
\newcommand{\rmu}{\textnormal{\mu}}
\newcommand{\rnu}{\textnormal{\nu}}
\newcommand{\rxi}{\textnormal{\xi}}
\newcommand{\rpi}{\textnormal{\pi}}
\newcommand{\rrho}{\textnormal{\rho}}
\newcommand{\rsigma}{\textnormal{\sigma}}
\newcommand{\rtau}{\textnormal{\tau}}
\newcommand{\rupsilon}{\textnormal{\upsilon}}
\newcommand{\rphi}{\textnormal{\phi}}
\newcommand{\rvarphi}{\textnormal{\varphi}}
\newcommand{\rchi}{\textnormal{\chi}}
\newcommand{\rpsi}{\textnormal{\psi}}
\newcommand{\romega}{\textnormal{\omega}}
\newcommand{\rGamma}{\textnormal{\Gamma}}
\newcommand{\rDelta}{\textnormal{\Delta}}
\newcommand{\rTheta}{\textnormal{\Theta}}
\newcommand{\rLambda}{\textnormal{\Lambda}}
\newcommand{\rXi}{\textnormal{\Xi}}
\newcommand{\rPi}{\textnormal{\Pi}}
\newcommand{\rSigma}{\textnormal{\Sigma}}
\newcommand{\rUpsilon}{\textnormal{\Upsilon}}
\newcommand{\rPhi}{\textnormal{\Phi}}
\newcommand{\rPsi}{\textnormal{\Psi}}
\newcommand{\rOmega}{\textnormal{\Omega}}
\newcommand{\ra}{\textnormal{a}}
\newcommand{\rb}{\textnormal{b}}
\newcommand{\rc}{\textnormal{c}}
\newcommand{\rd}{\textnormal{d}}
\newcommand{\re}{\textnormal{e}}
\newcommand{\rf}{\textnormal{f}}
\newcommand{\rg}{\textnormal{g}}
\newcommand{\rh}{\textnormal{h}}
\newcommand{\ri}{\textnormal{i}}
\newcommand{\rj}{\textnormal{j}}
\newcommand{\rk}{\textnormal{k}}
\newcommand{\rl}{\textnormal{l}}
% rm is already a command, just don't name any random variables m
\newcommand{\rn}{\textnormal{n}}
\newcommand{\ro}{\textnormal{o}}
\newcommand{\rp}{\textnormal{p}}
\newcommand{\rqq}{\textnormal{q}}
\newcommand{\rr}{\textnormal{r}}
\newcommand{\rs}{\textnormal{s}}
\newcommand{\rt}{\textnormal{t}}
\newcommand{\ru}{\textnormal{u}}
\newcommand{\rv}{\textnormal{v}}
\newcommand{\rw}{\textnormal{w}}
\newcommand{\rx}{\textnormal{x}}
\newcommand{\ry}{\textnormal{y}}
\newcommand{\rz}{\textnormal{z}}
\newcommand{\rA}{\textnormal{A}}
\newcommand{\rB}{\textnormal{B}}
\newcommand{\rC}{\textnormal{C}}
\newcommand{\rD}{\textnormal{D}}
\newcommand{\rE}{\textnormal{E}}
\newcommand{\rF}{\textnormal{F}}
\newcommand{\rG}{\textnormal{G}}
\newcommand{\rH}{\textnormal{H}}
\newcommand{\rI}{\textnormal{I}}
\newcommand{\rJ}{\textnormal{J}}
\newcommand{\rK}{\textnormal{K}}
\newcommand{\rL}{\textnormal{L}}
\newcommand{\rM}{\textnormal{M}}
\newcommand{\rN}{\textnormal{N}}
\newcommand{\rO}{\textnormal{O}}
\newcommand{\rP}{\textnormal{P}}
\newcommand{\rQ}{\textnormal{Q}}
\newcommand{\rR}{\textnormal{R}}
\newcommand{\rS}{\textnormal{S}}
\newcommand{\rT}{\textnormal{T}}
\newcommand{\rU}{\textnormal{U}}
\newcommand{\rV}{\textnormal{V}}
\newcommand{\rW}{\textnormal{W}}
\newcommand{\rX}{\textnormal{X}}
\newcommand{\rY}{\textnormal{Y}}
\newcommand{\rZ}{\textnormal{Z}}

% Random vectors
\newcommand{\rvalpha}{\mathbf{\alpha}}
\newcommand{\rvbeta}{\mathbf{\beta}}
\newcommand{\rvgamma}{\mathbf{\gamma}}
\newcommand{\rvdelta}{\mathbf{\delta}}
\newcommand{\rvepsilon}{\mathbf{\epsilon}}
\newcommand{\rveps}{\mathbf{\varepsilon}}
\newcommand{\rvzeta}{\mathbf{\zeta}}
\newcommand{\rveta}{\mathbf{\eta}}
\newcommand{\rvtheta}{\mathbf{\theta}}
\newcommand{\rvvartheta}{\mathbf{\vartheta}}
\newcommand{\rviota}{\mathbf{\iota}}
\newcommand{\rvkappa}{\mathbf{\kappa}}
\newcommand{\rvlambda}{\mathbf{\lambda}}
\newcommand{\rvmu}{\mathbf{\mu}}
\newcommand{\rvnu}{\mathbf{\nu}}
\newcommand{\rvxi}{\mathbf{\xi}}
\newcommand{\rvpi}{\mathbf{\pi}}
\newcommand{\rvrho}{\mathbf{\rho}}
\newcommand{\rvsigma}{\mathbf{\sigma}}
\newcommand{\rvtau}{\mathbf{\tau}}
\newcommand{\rvupsilon}{\mathbf{\upsilon}}
\newcommand{\rvphi}{\mathbf{\phi}}
\newcommand{\rvvarphi}{\mathbf{\varphi}}
\newcommand{\rvchi}{\mathbf{\chi}}
\newcommand{\rvpsi}{\mathbf{\psi}}
\newcommand{\rvomega}{\mathbf{\omega}}
\newcommand{\rva}{\mathbf{a}}
\newcommand{\rvb}{\mathbf{b}}
\newcommand{\rvc}{\mathbf{c}}
\newcommand{\rvd}{\mathbf{d}}
\newcommand{\rve}{\mathbf{e}}
\newcommand{\rvf}{\mathbf{f}}
\newcommand{\rvg}{\mathbf{g}}
\newcommand{\rvh}{\mathbf{h}}
\newcommand{\rvi}{\mathbf{i}}
\newcommand{\rvj}{\mathbf{j}}
\newcommand{\rvk}{\mathbf{k}}
\newcommand{\rvl}{\mathbf{l}}
\newcommand{\rvm}{\mathbf{m}}
\newcommand{\rvo}{\mathbf{o}}
\newcommand{\rvp}{\mathbf{p}}
\newcommand{\rvq}{\mathbf{q}}
\newcommand{\rvr}{\mathbf{r}}
\newcommand{\rvs}{\mathbf{s}}
\newcommand{\rvt}{\mathbf{t}}
\newcommand{\rvu}{\mathbf{u}}
\newcommand{\rvv}{\mathbf{v}}
\newcommand{\rvw}{\mathbf{w}}
\newcommand{\rvx}{\mathbf{x}}
\newcommand{\rvy}{\mathbf{y}}
\newcommand{\rvz}{\mathbf{z}}

% Random matrices
\newcommand{\rmGamma}{\mathbf{\Gamma}}
\newcommand{\rmDelta}{\mathbf{\Delta}}
\newcommand{\rmTheta}{\mathbf{\Theta}}
\newcommand{\rmLambda}{\mathbf{\Lambda}}
\newcommand{\rmXi}{\mathbf{\Xi}}
\newcommand{\rmPi}{\mathbf{\Pi}}
\newcommand{\rmSigma}{\mathbf{\Sigma}}
\newcommand{\rmUpsilon}{\mathbf{\Upsilon}}
\newcommand{\rmPhi}{\mathbf{\Phi}}
\newcommand{\rmPsi}{\mathbf{\Psi}}
\newcommand{\rmOmega}{\mathbf{\Omega}}
\newcommand{\rmA}{\mathbf{A}}
\newcommand{\rmB}{\mathbf{B}}
\newcommand{\rmC}{\mathbf{C}}
\newcommand{\rmD}{\mathbf{D}}
\newcommand{\rmE}{\mathbf{E}}
\newcommand{\rmF}{\mathbf{F}}
\newcommand{\rmG}{\mathbf{G}}
\newcommand{\rmH}{\mathbf{H}}
\newcommand{\rmI}{\mathbf{I}}
\newcommand{\rmJ}{\mathbf{J}}
\newcommand{\rmK}{\mathbf{K}}
\newcommand{\rmL}{\mathbf{L}}
\newcommand{\rmM}{\mathbf{M}}
\newcommand{\rmN}{\mathbf{N}}
\newcommand{\rmO}{\mathbf{O}}
\newcommand{\rmP}{\mathbf{P}}
\newcommand{\rmQ}{\mathbf{Q}}
\newcommand{\rmR}{\mathbf{R}}
\newcommand{\rmS}{\mathbf{S}}
\newcommand{\rmT}{\mathbf{T}}
\newcommand{\rmU}{\mathbf{U}}
\newcommand{\rmV}{\mathbf{V}}
\newcommand{\rmW}{\mathbf{W}}
\newcommand{\rmX}{\mathbf{X}}
\newcommand{\rmY}{\mathbf{Y}}
\newcommand{\rmZ}{\mathbf{Z}}

% Vectors
\newcommand{\vzero}{\bm{0}}
\newcommand{\vone}{\bm{1}}
\newcommand{\valpha}{\bm{\alpha}}
\newcommand{\vbeta}{\bm{\beta}}
\newcommand{\vgamma}{\bm{\gamma}}
\newcommand{\vdelta}{\bm{\delta}}
\newcommand{\vepsilon}{\bm{\epsilon}}
\newcommand{\veps}{\bm{\varepsilon}}
\newcommand{\vzeta}{\bm{\zeta}}
\newcommand{\veta}{\bm{\eta}}
\newcommand{\vtheta}{\bm{\theta}}
\newcommand{\vvartheta}{\bm{\vartheta}}
\newcommand{\viota}{\bm{\iota}}
\newcommand{\vkappa}{\bm{\kappa}}
\newcommand{\vlambda}{\bm{\lambda}}
\newcommand{\vmu}{\bm{\mu}}
\newcommand{\vnu}{\bm{\nu}}
\newcommand{\vxi}{\bm{\xi}}
\newcommand{\vpi}{\bm{\pi}}
\newcommand{\vrho}{\bm{\rho}}
\newcommand{\vsigma}{\bm{\sigma}}
\newcommand{\vtau}{\bm{\tau}}
\newcommand{\vupsilon}{\bm{\upsilon}}
\newcommand{\vphi}{\bm{\phi}}
\newcommand{\vvarphi}{\bm{\varphi}}
\newcommand{\vchi}{\bm{\chi}}
\newcommand{\vpsi}{\bm{\psi}}
\newcommand{\vomega}{\bm{\omega}}
\newcommand{\vGamma}{\bm{\Gamma}}
\newcommand{\vDelta}{\bm{\Delta}}
\newcommand{\vTheta}{\bm{\Theta}}
\newcommand{\vLambda}{\bm{\Lambda}}
\newcommand{\vXi}{\bm{\Xi}}
\newcommand{\vPi}{\bm{\Pi}}
\newcommand{\vSigma}{\bm{\Sigma}}
\newcommand{\vUpsilon}{\bm{\Upsilon}}
\newcommand{\vPhi}{\bm{\Phi}}
\newcommand{\vPsi}{\bm{\Psi}}
\newcommand{\vOmega}{\bm{\Omega}}
\newcommand{\va}{\bm{a}}
\newcommand{\vb}{\bm{b}}
\newcommand{\vc}{\bm{c}}
\newcommand{\vd}{\bm{d}}
\newcommand{\ve}{\bm{e}}
\newcommand{\vf}{\bm{f}}
\newcommand{\vg}{\bm{g}}
\newcommand{\vh}{\bm{h}}
\newcommand{\vi}{\bm{i}}
\newcommand{\vj}{\bm{j}}
\newcommand{\vk}{\bm{k}}
\newcommand{\vl}{\bm{l}}
\newcommand{\vm}{\bm{m}}
\newcommand{\vn}{\bm{n}}
\newcommand{\vo}{\bm{o}}
\newcommand{\vp}{\bm{p}}
\newcommand{\vq}{\bm{q}}
\newcommand{\vr}{\bm{r}}
\newcommand{\vs}{\bm{s}}
\newcommand{\vt}{\bm{t}}
\newcommand{\vu}{\bm{u}}
\newcommand{\vv}{\bm{v}}
\newcommand{\vw}{\bm{w}}
\newcommand{\vx}{\bm{x}}
\newcommand{\vy}{\bm{y}}
\newcommand{\vz}{\bm{z}}
\newcommand{\vA}{\bm{A}}
\newcommand{\vB}{\bm{B}}
\newcommand{\vC}{\bm{C}}
\newcommand{\vD}{\bm{D}}
\newcommand{\vE}{\bm{E}}
\newcommand{\vF}{\bm{F}}
\newcommand{\vG}{\bm{G}}
\newcommand{\vH}{\bm{H}}
\newcommand{\vI}{\bm{I}}
\newcommand{\vJ}{\bm{J}}
\newcommand{\vK}{\bm{K}}
\newcommand{\vL}{\bm{L}}
\newcommand{\vM}{\bm{M}}
\newcommand{\vN}{\bm{N}}
\newcommand{\vO}{\bm{O}}
\newcommand{\vP}{\bm{P}}
\newcommand{\vQ}{\bm{Q}}
\newcommand{\vR}{\bm{R}}
\newcommand{\vS}{\bm{S}}
\newcommand{\vT}{\bm{T}}
\newcommand{\vU}{\bm{U}}
\newcommand{\vV}{\bm{V}}
\newcommand{\vW}{\bm{W}}
\newcommand{\vX}{\bm{X}}
\newcommand{\vY}{\bm{Y}}
\newcommand{\vZ}{\bm{Z}}

% Matrices
\newcommand{\mzero}{\bm{0}}
\newcommand{\malpha}{\bm{\alpha}}
\newcommand{\mbeta}{\bm{\beta}}
\newcommand{\mgamma}{\bm{\gamma}}
\newcommand{\mdelta}{\bm{\delta}}
\newcommand{\mepsilon}{\bm{\epsilon}}
\newcommand{\meps}{\bm{\varepsilon}}
\newcommand{\mzeta}{\bm{\zeta}}
\newcommand{\meta}{\bm{\eta}}
\newcommand{\mtheta}{\bm{\theta}}
\newcommand{\mvartheta}{\bm{\vartheta}}
\newcommand{\miota}{\bm{\iota}}
\newcommand{\mkappa}{\bm{\kappa}}
\newcommand{\mlambda}{\bm{\lambda}}
\newcommand{\mmu}{\bm{\mu}}
\newcommand{\mnu}{\bm{\nu}}
\newcommand{\mxi}{\bm{\xi}}
\newcommand{\mpi}{\bm{\pi}}
\newcommand{\mrho}{\bm{\rho}}
\newcommand{\msigma}{\bm{\sigma}}
\newcommand{\mtau}{\bm{\tau}}
\newcommand{\mupsilon}{\bm{\upsilon}}
\newcommand{\mphi}{\bm{\phi}}
\newcommand{\mvarphi}{\bm{\varphi}}
\newcommand{\mchi}{\bm{\chi}}
\newcommand{\mpsi}{\bm{\psi}}
\newcommand{\momega}{\bm{\omega}}
\newcommand{\mGamma}{\bm{\Gamma}}
\newcommand{\mDelta}{\bm{\Delta}}
\newcommand{\mTheta}{\bm{\Theta}}
\newcommand{\mLambda}{\bm{\Lambda}}
\newcommand{\mXi}{\bm{\Xi}}
\newcommand{\mPi}{\bm{\Pi}}
\newcommand{\mSigma}{\bm{\Sigma}}
\newcommand{\mUpsilon}{\bm{\Upsilon}}
\newcommand{\mPhi}{\bm{\Phi}}
\newcommand{\mPsi}{\bm{\Psi}}
\newcommand{\mOmega}{\bm{\Omega}}
\newcommand{\mA}{\bm{A}}
\newcommand{\mB}{\bm{B}}
\newcommand{\mC}{\bm{C}}
\newcommand{\mD}{\bm{D}}
\newcommand{\mE}{\bm{E}}
\newcommand{\mF}{\bm{F}}
\newcommand{\mG}{\bm{G}}
\newcommand{\mH}{\bm{H}}
\newcommand{\mI}{\bm{I}}
\newcommand{\mJ}{\bm{J}}
\newcommand{\mK}{\bm{K}}
\newcommand{\mL}{\bm{L}}
\newcommand{\mM}{\bm{M}}
\newcommand{\mN}{\bm{N}}
\newcommand{\mO}{\bm{O}}
\newcommand{\mP}{\bm{P}}
\newcommand{\mQ}{\bm{Q}}
\newcommand{\mR}{\bm{R}}
\newcommand{\mS}{\bm{S}}
\newcommand{\mT}{\bm{T}}
\newcommand{\mU}{\bm{U}}
\newcommand{\mV}{\bm{V}}
\newcommand{\mW}{\bm{W}}
\newcommand{\mX}{\bm{X}}
\newcommand{\mY}{\bm{Y}}
\newcommand{\mZ}{\bm{Z}}

% Tensor
\DeclareMathAlphabet{\mathsfit}{\encodingdefault}{\sfdefault}{m}{sl}
\SetMathAlphabet{\mathsfit}{bold}{\encodingdefault}{\sfdefault}{bx}{n}
\newcommand{\tens}[1]{\bm{\mathsfit{#1}}}
\newcommand{\talpha}{\tens{\alpha}}
\newcommand{\tbeta}{\tens{\beta}}
\newcommand{\tgamma}{\tens{\gamma}}
\newcommand{\tdelta}{\tens{\delta}}
\newcommand{\tepsilon}{\tens{\epsilon}}
\newcommand{\teps}{\tens{\varepsilon}}
\newcommand{\tzeta}{\tens{\zeta}}
\newcommand{\teta}{\tens{\eta}}
\newcommand{\ttheta}{\tens{\theta}}
\newcommand{\tvartheta}{\tens{\vartheta}}
\newcommand{\tiota}{\tens{\iota}}
\newcommand{\tkappa}{\tens{\kappa}}
\newcommand{\tlambda}{\tens{\lambda}}
\newcommand{\tmu}{\tens{\mu}}
\newcommand{\tnu}{\tens{\nu}}
\newcommand{\txi}{\tens{\xi}}
\newcommand{\tpi}{\tens{\pi}}
\newcommand{\trho}{\tens{\rho}}
\newcommand{\tsigma}{\tens{\sigma}}
\newcommand{\ttau}{\tens{\tau}}
\newcommand{\tupsilon}{\tens{\upsilon}}
\newcommand{\tphi}{\tens{\phi}}
\newcommand{\tvarphi}{\tens{\varphi}}
\newcommand{\tchi}{\tens{\chi}}
\newcommand{\tpsi}{\tens{\psi}}
\newcommand{\tomega}{\tens{\omega}}
\newcommand{\tGamma}{\tens{\Gamma}}
\newcommand{\tDelta}{\tens{\Delta}}
\newcommand{\tTheta}{\tens{\Theta}}
\newcommand{\tLambda}{\tens{\Lambda}}
\newcommand{\tXi}{\tens{\Xi}}
\newcommand{\tPi}{\tens{\Pi}}
\newcommand{\tSigma}{\tens{\Sigma}}
\newcommand{\tUpsilon}{\tens{\Upsilon}}
\newcommand{\tPhi}{\tens{\Phi}}
\newcommand{\tPsi}{\tens{\Psi}}
\newcommand{\tOmega}{\tens{\Omega}}
\newcommand{\tA}{\tens{A}}
\newcommand{\tB}{\tens{B}}
\newcommand{\tC}{\tens{C}}
\newcommand{\tD}{\tens{D}}
\newcommand{\tE}{\tens{E}}
\newcommand{\tF}{\tens{F}}
\newcommand{\tG}{\tens{G}}
\newcommand{\tH}{\tens{H}}
\newcommand{\tI}{\tens{I}}
\newcommand{\tJ}{\tens{J}}
\newcommand{\tK}{\tens{K}}
\newcommand{\tL}{\tens{L}}
\newcommand{\tM}{\tens{M}}
\newcommand{\tN}{\tens{N}}
\newcommand{\tO}{\tens{O}}
\newcommand{\tP}{\tens{P}}
\newcommand{\tQ}{\tens{Q}}
\newcommand{\tR}{\tens{R}}
\newcommand{\tS}{\tens{S}}
\newcommand{\tT}{\tens{T}}
\newcommand{\tU}{\tens{U}}
\newcommand{\tV}{\tens{V}}
\newcommand{\tW}{\tens{W}}
\newcommand{\tX}{\tens{X}}
\newcommand{\tY}{\tens{Y}}
\newcommand{\tZ}{\tens{Z}}

% entries of a tensor
% Same font as tensor, without \bm wrapper
\newcommand{\etens}[1]{\mathsfit{#1}}
\newcommand{\etalpha}{\etens{\alpha}}
\newcommand{\etbeta}{\etens{\beta}}
\newcommand{\etgamma}{\etens{\gamma}}
\newcommand{\etdelta}{\etens{\delta}}
\newcommand{\etepsilon}{\etens{\epsilon}}
\newcommand{\eteps}{\etens{\varepsilon}}
\newcommand{\etzeta}{\etens{\zeta}}
\newcommand{\eteta}{\etens{\eta}}
\newcommand{\ettheta}{\etens{\theta}}
\newcommand{\etvartheta}{\etens{\vartheta}}
\newcommand{\etiota}{\etens{\iota}}
\newcommand{\etkappa}{\etens{\kappa}}
\newcommand{\etlambda}{\etens{\lambda}}
\newcommand{\etmu}{\etens{\mu}}
\newcommand{\etnu}{\etens{\nu}}
\newcommand{\etxi}{\etens{\xi}}
\newcommand{\etpi}{\etens{\pi}}
\newcommand{\etrho}{\etens{\rho}}
\newcommand{\etsigma}{\etens{\sigma}}
\newcommand{\ettau}{\etens{\tau}}
\newcommand{\etupsilon}{\etens{\upsilon}}
\newcommand{\etphi}{\etens{\phi}}
\newcommand{\etvarphi}{\etens{\varphi}}
\newcommand{\etchi}{\etens{\chi}}
\newcommand{\etpsi}{\etens{\psi}}
\newcommand{\etomega}{\etens{\omega}}
\newcommand{\etGamma}{\etens{\Gamma}}
\newcommand{\etDelta}{\etens{\Delta}}
\newcommand{\etTheta}{\etens{\Theta}}
\newcommand{\etLambda}{\etens{\Lambda}}
\newcommand{\etXi}{\etens{\Xi}}
\newcommand{\etPi}{\etens{\Pi}}
\newcommand{\etSigma}{\etens{\Sigma}}
\newcommand{\etUpsilon}{\etens{\Upsilon}}
\newcommand{\etPhi}{\etens{\Phi}}
\newcommand{\etPsi}{\etens{\Psi}}
\newcommand{\etOmega}{\etens{\Omega}}
\newcommand{\etA}{\etens{A}}
\newcommand{\etB}{\etens{B}}
\newcommand{\etC}{\etens{C}}
\newcommand{\etD}{\etens{D}}
\newcommand{\etE}{\etens{E}}
\newcommand{\etF}{\etens{F}}
\newcommand{\etG}{\etens{G}}
\newcommand{\etH}{\etens{H}}
\newcommand{\etI}{\etens{I}}
\newcommand{\etJ}{\etens{J}}
\newcommand{\etK}{\etens{K}}
\newcommand{\etL}{\etens{L}}
\newcommand{\etM}{\etens{M}}
\newcommand{\etN}{\etens{N}}
\newcommand{\etO}{\etens{O}}
\newcommand{\etP}{\etens{P}}
\newcommand{\etQ}{\etens{Q}}
\newcommand{\etR}{\etens{R}}
\newcommand{\etS}{\etens{S}}
\newcommand{\etT}{\etens{T}}
\newcommand{\etU}{\etens{U}}
\newcommand{\etV}{\etens{V}}
\newcommand{\etW}{\etens{W}}
\newcommand{\etX}{\etens{X}}
\newcommand{\etY}{\etens{Y}}
\newcommand{\etZ}{\etens{Z}}

% Sets
\newcommand{\sone}{\mathbbm{1}}
\newcommand{\sA}{\mathbb{A}}
\newcommand{\sB}{\mathbb{B}}
\newcommand{\sC}{\mathbb{C}}
\newcommand{\sD}{\mathbb{D}}
% Don't use a set called E, because this would be the same as our symbol for expectation.
\newcommand{\sF}{\mathbb{F}}
\newcommand{\sG}{\mathbb{G}}
\newcommand{\sH}{\mathbb{H}}
\newcommand{\sI}{\mathbb{I}}
\newcommand{\sJ}{\mathbb{J}}
\newcommand{\sK}{\mathbb{K}}
\newcommand{\sL}{\mathbb{L}}
\newcommand{\sM}{\mathbb{M}}
\newcommand{\sN}{\mathbb{N}}
\newcommand{\sO}{\mathbb{O}}
% Don't use a set called P, because this would be the same as our symbol for probability.
\newcommand{\sQ}{\mathbb{Q}}
\newcommand{\sR}{\mathbb{R}}
\newcommand{\sS}{\mathbb{S}}
\newcommand{\sT}{\mathbb{T}}
\newcommand{\sU}{\mathbb{U}}
\newcommand{\sV}{\mathbb{V}}
\newcommand{\sW}{\mathbb{W}}
\newcommand{\sX}{\mathbb{X}}
\newcommand{\sY}{\mathbb{Y}}
\newcommand{\sZ}{\mathbb{Z}}

% Function class, spaces, operator, etc.
\newcommand{\fA}{\mathcal{A}}
\newcommand{\fB}{\mathcal{B}}
\newcommand{\fC}{\mathcal{C}}
\newcommand{\fD}{\mathcal{D}}
\newcommand{\fE}{\mathcal{E}}
\newcommand{\fF}{\mathcal{F}}
\newcommand{\fG}{\mathcal{G}}
\newcommand{\fH}{\mathcal{H}}
\newcommand{\fI}{\mathcal{I}}
\newcommand{\fJ}{\mathcal{J}}
\newcommand{\fK}{\mathcal{K}}
\newcommand{\fL}{\mathcal{L}}
\newcommand{\fM}{\mathcal{M}}
\newcommand{\fN}{\mathcal{N}}
\newcommand{\fO}{\mathcal{O}}
\newcommand{\fP}{\mathcal{P}}
\newcommand{\fQ}{\mathcal{Q}}
\newcommand{\fR}{\mathcal{R}}
\newcommand{\fS}{\mathcal{S}}
\newcommand{\fT}{\mathcal{T}}
\newcommand{\fU}{\mathcal{U}}
\newcommand{\fV}{\mathcal{V}}
\newcommand{\fW}{\mathcal{W}}
\newcommand{\fX}{\mathcal{X}}
\newcommand{\fY}{\mathcal{Y}}
\newcommand{\fZ}{\mathcal{Z}}

%neural networks
\newcommand{\LS}{L_S}
\newcommand{\LD}{L_\fD}
\newcommand{\RS}{R_S}
\newcommand{\Rn}{R_n}
\newcommand{\RD}{R_\fD}
\newcommand{\diam}{\mathrm{diam}}
\newcommand{\diag}{\mathrm{diag}}
\newcommand{\dist}{\mathrm{dist}}
\newcommand{\ERM}{\mathrm{ERM}}
\newcommand{\Lip}{\mathrm{Lip}}
\newcommand{\ReLU}{\mathrm{ReLU}}
\newcommand{\Rep}{\mathrm{Rep}}
\newcommand{\Var}{\mathrm{Var}}
\newcommand{\Rad}{\mathrm{Rad}}
\newcommand{\DKL}{\mathrm{D}_{KL}}
\newcommand{\conv}{\mathrm{conv}}
\newcommand{\csch}{\mathrm{csch}}
\newcommand{\sech}{\mathrm{sech}}
\newcommand{\Sigmoid}{\mathrm{Sigmoid}}




%define theorems
\newtheorem{thm}{Theorem}
\newtheorem{cor}{Corollary}
\newtheorem{defi}{Definition}
\newtheorem{lem}{Lemma}
\newtheorem{prop}{Proposition}
\newtheorem{rmk}{Remark}
\newtheorem{assump}{Assumption}
\newtheorem{exam}{Example}
\newtheorem{conj}{Conjecture}
\newtheorem{algo}{Algorithm}

%
\renewcommand{\abstractname}{Summary}