%THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
\usepackage[margin=1.6in]{geometry}
\usepackage{proof}
\setlength{\inferLineSkip}{4pt}
\usepackage{amsmath,amsthm,amssymb}
\usepackage{verbatim}
% \usepackage{hyperref}
\usepackage[breaklinks=true,
  colorlinks=true,
  citecolor=blue,
  linkcolor=blue,
  urlcolor=blue]{hyperref}
\usepackage{cleveref}
\usepackage{environ}
\usepackage[dvipsnames]{xcolor}
\usepackage{color}
\usepackage{microtype}
\usepackage{mathtools}
\usepackage{etoolbox}
\usepackage{scalerel}
\usepackage{centernot}

% font{
% begin palatino.sty
% copied from palatino.sty, except left ttdefault to CMTT
\renewcommand{\rmdefault}{ppl}
\renewcommand{\sfdefault}{phv}
% \renewcommand{\ttdefault}{pcr}
% end palatino.sty
% }font

%\newtheorem{theorem}{Theorem}
%\newtheorem{proposition}{Proposition}
%\newtheorem{lemma}{Lemma}
\theoremstyle{definition}
\newtheorem{task}{Task}
\newtheorem{codetask}[task]{Task}
\crefname{task}{Task}{Tasks}
\crefname{codetask}{Task}{Tasks}

