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

\newcommand{\R}{\mathbb{R}}

%% ----------------------------------------------------------------
\definecolor{lightred}{rgb}{1.0,0.7,0.7}
\definecolor{blue1}{rgb}{0.0,0.2,0.7}
\definecolor{blue2}{rgb}{0,0,0.7}
\definecolor{darkred}{rgb}{0.5,0,0}
\definecolor{lightgreen}{rgb}{0.7,1.0,0.7}
\definecolor{lightblue}{rgb}{0.7,0.85,1}
\definecolor{darkblue}{rgb}{0.125,0,0.508}
\definecolor{darkerblue}{rgb}{0.2,0,0.5}
\definecolor{backgroundColor}{rgb}{1,1,1}
\definecolor{textColor}{rgb}{0,0,0}
\definecolor{shaded}{rgb}{0.8,0.8,0.8}
\definecolor{formulaColor}{rgb}{0,0.2,0.6}
\definecolor{formulaExtraColor}{rgb}{1,0,0}
\definecolor{beamerstructure}{rgb}{0,0.5,0.1}
\definecolor{structure}{rgb}{0,0,0}
\newcommand{\fcl}{\color{formulaColor}}
\newcommand{\tcl}{\color{textColor}}
\newcommand{\excol}{\color{formulaExtraColor}}
\newcommand{\emcol}{\color{darkred}}
\newcommand{\ff}[1]{\fcl \ensuremath{#1} \tcl}

%% ----------------------------------------------------------------
%\newcommand{\comment}[1]{}
\newcommand{\comment}[1]{\marginpar{\tiny #1}}
\newcommand{\nn}{\nonumber}

\DeclareMathSymbol{\leqslant}{\mathalpha}{AMSa}{"36}
\DeclareMathSymbol{\geqslant}{\mathalpha}{AMSa}{"3E}
\DeclareMathSymbol{\doteqdot}{\mathalpha}{AMSa}{"2B}
\DeclareMathSymbol{\circlearrowright}{\mathalpha}{AMSa}{"08}
\DeclareMathSymbol{\subsetneq}{\mathalpha}{AMSb}{"28}
\DeclareMathSymbol{\supsetneq}{\mathalpha}{AMSb}{"29}
\renewcommand{\leq}{\;\leqslant\;}
\renewcommand{\geq}{\;\geqslant\;}
\newcommand{\isdefby}{\;\doteqdot\;}
%\newcommand{\isdefby}{\; := \;}
\newcommand{\bydefis}{\; =: \;}
\newcommand{\strictinc}{\;\subsetneq\;}
%\newcommand{\dd}{{\rm d}}
%\newcommand{\e}[1]{\,{\rm e}^{#1}\,}
\newcommand{\ii}{{\rm i}}
\newcommand{\sumtwo}[2]{\sum_{\substack{#1 \\ #2}}}
\newcommand{\sumthree}[3]{\sum_{\substack{#1 \\ #2 \\ #3}}}
\newcommand{\uniontwo}[2]{\union_{\substack{#1 \\ #2}}}
\newcommand{\inttwo}[2]{\int_{\substack{#1 \\ #2}}}
\newcommand{\intthree}[3]{\int_{\substack{#1 \\ #2 \\ #3}}}
\newcommand{\prodtwo}[2]{\prod_{\substack{#1 \\ #2}}}
\newcommand{\maxtwo}[2]{\max_{\substack{#1 \\ #2}}}
\DeclareMathOperator*{\union}{\text{\large$\cup$}}
\DeclareMathOperator*{\Union}{\text{\Large$\cup$}}
\newcommand{\Uniontwo}[2]{\Union_{\substack{#1 \\ #2}}}
\DeclareMathOperator*{\inter}{\text{\large$\cap$}}
\DeclareMathOperator*{\Inter}{\text{\Large$\cap$}}
\newcommand{\Biggerint}[1]{\lceil #1 \rceil}
\DeclareMathOperator*{\supp}{\text{supp}}

% Use a bullet for itemized lists:
\setbeamertemplate{itemize item}{$\bullet$}
% Make it darkred, not the default blue:
\setbeamercolor{item}{fg=darkred}
% Theorems, propositions, etc.:
\setbeamercolor{structure}{fg=darkred}

%% ----------------------------------------------------------------
\def\Tr{{\operatorname{Tr\,}}}
\def\dist{{\operatorname{dist\,}}}
\def\Re{{\operatorname{Re\,}}}
\def\Im{{\operatorname{Im\,}}}

%% ----------------------------------------------------------------
%\def\bra #1{\langle#1 |\,}
%\def\ket #1{\,|#1 \rangle}
%\newcommand{\braket}[2]{\langle#1 | #2 \rangle}
%\newcommand{\expval}[1]{\langle #1 \rangle}
\newcommand{\bigexpval}[1]{\bigl\langle #1 \bigr\rangle}
\newcommand{\Bigexpval}[1]{\Bigl\langle #1 \Bigr\rangle}
\newcommand{\neighbours}[2]{<\! #1,#2 \! >}
\newcommand{\compl}{{\text{\rm c}}}
\newcommand{\indicator}[1]{\,\mathbb I \, \bigl[ #1 \bigr]}
\newcommand{\const}{{\text{\rm const}}}
\newcommand{\upchi}{\raise 2pt \hbox{$\chi$}}

%% ----------------------------------------------------------------
% figures
\makeatletter
%\renewcommand\captionfont@{\footnotesize}
\makeatother
\def\writefig#1 #2 #3 {\rlap{\kern #1 truecm \raise #2 truecm
\hbox{#3}}}
\def\figtext#1{\smash{\hbox{#1}} \vspace{-5mm}}

%% ----------------------------------------------------------------
% exotic letters

\newcommand{\caA}{{\mathcal A}}
\newcommand{\caB}{{\mathcal B}}
\newcommand{\caC}{{\mathcal C}}
\newcommand{\caD}{{\mathcal D}}
\newcommand{\caE}{{\mathcal E}}
\newcommand{\caF}{{\mathcal F}}
\newcommand{\caG}{{\mathcal G}}
\newcommand{\caH}{{\mathcal H}}
\newcommand{\caI}{{\mathcal I}}
\newcommand{\caJ}{{\mathcal J}}
\newcommand{\caK}{{\mathcal K}}
\newcommand{\caL}{{\mathcal L}}
\newcommand{\caM}{{\mathcal M}}
\newcommand{\caN}{{\mathcal N}}
\newcommand{\caO}{{\mathcal O}}
\newcommand{\caP}{{\mathcal P}}
\newcommand{\caQ}{{\mathcal Q}}
\newcommand{\caR}{{\mathcal R}}
\newcommand{\caS}{{\mathcal S}}
\newcommand{\caT}{{\mathcal T}}
\newcommand{\caU}{{\mathcal U}}
\newcommand{\caV}{{\mathcal V}}
\newcommand{\caW}{{\mathcal W}}
\newcommand{\caX}{{\mathcal X}}
\newcommand{\caY}{{\mathcal Y}}
\newcommand{\caZ}{{\mathcal Z}}

\def\bbone{{\mathchoice {\rm 1\mskip-4mu l} {\rm 1\mskip-4mu l} {\rm 1\mskip-4.5mu l} {\rm 1\mskip-5mu l}}}

\newcommand{\bba}{{\mathbb a}}
\newcommand{\bbb}{{\mathbb b}}
\newcommand{\bbc}{{\mathbb c}}
\newcommand{\bbd}{{\mathbb d}}
\newcommand{\bbe}{{\mathbb e}}
\newcommand{\bbf}{{\mathbb f}}
\newcommand{\bbg}{{\mathbb g}}
\newcommand{\bbh}{{\mathbb h}}
\newcommand{\bbi}{{\mathbb i}}
\newcommand{\bbj}{{\mathbb j}}
\newcommand{\bbk}{{\mathbb k}}
\newcommand{\bbl}{{\mathbb l}}
\newcommand{\bbm}{{\mathbb m}}
\newcommand{\bbn}{{\mathbb n}}
\newcommand{\bbo}{{\mathbb o}}
\newcommand{\bbp}{{\mathbb p}}
\newcommand{\bbq}{{\mathbb q}}
\newcommand{\bbr}{{\mathbb r}}
\newcommand{\bbs}{{\mathbb s}}
\newcommand{\bbt}{{\mathbb t}}
\newcommand{\bbu}{{\mathbb u}}
\newcommand{\bbv}{{\mathbb v}}
\newcommand{\bbw}{{\mathbb w}}
\newcommand{\bbx}{{\mathbb x}}
\newcommand{\bby}{{\mathbb y}}
\newcommand{\bbz}{{\mathbb z}}

\newcommand{\bbA}{{\mathbb A}}
\newcommand{\bbB}{{\mathbb B}}
\newcommand{\bbC}{{\mathbb C}}
\newcommand{\bbD}{{\mathbb D}}
\newcommand{\bbE}{{\mathbb E}}
\newcommand{\bbF}{{\mathbb F}}
\newcommand{\bbG}{{\mathbb G}}
\newcommand{\bbH}{{\mathbb H}}
\newcommand{\bbI}{{\mathbb I}}
\newcommand{\bbJ}{{\mathbb J}}
\newcommand{\bbK}{{\mathbb K}}
\newcommand{\bbL}{{\mathbb L}}
\newcommand{\bbM}{{\mathbb M}}
\newcommand{\bbN}{{\mathbb N}}
\newcommand{\bbO}{{\mathbb O}}
\newcommand{\bbP}{{\mathbb P}}
\newcommand{\bbQ}{{\mathbb Q}}
\newcommand{\bbR}{{\mathbb R}}
\newcommand{\bbS}{{\mathbb S}}
\newcommand{\bbT}{{\mathbb T}}
\newcommand{\bbU}{{\mathbb U}}
\newcommand{\bbV}{{\mathbb V}}
\newcommand{\bbW}{{\mathbb W}}
\newcommand{\bbX}{{\mathbb X}}
\newcommand{\bbY}{{\mathbb Y}}
\newcommand{\bbZ}{{\mathbb Z}}

\newcommand{\fra}{{\mathfrak a}}
\newcommand{\frb}{{\mathfrak b}}
\newcommand{\frc}{{\mathfrak c}}
\newcommand{\frd}{{\mathfrak d}}
\newcommand{\fre}{{\mathfrak e}}
\newcommand{\frf}{{\mathfrak f}}
\newcommand{\frg}{{\mathfrak g}}
\newcommand{\frh}{{\mathfrak h}}
\newcommand{\fri}{{\mathfrak i}}
\newcommand{\frj}{{\mathfrak j}}
\newcommand{\frk}{{\mathfrak k}}
\newcommand{\frl}{{\mathfrak l}}
\newcommand{\frm}{{\mathfrak m}}
\newcommand{\frn}{{\mathfrak n}}
\newcommand{\fro}{{\mathfrak o}}
\newcommand{\frp}{{\mathfrak p}}
\renewcommand{\frq}{{\mathfrak q}}
\newcommand{\frr}{{\mathfrak r}}
\newcommand{\frs}{{\mathfrak s}}
\newcommand{\frt}{{\mathfrak t}}
\newcommand{\fru}{{\mathfrak u}}
\newcommand{\frv}{{\mathfrak v}}
\newcommand{\frw}{{\mathfrak w}}
\newcommand{\frx}{{\mathfrak x}}
\newcommand{\fry}{{\mathfrak y}}
\newcommand{\frz}{{\mathfrak z}}

\newcommand{\frA}{{\mathfrak A}}
\newcommand{\frB}{{\mathfrak B}}
\newcommand{\frC}{{\mathfrak C}}
\newcommand{\frD}{{\mathfrak D}}
\newcommand{\frE}{{\mathfrak E}}
\newcommand{\frF}{{\mathfrak F}}
\newcommand{\frG}{{\mathfrak G}}
\newcommand{\frH}{{\mathfrak H}}
\newcommand{\frI}{{\mathfrak I}}
\newcommand{\frJ}{{\mathfrak J}}
\newcommand{\frK}{{\mathfrak K}}
\newcommand{\frL}{{\mathfrak L}}
\newcommand{\frM}{{\mathfrak M}}
\newcommand{\frN}{{\mathfrak N}}
\newcommand{\frO}{{\mathfrak O}}
\newcommand{\frP}{{\mathfrak P}}
\newcommand{\frQ}{{\mathfrak Q}}
\newcommand{\frR}{{\mathfrak R}}
\newcommand{\frS}{{\mathfrak S}}
\newcommand{\frT}{{\mathfrak T}}
\newcommand{\frU}{{\mathfrak U}}
\newcommand{\frV}{{\mathfrak V}}
\newcommand{\frW}{{\mathfrak W}}
\newcommand{\frX}{{\mathfrak X}}
\newcommand{\frY}{{\mathfrak Y}}
\newcommand{\frZ}{{\mathfrak Z}}

\newcommand{\bsa}{{\boldsymbol a}}
\newcommand{\bsb}{{\boldsymbol b}}
\newcommand{\bsc}{{\boldsymbol c}}
\newcommand{\bsd}{{\boldsymbol d}}
\newcommand{\bse}{{\boldsymbol e}}
\newcommand{\bsf}{{\boldsymbol f}}
\newcommand{\bsg}{{\boldsymbol g}}
\newcommand{\bsh}{{\boldsymbol h}}
\newcommand{\bsi}{{\boldsymbol i}}
\newcommand{\bsj}{{\boldsymbol j}}
\newcommand{\bsk}{{\boldsymbol k}}
\newcommand{\bsl}{{\boldsymbol l}}
\newcommand{\bsm}{{\boldsymbol m}}
\newcommand{\bsn}{{\boldsymbol n}}
\newcommand{\bso}{{\boldsymbol o}}
\newcommand{\bsp}{{\boldsymbol p}}
\newcommand{\bsq}{{\boldsymbol q}}
\newcommand{\bsr}{{\boldsymbol r}}
\newcommand{\bss}{{\boldsymbol s}}
\newcommand{\bst}{{\boldsymbol t}}
\newcommand{\bsu}{{\boldsymbol u}}
\newcommand{\bsv}{{\boldsymbol v}}
\newcommand{\bsw}{{\boldsymbol w}}
\newcommand{\bsx}{{\boldsymbol x}}
\newcommand{\bsy}{{\boldsymbol y}}
\newcommand{\bsz}{{\boldsymbol z}}

\newcommand{\bsA}{{\boldsymbol A}}
\newcommand{\bsB}{{\boldsymbol B}}
\newcommand{\bsC}{{\boldsymbol C}}
\newcommand{\bsD}{{\boldsymbol D}}
\newcommand{\bsE}{{\boldsymbol E}}
\newcommand{\bsF}{{\boldsymbol F}}
\newcommand{\bsG}{{\boldsymbol G}}
\newcommand{\bsH}{{\boldsymbol H}}
\newcommand{\bsI}{{\boldsymbol I}}
\newcommand{\bsJ}{{\boldsymbol J}}
\newcommand{\bsK}{{\boldsymbol K}}
\newcommand{\bsL}{{\boldsymbol L}}
\newcommand{\bsM}{{\boldsymbol M}}
\newcommand{\bsN}{{\boldsymbol N}}
\newcommand{\bsO}{{\boldsymbol O}}
\newcommand{\bsP}{{\boldsymbol P}}
\newcommand{\bsQ}{{\boldsymbol Q}}
\newcommand{\bsR}{{\boldsymbol R}}
\newcommand{\bsS}{{\boldsymbol S}}
\newcommand{\bsT}{{\boldsymbol T}}
\newcommand{\bsU}{{\boldsymbol U}}
\newcommand{\bsV}{{\boldsymbol V}}
\newcommand{\bsW}{{\boldsymbol W}}
\newcommand{\bsX}{{\boldsymbol X}}
\newcommand{\bsY}{{\boldsymbol Y}}
\newcommand{\bsZ}{{\boldsymbol Z}}

%\newcommand{\vecomega}{\boldsymbol{\omega}}

\newcommand{\bsalpha}{{\boldsymbol\alpha}}
\newcommand{\bsbeta}{{\boldsymbol\beta}}
\newcommand{\bsgamma}{{\boldsymbol\gamma}}
\newcommand{\bsdelta}{{\boldsymbol\delta}}
\newcommand{\bsepsilon}{{\boldsymbol\epsilon}}
\newcommand{\bsmu}{{\boldsymbol\mu}}
\newcommand{\bsrho}{{\boldsymbol\rho}}
\newcommand{\bsvarrho}{{\boldsymbol\varrho}}
\newcommand{\bssigma}{{\boldsymbol\sigma}}
\newcommand{\bsomega}{{\boldsymbol\omega}}


%\newcommand{\longto}{\longrightarrow}


%% ================================================================

\theoremstyle{plain}
%\newtheorem{thm}{Theorem}[subsection]
\newtheorem{thm}[equation]{Theorem}
\newtheorem{cor}[equation]{Corollary}
\newtheorem{lem}[equation]{Lemma}
\newtheorem{prop}[equation]{Proposition}
\newtheorem{ax}[equation]{Axiom}
\newtheorem*{thm*}{Theorem}
\newtheorem*{cor*}{Corollary}
\newtheorem*{lem*}{Lemma}
\newtheorem*{prop*}{Proposition}
\newtheorem*{ax*}{Axiom}

%\theoremstyle{definition}
%\newtheorem{defn}[equation]{Definition}
%\newtheorem{problem}{Problem}
%\newtheorem*{defn*}{Definition}
%\newtheorem*{problem*}{Problem}
%\newtheorem{ex}[equation]{Example}
%\newtheorem{exs}[equation]{Examples}
%\newtheorem*{ex*}{Example}
%\newtheorem*{exs*}{Examples}

%\theoremstyle{remark}
%\newtheorem{rem}[equation]{Remark}
%\newtheorem*{rem*}{Remark}
%\newtheorem{aside}[equation]{Aside}
%\newtheorem*{aside*}{Aside}
%\newtheorem{intuition}[equation]{Intuition}
%\newtheorem*{intuition*}{Intuition}
%\newtheorem{notn}[equation]{Notation}
%\newtheorem*{notn*}{Notation}
%\newtheorem{conv}[equation]{Convention}
%\newtheorem*{conv*}{Convention}
%\newtheorem{interp}[equation]{Interpretation}
%\newtheorem*{interp*}{Interpretation}
%\newtheorem{mnem}[equation]{Mnemonic}
%\newtheorem*{mnem*}{Mnemonic}
%\newtheorem{exer}[equation]{Exercise}
%\newtheorem*{exer*}{Exercise}
%\newtheorem{conjecture}[equation]{Conjecture}
%\newtheorem*{conjecture*}{Conjecture}
