%--------------
%% preamble.tex
%% this should be included with a command like
%% \input{preamble.tex}
%% \lecture{1}{September 4, 1996 }{Daniel A. Spielman}{name
%%  of poor scribe}

\newcommand{\lref}[2][]{\hyperref[#2]{#1~\ref*{#2}}}
\renewcommand{\eqref}[2][]{\hyperref[#2]{(\ref*{#2})}}

\setlength{\oddsidemargin}{.25in}
\setlength{\evensidemargin}{.25in}
\setlength{\textwidth}{6in}
\setlength{\topmargin}{-0.4in}
\setlength{\textheight}{8.5in}

\newcommand{\handout}[5]{
   \renewcommand{\thepage}{#1-\arabic{page}}
   %\renewcommand{\thetheorem}{#1.\arabic{theorem}}
   \renewcommand{\thesection}{#1.\arabic{section}}
   \noindent
   \begin{center}
   \framebox{
      \vbox{
    \hbox to 5.78in { {\bf Limits of Approximation Algorithms}
     	 \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{\lecture}[5]{\handout{#1}{#2}
{Lecturer: #4}
{Scribe: #3}
{Lec. #1: #5}}

\newtheorem{theorem}{Theorem}[section]
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{observation}[theorem]{Observation}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{fact}[theorem]{Fact}
\newtheorem{assumption}[theorem]{Assumption}
\newtheorem{remark}[theorem]{Remark}
\newtheorem*{ugc}{Unique Games Conjecture}

%\newcommand{\qed}{\rule{7pt}{7pt}}
\newcommand{\dis}{\mathop{\mbox{\rm d}}\nolimits}
\newcommand{\per}{\mathop{\mbox{\rm per}}\nolimits}
\newcommand{\area}{\mathop{\mbox{\rm area}}\nolimits}
\newcommand{\cw}{\mathop{\rm cw}\nolimits}
\newcommand{\ccw}{\mathop{\rm ccw}\nolimits}
\newcommand{\DIST}{\mathop{\mbox{\rm DIST}}\nolimits}
\newcommand{\OP}{\mathop{\mbox{\it OP}}\nolimits}
\newcommand{\OPprime}{\mathop{\mbox{\it OP}^{\,\prime}}\nolimits}
\newcommand{\ihat}{\hat{\imath}}
\newcommand{\jhat}{\hat{\jmath}}
\newcommand{\abs}[1]{\mathify{\left| #1 \right|}}
%\newcommand{\prob}[2]{\underset{#1}{\rm Prob}\left[{#2}\right]}
\newcommand{\prob}[2]{\Pr_{#1}\left[#2\right]}
\newcommand{\acc}{{\sf acc}}
\newcommand{\rej}{{\sf rej}}
%\newcommand{\NP}{{\sf NP}}
%\newcommand{\PCP}[4]{{\sf PCP}$_{{#1},{#2}}$ (${#3}, {#4}$)}
\DeclareMathOperator*{\E}{{\mathbb E}}

%\newenvironment{proof}{\noindent{\bf Proof:}\hspace*{1em}}{\qed\bigskip}
\newenvironment{proof-sketch}{\noindent{\bf Sketch of Proof}\hspace*{1em}}{\qed\bigskip}
\newenvironment{proof-idea}{\noindent{\bf Proof Idea}\hspace*{1em}}{\qed\bigskip}
\newenvironment{proof-of-lemma}[1]{\noindent{\bf Proof of Lemma #1}\hspace*{1em}}{\qed\bigskip}
\newenvironment{proof-attempt}{\noindent{\bf Proof Attempt}\hspace*{1em}}{\qed\bigskip}
%\newenvironment{proofof}[1]{\noindent{\bf Proof of #1:}\hspace*{1em}}{\qed\bigskip}


% \makeatletter
% \@addtoreset{figure}{section}
% \@addtoreset{table}{section}
% \@addtoreset{equation}{section}
% \makeatother

\newcommand{\FOR}{{\bf for}}
\newcommand{\TO}{{\bf to}}
\newcommand{\DO}{{\bf do}}
\newcommand{\WHILE}{{\bf while}}
\newcommand{\AND}{{\bf and}}
\newcommand{\IF}{{\bf if}}
\newcommand{\THEN}{{\bf then}}
\newcommand{\ELSE}{{\bf else}}

% \renewcommand{\thefigure}{\thesection.\arabic{figure}}
% \renewcommand{\thetable}{\thesection.\arabic{table}}
% \renewcommand{\theequation}{\thesection.\arabic{equation}}

\makeatletter
\def\fnum@figure{{\bf Figure \thefigure}}
\def\fnum@table{{\bf Table \thetable}}
\long\def\@mycaption#1[#2]#3{\addcontentsline{\csname
  ext@#1\endcsname}{#1}{\protect\numberline{\csname 
  the#1\endcsname}{\ignorespaces #2}}\par
  \begingroup
    \@parboxrestore
    \small
    \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par
  \endgroup}
\def\mycaption{\refstepcounter\@captype \@dblarg{\@mycaption\@captype}}
\makeatother

\newcommand{\figcaption}[1]{\mycaption[]{#1}}
\newcommand{\tabcaption}[1]{\mycaption[]{#1}}
\newcommand{\head}[1]{\chapter[Lecture \##1]{}}
\newcommand{\mathify}[1]{\ifmmode{#1}\else\mbox{$#1$}\fi}
%\renewcommand{\Pr}[1]{\mathify{\mbox{Pr}\left[#1\right]}}
%\newcommand{\Exp}[1]{\mathify{\mbox{Exp}\left[#1\right]}}
\newcommand{\bigO}O
\newcommand{\set}[1]{\mathify{\left\{ #1 \right\}}}
\def\half{\frac{1}{2}}

% Coding theory addenda

\newcommand{\enc}{{\sf Enc}}
\newcommand{\dec}{{\sf Dec}}
\newcommand{\Var}{{\rm Var}}
\newcommand{\Z}{{\mathbb Z}}
\newcommand{\F}{{\mathbb F}}
\newcommand{\A}{{\mathcal A}}
\newcommand{\integers}{{\mathbb Z}^{\geq 0}}
\newcommand{\R}{{\mathbb R}}
\newcommand{\Q}{{\cal Q}}
\newcommand{\eqdef}{{\stackrel{\rm def}{=}}}
\newcommand{\from}{{\leftarrow}}
\newcommand{\vol}{{\rm Vol}}
\newcommand{\poly}{{\rm poly}}
\newcommand{\ip}[1]{{\langle #1 \rangle}}
\newcommand{\wt}{{\rm wt}}
\renewcommand{\vec}[1]{{\mathbf #1}}
\newcommand{\mspan}{{\rm span}}
\newcommand{\rs}{{\rm RS}}
\newcommand{\RM}{{\rm RM}}
\newcommand{\Had}{{\rm Had}}
\newcommand{\calc}{{\cal C}}
\newcommand{\calX}{{\cal X}}
\newcommand{\calY}{{\cal Y}}

%\newcommand{\binom}[2]{{#1 \choose #2}}
\renewcommand{\epsilon}{\varepsilon}
\renewcommand{\phi}{\varphi}

\newcommand{\fig}[4]{
        \begin{figure}
        \setlength{\epsfysize}{#2}
        \vspace{3mm}
        \centerline{\epsfbox{#4}}
        \caption{#3} \label{#1}
        \end{figure}
        }

\newcommand{\ord}{{\rm ord}}

\providecommand{\norm}[1]{\lVert #1 \rVert}
\newcommand{\embed}{{\rm Embed}}
\newcommand{\qembed}{\mbox{$q$-Embed}}
\newcommand{\calh}{{\cal H}}
\newcommand{\lp}{{\rm LP}}
\DeclareMathOperator*{\agr}{agr}

%%% Course specific macros
\newcommand{\GAMTS}{$\text{gap}_{\alpha}\text{-MAX3SAT}$}
\newcommand{\mathprob}[1]{\mbox{\textmd{\textsc{#1}}}}
\newcommand{\labelcover}{\mathprob{Label-Cover}}
\newcommand{\gaplc}[1]{\mathprob{gap}_{#1}\mathprob{-LC}}
\newcommand{\uniquelc}{\mathprob{UniqueLC}}

%\newcommand{\Poly}{\mathcal{P}}
\newcommand{\mcA}{\mathcal{A}}
\newcommand{\mcD}{\mathcal{D}}
\newcommand{\omcA}{\overline{\mcA}}
\newcommand{\gapLabelCover}{\mathrm{gapLabelCover}}
%\newcommand{\agr}{\mathrm{agr}}
\newcommand{\polylog}{\text{polylog}}

\newcommand{\maxcut}{\mathprob{MAXCUT}}
\newcommand{\gapulc}[2]{\mathprob{gap}_{#1,#2}\mathprob{-UniqueLC}}

\newcommand{\PCP}[5]{PCP_{#1,#2}^{#3}[#4,#5]}
\newcommand{\gap}[3]{\mathprob{gap}_{#1,#2}\mathprob{-#3}}


%\newcommand{\gap}[2]{\text{gap}_{#1}-\text{#2}}

\newcommand{\NP}{{\mathsf{NP}}}
\newcommand{\Sub}[2]{{\mathcal S}^{#1}_{#2}}
\newcommand{\Polynomial}[2]{{\mathcal P}^{#1}_{#2}}
\newcommand{\Oracle}{{\mathcal O}}
\newcommand{\myindent}[1]{{\addtolength{\leftskip}{30pt}$\;$\\\noindent
    #1\\\par}}
\newcommand{\avg}[2]{\mathop{\textbf{E}}_{#1}[#2]}

\newcommand{\bra}[1]{\{#1\}}
\newcommand{\field}{\mathbb{F}}
\newcommand{\integer}{\mathbb{Z}}
\newcommand{\setcond}[2]{\left\{#1\: \middle|\: #2\right\}}
\newcommand{\union}{\cup}