%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%INSTRUCTIONS to the scribe:
%1) "Packages" and "Macros" section: ignore whatever is there already
%2) "Scribe" section: 
%2.a) Enter your details here
%2.b) If you happen to use a package that is not already included (e.g., TikZ) or define new macros, please do it there. 
%     To make your life easy, I have already defined most objects (sets, algorithms etc) you might need for the course that section: feel free to use them (see instruction there for how to).
%3) "Lecture Note" section: this is where you write your lecture notes. Some dummy text which will help you familiarise yourself with the macros is already present
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\documentclass[a4paper,12pt]{exam}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Packages
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{amssymb}%Required for \mathbb
\usepackage{amsmath}%Required for \boldsymbol
\usepackage{amsthm}%Theorem/Definition environment; required for \theoremstyle
\usepackage{mathtools}%mathrsfs, used in DeclaredPairedDelimiters
\usepackage{etoolbox}%Used for \forcsvlist
\usepackage{xspace}%Automated spacing while defining commands
\usepackage{xargs}%Required for \newcommandx 
\usepackage{xstring}%Required for \If* commands
\usepackage[pagebackref=true]{hyperref}%Clickable references; back ref in references 
\usepackage[capitalise,noabbrev]{cleveref}%Easier referencing 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%End of Packages
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Macros
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Batching Engine
%Designed based on tex.stackexchange posts 39380, 20096, 203513 and 513184
%Note: things are case-senstive
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Used to define all "redundant" macros
\makeatletter
\newcommand\InitiateObject[3]{
	%Purpose: Level-1 macro used for initiating an object, i.e., it defines the object's standalone (\Declare<ObjectName>) and batch (\Batch<ObjectName>) macros
	%Syntax: \InitiateObject{<ObjectName>}{<Prefix>}{<TextType>} 
	%E.g.: \InitiateObject{set}{s}{\mathcal}, which allows defining `set' macros of the form \s* (e.g., \sH in the MWE below) using \Declareset command below.
	\expandafter\newcommand\csname Declare#1\endcsname[1]{
		%Purpose: Level-2 macro which defines the standalone command \Declare<ObjectName>
		%Syntax: \Declare<ObjectName>{<Suffix>}
		%E.g.: \Declareset{H}, which defines the macro \sH
		%WARNING: Since \def is used, an already-existing command will be *overwritten*; for safety, use \newcommand instead.
		\expandafter\def\csname#2##1\endcsname{
			%Purpose: Level-3 macro, that actually defines the instances of an object
			%Syntax: \<Prefix><Suffix>, which is compiled into \TextType{\Suffix}
			%E.g., \sH, which is compiled into \mathcal{H}
			%			Declared #1##1
			\ensuremath{#3{##1}}
		}
	}
	\expandafter\newcommand\csname Batch#1\endcsname[1]{
		%Purpose: Level-2 macro which defines the batch command \Batch<ObjectName>
		%Syntax: \Batch<Objectname>{<Suffixes in CSV>}
		%E.g.: \Batchsets{H,I}, which calls \Declareset{H} and \Declareset{I} which, in turn, defines the macros \sH and \sI.
		%Attempt using for
		\@for\@Suffix:=##1\do{
			\expandafter\expandafter\csname Declare#1\endcsname\expandafter{\@Suffix}
		}
	}
}
\newcommand\InitiateObjects[1]{
	\@for\@Object:=#1\do{
		\expandafter\InitiateObject\@Object
	}
}%Batch-initiate 1-st level macro
\makeatother

%Delimiter with auto-adjusted \left \right (courtesy: egreg, tex.stackexchange post 225562)
\newcommand{\DeclareAutoPairedDelimiter}[3]{%
	\expandafter\DeclarePairedDelimiter\csname Auto\string#1\endcsname{#2}{#3}%
	\begingroup\edef\x{\endgroup
		\noexpand\DeclareRobustCommand{\noexpand#1}{%
			\expandafter\noexpand\csname Auto\string#1\endcsname*}}%
	\x}

%Sets, sequences...
\newcommandx{\seq}[3][1={,}]{#2#1\ldots#1#3} %A sequence of form a,...,b or in general a op ... op b
\DeclareAutoPairedDelimiter{\Set}{\{}{\}} %A set of the form {a}
\newcommandx{\Seq}[2]{\Set{\seq{#1}{#2}}} %A sequence of the form {a,...,b}
\newcommandx{\tuple}[2]{(\seq{#1}{#2})} %A tuple of the form (a,...,b)
\DeclareAutoPairedDelimiter{\Tuple}{(}{)} %A tuple
\newcommandx{\range}[2]{\left[#1,#2\right]} %[a,b] denotes integers a,a+1,...,b-1,b
\newcommandx{\str}[1][1=*]{\Set{0,1}^{#1}} %String

%Unary Operators
\DeclareAutoPairedDelimiter{\card}{\lvert}{\rvert} %\card{}: Cardinality of a set |.|
\DeclareAutoPairedDelimiter{\abs}{\lvert}{\rvert} %\abs{}: Absolute value |.|
\DeclareAutoPairedDelimiter{\size}{\lvert}{\rvert} %\size{}: size/length of a string |.|
\DeclareAutoPairedDelimiter{\norm}{\lvert\lvert}{\rvert\rvert} %\norm{}: Norm
\DeclareAutoPairedDelimiter{\ceil}{\lceil}{\rceil} %\ceil{}: Ceiling 
\DeclareAutoPairedDelimiter{\floor}{\lfloor}{\rfloor} %\floor{}: Floor
\DeclareAutoPairedDelimiter{\dot}{\langle}{\rangle} %\abs{}: dot product
\DeclareAutoPairedDelimiter{\round}{\lfloor}{\rceil} %\round{}: Rounding function
\DeclareAutoPairedDelimiter{\ensemble}{(}{)} %An ensemble
\DeclareAutoPairedDelimiter{\IP}{\langle}{\rangle} %\abs{}: dot product

%Binary operators
\newcommandx{\aCb}[2]{\left(\dfrac{#1}{#2}\right)} %The Legendre/Jacobi symbol
\newcommandx{\oand}{\wedge} %Logical and
\newcommandx{\oAND}{\big\wedge} %Logical and
\newcommandx{\oor}{\vee} %Logical or
\newcommandx{\oOR}{\big\vee} %Logical or
\newcommandx{\oxor}{\oplus}
\newcommandx{\oXOR}{\big\oplus}
\newcommandx{\cross}{\times} %AxB
\newcommandx{\union}{\cup} %Union of sets
\newcommandx{\inter}{\cap} %Intersection of sets
\newcommandx{\Union}{\bigcup} %Union in equations
\newcommandx{\Inter}{\bigcap} %Intersection in equations

%Misc Math
\newcommandx{\out}{\leftarrow} %Output <-
\newcommandx{\tuo}{\rightarrow} %Output ->
\newcommandx{\ST}{\mid} %Such that
\newcommandx{\given}{|} %Given (conditional probability)
\newcommandx\args{{(\cdot)}}%Argument placeholder for a function/algorithm
\newcommandx\poly{\mathbf{poly}\xspace} %Polynomial functions
\newcommandx\polylog{\mathbf{polylog}\xspace} %Poly-log functions
\newcommandx\qpoly{\mathbf{quasipoly}\xspace} %Poly-log functions
\newcommandx\negl{\mathbf{negl}\xspace} %Negligible function
\newcommandx\expn{\mathbf{exp}\xspace} %Exponential function

%Misc
\newcommand{\tbox}[1]{\noindent\fbox{\parbox{\textwidth}{#1}}}%Box for assignments/lecture notes

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%End of Macros
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Scribe 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%Add your details below:
\def\scribe{Your name (Roll no)}
\def\lectureno{3.14}
\def\lecturedate{15/Aug/1947}
%Add your packages below

%Add your Macros below

%INSTRUCTIONS to initiate your *objects* and instances of these objects
%1) I have already initiated below a set of objects that will be frequently used in the coures: sets, algorithms, classes etc. 
%2) To add an object, say, multiset,  add a row "{multiset}{ms}{\bar}". Here "multiset" is the type of the object; "ms" is the prefix you will use to invoke instances of multiset type and "\bar" is the modifier/font type.
%3) To define instances A and B of multiset, now add \Batchmultiset{A,B}  and commands \msA and \msB will be automatically defined
\InitiateObjects{
	{set}{s}{\mathcal}, %Sets in calligraphic font, \s*
	{Algorithm}{A}{\mathsf}, %Algorithms in straight font, \A*
	{Problem}{P}{\mathrm},%Search/decision problems, \P*
	{Class}{C}{\mathbf}, %Complexity class in bold font, \C*
	{Group}{G}{\mathbb}, %Groups in blackboard bol font, \G*
	{graph}{g}{}, %Graphs in normal mode, \g*
	{function}{f}{\mathrm}, %Functions, polynomials in normal mode, \f*
	{Distribution}{D}{\mathrm}, %Distributions in normal mode, \D*
	{Matrix}{M}{\bar}, %Matrices in boldsymbol, \M*
	{vector}{v}{\bar} %Vectors in boldsymbol, \v*
}

%Declare *instances* of objects 
\Batchset{M,K,C}
\BatchAlgorithm{Gen,Enc,Dec,Eval,P,V}%Algorithms
\BatchProblem{GI,GNI,QR,QNR}%Problems
\BatchClass{co,P,NP,coNP,BPP,IP,PSPACE,TFNP,NTIME,DTIME,SZK,coSZK,AM,coAM,NC,poly}
\BatchGroup{G,Z,N,L,R,F}%Algebraic objects: group, integers, natural numbers etc.
\Batchgraph{G,H,C}%Graphs
\Batchfunction{f,view}
\BatchDistribution{M,C,X,Y,E}
\BatchMatrix{C,A,G,B}
\Batchvector{v,e,b,u,s,x,y,r,a,t,c}

%Declare local theorem-like environments
\theoremstyle{definition}
\newtheorem{definition}{Definition}
\newtheorem{exercise}{Exercise}
\newtheorem{homework}{Homework}
\newtheorem{oprob}{Open Problem}
\newtheorem{assumption}{Assumption}

\theoremstyle{theorem}
\newtheorem{theorem}{Theorem}
\newtheorem{claim}{Claim}
\newtheorem{lemma}{Lemma}

\begin{document}
	\tbox{
		\textbf{\noindent CS789: Introduction to Probabilistic Proof Systems} \hfill Spring 2025
		\begin{center}
			\huge \textbf{Lecture \lectureno }\\
			\large \lecturedate\\
		\end{center}
		Instructor: Chethan Kamath  \hfill Scribe:~\scribe
	}
	
	\pagestyle{headandfoot}
	\runningheader{}{}{}
	\runningfootrule
	\runningfooter{CS789}{Page \thepage\ of \numpages}{Lecture~\lectureno}
	\firstpagefootrule
	\firstpagefooter{CS789}{Page \thepage\ of \numpages}{Lecture~\lectureno}
	
%	\thispagestyle{headandfoot}


	
	%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	%Lecture Note
	%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	
	\section{Motivation}
	In this course we will study probabilistic proofs. 
	
	\section{Notation}
	Let's try to use the following notation for the objects we will use in our course.
	\begin{itemize}
		\item Sets: $\sM\union\sK$
		\item Complexity classes: $\CNP$, $\Cco\CNP$
		\item Problems: $\PGNI$, $\PGI$ 
		\item Matrices and vectors: $\MA$, $\vx$
		\item Algorithms: $\AP$, $\AV$
		\item Algebraic objects: $\GG$, $\GN$ (natural numbers), $\GZ$ (integers), $\GF$ (finite fields)
	\end{itemize}
	
	\section{Environments: Definitions, Lemmata, Proofs etc}
	
	\begin{definition}[Interactive Protocol]\label{def:IProtocol}
		Write your definition of interactive protocols here.
	\end{definition}

	\begin{definition}[Interactive Proofs]\label{def:IProof}
		Write your definition of interactive proofs here.
	\end{definition}

	\begin{lemma}[Chernoff Bound]\label{lem:Chernoff}
		Chernoff bound states that...
	\end{lemma}
	\begin{proof}
		Prove using Markov's inequality...
	\end{proof}

	\begin{oprob}\label{oprob:PNP}
		Is $\CP=\CNP$?
	\end{oprob}
	
	\begin{homework}\label{hw:Fact2}
		Prove that any two unequal degree-$d$ univariate polynomials over a finite field $\GF_q$ agree on at most $d$ points.
	\end{homework}
	
	You can use \verb|\cref| to refer to the above (do give meaningful label names). You can use \verb|\href| to refer to articles or papers online (e.g., StackExchange or Wikipedia)
	\begin{itemize}
		\item The class $\CIP$ doesn't change when we alter \cref{def:IProof,def:IProtocol} to allow for randomised provers.
		\item \href{https://en.wikipedia.org/wiki/Cram%C3%A9r%27s_theorem_(large_deviations)}{Cramér's theorem} is quite similar to \cref{lem:Chernoff}.
		\item \cref{oprob:PNP} is one of the \href{https://en.wikipedia.org/wiki/Millennium_Prize_Problems}{Millenium Prize} problems.
		\item \cref{hw:Fact2} is \emph{not} one of the \href{https://en.wikipedia.org/wiki/Millennium_Prize_Problems}{Millenium Prize} problems.
	\end{itemize}
	
	\section{Misc.}
	Do feel free to use the other macros defined, such as $\abs{-1}$, $\range{1}{n}$, $\Set{1,2,3}$, $\Seq{1}{3}$, $\IP{\AP,\AV}(x)$, $k\out\sK$ etc
	
\end{document}