%This document is copyrightless. Please feel free to modify and use in whatever way you wish.
%These notes were fleshed out and modified form J.P. Pretti's F2015 Math 135 notes.

%\documentclass[letterpaper,12pt,titlepage,oneside,final]{report}
\documentclass[a4paper,12pt]{article}
\usepackage{amssymb,amsmath, amscd} % amscd is for commuting diagrams
%NOTE: TO USE diagrams.sty VISIT http://www.paultaylor.eu/diagrams/
%TO INSTALL GO TO PROGRAMFILES\MIKTEX2.x\TEX\LATEX CREATE FOLDER
%diagrams THEN MOVE diagrams.sty THERE
%\usepackage[small,nohug,heads=vee]{diagrams} %better commutative diagrams
%\allowdisplaybreaks   %allows for equations to spread over multiple pages.
%\diagramstyle[labelstyle=\scriptstyle] 
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{enumerate}
\usepackage{verbatim}
\usepackage{etoolbox}
\usepackage{color}
%\usepackage{setspace}
\usepackage{tikz}
%\usetikzlibrary{positioning,shapes}
%\usepackage{indentfirst} %Always indents the first line
\usepackage[bookmarks=true]{hyperref} % redboxes.
\usepackage[vmargin=2cm, hmargin=2.5cm]{geometry}
%Good for creating good citations using \citep
\usepackage{natbib}

%\title{\textbf{Title}}
%\author{\normalsize Carmen A. Bruni}
%\date{\normalsize \today}



%Changes name of Bibliography to References.
\renewcommand{\bibname}{References}

%1.5x spacing
%\linespread{1.4}

