\newcommand{\thetop}[5]{
   \renewcommand{\thepage}{\arabic{page}}
   \noindent
   \begin{center}
   \framebox{
      \vbox{
    \hbox to 5.78in {Math 7H: Honors Seminar \hfill #2 }
       \vspace{4mm}
       \hbox to 5.78in { {\Large \hfill #5  \hfill} }
       \vspace{2mm}
       \hbox to 5.78in { {\it #3 \hfill #4} }
      }
   }
   \end{center}
   \vspace*{4mm}
}

\newcommand{\mpresentation}[2]{\thetop{#1}{Professor: Padraic Bartlett}{#2}{UCSB 2014}{Mini-presentation #1}}
\newcommand{\mlecture}[2]{\thetop{#1}{Professor: Padraic Bartlett}{#2}{UCSB 2014}{Minilecture #1}}
\newcommand{\lecture}[2]{\thetop{#1}{Professor: Padraic Bartlett}{#2}{UCSB 2014}{Lecture #1}}
\newcommand{\masterfile}[2]{\thetop{#1}{Professor: Padraic Bartlett}{#2}{UCSB 2014}{Lectures and Problem Sets #1}}
\newcommand{\syllabus}[2]{\thetop{#1}{Professor: Padraic Bartlett}{#2}{UCSB 2014}{Syllabus#1}}
\newcommand{\ways}[2]{\thetop{#1}{Professor: Padraic Bartlett}{#2}{UCSB 2014}{Ways #1}}
\newcommand{\week}[2]{\thetop{#1}{Professor: Padraic Bartlett}{#2}{UCSB 2014}{#1}}
\newcommand{\recitation}[2]{\thetop{#1}{Professor: Padraic Bartlett}{#2}{UCSB 2014}{Recitation #1}}
\newcommand{\handout}[2]{\thetop{#1}{Professor: Padraic Bartlett}{#2}{UCSB 2014}{Handout #1}}
\newcommand{\homework}[2]{\thetop{#1}{Professor: Padraic Bartlett}{#2}{UCSB 2014}{Homework #1}}
\newcommand{\midterm}[2]{\thetop{#1}{Professor: Padraic Bartlett}{#2}{UCSB 2014}{Midterm! #1}}
\newcommand{\pmidterm}[2]{\thetop{#1}{Professor: Padraic Bartlett}{#2}{UCSB 2014}{Practice Midterm! #1}}
\newcommand{\final}[2]{\thetop{#1}{Professor: Padraic Bartlett}{#2}{UCSB 2014}{Final! #1}}
\newcommand{\pfinal}[2]{\thetop{#1}{Professor: Padraic Bartlett}{#2}{UCSB 2014}{Practice Final! #1}}
\newcommand{\prachomework}[2]{\thetop{#1}{Professor: Padraic Bartlett}{#2}{UCSB 2014}{Practice Homework #1}}
\newcommand{\quiz}[2]{\thetop{#1}{Professor: Padraic Bartlett}{#2}{UCSB 2014}{Quiz #1}}
\newcommand{\solutionset}[2]{\thetop{#1}{Professor: Padraic Bartlett}{#2}{UCSB 2014}{Solution Set #1}}
\newcommand{\blank}[2]{\thetop{#1}{Professor: Padraic Bartlett}{#2}{UCSB 2014}{#1}}


\def\squarebox#1{\hbox to #1{\hfill\vbox to #1{\vfill}}}
\def\qed{\hspace*{\fill}
        \vbox{\hrule\hbox{\vrule\squarebox{.667em}\vrule}\hrule}}

\newtheorem{theorem}{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{fact}[theorem]{Fact}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{question}[theorem]{Question}



\newenvironment{conj}[1][Conjecture.]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{solution}[1][Solution.]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{construct}[1][Construction.]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{definition}[1][Definition.]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{defn}[1][Definition.]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{thm}[1][Theorem.]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{exmps}[1][Examples.]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{exmp}[1][Example.]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{nonexmp}[1][Nonexample.]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{remark}[1][Remark.]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{problem}[1][Problem.]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{prop}[1][Proposition.]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{quest}[1][Question.]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{answr}[1][Answer.]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{answer}[1][Answer.]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{aside}[1][Side note.]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{obs}[1][Observation.]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{claim}[1][Claim.]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{lem}[1][Lemma.]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{algorithm}[1][Algorithm.]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{weakness}[1][Weaknesses.]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{puzzle}[1][Puzzle.]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{game}[1][Game.]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\newenvironment{vote}[1][Voting system.]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}


\def\QQ{\mathbb Q}
\def\ZZ{\mathbb Z}
\def\RR{\mathbb R}
\def\CC{\mathbb C}
\def\NN{\mathbb N}

\def\from{\gets}
\def\isin{\subseteq}
\def\iso{\cong}
\def\st{\ |\ }