Skip to content

Commit

Permalink
Add shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
jstrieb committed Apr 16, 2020
1 parent c1aef7b commit 397c412
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion hw-shortcuts.sty
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@
% Shortcuts for left/right parentheses, square brackets, and curly braces
\newcommand{\lrp}[1]{\left( #1 \right)}
\newcommand{\lrs}[1]{\left[ #1 \right]}
\newcommand{\lrc}[1]{\left{ #1 \right}}
\newcommand{\lrc}[1]{\left\{ #1 \right\}}
\newcommand{\lrb}[1]{\left| #1 \right|}

% Commonly-used sets
\newcommand{\N}{\ensuremath{\mathbb{N}}}
\newcommand{\Z}{\ensuremath{\mathbb{Z}}}
\newcommand{\R}{\ensuremath{\mathbb{R}}}
\newcommand{\RR}{\ensuremath{\mathbb{R}}}
\newcommand{\Q}{\ensuremath{\mathbb{Q}}}
\newcommand{\C}{\ensuremath{\mathbb{C}}}

Expand All @@ -33,6 +35,7 @@
\newcommand{\expect}[1]{\mathbb{E}\left[ #1 \right]}
\newcommand{\prob}[1]{\mathbb{P}\left[ #1 \right]}
\newcommand{\var}[1]{\mathrm{var}\left( #1 \right)}
\newcommand{\cov}[1]{\mathrm{cov}\left( #1 \right)}

% Commonly-used computer science languages
\renewcommand{\P}{\ensuremath{\mathsf{P}}}
Expand All @@ -42,3 +45,7 @@
% Commonly-used reductions add semantic clarity
\newcommand{\CookReducesTo}{\ensuremath{\leq^P_T}}
\newcommand{\KarpReducesTo}{\ensuremath{\leq^P_m}}

% Set of functions integrable in the Riemann sense and equal sign denoted with L'Hospitals' rule
\newcommand{\Rf}{\ensuremath{\mathcal{R}(\alpha)}}
\newcommand{\lh}{\ensuremath{\overset{\text{L'H}}{=}}}

0 comments on commit 397c412

Please sign in to comment.