%*************************************************************
\input mssymb                                 
\input /jj/kt/tex/fixqmsfonts
\input /jj/kt/tex/laktex
\input /jj/kt/tex/illustrations

%%%%%% Commutative diagrams
%%
\input /jj/ariola/diagrams/diagrams
\input /jj/ariola/diagrams/prooftree

%%%%%% Change size of diagrams
%%
\CellSize=2em

%%%%%%%%% IDRAW MACROS FROM SHAIL
\input{psadobe}

\newenvironment{boxit}%
{\begin{tabular}{|p{\hlessm}|}
\hline
\begin{center}}%
{\end{center} \\
\hline
\end{tabular}}

\def\illustrationfileprefix{/bk/ariola/confluence/PS/}

%\illustration{filename}
\def\illustration#1{\begin{center}\psadobe{\illustrationfileprefix#1.ps}%
                       \end{center}}

% \illuswidth is used to set up boxes around illustrations.
\newlength{\illuswidth}
\setlength{\illuswidth}{\textwidth}
\addtolength{\illuswidth}{-7pt}

%%%%%%%%%%% END

\newcommand{\frag}{\displaystyle\frac}
\renewcommand{\baselinestretch}{1.3}
\setlength{\topmargin}{0.0in}
\setlength{\textwidth}{16cm}
\setlength{\oddsidemargin}{0.0in}
\setlength{\textheight}{8.2in}