\newcommand{\be}[1]{\textbf{e}\left( #1 \right)}

%      Blackboard bold letters
\newcommand{\bA}{{\mathbb{A}}}
\newcommand{\bC}{{\mathbb{C}}}
\newcommand{\bD}{{\mathbb{D}}}
\newcommand{\bF}{{\mathbb{F}}}
\newcommand{\bH}{{\mathbb{H}}}
\newcommand{\bK}{{\mathbb{K}}}
\newcommand{\bN}{{\mathbb{N}}}
\newcommand{\bP}{{\mathbb{P}}}
\newcommand{\bQ}{{\mathbb{Q}}}
\newcommand{\bR}{{\mathbb{R}}}
\newcommand{\bT}{{\mathbb{T}}}
\newcommand{\bZ}{{\mathbb{Z}}}


%      Capital script letters
  \newcommand{\A}{{\mathcal{A}}}
  \newcommand{\B}{{\mathcal{B}}}
  \newcommand{\C}{{\mathcal{C}}}
  \newcommand{\D}{{\mathcal{D}}}
  \newcommand{\E}{{\mathcal{E}}}
  \newcommand{\F}{{\mathcal{F}}}
  \newcommand{\G}{{\mathcal{G}}}
\renewcommand{\H}{{\mathcal{H}}}
  \newcommand{\HOM}{{\mathcal{H}\textit{om}}}
  \newcommand{\I}{{\mathcal{I}}}
  \newcommand{\J}{{\mathcal{J}}}
  \newcommand{\K}{{\mathcal{K}}}  
\renewcommand{\L}{{\mathcal{L}}}
  \newcommand{\M}{{\mathcal{M}}}
  \newcommand{\N}{{\mathcal{N}}}
\renewcommand{\O}{{\mathcal{O}}}
\renewcommand{\P}{{\mathcal{P}}}
  \newcommand{\p}{{\mathfrak{p}}}
  \newcommand{\Q}{{\mathcal{Q}}}
  \newcommand{\R}{{\mathcal{R}}}
\renewcommand{\S}{{\mathcal{S}}}
  \newcommand{\T}{{\mathcal{T}}}
  \newcommand{\U}{{\mathcal{U}}}
  \newcommand{\V}{{\mathcal{V}}}
  \newcommand{\W}{{\mathcal{W}}}
  \newcommand{\X}{{\mathcal{X}}}
  \newcommand{\Y}{{\mathcal{Y}}}
  \newcommand{\Z}{{\mathcal{Z}}}

%      Capital Fraktur letters
  \newcommand{\fF}{{\mathfrak{F}}}
  \newcommand{\fG}{{\mathfrak{G}}}
  \newcommand{\fH}{{\mathfrak{H}}}
  \newcommand{\fL}{{\mathfrak{L}}}
  \newcommand{\fU}{{\mathfrak{U}}}
  \newcommand{\fV}{{\mathfrak{V}}}
  \newcommand{\fW}{{\mathfrak{W}}}
  \newcommand{\fX}{{\mathfrak{X}}}
  \newcommand{\fY}{{\mathfrak{Y}}}
  \newcommand{\fZ}{{\mathfrak{Z}}}
  
\newcommand{\FOR}{\text{ for }}
\newcommand{\FORALL}{\text{ for all }}
\newcommand{\AND}{\text{ and }}
\newcommand{\IF}{\text{ if }}
\newcommand{\OR}{\text{ or }}
\newcommand{\qand}{\quad\text{and}\quad}
\newcommand{\qor}{\quad\text{or}\quad}
\newcommand{\qfor}{\quad\text{for}\quad}
\newcommand{\qforal}{\quad\text{for all}\quad}
\newcommand{\qif}{\quad\text{if}\quad}
\newcommand{\ran}{\text{Ran}\,}
\newcommand{\Div}{\textnormal{Div}\,}
\newcommand{\sdiv}{\textnormal{div}\,}
\renewcommand{\div}{\textnormal{div}\,}
\newcommand{\CaDiv}{\textnormal{CaDiv}\,}
\newcommand{\Pic}{\textnormal{Pic}\,}
\newcommand{\Cl}{\textnormal{Cl}\,}
\newcommand{\ord}{\textnormal{ord}\,}
\renewcommand{\qed}{$\hfill\blacksquare$\smallskip}
\newcommand{\Lat}{\mathrm{Lat}\,}
\newcommand{\Alg}{\mathrm{Alg}\,}
\newcommand{\Sym}{\mathrm{Sym}\,}
\newcommand{\Alt}{\mathrm{Alt}\,}
\newcommand{\logt}{\log_{2}}
\newcommand{\im}{\textnormal{im}}
\newcommand{\cis}{\textnormal{cis}}
\newcommand{\aut}{\textnormal{Aut}}
\newcommand{\SL}{\textnormal{SL}}
\newcommand{\SLtbZ}{\textnormal{SL}_{2}(\bZ)}
\newcommand{\GL}{\textnormal{GL}}
\newcommand{\SO}{\textnormal{SO}}
\newcommand{\stdmat}{\begin{bmatrix} a & b \\ c & d \end{bmatrix}}
\newcommand{\stddelmat}{\begin{bmatrix} a & b \\ c & \delta \end{bmatrix}}
\newcommand{\stdgammamat}[1]{\begin{bmatrix} a_{#1} & b_{#1} \\ c_{#1} & d_{#1} \end{bmatrix}}
\newcommand{\stdinvmat}{\begin{bmatrix} d & -b \\ -c & a \end{bmatrix}}
\newcommand{\stdtmat}{\begin{bmatrix} e & f \\ g & h \end{bmatrix}}
\newcommand{\stddeltamat}{\begin{bmatrix} a & b \\ c_{v} & d_{v} \end{bmatrix}}
\newcommand{\stdtinvmat}{\begin{bmatrix} h & -f \\ -g & e \end{bmatrix}}
\newcommand{\stdqmat}{\begin{bmatrix} p & q \\ r & s \end{bmatrix}}
\newcommand{\vect}[2]{\begin{pmatrix} #1 \\ #2 \end{pmatrix}}
\newcommand{\bvect}[2]{\begin{bmatrix} #1 \\ #2 \end{bmatrix}}
\newcommand{\tbtmat}[4]{\begin{bmatrix} #1 & #2 \\ #3 & #4 \end{bmatrix}}
\newcommand{\pchar}[1]{\textbf{1}_{#1}}
\newcommand{\cusp}{\bQ \cup \{ \infty \}}
\newcommand{\rad}{\textnormal{rad}}
\newcommand{\Char}{\textnormal{char}}
\newcommand{\Mod}{\textnormal{mod }}
\newcommand{\Res}{\textnormal{Res}}
\newcommand{\id}{\textnormal{id}}
\newcommand{\reg}{\textnormal{reg}}
\newcommand{\norm}{\textnormal{norm}}
\newcommand{\irr}{\textnormal{irr}}
\newcommand{\tr}{\textnormal{tr}}
\newcommand{\old}{\textnormal{old}}
\newcommand{\new}{\textnormal{new}}
\newcommand{\Span}{\textnormal{span}}
\newcommand{\lcm}{\textnormal{lcm}}
\newcommand{\bigmid}{\hspace{1pt}\rule[-10pt]{1pt}{30pt}}
\newcommand{\Hom}{\textnormal{Hom}}
\newcommand{\rank}{\textnormal{rank}}
\newcommand{\End}{\textnormal{End}}
\newcommand{\Tr}{\textnormal{Tr}}
\newcommand{\Jac}{\textnormal{Jac}}
\newcommand{\disc}{\textnormal{disc}}
\newcommand{\differ}[1]{\ensuremath\Omega^{\otimes #1}}
\newcommand{\hecked}[1]{\langle #1 \rangle}
%\newcommand{\differ}{\Omega^{\otimes n}}
%\newcommand{\differk}{\Omega^{\otimes k}}
%\newcommand{\differone}{\Omega^{\otimes 1}}
\newcommand{\hol}{\textnormal{hol}}
\newcommand{\floor}[1]{ \lfloor #1 \rfloor}
\renewcommand{\mod}[1]{{\ifmmode\text{\rm\ (mod~$#1$)}\else\discretionary{}{}{\hbox{ }}\rm(mod~$#1$)\fi}}

\newcommand{\ip}[2]{\langle#1,#2\rangle}
\newcommand{\Legendre}[2]{\left( \frac{#1}{#2}\right)}
\newcommand{\sgn}{\textnormal{sgn}}
%\renewcommand{\span}{\mathrm{span}} %DOES NOT WORK WITH ALIGN
\renewcommand{\subset}{\subseteq}
\newcommand{\ep}{\varepsilon}
\newcommand{\upchi}{{\raise.35ex\hbox{$\chi$}}}
\newcommand{\uprho}{{\raise.35ex\hbox{$\rho$}}}
\newcommand{\ol}{\overline}
\newcommand{\mt}{\emptyset}
  
\newcounter{exerci}[section]
\renewcommand{\theexerci}{\arabic{chapter}.\arabic{section}.\arabic{exerci}}

\newenvironment{Ex}{\begin{list}%
 {\theexerci\hfill}{\usecounter{exerci}\rightmargin=0pt\leftmargin=12pt%
 \labelwidth=12pt\labelsep=6pt\itemsep=2ex}}{\end{list}\medbreak }
 
\newenvironment{parts}{\vspace{1ex}\begin{enumerate}\renewcommand{\itemsep}{1ex}
 \renewcommand{\labelenumi}{(\alph{enumi})}}{\end{enumerate}}  %enumi to roman for i, ii, iii to a, b, c

  
%      Itemize
\renewcommand{\labelenumi}{(\roman{enumi})}
\renewcommand{\labelenumii}{\arabic{enumii}.}


%       Sundry
%\renewcommand{\subset}{\subseteq}

\newcommand{\lecture}[1]{\noindent \textbf{Lecture #1} \vskip1em}
\renewcommand{\qed}{\hfill $\blacksquare$}
\newcommand{\defn}{\noindent \textbf{Definition: } }
\newcommand{\ex}{\noindent \textbf{Example: } }
\newcommand{\exr}{\noindent \textbf{Exercise: } }
\newcommand{\thm}{\noindent \textbf{Theorem: } }
\newcommand{\cor}{\noindent \textbf{Corollary: } }
\newcommand{\prop}{\noindent \textbf{Proposition: } }
\newcommand{\pf}{\noindent \textbf{Proof: }}
\newcommand{\note}{\noindent \textbf{Note: }}
\newcommand{\qn}{\noindent \textbf{Question: }}
\newcommand{\soln}{\noindent \textbf{Solution: }}
\newcommand{\claim}{\noindent \textbf{Claim:} }
\newcommand{\recall}{\noindent \textbf{Recall:} }


\newcounter{lecno}
%\setcounter{lecno}{0}
\newcommand{\newlec}{\stepcounter{lecno} \begin{center}\lecture{\arabic{lecno}}\end{center}}


\newtoggle{IC} %Instructor's Comments
\toggletrue{IC}
%\togglefalse{IC}

\newcommand{\ic}[1]{\vskip1em \iftoggle{IC}{ {\color{red} \textbf{Instructor's Comments: #1}}\vskip1em}{}}
\newcommand{\hdc}{{\color{blue} Handout or Document Camera or Class Exercise} \vskip1em}