% Modified from proof environment, lifted from amsthm (2.20.3) documentation
\newtoggle{sol}
\makeatletter
\newenvironment{solution}[1][]{\iftoggle{sol}{\par
    \pushQED{\qed}%
    \normalfont \topsep6\p@\@plus6\p@\relax
    \trivlist
  \item\relax
    {\bf Solution \thetask#1\@addpunct{:}}\hspace\labelsep\ignorespaces
  }{%
    \expandafter\comment%
  }
}{%
  \iftoggle{sol}{%
    \popQED\endtrivlist\@endpefalse
  }{%
    \expandafter\endcomment%
  }%
}
\makeatother

% For putting in the title field if we are generating solution PDFs
\newcommand{\solutions}{\iftoggle{sol}{ (Sample~Solutions)}{}}

\newenvironment{includeintemplate}{}{}
\newenvironment{noinclude}{}{}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Environments
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\newcommand{\ednote}[1]{\footnote{\it #1}\message{ednote!}}
\newenvironment{note}{\begin{quote}\message{note!}\it}{\end{quote}}
% use the amsmath proof environment instead of Frank's. —RAK
%\newenvironment{proof}{\trivlist \item[\hskip \labelsep{\bf
%Proof:}]}{\hfill $\Box$\endtrivlist}

\newtheorem{theorem}{Theorem}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{exercise}{Exercise}
%\theoremstyle{definition}
\newtheorem{remark}{Remark}
\def\abstractname{Synopsis}

\DeclareMathOperator{\fv}{fv} % free variables
\DeclareMathOperator{\dom}{dom} % domain

%%% Logic
\newcommand{\limplies}{\mathbin{\supset}}
\newcommand{\ltrue}{\top}
\newcommand{\lfalse}{\bot}

%%% Font selection
\newcommand{\mi}[1]{\mbox{\it #1}}
\newcommand{\mc}[1]{\mathcal{#1}}
\newcommand{\um}[1]{\underline{\m{#1}}}
\newcommand{\ms}[1]{\mathsf{#1}}
\newcommand{\mb}[1]{\mathbf{#1}}

%%% Colours
\newcommand{\red}[1]{{\color{Maroon}{#1}}}
\newcommand{\blue}[1]{{\color{MidnightBlue}{#1}}}

%%% Keywords
\newcommand{\ccase}{\mbox{\bf case}}

%%% Value and stepping judgments
\newcommand{\val}[1]{#1\ \mi{val}}
\newcommand{\step}{\mapsto}
\newcommand{\steps}{\mapsto^*}

%%% Judgments about stacks
% Typing
\newcommand{\stackt}[3]{#1 \div #2 \Rightarrow #3}
% Evaluate on a stack
\newcommand{\kev}[2]{#1 \rhd #2}
% Return to the stack
\newcommand{\kret}[2]{#1 \lhd #2}
% Empty stack
\newcommand{\eps}{\epsilon}

%%% Judgments about store machines
\newcommand{\steval}[3]{\ms{eval}\ #1\ #2\ #3}
\newcommand{\stevnc}[2]{\ms{eval}\ #1\ #2}
\newcommand{\stcell}[2]{{!}\ms{cell}\ #1\ #2}
\newcommand{\stcont}[3]{\ms{cont}\ #1\ #2\ #3}
% Closures
\newcommand{\stclos}[2]{\langle #1, #2 \rangle}

%%% Judgments about types
\newcommand{\istype}[1]{#1\ \mi{type}}

%%% Types
\newcommand{\Teprod}[2]{#1 \otimes #2} % eager products
\newcommand{\TeprodSchema}[2]{\bigotimes_{#1} #2} % finite eager products
\newcommand{\Tlprod}[2]{#1 \mathrel{\&} #2} % lazy products
\DeclareMathOperator*{\amper}{\scalerel*{\&}{\sum}}
\newcommand{\TlprodSchema}[2]{\amper_{#1} #2} % finite lazy producs
\newcommand{\Tunit}{\mathbf{1}} % unit
\newcommand{\Tvoid}{\mathbf{0}}
\newcommand{\Tzero}{\Tvoid} % synonym
\newcommand{\Tbool}{\mathbf{bool}}
\newcommand{\Tsum}[2]{\sum_{#1}#2}
\newcommand{\Tnat}{\mathbf{nat}}
\newcommand{\Tlist}[1]{#1\ \mathbf{list}}
\newcommand{\Trec}[2]{\rho(#1.\,#2)}
\newcommand{\Tstream}[1]{#1\ \mathbf{stream}}
\newcommand{\Tcont}[1]{#1\ \mathbf{cont}}
\newcommand{\Texists}[2]{\exists\, #1.#2}
\newcommand{\Tforall}[2]{\forall #1.#2}
\newcommand{\Tbox}[1]{\square #1}

%%% Terms
% Products
\newcommand{\pitem}[2]{#1 \hookrightarrow #2}

% Eager products
\newcommand{\epair}[2]{\langle #1, #2\rangle}
\newcommand{\etuple}[1]{\langle #1 \rangle}
\newcommand{\etupleSchema}[2]{\langle #1 \rangle_{#2}}
\newcommand{\eunit}{\langle\,\rangle}
\newcommand{\epcase}[3]{\ccase\ #1\ \{#2 \Rightarrow #3\}}

% Lazy products
\newcommand{\lsandwhich}{{\langle}\mkern-3.75mu{|}}
\newcommand{\rsandwhich}{{|}\mkern-3.75mu{\rangle}}
\newcommand{\lpair}[2]{\lsandwhich #1, #2\rsandwhich}
\newcommand{\ltuple}[1]{\lsandwhich #1 \rsandwhich}
\newcommand{\ltupleSchema}[2]{\lsandwhich #1 \rsandwhich_{#2}}
\newcommand{\lunit}{\lsandwhich\,\rsandwhich}
\newcommand{\outl}[1]{#1 \cdot \mathit{l}}
\newcommand{\outr}[1]{#1 \cdot \mathit{r}}
\newcommand{\out}[2]{#2 \cdot #1}

% Sums (binary case)
\newcommand{\inl}[1]{\mathit{l} \cdot #1}
\newcommand{\inr}[1]{\mathit{r} \cdot #1}
\newcommand{\zcase}[1]{\ccase\ #1\ \{\,\}}
\newcommand{\bscase}[5]{\ccase\ #1\ \{\inl{#2} \Rightarrow #3 \mid \inr{#4} \Rightarrow #5\}}

% Sums (general case)
\newcommand{\inj}[2]{#1 \cdot #2}
\newcommand{\gscase}[2]{\ccase\ #1\ \{#2\}}
\newcommand{\gscaseSchema}[4]{\ccase\ #1\ \{#2 \Rightarrow #3\}_{#4}}

% Boolean
\newcommand{\ifte}[3]{\mathbf{if}\ #1\ \mathbf{then}\ #2\ \mathbf{else}\ #3}
\newcommand{\btrue}{\mathbf{true}}
\newcommand{\bfalse}{\mathbf{false}}

% Fix construct
\newcommand{\fix}[2]{\mathbf{fix}(#1.#2)}

% Nats
\newcommand{\nz}{\mathsf{z}}
\newcommand{\ns}{\mathsf{s}}

% Lists
\newcommand{\lnil}{\mathsf{nil}}
\newcommand{\lcons}{\mathsf{cons}}

% Recursive types
\newcommand{\fold}[1]{\mathbf{fold}(#1)}
\newcommand{\unfold}[1]{\mathbf{unfold}(#1)}

% Continuations
\newcommand{\cont}[1]{\mathbf{cont}(#1)}
\newcommand{\letcc}[2]{\mathbf{letcc}(#1.#2)}
\newcommand{\throw}[2]{\mathbf{throw}(#1 \Rightarrow #2)}

% Abstract types
\newcommand{\abst}[2]{\langle #1, #2 \rangle}
\newcommand{\atcase}[4]{\ccase\ #1\ \{\abst{#2}{#3} \Rightarrow #4\}}

%%% Relations

% Syntactic equality
\newcommand{\syneq}{\equiv}
\newcommand{\nsyneq}{\centernot\syneq}

\newcommand{\defin}[1]{\textbf{\textsf{#1}}}
\newcommand{\rn}[1]{(\textsc{#1})}

% Representation
\newcommand{\rep}[1]{\ulcorner #1\mathstrut\urcorner}% Insert any additional macros for your assignment here.
% This file will be combined with the global macros.tex file
% and placed in the handout tarball.

\crefname{rule}{rule}{rules}
\newcommand{\stsusp}[2]{\ms{susp}\ #1\ #2}
\newcommand{\stfrloc}[1]{\ms{loc}\ #1}

\newcommand{\tSendC}[3]{\mathsf{send}\ #1\ #2;\ #3}
\newcommand{\tSendL}[3]{#1.#2;#3}
\newcommand{\tRecv}[3]{#1 \leftarrow \mathsf{recv}\ #2;\ #3}
\newcommand{\tClose}[1]{\mathsf{close}\ #1}
\newcommand{\tWait}[2]{\mathsf{wait}\ #1;#2}
\newcommand{\tCase}[1]{\mathsf{case}\ #1}
\newcommand{\tFwd}[2]{#1 \leftarrow #2}
\newcommand{\tCut}[3]{#1 \leftarrow #2;\ #3}

\newcommand{\str}{\mb{str}}
\newcommand{\cstk}{\mb{cstack}}
\renewcommand{\exp}{\mb{exp}}

\newcommand{\expr}{\ms{exp}}
\newcommand{\plu}{\ms{plus}}
\newcommand{\tim}{\ms{times}}
\newcommand{\eval}{\ms{eval}}
\newcommand{\eol}{\mathstrut\\\hline}
\newcommand{\uscore}{\mbox{\tt\char`\_}}

\usepackage{skull}

\newcommand{\magic}{\vspace*{-\dimexpr1.4\baselineskip}}

\newcommand{\proc}[2]{\ms{proc}\ (#1)\ #2}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: "hw9"
%%% End: