\ProvidesPackage{lecture}[2013/02/01 v1.0 Lecture notes]

\usepackage{fullpage}
\usepackage[pdfborder={0 0 0}]{hyperref}
\usepackage{color}
\usepackage{graphicx}
\usepackage{epsfig}
\usepackage{latexsym}
\usepackage{amssymb}
\usepackage{amsmath}

% pretty enumerate environments
\usepackage[shortlabels]{enumitem}

% Expected value
\newcommand{\Exp}{\mathbb E}

% Variance
\newcommand{\Var}{\mathrm{Var}}

% natural numbers
\newcommand{\Nat}{\mathbb N}

% complex numbers
\newcommand{\C}{\mathbb C}

% Binary alphabet {0,1}
\newcommand{\zo}{\{0,1\}}

% Majority
\newcommand{\maj}{\mathrm{maj}}

% Bias
\newcommand{\bias}{\mathrm{bias}}

% Extractor
\newcommand{\Ext}{\mathrm{Ext}}

% Maximum value of quadratic equation system
\newcommand{\maxqe}{\text{\rm Max-QE}}

% Encoder and Decoder (for error-correcting codes)
\newcommand{\Enc}{\mathrm{Enc}}
\newcommand{\Dec}{\mathrm{Dec}}

% finite fields. Use \GF{q} to typeset the field with q elements
\newcommand{\GF}[1]{\mathbb F_{#1}}

% Class of algorithms \A
\newcommand{\A}{\mathcal{A}}

% Hamming distance
\newcommand{\hdist}{d_{\mathrm{H}}}

% statistical distance
\newcommand{\sdist}{d_{\mathrm{stat}}}

% Support (of a random variable)
\newcommand{\supp}{\mathrm{supp}}

% This is symbol we will use to denote "edge labels"
\newcommand{\el}{\ell}

% zig-zag transition matrix
\newcommand{\zigzagM}{M_{\mathrm{zig-zag}}}

% circle a character
\usepackage{tikz}
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
            \node[shape=circle,draw,inner sep=1pt] (char) {#1};}}
% replacement product
\DeclareMathOperator{\replacement}{\circled{{\rm r}}}
% zig-zag product
\DeclareMathOperator{\zigzag}{\circled{{\rm z}}}
% derandomized squaring
\DeclareMathOperator{\dersquare}{\circled{{\rm s}}}

% tensor product
\newcommand{\tensor}{\otimes}

\renewcommand{\labelitemi}{$\circ$}

\newcommand{\newfontobj}[2]{
  \newcommand{#1}[1]{
    \expandafter\def\csname##1\endcsname{{#2 ##1}}}}

\newfontobj{\class}{\rm} % Typeset Classes in roman font

% Some standard classes (use in only mathmode)
% Usage example: $\P \subseteq \NP$ and we believe that $\NP$ is not 
%  equal to $\P$.

\class{PSPACE}	
\class{L}
\class{BPL}
\class{RL}
\class{NC}
\class{ZPL}
\class{NPSPACE}	
\class{ASPACE}	
\class{NL}
\class{EXP}
\class{NEXP}
\class{coNEXP}
\class{NE}
\class{E}
\class{AM}		
\class{MA}
\class{NP}
\class{DNP}
\class{UP}
\class{P}
\class{RP}
\class{BPP}
\class{ZPP}
\class{EXPSPACE}
\class{coNP}
\class{coRP}
\class{coAM}
\class{PH}
\class{IP}
\class{PCP}
\class{MIP}

% operator classes.
\class{BP}

% these commands should be used in math mode - $ $
\newcommand{\SHARPP}{{\#\rm{P}}}
\newcommand{\PARITYP}{{\oplus\rm{P}}}

% math operators...
\DeclareMathOperator{\poly}{poly}
\DeclareMathOperator{\Majority}{Majority}
\DeclareMathOperator{\quasipoly}{quasi-poly}
\DeclareMathOperator{\polylog}{poly-log}
\DeclareMathOperator{\superpoly}{super-poly}
\DeclareMathOperator{\DTISP}{DTISP}
\DeclareMathOperator{\DSPACE}{DSPACE}
\DeclareMathOperator{\DTIME}{DTIME}
\DeclareMathOperator{\NSPACE}{NSPACE}
\DeclareMathOperator{\NTIME}{NTIME}
\DeclareMathOperator{\BPTIME}{BPTIME}
\DeclareMathOperator{\RTIME}{RTIME}
\DeclareMathOperator{\ZPTIME}{ZPTIME}
\DeclareMathOperator{\BPSPACE}{BPSPACE}
\DeclareMathOperator{\RSPACE}{RSPACE}
\DeclareMathOperator{\ZPSPACE}{ZPSPACE}


% Complexity class
\newcommand{\CC}{\mathcal{C}}


% \lecture{number}{date}{title}{scribe}
\newcommand{\lecture}[4]{
\noindent
\fbox{
\begin{minipage}{6.2in}
  {\bf CS 880: Pseudorandomness and Derandomization} \hfill #2
  \begin{center}
    {\Large Lecture #1: #3} \\[3mm]
  \end{center}
Instructors: Holger Dell and Dieter van Melkebeek \hfill Scribe: #4
\end{minipage}
}
\bigskip

\bigskip
}
% \homework{number}{date}
\newcommand{\homework}[2]{
\noindent
\fbox{
\begin{minipage}{6.2in}
  {\bf CS 880: Pseudorandomness and Derandomization} \hfill #2
  \begin{center}
    {\Large Homework #1} \\[3mm]
  \end{center}
Instructors: Holger Dell and Dieter van Melkebeek \hfill
\end{minipage}
}
\bigskip

\bigskip
}

% add DRAFT to your document %
\newcommand{\draft}[0]{
\begin{center}
	{\bf \Large {\sc DRAFT} }
\end{center}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% theorem environment
%% This package replaces amsthm. (load amsmath and hyperref first)
\RequirePackage[amsmath,hyperref,thmmarks]{ntheorem}

\theoremseparator{.}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{fact}[theorem]{Fact}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
% Use this for non-trivial definitions:
\newtheorem{definition}{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{exercise}{Exercise}
\newtheorem{construction}{Construction}

\theoremstyle{empty}
\renewtheorem{theorem*}{Theorem}
\renewtheorem{lemma*}{Lemma}
% use \begin{theorem*}[Theorem 12] to get "Theorem 12"
% (useful for restating theorems)

\theoremstyle{plain}
\theorembodyfont{\normalfont}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{conjecture}[theorem]{Conjecture}

\theoremstyle{nonumberplain}
\theoremheaderfont{\normalfont\itshape}
\theorembodyfont{\normalfont}
\newtheorem{claim}{Claim}
\theoremsymbol{\ensuremath{\square}}
\newtheorem{proof}{Proof}
\theoremstyle{empty}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% Add references to previous lectures.
% For example, to reference a definition with label def:bla in
% lecture 3, simply use \ref{lect03:def:bla}
%
% Note: this will only work if lecture 3 can be found in the file 
% ../03/lecture03.tex AND has been compiled.

\usepackage{pgffor} % for for loops
\usepackage{xr} % for references to previous lectures

\foreach \n in {1,...,9}{%
\externaldocument[lect0\n:]{../0\n/lecture0\n}%
}
\foreach \n in {10,...,29}{%
\externaldocument[lect\n:]{../\n/lecture\n}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
