/
macro.tex
111 lines (92 loc) · 2.72 KB
/
macro.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
% packages
\usepackage{amsmath,amssymb,amsthm,dsfont,mathtools,microtype}
\usepackage{hyperref}
\usepackage{xcolor}
% links
\definecolor{db}{rgb}{0,0.2,0.55}
\hypersetup{
colorlinks,
citecolor=db,
linkcolor=db,
filecolor=db,
urlcolor=db,
}
% domains
\newcommand{\R}{\mathbb{R}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Q}{\mathbb{Q}}
% mathcal
\newcommand{\cA}{\mathcal{A}}
\newcommand{\cB}{\mathcal{B}}
\newcommand{\cC}{\mathcal{C}}
\newcommand{\cD}{\mathcal{D}}
\newcommand{\cE}{\mathcal{E}}
\newcommand{\cF}{\mathcal{F}}
\newcommand{\cG}{\mathcal{G}}
\newcommand{\cH}{\mathcal{H}}
\newcommand{\cI}{\mathcal{I}}
\newcommand{\cJ}{\mathcal{J}}
\newcommand{\cK}{\mathcal{K}}
\newcommand{\cL}{\mathcal{L}}
\newcommand{\cM}{\mathcal{M}}
\newcommand{\cN}{\mathcal{N}}
\newcommand{\cO}{\mathcal{O}}
\newcommand{\cP}{\mathcal{P}}
\newcommand{\cQ}{\mathcal{Q}}
\newcommand{\cR}{\mathcal{R}}
\newcommand{\cS}{\mathcal{S}}
\newcommand{\cT}{\mathcal{T}}
\newcommand{\cU}{\mathcal{U}}
\newcommand{\cV}{\mathcal{V}}
\newcommand{\cW}{\mathcal{W}}
\newcommand{\cX}{\mathcal{X}}
\newcommand{\cY}{\mathcal{Y}}
\newcommand{\cZ}{\mathcal{Z}}
% symbol
\newcommand{\eps}{\varepsilon}
\newcommand{\ind}{\mathds{1}}
% operators
\newcommand{\sub}{\subseteq}
\renewcommand{\P}[2]{{\ifx& \mathbb{P} \else \underset{#1}{\mathbb{P}} \fi \left\{#2\right\}}}
\newcommand{\E}[2]{{\ifx& \mathbb{E} \else \underset{#1}{\mathbb{E}} \fi #2}}
\DeclareMathOperator*{\argmin}{arg\,min}
\DeclareMathOperator*{\argmax}{arg\,max}
\newcommand{\Cdot}{\boldsymbol{\cdot}}
\DeclareMathOperator{\var}{Var}
\DeclareMathOperator{\vc}{VC}
\DeclareMathOperator{\im}{Im}
\DeclareMathOperator{\tv}{TV}
\DeclareMathOperator{\dist}{dist}
\DeclareMathOperator{\poly}{poly}
\DeclareMathOperator{\polylog}{polylog}
\DeclareMathOperator{\tr}{tr}
\renewcommand{\dh}{\operatorname{H}^2}
\newcommand{\kl}[2]{\operatorname{KL}\left(#1 \| #2\right)}
% shortcuts
\renewcommand{\l}{\left}
\renewcommand{\r}{\right}
\renewcommand{\t}{\tilde}
\newcommand{\h}{\hat}
\newcommand{\wh}{\widehat}
\newcommand{\bs}{\boldsymbol}
\newcommand{\id}{\mathbb I}
% theorems
\newtheorem{theorem}{Theorem}[section]
\newtheorem{claim}[theorem]{Claim}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{fact}[theorem]{Fact}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{question}[theorem]{Question}
\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{exercise}[theorem]{Exercise}
% misc
\newcommand{\ttemail}[1]{
\href{mailto:#1}{\color{black}{\tt{#1}}}
}