\usepackage{mathchars}
\input{figs.teaching}
% Page style
\renewcommand{\baselinestretch}{1.25}   % {1,1.25,1.667} = single/1.5/double line spacing
\setlength{\parindent}{0in}
\setlength{\parskip}{0.1in}

% Written style
\newcommand{\ie}{i.e.\ }
\newcommand{\eg}{e.g.\ }
\newcommand{\etc}{etc\ }

% Maths style
\newcommand{\nat}{\ensuremath{\bbbn}}
\newcommand{\real}{\ensuremath{\bbbr}}
\newcommand{\rat}{\ensuremath{\bbbq}}
\newcommand{\integers}{\ensuremath{\bbbz}}
\newcommand{\bool}{\sf Bool}

% Additional internal commands
% Logical operators and symbols
\newcommand{\union}{\cup}
\newcommand{\intersect}{\cap}
\newcommand{\boolif}{\cmd{iff}}
\newcommand{\boolor}{\vee}
\newcommand{\booland}{\wedge}
\newcommand{\boolimply}{\Rightarrow}
\newcommand{\boolbimply}{\Leftrightarrow}
\newcommand{\boolnot}{\neg}
\newcommand{\boolsat}{\!\models}
\newcommand{\boolnsat}{\!\not\models}
\newcommand{\booltrue}{\cmdns{true}}
\newcommand{\boolfalse}{\cmdns{false}}

\newcommand{\cmd}[1]{\mbox{ \sf #1 }}
\newcommand{\cmdns}[1]{\mbox{\sf #1}}

\newsavebox{\savepar}
\newlength{\boxparwidth}\setlength{\boxparwidth}{\textwidth}\addtolength{\boxparwidth}{-20pt}
\newenvironment{boxpar}
{\begin{lrbox}{\savepar}\begin{minipage}[t]{\boxparwidth}\vspace{0mm}}
{\vspace{0mm}\end{minipage}\end{lrbox}\framebox[\textwidth][c]{\usebox{\savepar}}}

\newenvironment{principle}[1]{\begin{boxpar}{\bf #1}\\}{\end{boxpar}}
\newtheorem{example}{Example}
\newtheorem{exercise}{Exercise}

\newcommand{\Sbox}{\mbox{\rule[0.6pt]{1.9mm}{1.9mm}}}
\newcommand{\qed}{\hfill$\Sbox$}


\newcommand{\sectref}[1]{Section~\ref{#1}}
\newcommand{\Sectref}[1]{Section~\ref{#1}}
\newcommand{\Sectsref}[1]{Sections~\ref{#1}}
\newcommand{\eqnref}[1]{Eq.~(\ref{#1})}
\newcommand{\Eqnref}[1]{Eq.~(\ref{#1})}
\newcommand{\figref}[1]{Fig.~\ref{#1}}
\newcommand{\figsref}[1]{Figs.~\ref{#1}}
\newcommand{\Figref}[1]{Fig.~\ref{#1}}
\newcommand{\tabref}[1]{Tab.~\ref{#1}}
\newcommand{\tabsref}[1]{Tabs.~\ref{#1}}
\newcommand{\Tabref}[1]{Tab.~\ref{#1}}
\newcommand{\Tabsref}[1]{Tabs.~\ref{#1}}

\newcommand{\cchoice}[2]{\left(\begin{array}{c}{#1}\\{#2}\end{array}\right)}

\newcommand{\pdiff}[1]{\frac{\partial}{\partial #1}}
\newcommand{\pdiffF}[2]{\frac{\partial #1}{\partial #2}}
\newcommand{\pdiffFII}[3]{\frac{\partial^2 #1}{\partial #2 \partial #3}}
\newcommand{\diff}[1]{\mathrm{\frac{d}{d\mathit{#1}}}}
\newcommand{\diffF}[2]{\mathrm{\frac{d\mathit{#1}}{d\mathit{#2}}}}
\newcommand{\diffII}[1]{\mathrm{\frac{d^2}{d\mathit{#1}^2}}}
\newcommand{\indintg}[2]{\int #1 \, \mathrm{d}#2}
\newcommand{\intg}[4]{\int_{#3}^{#4} #1 \, \mathrm{d}#2}
\newcommand{\intgd}[4]{\int\!\!\!\!\int_{#4} #1 \, \mathrm{d}#2 \, \mathrm{d}#3}
