%%% ====================================================================
%%%  @LaTeX-style-file{
%%%     author          = "David M. Jones",
%%%     version         = "2.00",
%%%     date            = "27 October 1993",
%%%     time            = "15:38:22 EDT",
%%%     filename        = "hilbaux.sty",
%%%     address         = "MIT Laboratory for Computer Science
%%%                        Room NE43-316
%%%                        545 Technology Square
%%%                        Cambridge, MA 02139
%%%                        USA",
%%%     telephone       = "(617) 253-5936",
%%%     FAX             = "(617) 253-3480",
%%%     checksum        = "23834 551 1154 15879",
%%%     email           = "dmjones@theory.lcs.mit.edu (Internet)",
%%%     codetable       = "ISO/ASCII",
%%%     keywords        = "latex, amslatex, ams-latex",
%%%     supported       = "yes",
%%%     docstring       = "This is an AMS-\LaTeX{} documentstyle
%%%                        option file containing some supplementary
%%%                        macros for typesetting Yuri Matiyasevich's
%%%                        book on ``Hilbert's Tenth Problem'' (MIT
%%%                        Press, 1993).  It's a mixed bag of
%%%                        miscellaneous bug fixes, kludges, and
%%%                        simple macros, but it might be of interest
%%%                        to someone.
%%%
%%%                        This and related files are available via
%%%                        anonymous ftp from theory.lcs.mit.edu in
%%%                        the directory pub/hilbert10.  See the file
%%%                        ``README'' in that directory for a list and
%%%                        description of what is available.
%%%
%%%                        The checksum field above contains a CRC-16
%%%                        checksum as the first value, followed by the
%%%                        equivalent of the standard UNIX wc (word
%%%                        count) utility output of lines, words, and
%%%                        characters.  This is produced by Robert
%%%                        Solovay's checksum utility.",
%%%  }
%%% ====================================================================

