% ****************************************************************
% FROM P-TAC paper
%
\setlength{\headheight}{0.25in}
\setlength{\headsep}{0.25in}
\setlength{\parskip}{\medskipamount}
% ----------------
% STRUTS
% HORIZONTAL STRUT.  One argument (width).
\newcommand{\hstrut}[1]{\hspace*{#1}}
% VERTICAL STRUT. Two arguments (offset from baseline, height).
\newcommand{\vstrut}[2]{\rule[#1]{0in}{#2}}
% ----------------
\columnsep=0.25in
\setlength{\topmargin}{-0.5in}
\setlength{\textheight}{9in}
\setlength{\textwidth}{6.75in} %\setlength{\textwidth}{6in}
\addtolength{\oddsidemargin}{-0.875in} 
%\renewcommand{\baselinestretch}{1.2}
%\pagestyle{plain}
% 
%**********************************************************************
%mssymb is obsolete, using amssym.def and amssym.tex instead
%\input mssymb                                 
\input amssym.def
\input amssym.tex
%\input /jj/kt/tex/fixqmsfonts
%\input /jj/kt/tex/laktex
%\input /jj/kt/tex/illustrations
\input fixqmsfonts
\input laktex
\input illustrations %from srco

%%%%%% Commutative diagrams
%%
%\input /jj/ariola/diagrams/diagrams
%\input /jj/ariola/diagrams/prooftree
\input diagrams
\input prooftree
%%%%%% Change size of diagrams
%%
\CellSize=2em

%%%%%%%%% IDRAW MACROS FROM SHAIL
\input{psadobe}  %in srco this is compatible.

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

%\def\illustrationfileprefix{/fs/abp/ariola/CONFLUENCE/PS/}
\def\illustrationfileprefix{/home/www/csg-memos/CSG-321/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{\ioreduces}[1]{%
{\tiny $\stackrel{\nearrow\llap{\mbox{$\rightarrow$}}}
{\cal #1}$}%
}
\newcommand{\frag}{\displaystyle\frac}
\renewcommand{\baselinestretch}{1.3}
%\setlength{\topmargin}{0.0in}
%\setlength{\textwidth}{6.3in}
%\setlength{\oddsidemargin}{0.0in}
%\setlength{\textheight}{8.2in}


%\def\illustrationfileprefix{/jj/arvind/PS/}

%%%%%% 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}}

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

% SUBCASE ENVIRONMENT
\newcounter{subcase}
\newenvironment{mysubcases}%
{\begin{list}%
{{\em }\ \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 {\ }}

\newtheorem{mexample}[theorem]{Example}
\renewenvironment{example}{\begin{mexample}\rm}{\end{mexample}}

% 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{remark}[theorem]{Remark}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{conjecture}[theorem]{Conjecture}
%\newenvironment{proof}{{\em Proof:}}{\hfill\rule{2mm}{2mm}}
\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)
