%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%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 Content" 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{mdframed}%Required for boxed minipage
\usepackage{enumitem}%Required for controlling leftmargins 
\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{
	%Discrete math
	{set}{s}{\mathcal}, %Sets in calligraphic font, \s*
	{Algorithm}{A}{\mathsf}, %Algorithms in straight font, \A*
	{Problem}{P}{\textsc},%Search/decision problems, \P*
	{Class}{C}{\mathbf}, %Complexity class in bold font, \C*
	{key}{k}{}, %Keys in normal font, \k* (or: \mathrm)
	{Group}{G}{\mathbb}, %Groups in blackboard bol font, \G*
	{function}{f}{}, %Functions in normal mode, \f*
	{Distribution}{D}{\mathrm}, %Distributions in normal mode, \D*
	{Matrix}{M}{\overbar}, %Matrices in boldsymbol, \M*
	{vector}{v}{\overbar} %Vectors in boldsymbol, \v*
}

%Declare *instances* of objects 
%Declare instances of local objects 
\Batchset{S}
\BatchAlgorithm{GramSchmidt,LLL}%Algorithms
\BatchProblem{CVP,SVP,BDD,SIVP,SIS,LWE}%Lattice Problems
\BatchProblem{DLP}%Other Problems
\BatchClass{NP,coNP}
\Batchkey{}
\BatchGroup{G,Z,N,R,F}%Math objects
\Batchfunction{B}
\BatchDistribution{D}
\BatchMatrix{A,B,S}
\Batchvector{v,x,y,b,t,s}

%Misc
\newcommand\Adv{\mathsf{A}}%Adversary 

%Lattice related
\newcommand\LDimension{n}%Dimension of a lattice
\newcommand\LRank{m}%Number of vectors 
\newcommand\Lattice\Lambda
\newcommand\Trans{^t}
\newcommand\LMod{q}%Modulus

%Parameters
\newcommand\mlength{\ell}%Message length
\newcommand\hilength{\ell}%hash input length
\newcommand\ilength{n}%Input length
\newcommand\olength{m}%Output length
\newcommand\tparties{t}
\newcommand\secpar{n}%Security parameter. Alternatively \lambda
\newcommand{\overbar}[1]{\mkern 1.5mu\overline{\mkern-1.5mu#1\mkern-1.5mu}\mkern 1.5mu}%Courtesy: https://tex.stackexchange.com/questions/22100/the-bar-and-overline-commands
\newcommand{\ioverbar}[1]{\mkern 1.5mu\overline{\mkern-2.5mu#1\mkern1mu}\mkern 1.5mu}%Italic version of above

%Other mathematical notation
\newcommand\order{q}%Order of group
\newcommand\porder{p}%Prime order of group
\newcommand\RSAmod{N}%RSA modulus
\newcommand\LWEn{n}
\newcommand\LWEm{m}
\newcommand\simplies\Rightarrow%Short logical implication

%Declare local theorem-like environments
\theoremstyle{definition}
\newtheorem{definition}{Definition}
\newtheorem{claim}{Claim}
\newtheorem{lemma}{Lemma}
\newtheorem{fact}{Fact}
\newtheorem{cdefinition}{Candidate Defintion}
\newtheorem{idefinition}{Informal Definition}
\newtheorem{itheorem}{Informal Theorem}
\newtheorem*{itheorem*}{Informal Theorem}
\newtheorem{construction}{Construction}
\newtheorem{protocol}{Protocol}
\newtheorem{pseudocode}{Pseudocode}
\newtheorem{exercise}{Exercise}
\newtheorem{example}{Example}
\newtheorem{homework}{Homework}
\newtheorem{prob}{Problem}
\newtheorem{oprob}{Open Problem}
\newtheorem{pop}{Pop Quiz}
\newtheorem{assumption}{Assumption}

%Environment for defining proof sketch
\newenvironment{proofsketch}[1][]{
	\begin{proof}[Proof Sketch. #1]
	}{
		\vspace{-1em}
	\end{proof}
}

\newenvironment{bminipage}[1][0.45\textwidth]{
	\begin{center}
		\begin{minipage}{#1}
			\begin{center}
				\begin{mdframed}
				}{
				\end{mdframed}
			\end{center}
		\end{minipage}
	\end{center}
}

\newcommand\highlight{\underline}

\begin{document}
	\tbox{
		\textbf{\noindent CS758: Advanced Tools from Modern Cryptography (Lattices)} \hfill Spring 2026
		\begin{center}
			\huge \textbf{Lecture \lectureno }\\
			\large \lecturedate\\
		\end{center}
		Instructor: Chethan Kamath  \hfill Scribe:~\scribe
	}
	
	\pagestyle{headandfoot}
	\runningheader{}{}{}
	\runningfootrule
	\runningfooter{CS758}{Page \thepage\ of \numpages}{Lecture~\lectureno}
	\firstpagefootrule
	\firstpagefooter{CS758}{Page \thepage\ of \numpages}{Lecture~\lectureno}
	
	%	\thispagestyle{headandfoot}
	
	
	
	%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	%Lecture Note Content
	%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	\section{Motivation}
	In this course we will study lattices. 
	
	\section{Notation}
	Let's try to use the following notation for the objects we will use in our course.
	\begin{itemize}
		\item Sets: $\sS_1\union\sS_2$
		\item Complexity classes: $\CNP$, $\CcoNP$
		\item Problems: $\PSVP$, $\PCVP$ 
		\item Matrices and vectors: $\MA$, $\vx$
		\item Algorithms: $\AGramSchmidt$, $\ALLL$
		\item Algebraic objects: $\GG$, $\GN$ (natural numbers), $\GZ$ (integers), $\GF$ (finite fields)
	\end{itemize}
	
	\section{Environments: Definitions, Lemmata, Proofs etc}
	
	\begin{definition}[Lattice, Definition 1]\label{def:Lattice1}
		Write your definition of lattice here.
	\end{definition}
	
	\begin{definition}[Lattice, Definition 2]\label{def:Lattice2}
		Write your alternative definition of lattice here.
	\end{definition}
	
	\begin{lemma}[Unimodularity and inverses]\label{lem:Unimodular}
		If a matrix $\MA$ is unimodular, then so is its inverse.
	\end{lemma}
	\begin{proof}
		Prove using Cramer's rule.
	\end{proof}
	
	\begin{oprob}\label{oprob:PNP}
		Can we construct one-way function from $\PSVP$?
	\end{oprob}
	
	You can use \verb|\cref| to refer to the above (do give meaningful label names).
	
	\begin{homework}\label{hw:Fact2}
		Prove that \cref{def:Lattice1} implies \cref{def:Lattice2}.
	\end{homework}
	
	You can use \verb|\href| to refer to articles or papers online (e.g., StackExchange or Wikipedia)
	\begin{itemize}
		\item We will rely on two courses:
		\begin{enumerate}
			\item \href{https://cseweb.ucsd.edu/classes/sp07/cse206a/}{CS206A, Lattices Algorithms and Applications (Spring 2007)} by Daniele Micciancio, for Module I
			\item \href{https://people.csail.mit.edu/vinodv/CS294/}{CS294: Lattices, Learning with Errors and Post-Quantum Cryptography} by Vinod Vaikuntanathan, for Modules II and III
		\end{enumerate}
		\item \href{https://en.wikipedia.org/wiki/Cramer's_rule}{Cramer's rule} has a very cool geometric interpretation: see \href{https://www.youtube.com/watch?v=jBsC34PxzoM}{this} 3Blue1Brown video.
	\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}$, $s\out\sS$ etc

\end{document}