%%%%%% From Meyer's lecture
%%
\newcommand{\TT}{\rlap{\rm t}\kern .5ex{\rm t}}
\newcommand{\FF}{\rlap{\rm f}\kern .5ex{\rm f}}
\newcommand{\mean}[1]{\left[ \! \left[ #1 \right]\! \right]}
\newcommand{\ap}{\sqsubseteq}
%

%%%%%% From Vinod
%%
\def\mjoin{\mkern -4mu}
\def\mbar{\raise .25pt \hbox{$\smash-$}}
\def\sra{\makebox[.5mm][l]{\mbar}\mbar\mjoin\mbox{$\rightarrow$}}
\def\dra{\mbar\mjoin\mbox{$\rightarrow$}\makebox[.5mm][r]{$\rightarrow$}}
\def\sla{\mbox{$\leftarrow$}\mjoin\mbar\makebox[.5mm][r]{\mbar}}
\def\dla{\makebox[.5mm][l]{$\leftarrow$}\mbox{$\leftarrow$}\mjoin\mbar}
\newcommand{\reduces}[2]{\mathrel{\mathop{\dra}\limits_{#1}^{#2}}}
\newcommand{\reduce}[2]{\mathrel{\mathop{\sra}\limits_{#1}^{#2}}}
\newcommand{\lreduces}[2]{\mathrel{\mathop{\dla}\limits_{#1}^{#2}}}
\newcommand{\lreduce}[2]{\mathrel{\mathop{\sla}\limits_{#1}^{#2}}}

\def\ddra{\mjoin\mbox{$\swarrow$}\makebox[.5mm][r]{$\swarrow$}}
\def\ssra{\makebox[.5mm][l]{}\mjoin\mbox{$\swarrow$}}
\def\ddla{\makebox[.5mm][l]{$\searrow$}\mbox{$\searrow$}\mjoin}
\def\ssla{\mbox{$\searrow$}\mjoin\makebox[.5mm][r]{}}

\newcommand{\dlreduces}[2]{\mathrel{\mathop{\ddra}\limits_{#1}^{#2}}}
\newcommand{\dlreduce}[2]{\mathrel{\mathop{\ssra}\limits_{#1}^{#2}}}
\newcommand{\drreduces}[2]{\mathrel{\mathop{\ddla}\limits_{#1}^{#2}}}
\newcommand{\drreduce}[2]{\mathrel{\mathop{\ssla}\limits_{#1}^{#2}}}


\newcommand{\blank}{\vspace{1ex}}   % generates a blank line in the output

% ``TIGHTLIST'' ENVIRONMENT (no para space between items, small indent)
\newenvironment{tightlist}%
{\begin{list}{$\bullet$}{%
    \setlength{\topsep}{0in}
    \setlength{\partopsep}{0in}
    \setlength{\itemsep}{0in}
    \setlength{\parsep}{0in}
    \setlength{\leftmargin}{1.5em}
    \setlength{\rightmargin}{0in}
    \setlength{\itemindent}{0in}
}
}%
{\end{list}
}

% Shail ``CASE'' ENVIRONMENT
\newcounter{case}
\newenvironment{mycases}%
{\begin{list}%
{{\em Case}\ \arabic{case}:}{\usecounter{case}%
                              \setlength{\rightmargin}{\leftmargin}}}%
{\end{list}}

% SUBCASE ENVIRONMENT
\newcounter{subcase}
\newenvironment{mysubcases}%
{\begin{list}%
{{\em SubCase}\ \arabic{case}.\arabic{subcase}:}{\usecounter{subcase}%
                               \setlength{\rightmargin}{\leftmargin}}}%
{\end{list}}

% CODE FONT (e.g. {\cf x := 0}).
\newcommand{\cf}{\tt}
% ----------------------------------------------------------------

% ----------------------------------------------------------------
% ID CODE DISPLAYS.
% Id code displays are enclosed between \bid and \eid.
% Most characters are taken verbatim, in typewriter font,
% Except
%  Commands are still available (beginning with \)
%    but use ` and ' instead of { and }
%  Math mode is still available (beginning with $)
%    but use ~ and ! for ^ and _

\outer\def\beginid{%
  \begin{list}{$\bullet$}{%
    \setlength{\topsep}{0in}
    \setlength{\partopsep}{0in}
    \setlength{\itemsep}{0in}
    \setlength{\parsep}{0in}
    \setlength{\leftmargin}{1.5em}
    \setlength{\rightmargin}{0in}
    \setlength{\itemindent}{0in}
  }\item[]
  \catcode`\{=12
  \catcode`\}=12
  \catcode`\&=12
  \catcode`\#=12
  \catcode`\%=12
  \catcode`\~=12
  \catcode`\_=12
  \catcode`\^=12
  \catcode`\~=7
  \catcode`\!=8
  \catcode`\'=2
  \catcode`\`=1
  \obeyspaces
  \obeylines \footnotesize\tt}

\outer\def\endid{%
  \end{list}
  }

{\obeyspaces\gdef {\ }}

% Use these for theorems, lemmas, proofs, etc.
%
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{fact}[theorem]{Fact}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{proposition}[theorem]{Proposition}

\newenvironment{proof}{\vspace{-0.4cm}{\em Proof:}}{\hfill $\clubsuit$}

%
% Use the following for definitions.
% \bigdef is for definitions to be set off by themselves; \smalldef is for
% definitions given in the middle of a paragraph.
%
\newenvironment{dfn}{{\vspace*{1ex} \noindent \bf Definition }}{\vspace*{1ex}}
\newcommand{\bigdef}[2]{\index{#1}\begin{dfn} {\rm #2} \end{dfn}}
\newcommand{\smalldef}[1]{\index{#1} {\em #1}}

%

% SHORT FORMS FOR ITALICIZED ``i.e.'', ``e.g.'', ``etc.''

\newcommand{\ie}{{\em i.e. \/}}
\newcommand{\vis}{{\em vis. \/}}
\newcommand{\eg}{{\em e.g. \/}}
\newcommand{\etc}{{\em etc. \/}}
\newcommand{\Eg}{{\em E.g. \/}}

\newcommand{\mv}[1]{\stackrel{\rightarrow}{#1}}

%%%%% Arrows in MV
%
%\newcommand{\mv}[1]{\stackrel{\longrightarrow}{#1}}

%%%%%%%%% If you want bigger space
%
%\renewcommand{\baselinestretch}{1.5}
%%%

\illustrationcorner = (1.125in, 10in)
