%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% File: Macros for Joe Zhong's Latex Documents
%% Type: Casual
%% Source: Prof. Jianqing Fan's Latex Contemplate

\usepackage{dsfont}
\newcommand{\indicator}{\mathds{1}}
\newcommand{\overbar}[1]{\mkern 1.5mu\overline{\mkern-1.5mu#1\mkern-1.5mu}\mkern 1.5mu}
\renewcommand{\hat}{\widehat}
\renewcommand{\bar}{\overbar}

\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}

\def\##1\#{\begin{align}#1\end{align}}
\def\$#1\${\begin{align*}#1\end{align*}}

\newcommand{\ud }{\mathrm{d}}

\newcommand{\bfm}[1]{\ensuremath{\mathbf{#1}}}

% Define Boldfaces
\def\ba{\bfm a}   \def\bA{\bfm A}  \def\AA{\mathbb{A}}
\def\bb{\bfm b}   \def\bB{\bfm B}  \def\BB{\mathbb{B}}
\def\bc{\bfm c}   \def\bC{\bfm C}  \def\CC{\mathbb{C}}
\def\bd{\bfm d}   \def\bD{\bfm D}  \def\DD{\mathbb{D}}
\def\be{\bfm e}   \def\bE{\bfm E}  \def\EE{\mathbb{E}}
\def\bff{\bfm f}  \def\bF{\bfm F}  \def\FF{\mathbb{F}}
\def\bg{\bfm g}   \def\bG{\bfm G}  \def\GG{\mathbb{G}}
\def\bh{\bfm h}   \def\bH{\bfm H}  \def\HH{\mathbb{H}}
\def\bi{\bfm i}   \def\bI{\bfm I}  \def\II{\mathbb{I}}
\def\bj{\bfm j}   \def\bJ{\bfm J}  \def\JJ{\mathbb{J}}
\def\bk{\bfm k}   \def\bK{\bfm K}  \def\KK{\mathbb{K}}
\def\bl{\bfm l}   \def\bL{\bfm L}  \def\LL{\mathbb{L}}
\def\bm{\bfm m}   \def\bM{\bfm M}  \def\MM{\mathbb{M}}
\def\bn{\bfm n}   \def\bN{\bfm N}  \def\NN{\mathbb{N}}
\def\bo{\bfm o}   \def\bO{\bfm O}  \def\OO{\mathbb{O}}
\def\bp{\bfm p}   \def\bP{\bfm P}  \def\PP{\mathbb{P}}
\def\bq{\bfm q}   \def\bQ{\bfm Q}  \def\QQ{\mathbb{Q}}
\def\br{\bfm r}   \def\bR{\bfm R}  \def\RR{\mathbb{R}}
\def\bs{\bfm s}   \def\bS{\bfm S}  \def\SS{\mathbb{S}}
\def\bt{\bfm t}   \def\bT{\bfm T}  \def\TT{\mathbb{T}}
\def\bu{\bfm u}   \def\bU{\bfm U}  \def\UU{\mathbb{U}}
\def\bv{\bfm v}   \def\bV{\bfm V}  \def\VV{\mathbb{V}}
\def\bw{\bfm w}   \def\bW{\bfm W}  \def\WW{\mathbb{W}}
\def\bx{\bfm x}   \def\bX{\bfm X}  \def\XX{\mathbb{X}}
\def\by{\bfm y}   \def\bY{\bfm Y}  \def\YY{\mathbb{Y}}
\def\bz{\bfm z}   \def\bZ{\bfm Z}  \def\ZZ{\mathbb{Z}}

% Define mathcal font

\def\calA{{\cal  A}} \def\cA{{\cal  A}}
\def\calB{{\cal  B}} \def\cB{{\cal  B}}
\def\calC{{\cal  C}} \def\cC{{\cal  C}}
\def\calD{{\cal  D}} \def\cD{{\cal  D}}
\def\calE{{\cal  E}} \def\cE{{\cal  E}}
\def\calF{{\cal  F}} \def\cF{{\cal  F}}
\def\calG{{\cal  G}} \def\cG{{\cal  G}}
\def\calH{{\cal  H}} \def\cH{{\cal  H}}
\def\calI{{\cal  I}} \def\cI{{\cal  I}}
\def\calJ{{\cal  J}} \def\cJ{{\cal  J}}
\def\calK{{\cal  K}} \def\cK{{\cal  K}}
\def\calL{{\cal  L}} \def\cL{{\cal  L}}
\def\calM{{\cal  M}} \def\cM{{\cal  M}}
\def\calN{{\cal  N}} \def\cN{{\cal  N}}
\def\calO{{\cal  O}} \def\cO{{\cal  O}}
\def\calP{{\cal  P}} \def\cP{{\cal  P}}
\def\calQ{{\cal  Q}} \def\cQ{{\cal  Q}}
\def\calR{{\cal  R}} \def\cR{{\cal  R}}
\def\calS{{\cal  S}} \def\cS{{\cal  S}}
\def\calT{{\cal  T}} \def\cT{{\cal  T}}
\def\calU{{\cal  U}} \def\cU{{\cal  U}}
\def\calV{{\cal  V}} \def\cV{{\cal  V}}
\def\calW{{\cal  W}} \def\cW{{\cal  W}}
\def\calX{{\cal  X}} \def\cX{{\cal  X}}
\def\calY{{\cal  Y}} \def\cY{{\cal  Y}}
\def\calZ{{\cal  Z}} \def\cZ{{\cal  Z}}
\def\bzero{\bfm 0}


%%%%%%%%%%%%%%%%%%%%%%%%% Boldfaces in Greek %%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\bfsym}[1]{\ensuremath{\boldsymbol{#1}}}

 \def\balpha{\bfsym \alpha}
 \def\bbeta{\bfsym \beta}
 \def\bgamma{\bfsym \gamma}             \def\bGamma{\bfsym \Gamma}
 \def\bdelta{\bfsym {\delta}}           \def\bDelta {\bfsym {\Delta}}
 \def\bfeta{\bfsym {\eta}}              \def\bfEta {\bfsym {\Eta}}
 \def\bmu{\bfsym {\mu}}                 \def\bMu {\bfsym {\Mu}}
 \def\bnu{\bfsym {\nu}}
 \def\btheta{\bfsym {\theta}}           \def\bTheta {\bfsym {\Theta}}
 \def\beps{\bfsym \varepsilon}          \def\bepsilon{\bfsym \varepsilon}
 \def\bsigma{\bfsym \sigma}             \def\bSigma{\bfsym \Sigma}
 \def\blambda {\bfsym {\lambda}}        \def\bLambda {\bfsym {\Lambda}}
 \def\bomega {\bfsym {\omega}}          \def\bOmega {\bfsym {\Omega}}
 \def\brho   {\bfsym {\rho}}
 \def\btau{\bfsym {\tau}}
 \def\bxi{\bfsym {\xi}}
 \def\bzeta{\bfsym {\zeta}}
% May add more in future.



%%%%%%%%%%%%%%%%%%%% hat in greek  %%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \def\halpha{\hat{\alpha}}              \def\hbalpha{\hat{\bfsym \alpha}}
 \def\hbeta{\hat{\beta}}                \def\hbbeta{\hat{\bfsym \beta}}
 \def\hgamma{\hat{\gamma}}              \def\hgamma{\hat{\bfsym \gamma}}
 \def\hGamma{\hat{ \Gamma}}             \def\hbGamma{\hat{\bfsym \Gamma}}
 \def\hdelta{\hat{\delta}}              \def\hbdelta{\hat{\bfsym {\delta}}}
 \def\hDelta {\hat{\Delta}}             \def\hbDelta{\hat{\bfsym {\Delta}}}
 \def\heta{\hat {\eta}}                 \def\hbfeta {\hat{\bfsym {\eta}}}
 \def\hmu{\hat{\mu}}                    \def\hbmu {\hat{\bfsym {\mu}}}
 \def\hnu{\hat{\nu}}                    \def\hbnu {\hat{\bfsym {\nu}}}
 \def\htheta{\hat {\theta}}             \def\hbtheta {\hat{\bfsym {\theta}}}
 \def\hTheta{\hat {\Theta}}             \def\hbTheta {\hat{\bfsym {\Theta}}}
 \def\hbeps{\hat{\bfsym \varepsilon}}   \def\hbepsilon{\hat{\bfsym \varepsilon}}
 \def\hsigma{\hat{\sigma}}              \def\hbsigma{\hat{\bfsym \sigma}}
 \def\hSigma{\hat{\Sigma}}              \def\hbSigma{\hat{\bfsym \Sigma}}
 \def\hlambda{\hat{\lambda}}            \def\hblambda{\hat{\bfsym \lambda}}
 \def\hLambda{\hat{\Lambda}}            \def\hbLambda{\hat{\bfsym \Lambda}}
 \def\homega {\hat {\omega}}            \def\hbomega {\hat{\bfsym {\omega}}}
 \def\hOmega {\hat {\omega}}            \def\hbOmega {\hat{\bfsym {\Omega}}}
 \def\hrho   {\hat {\rho}}              \def\hbrho {\hat{\bfsym {\rho}}}
 \def\htau   {\hat {\tau}}              \def\hbtau {\hat{\bfsym {\tau}}}
 \def\hxi{\hat{\xi}}                    \def\hbxi{\hat{\bfsym {\xi}}}
 \def\hzeta{\hat{\zeta}}                \def\hbzeta{\hat{\bfsym {\bzeta}}}

%%%%%%%%%%%%%%%% Regular font in math equation  %%%%%%%

\DeclareMathOperator{\argmin}{argmin}
\DeclareMathOperator{\corr}{corr}
\DeclareMathOperator{\cov}{cov}
\DeclareMathOperator{\Cov}{Cov}
\DeclareMathOperator{\Dev}{Dev}
\DeclareMathOperator{\diag}{diag}
\DeclareMathOperator{\E}{E}
\DeclareMathOperator{\logit}{logit}
\DeclareMathOperator{\rank}{rank}
\DeclareMathOperator{\RSS}{RSS}
\DeclareMathOperator{\sgn}{sgn}
\DeclareMathOperator{\supp}{supp}
\DeclareMathOperator{\Var}{Var}
%\DeclareMathOperator{\var}{var}
\DeclareMathOperator{\SE}{SE}
\DeclareMathOperator{\tr}{tr}


\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}
\newtheorem{proposition}{Proposition}
\newtheorem{corollary}{Corollary}

\theoremstyle{remark}
\newtheorem{remark}{Remark}
\newtheorem{example}{Example}

\theoremstyle{definition}
\newtheorem{definition}{Definition}
\newtheorem{conjecture}{Conjecture}
\newtheorem{axiom}[definition]{Axiom}
\newtheorem{exercise}{Exercise}

%%%%%%%%%%%%%%%%%%%%%% no indent %%%%%%%%%%%%%%%%%%%%%%
\setlength\parindent{0pt}