\def\cprime{'}

\def\Cprime{'}

\def\bibcyr{\iflanguage{russian}%
                {\selectlanguage{russian}}%
                {\selectlanguage{russiant}}%
}

% \numberwithin{equation}{section}

% \def\eqnum#1{\eqno (#1)}

% \def\eqnum#1{%
%     \expandafter\label\expandafter{\the\c@chapter.\the\c@section.#1}%
% }

\def\kludge#1{#1}

\let\bar\overline

\def\qqquad{\hskip3em\relax}
\def\qqqquad{\hskip4em\relax}

\def\tuple#1{\langle#1\rangle}

\def\bigtuple#1{\left\langle#1\right\rangle}

\renewcommand{\land}{\mathbin{\&}}

\def\Land{\mathop{\vcenter{\hbox{\large$\land$}}}}

\mathchardef\divides="226A

\renewcommand{\Re}{{\Bbb{R}}}

\newcommand{\notdivides}{\mathbin{\nmid}}

\let\implies\Longrightarrow

\let\Index\text

\def\indexbarD{\bar{\rm D}}
\def\indexbarL{\bar{\rm L}}
\def\indexbarR{\bar{\rm R}}
\def\indexbarS{\bar{\rm S}}

%%  \def\stateq{{\rm q}}

\def\state#1{{\rm#1}}

\def\Alpha{{\rm{A}}}

\def\Beta{{\rm{B}}}

\def\Epsilon{{\rm{E}}}

\def\Eta{{\rm{H}}}

\def\Iota{{\rm{I}}}

\def\Zeta{{\rm{Z}}}

\def\Mu{{\rm M}}

\def\Tau{{\rm T}}

\def\Chi{{\rm{X}}}

\def\floor#1{\lfloor#1\rfloor}

\def\cvdots#1{\setbox0=\hbox{${}#1{}$}\hbox to\wd0{\hss$\vdots$\hss}}

\def\bmit#1{\text{\m@th\boldmath$#1$}}

\def\Exists{\exists\@quantifier}

\def\Forall{\forall\@quantifier}

\def\@quantifier#1.{%
    \hbox{\advance\medmuskip-.5\thinmuskip
          \advance\thickmuskip-.5\thinmuskip
          $\displaystyle#1$%
    }%
    \@ifnextchar[{\,}%
        {\@ifnextchar\Forall{\,}{\@ifnextchar\Exists{\;}{}}}%
}

%% \newtheorem{thesis}{}

%% \def\thethesis{}

\def\lefteqn#1{\hbox to 1em{$\displaystyle #1$\hss}}

%% This is of limited usefulness.

\def\numbered#1{\def\labelenumi{\csname @#1\endcsname\c@enumi.}%
                \def\theenumi{\csname @#1\endcsname\c@enumi}}

\def\problemequation{%
    \if@newlist\else
        \par
        \vskip-\lastskip
    \fi
    \tagsleft@true
    \def\tagform@##1{\maketag@@@{\ignorespaces##1\unskip}}%
    \abovedisplayskip=0pt
    \belowdisplayskip=0pt
}

\def\endproblemequation{\par\vskip-\lastskip}

\def\problemtag{%
    \refstepcounter{problems}%
    \tag{\labelproblems}%
}

%% Now, this is really dangerous.  The problem is that in certain
%% equations (notably 6.3.12, 6.4.21 and 6.6.4), the equation numbers
%% overlap their equations by quite a bit.  Unfortunately, there
%% doesn't seem to be a simple way to fix this.  So, I'm going to
%% redefine one of AMS-LaTeX's equation environments to add a hook
%% that will allow me to move the equation number up or down
%% vertically.  My modifications are based on amstex.sty v1.1
%% <21-JUN-1991>.  They will almost surely cause problems if used with
%% any other version of amstex.sty.  This will only work in the gather
%% or equation environments.

%% Usage: \adjusteqnnumber <dimen>
%% This will shift the equation number of the next equation or gather
%% environment by <dimen> in the vertical direction in the next
%% \equation or \gather environment.

\newdimen\@adjustequation
\@adjustequation\z@

\def\adjusteqnnumber{\global\@adjustequation=}

\def\@moveeqnnumber{%
    \ifdim\@adjustequation=\z@\else
        \vskip\@adjustequation
        \global\@adjustequation\z@
    \fi
}

%% The only change to this definition is the addition of
%% \@moveeqnnumber to the 17th line.

\@namedef{gather \space}#1{%
    \gmeasure@{#1}%
    \global\dt@ptrue
    \tabskip\@centering
    \halign to\displaywidth\bgroup
        \ifst@rred\nonumber\else\global\@eqnswtrue\fi
        \hfil\strut@
        \setboxz@h{\global\tag@false$\m@th\displaystyle{##}$}%
        \global\gwidth@\wdz@\boxz@
        \hfil
       &\setboxz@h{\strut@{##}}%
        \dimen@\displaywidth
        \advance\dimen@-\gwidth@
        \ifdim\dimen@>\tw@\wdz@
            \llap{\boxz@}%
        \else
            \llap{\vtop{\@moveeqnnumber\normalbaselines\null\boxz@}}%
        \fi
        \tabskip\z@skip\crcr
        #1%
}


% The pmatrices in chapter 2 are too wide (particularly in equation
% (2.3.3), so we introduce a variant of \pmatrix with 0 extra spacing
% between the rows.  This still doesn't completely solve the problem,
% but it helps.  (Besides, I think those particular matrices look
% better this way.

\@namedef{pmatrix*}{\arraycolsep=0pt\left(\matrix}
\@namedef{endpmatrix*}{\endmatrix\right)}

\def\bolddots{\hbox{\Large$\dots$}}

%% The \dots comman seems to produce far too much space in text mode,
%% so we redefine \tdots@.

\def\tdots@{\unskip\relaxnext@
 \DN@{$\m@th\@ldots\,
   \ifx\next,$\else\ifx\next.$\else\ifx\next;$\else
   \ifx\next:$\else
   \ifx\next?$\else\ifx\next!$\else$ \fi\fi\fi\fi\fi\fi}%
 \ \FN@\next@}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                                                    %%
%%                          OPERATOR NAMES                            %%
%%                                                                    %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def\newoperatorname#1{\expandafter\@ifdefinable\csname#1\endcsname
    {\@namedef{#1}{\operatorname{#1}}}}

% First, a couple of redefinitions

\let\surd\sqrt

\def\sqrt{\operatorname{sqrt}}

\def\div{\operatorname{div}}

\def\real{\operatorname{Re}}

\newoperatorname{abs}
\newoperatorname{Add}
\newoperatorname{AfterP}
\newoperatorname{AfterT}
\newoperatorname{arem}
\newoperatorname{Bernoulli}
\newoperatorname{Cantor}
\newoperatorname{Card}
\newoperatorname{Code}
\newoperatorname{Concat}
\newoperatorname{ECard}
\newoperatorname{ECode}
\newoperatorname{Elema}
\newoperatorname{Elemb}
\newoperatorname{Elem}
\newoperatorname{Equal}
\newoperatorname{Eq}
\newoperatorname{erank}
\newoperatorname{erankiter}
\newoperatorname{Even}
\newoperatorname{explog}
\newoperatorname{Format}
% \newoperatorname{GCD}
\newoperatorname{GElem}
\newoperatorname{grem}
\newoperatorname{iter}
\newoperatorname{itererank}
\newoperatorname{Less}
\newoperatorname{Li}
\newoperatorname{Min}
\newoperatorname{Mult}
\newoperatorname{NextP}
\newoperatorname{NextT}
\newoperatorname{NotEqual}
\newoperatorname{NotGreater}
\newoperatorname{Odd}
\newoperatorname{oper}
\newoperatorname{operord}
\newoperatorname{operordrank}
\newoperatorname{operrank}
\newoperatorname{Ordrank}
\newoperatorname{ord}
\newoperatorname{ordrank}
\newoperatorname{ordrankoper}
\newoperatorname{ordoper}
\newoperatorname{Ort}
\newoperatorname{Ortnorm}
\newoperatorname{PNotGreater}
\newoperatorname{PSmall}
\newoperatorname{Primenth}
\newoperatorname{Prime}
\newoperatorname{rank}
\newoperatorname{rankoper}
\newoperatorname{rankord}
\newoperatorname{rankordoper}
\newoperatorname{Real}
\newoperatorname{Repeat}
\newoperatorname{rem}
\newoperatorname{SCode}
\newoperatorname{SCod}
\newoperatorname{Small}
\newoperatorname{Solution}
\newoperatorname{Sum}
\newoperatorname{lcm}
\newoperatorname{unit}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                                                    %%
%%                             KEYWORDS                               %%
%%                                                                    %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%% Keywords present difficulties because many of them are already
%% defined as TeX macros (\if, \stop, \and and \do).  So, for
%% consistency's sake, I defined all the keyword macros with capital
%% letters.
%%
%% Getting proper spacing is also a problem.  Let's try making
%% keywords mathrels and see what happens.

%%  \def\keywordname#1{\mathop{\newmcodes@\kern\z@
%%   \keyword@font#1}\nolimits@}
%%
%%  \def\keyword@font{\mathgroup\bffam}

\def\keywordname#1{\mathrel{\newmcodes@\kern\z@
 {\bf{#1}}}}

\def\newkeyword#1{\@namedef{#1}{\keywordname{#1}}}

\def\newkeyword#1{\expandafter\@ifdefinable\csname#1\endcsname
    {\@namedef{#1}{\keywordname{#1}}}}

\def\While{\keywordname{while}}

\def\And{\keywordname{and}}

\def\Then{\keywordname{then}}

\def\Do{\keywordname{do}}

\def\Od{\keywordname{od}}

\def\Goto{\keywordname{goto}}

\def\Stop{\keywordname{stop}}

\def\If{\keywordname{if}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                                                    %%
%%                          MACHINE NAMES                             %%
%%                                                                    %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%% Machine names are given macro names starting with capital letters.
%% (Except for \STOP)

\def\machinename#1{\mathop{\newmcodes@\kern\z@
 {\sc{\lowercase{#1}}}}\nolimits@}

\def\newmachine#1{\expandafter\@ifdefinable\csname#1\endcsname
    {\@namedef{#1}{\machinename{#1}}}}

% \newmachine{Equal}
% \newmachine{Mult}
\newmachine{ADD}
\newmachine{Append}
\newmachine{Bin}
\newmachine{Copy}
\newmachine{Decode}
\newmachine{Dec}
\newmachine{Delete}
\newmachine{Double}
\newmachine{Erase}
\newmachine{EQUAL}
\newmachine{Find}
\newmachine{Inc}
\newmachine{Jump}
\newmachine{Last}
\newmachine{Left}
\newmachine{Mark}
\newmachine{MULT}
\newmachine{Neverstop}
\newmachine{New}
\newmachine{Next}
\newmachine{Notequal}
\newmachine{Notgreater}
\newmachine{Readnot}
\newmachine{Read}
\newmachine{Restore}
\newmachine{Right}
\newmachine{STOP}
\newmachine{Star}
\newmachine{Thereis}
\newmachine{Therewas}
\newmachine{Vacant}
\newmachine{Write}

% The definition of \pmod (as well as \pod and \mod) is buggy, since
% it uses \ifinner to decide upon spacing.  However, all of the
% AMS-LaTeX math environments are based on \halign, which processes
% things in restricted internal mode, so you always get the smaller
% spacing.  This can be fixed with \mathchoice.

\def\pmod#1{\allowbreak%
    \mathchoice{\mkern18mu}{\mkern8mu}{\mkern8mu}{\mkern8mu}%
 ({\operator@font mod}\,\,#1)}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                                                    %%
%%                      PICTURE MODE HACKING                          %%
%%                                                                    %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%  The following were useful for the two figures in Chapter 5.

% The \shiftu and \shiftd operators are just like \put, except they
% shift their boxes up or down by half a linewidth.

\long\def\shiftu(#1,#2)#3{\@killglue\dimen@=#2\unitlength
\advance\dimen@ -\@halfwidth
\raise\dimen@\hbox to \z@{\kern
#1\unitlength #3\hss}\ignorespaces}

\long\def\shiftd(#1,#2)#3{\@killglue\dimen@=#2\unitlength
\advance\dimen@ \@halfwidth
\raise\dimen@\hbox to \z@{\kern
#1\unitlength #3\hss}\ignorespaces}

\def\plabel{\@ifnextchar [{\@plabel}{\@plabel[l]}}

\def\@plabel[#1](#2,#3)#4{%
    \put(#2,#3){\makebox(0,0)[#1]{\enskip#4\enskip}}%
}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                                                    %%
%%                    EQUATION LABEL HACKING                          %%
%%                                                                    %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%  \newwrite\@lablst
%%
%%  %% The following is based on the definition in latex.tex 2.09 <25
%%  %% March 1992>
%%
%%  \def\document{%
%%      \endgroup
%%      \@colht\textheight
%%      \@colroom\textheight
%%      \vsize\textheight
%%      \columnwidth\textwidth
%%      \@clubpenalty\clubpenalty
%%      \if@twocolumn
%%          \advance\columnwidth -\columnsep
%%          \divide\columnwidth\tw@
%%          \hsize\columnwidth
%%          \@firstcolumntrue
%%      \fi
%%      \hsize\columnwidth
%%      \linewidth\hsize
%%      \begingroup
%%          \@floatplacement
%%          \@dblfloatplacement
%%          \makeatletter
%%          \let\@writefile\@gobbletwo
%%          \@input{\jobname.aux}%
%%      \endgroup
%%      \if@filesw
%%          \immediate\openout\@mainaux=\jobname.aux
%%          \immediate\write\@mainaux{\relax}%
%%          \immediate\openout\@lablst=\jobname.lbl
%%      \fi
%%      \csname process@table\endcsname
%%      \let\glb@currsize\@empty  %% Force \baselineskip initialisation.
%%      \def\do##1{\let ##1\@notprerr}%
%%      \@preamblecmds
%%      \let\do\noexpand
%%      \@normalsize
%%      \everypar{}%
%%      \@noskipsecfalse
%%  }

\let\eqnum\@gobble

\def\eqlabel#1{\label{eq:#1}}

%%  \def\eqlabel#1{%
%%      \@bsphack
%%      \if@filesw
%%          \begingroup
%%              \let\thepage\relax
%%              \def\protect{\noexpand\noexpand\noexpand}%
%%              \def\@tempa{\write\@auxout{\string\newlabel{eq:#1}%
%%              {{\@arabic\c@chapter.\@arabic\c@section.\@currentlabel}%
%%                   {\thepage}}}}
%%          \expandafter\endgroup\@tempa
%%          \if@nobreak\ifvmode\nobreak\fi\fi
%%      \fi
%%      \@esphack
%%  }

\def\eqref#1{\@nomath\eqref%
    \write\@lablst{eq:#1}%
    \rom{\tagform@{\ref{eq:#1}}}%
}

%%  \def\eqref#1{%
%%  \rom{\tagform@{\eqref@{eq:#1}}}}
%%
%%  \def\eqref@#1{\@ifundefined{r@#1}{{\bf #1}\@warning
%%     {Reference `#1' on page \thepage \space
%%      undefined}}{\edef\@tempa{\@nameuse{r@#1}}%
%%      \edef\@tempa{\expandafter\@car\@tempa \@nil}\expandafter
%%      \eqref@@\@tempa\@nil\null}}
%%
%%  \def\eqref@@#1.#2.#3\@nil{%
%%      \ifnum\c@chapter=#1\relax
%%          \ifnum\c@section=#2\relax
%%              #3%
%%          \else
%%              #2.#3%
%%          \fi
%%      \else
%%          #1.#2.#3%
%%      \fi}

%%  \let\eqlabel\@gobble

%\input cropmark.sty

%\@@@paperheight=9in
%\@@@paperwidth=7in

\endinput
