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

\newcommand{\ednote}[1]{\footnote{\it #1}\message{ednote!}}
\newenvironment{note}{\begin{quote}\message{note!}\it}{\end{quote}}
\newenvironment{proof}{\trivlist \item[\hskip \labelsep{\bf 
Proof:}]}{\hfill $\Box$\endtrivlist}
\newenvironment{attempt}{\trivlist \item[\hskip \labelsep{\bf 
Proof attempt:}]}{\hfill $\Box$\endtrivlist}
\newenvironment{sketch}{\trivlist \item[\hskip \labelsep{\bf 
Proof sketch:}]}{\hfill $\Box$\endtrivlist}

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

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Judgments
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%% Chapter 1: Propositional Logic

\newcommand{\m}[1]{\mathsf{#1}}

% \newcommand{\jprop}{\mbox{\it prop}}
\newcommand{\jtrue}{\mbox{\it true}}
\newcommand{\jseemstrue}{\mbox{\it true?}}

\newcommand{\vd}{\null\mathrel{\vdash}}
\newcommand{\ddd}{\raisebox{0.2em}[1.1em]{$\vdots$}}

% \newcommand{\land}{\mathbin{\wedge}}
\newcommand{\limplies}{\mathbin{\supset}}
\newcommand{\ltrue}{\top}
% \newcommand{\lor}{\mathbin{\vee}}
\newcommand{\lfalse}{\bot}
\newcommand{\lequiv}{\mathbin{\equiv}}

\newcommand{\lred}{\mathrel{\raisebox{0.5em}{$\Longrightarrow_R$}}}
\newcommand{\lexp}{\mathrel{\raisebox{0.5em}{$\Longrightarrow_E$}}}
\newcommand{\lowerproof}[1]{\raisebox{-0.9em}{$#1$}}

\newcommand{\DD}{\mathcal{D}}
\newcommand{\EE}{\mathcal{E}}
\newcommand{\FF}{\mathcal{F}}

\newcommand{\up}{{\uparrow}}
\newcommand{\down}{{\downarrow}}

%%% Chapter 2: Proofs as Programs

\newcommand{\hastype}{\mathrel{:}}

\newcommand{\lam}{\lambda}
\newcommand{\oftp}{\mathord{:}}
\newcommand{\ldot}{\mathord{.}\;}

% alternate, concrete syntax
\newcommand{\fn}{\m{fn}\,}
\newcommand{\Arrow}{\Rightarrow}

\newcommand{\arrow}{\mathbin{\rightarrow}}

\newcommand{\fst}{\mbox{\bf fst}}
\newcommand{\snd}{\mbox{\bf snd}}
\newcommand{\cross}{\mathbin{\times}}

\newcommand{\unit}{\langle\,\rangle}
\newcommand{\one}{\mbox{\bf 1}}

% \newcommand{\inl}{\mbox{\bf inl}}
% \newcommand{\inr}{\mbox{\bf inr}}
\newcommand{\inl}{\mbox{\bf inl}}
\newcommand{\inr}{\mbox{\bf inr}}
\newcommand{\ccase}{\mbox{\bf case}}
\newcommand{\oof}{\mathrel{\mbox{\bf of}}}
\newcommand{\bbar}{\mathrel{\mid}}
\newcommand{\plus}{\mathbin{+}}

\newcommand{\abort}{\mbox{\bf abort}}
\newcommand{\zero}{\mbox{\bf 0}}

\newcommand{\red}{\mathrel{\Longrightarrow}_R}
\newcommand{\jtype}{\mbox{\it type}}

\newcommand{\nat}{\mathsf{nat}}
\newcommand{\z}{\mathsf{0}}
\newcommand{\s}{\mathsf{s}}

\newcommand{\of}{{:}}
\newcommand{\llet}{\mbox{\bf let}}
\newcommand{\iin}{\mathrel{\mbox{\bf in}}}

% \newcommand{\ian}[3]{\infer[{#3}]{#2}{#1}}

\newcommand{\jirr}{\mbox{\it irr}}

% Chapter 3: Proof Search
\newcommand{\seq}{\Longrightarrow}
\newcommand{\sq}{\longrightarrow}
\newcommand{\sqr}{\stackrel{R}{\sq}}
\newcommand{\sql}{\stackrel{L}{\sq}}

\newcommand{\Gammam}{\Gamma^{{}^{-}}}
\newcommand{\Cp}{C^{{}^{+}}}
\newcommand{\semi}{\mathrel{;}}

% Prolog
\newcommand{\unrep}[1]{\llcorner {#1}\lrcorner}
\newcommand{\rep}[1]{\ulcorner {#1}\urcorner}
\newcommand{\sqf}{\stackrel{f}{\sq}}
\newcommand{\focus}[1]{{\color{red}[#1]}}
\newcommand{\inv}[1]{{\color{blue}{#1}}}

% Substructural logic
\newcommand{\vvdash}{\seq}
\newcommand{\palign}[1]{\raisebox{-0.75em}{#1}}
\newcommand{\id}{\m{id}}
\newcommand{\against}{\mathrel{\#}}
\newcommand{\lover}{\mathbin{/}}
\newcommand{\lunder}{\mathbin{\backslash}}
\newcommand{\twist}{\mathbin{\circ}}
% \newcommand{\arrow}{\rightarrow}
\newcommand{\fuse}{\bullet}
\newcommand{\with}{\mathbin{\binampersand}}
\newcommand{\lolli}{\multimap}
\newcommand{\tensor}{\otimes}
\newcommand{\mi}[1]{\mbox{\it #1}}
\newcommand{\mc}[1]{\mathcal{#1}}
\newcommand{\um}[1]{\underline{\m{#1}}}
