%%%%%%%%%%%%%%%%% NEWFORMAT.TEX %%%%%%%%%%%%%%%%%%
%
% These formats, which were originally written by 
% Prof. Carl de Boor, are found to be useful for
% mathematical typesetting. They have subsequently
% been modified and appended with other macros
% according to my own preference. The user should
% read the instructions before using some of the
% macros presented here, especially those con-
% cerning "table of contents", automatic sequencing
% of (sub)equations and chapters and sections.
%
%     --- Sze-Ping Wong  April 18, 1992.
%
%-----------------------------------------------------------------------------
%The FONTS
%
\font\ninerm=cmr9 \font\eightrm=cmr8
\font\ninei=cmmi9 \font\eighti=cmmi8
\font\ninesy=cmsy9 \font\eightsy=cmsy8
\font\ninebf=cmbx9 \font\eightbf=cmbx8
\font\ninett=cmtt9 \font\eighttt=cmtt8
\font\nineit=cmti9 \font\eightit=cmti8
\font\ninesl=cmsl9 \font\eightsl=cmsl8
%-----------------------------------------------------------------------------
% First, the large boldface fonts, and their families.
\font\hugetitlefont=cmbx10 scaled \magstep3
%
% Titlefont and bigtitlefont is used in both text and math modes, so we need the
% fonts for the subscripts too
% 
\font\titlefont=cmbx10 scaled \magstep1
\font\tscriptfont=cmbx7 scaled \magstep1
\font\tscriptscriptfont=cmbx5 scaled \magstep1
%
\font\bigtitlefont=cmbx10 scaled \magstep2
\font\btscriptfont=cmbx10
\font\btscriptscriptfont=cmbx5 scaled \magstep2
%  
% Now, the families of titlefont (\tf)and bigtitlefont (\btf)
\newfam\tffam 
\def\tf{\fam\tffam\titlefont}
  \textfont\tffam\titlefont
  \scriptfont\tffam\tscriptfont
  \scriptscriptfont\tffam\tscriptscriptfont
%
\newfam\btffam 
\def\btf{\fam\btffam\bigtitlefont}
  \textfont\btffam\bigtitlefont
  \scriptfont\btffam\btscriptfont
  \scriptscriptfont\btffam\btscriptscriptfont
%
%------------------------------------------------------------------------------
% Macros for generating a Table of Contents
%
\newif\ifwritetoc
\newwrite\toc
\newcount\tocpage
%
% Use \TOCbegin to initiate a table of contents, every chapter, section
% and subsection will be entered from this point onwards until \TOCend.
\def\TOCbegin{\immediate\openout\toc=toc.tex\writetoctrue
  \immediate\write\toc{\centerline{\titlefont Table of Contents}}
  \immediate\write\toc{\bigskip}}
%
% Use \TOChere where you want the table of contents to appear, #1 should
% be the expected number of pages of toc. Note: for roman page numbers,
% it should be negative.
\def\TOChere#1{\tocpage=\pageno\advance\pageno by #1}
%
% Use \TOCend to stop entering items to toc. It also resets the pagenumber
% to where the toc is meant to be. Hence it should be immediately
% followed by \input toc
\def\TOCend{\pageno=\tocpage\immediate\closeout\toc}

% The writing of the individual items can be done by the following macros:
% The first adds a line to the table of contents, the second adds an entry,
% with text on the left and the current pageno on the right and a leader fill
% in between. Change the second one locally for a different style.

\def\nexttoc#1{\write\toc{#1}}
\def\tocline#1#2{\nexttoc{\line{\hskip#2truecm #1\leaderfill \ \ \folio}}
                 \nexttoc{\vskip0.2cm}
		}
\def\leaderfill{\leaders\hbox to 1em{\hss.\hss}\hfill}
%------------------------------------------------------------------------------
% The typesetting of various kinds of headings and related entries
% in the table of contents.
%
% \jtem#1#2 is like \item#1#2, except #1 is flushed left instead of right
% and the amount of hangindent varies with the width of #1. 
\newdimen\jtemwidth
\def\jtem#1{\setbox0=\hbox{#1 }\jtemwidth=\wd0%
\par\hangindent\jtemwidth\noindent\rlap{#1\enspace}%
\hskip\jtemwidth\ignorespaces}
%
% These are for headings which are less than one line long. Good for
% unnumbered headings such as Abstract, Appendix and References.
\def\HeadJustify#1{\centerline#1}  % Use \centerline for centered headings,
                                 % and \leftline for flushed left headings.
\def\Heading#1{\bigskip\medskip\goodbreak
               \HeadJustify{{\bf\everymath{\bf}#1}}\nobreak\bigskip\nobreak
               \ifwritetoc\tocline{#1}0\fi}
\def\SubHeading#1{\bigskip\goodbreak
               \HeadJustify{{\bf\everymath{\bf}#1}}\nobreak\medskip\nobreak
               \ifwritetoc\tocline{#1}0\fi}
%
% These are like \Heading, except long titles will be wrapped around in the
% text. The line in toc.tex will still be a single like, so God help us.
% The headings will always be flushed left.
\def\LongHeading#1#2{
\bigskip\medskip\goodbreak{\hsize=5truein%
\jtem{\tf#1}{\tf\everymath{\tf}#2\par}\nobreak\bigskip\nobreak}
\ifwritetoc\tocline{#1 #2}0\fi}
%
\def\LongSubHeading#1#2{
\bigskip\goodbreak{\hsize=5truein%
\jtem{\bf#1}{\bf\everymath{\bf}#2\par}\nobreak\medskip\nobreak}
\ifwritetoc\tocline{#1 #2}0\fi}
%----------------------------------------------------------------------------
% Automatic sequencing and labelling of chapters, sections and subsections
%
\newcount\chapterno
\newcount\sectionno
\newcount\subsectionno
\chapterno=0
\sectionno=0
\subsectionno=0
% The appearance of chapter/section/subsection numbers:
\def\formchpt{Chapter \the\chapterno}
%\def\formsect{\the\chapterno.\the\sectionno.}
\def\formsect{\the\sectionno.}
%\def\formsubsect{\the\chapterno.\the\sectionno.\the\subsectionno.}
\def\formsubsect{\the\sectionno.\the\subsectionno.}
%
% Use \vfill\eject before using \Chapter, which produces the effect of
%   <4 truecm of empty space>
%   Chapter XXX
%   ***** ******** ******* ** ****
%   ********* * *****
\def\Chapter#1{\advance\chapterno by 1
  \sectionno=0\subsectionno=0\thmno=0\equationno=0
  \ifwritetoc\nexttoc{\vskip.6cm\leftline{{\bf\everymath{\bf}\the\chapterno. #1}
                      \leaderfill \ \ \folio}\vskip.3cm}\fi
  \vglue4truecm{\leftline{\btf\formchpt}
  \vskip1.0truecm{\noindent\hsize=5truein\raggedright
                  \btf\everymath{\btf}#1\par}}\vskip1.0truecm}
%
% These are for sections and subsections, only difference is in the vertical
% spacing before and after.
\def\Section#1{\advance\sectionno by 1\subsectionno=0\thmno=0\equationno=0
  \Heading{\formsect\ #1}}
%  \LongHeading{\formsect}{#1}}
%
\def\SubSection#1{\advance\subsectionno by 1
  \SubHeading{\formsubsect\ #1}}
%  \LongHeading{\formsect}{#1}}
%
% This has the same appearance as \Chapter except it does not have
% a chapter number. Used for "Abstract" and "Bibliography".
\def\Chapitre#1{
  \ifwritetoc\nexttoc{\vskip.5truecm\leftline{{\bf #1}
                      \leaderfill \ \ \folio}\vskip.1truecm}\fi
  \vglue4truecm{
  {\noindent\hsize=5truein\raggedright\btf\everymath{\btf}#1\par}}
  \vskip1.0truecm}
%
%----------------------------------------------------------------------------
% Automatic sequencing of Theorems, Lemmas, Corollaries, Propositions,
% and Definitions, and the remembering thereof.
% To typeset a theorem use \theorem, \Theorem or \thm, followed by the
% text of the theorem. End the theorem by \par or a blank line. Typesetting
% of Lemmas, Corollaries, Propositions and Definitions are the same, here 
% are the equivalent names in each case
% Theorems:     \theorem, \Theorem, \thm
% Lemmas:       \lemma, \Lemma, \lem
% Corollaries:  \corollary, \Corollary, \cor
% Propositions: \proposition, \Prop, \prop
% Definitions:  \definition, \Def, \defn    (\def is a TeX reserved word.)
% To remember the last theorem, lemma, corollary or proposition, use
% \thmremember\<name>. To recall, use \<name>. 
%
\newcount\thmno\thmno=0
%
% The appearance of the theorem number is currently set to:
%\def\formthm{\the\chapterno.\the\sectionno.\the\thmno}
\def\formthm{\the\sectionno.\the\thmno}
%
\def\theorem #1\par{
  \advance\thmno by 1\global\def\resultname{{Theorem~\formthm}}
  \Proclaim #1\par}
\def\lemma #1\par{
  \advance\thmno by 1\global\def\resultname{{Lemma~\formthm}}
  \Proclaim #1\par}
\def\corollary #1\par{
  \advance\thmno by 1\global\def\resultname{{Corollary~\formthm}}
  \Proclaim #1\par}
\def\proposition #1\par{
  \advance\thmno by 1\global\def\resultname{{Proposition~\formthm}}
  \Proclaim #1\par}
\def\definition #1\par{
  \advance\thmno by 1\global\def\resultname{{Definition~\formthm}}
  \Proclaim #1\par}
\let\thm=\theorem
\let\Theorem=\theorem
\let\lem=\lemma
\let\Lemma=\lemma
\let\cor=\corollary
\let\Corollary=\corollary
\let\prop=\proposition
\let\Prop=\proposition
\let\defn=\definition
\let\Def=\definition
% This is for exercises.
\def\exercise #1\par{
  \global\def\resultname{{\eightbf EXERCISE}} \Proclaim{{\ninerm#1}}\par}
% This is for an unnumbered Remark; text is in \rm.
\def\remark #1\par{
  \global\def\resultname{{Remark}}
  \Proclaim{{\rm#1}}\par}
\let\Remark=\remark
% This is what makes all of the above work. It is similar to \proclaim, 
% except the title is controlled by \resultname.
\outer\def\Proclaim #1\par{
  \medbreak\noindent{\bf \resultname.\enspace}{\sl#1}\par 
  \ifdim\lastskip<\medskipamount \removelastskip\penalty55\medskip\fi}
\def\thmremember#1{\ifshowlabel\marginal{\string#1}\fi
  \ifremembermode\immediate\write\mem{\def\string#1\chapterno{\chapterno.\formthm}}\fi
  \global\edef#1{{\resultname}}}
%----------------------------------------------------------------------------
% Automatic sequencing and labelling of equations, subequations
% and other items, and the saving thereof.
%
% \equationno is a numeric label (1,2,3,...) and starts with "1" at the
% beginning of each section. \subequationno is an alphabetical label 
% (a,b,c,...) and starts with "a" at the beginning of each group of
% equations for which sub-labelling is desired.
\newcount\equationno
\equationno=0
\newcount\subeqno
\subeqno='140  % This puts \subeqno one character before lower case 'a'.
%- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
% To label the next item, use  \listitem. This increments \equationno
% by 1, then puts that number, within parentheses, right there, in a form
% specified by  \formeq , with the present default being
% \def\formeq{\the\equationno}
% but which one could override, e.g.,
\def\formeq{\the\sectionno.\the\equationno}
%\def\formeq{\the\chapterno.\the\sectionno.\the\equationno}
%
% To label the next subitem, use  \listsubitem, or \beginlistsubitem if it is
% the first in a group. \beginlistsubitem increments \equationno by 1 and
% resets \subequationno so that it begins with "a". Both control sequences
% increment \equationno and \subequationno, then
% put those numbers, within parentheses, right there, in a form
% specified by  \formsubeq , with the present default being
\def\formsubeq{\the\sectionno.\the\equationno\char\the\subeqno}
%\def\formsubeq{\the\chapterno.\the\sectionno.\the\equationno\char\the\subeqno}
%- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
% To label the next equation, use  \equation .
% This uses \listitem to increment the current value of 
% \equationno by 1 and puts that value into the equation number display.
%
% To label the next subequation, use  \subequation, or  \beginsubequation
% if it is the first in a group.
% This uses \listsubitem, or \beginlistsubitem, to update the appropriate
% values of \subeqno and
% \equationno and puts those values into the subequation number display.
%
% To save the current  \equationno  for later use, use:  \remember\<name> 
% To save the current  \subeqno for later use, use: \subremember\<name>
% To save the next one to be set, use instead: \premember\<name>
% The analog of \premember for saving the next \subeqno is not implemented
% because the amount of usage of this control sequence does not justify
% the work involved.
% This will define the control sequence \<name> to be the sequence of
% character tokens which spells the current value of \equationno . It will
% also put <name> in small letters into the left margin, in case
% \showlabeltrue has been mentioned earlier. It will also save the
% definition, in the form  
%    \def\<name>\chapterno{\chapterno.<number>} 
% in the file    <filename>.\chapterno    for use in subsequent documents 
% if \remembermodetrue  has been mentioned earlier. 
% For this last thing to work, the following three lines should have
% appeared earlier in the file:
%-------------------------
%\remembermodetrue
%\newwrite\mem
%\immediate\openout\mem=<filename>.\chapterno
%-------------------------
% One would \input\<filename>.<chapterno> in subsequent chapter files and
% use the saved numbers via  \<name><chapterno>
%
% To use the saved (sub)equation number later in the present file, use \<name>

% the macro \marginal#1 used here is good for other marginal notes.
\def\marginal#1{{\vskip0pt\noindent\llap{\fiverm #1\ }
 \vskip-\baselineskip\noindent}}
\newif\ifshowlabel
\newif\ifremembermode
\def\remember#1{\ifshowlabel\marginal{\string#1}\fi
\ifremembermode\immediate\write\mem{\def\string#1\chapterno{\chapterno.\formeq}}\fi
\global\edef#1{{(\formeq)}}}
\def\premember#1{{\advance\equationno by 1\remember#1}\vskip-\baselineskip}
\def\lremember#1{{\advance\equationno by 1\remember#1}\vskip0pt}
\def\lastequation{\formeq}
\def\nextequation{{\advance\equationno by 1{}\formeq}}
\def\listitem{\global\advance\equationno by 1 (\formeq)}
\def\equation{\eqno{\listitem}}
%corresponding macros for sub-numbering
\def\subremember#1{\ifshowlabel\marginal{\string#1}\fi
\ifremembermode\immediate\write\mem{\def\string#1\chapterno{\chapterno.\formsubeq}}\fi
\global\edef#1{{(\formsubeq)}}}
\def\listsubitem{\global\advance\subeqno by '1 (\formsubeq)}
\def\beginlistsubitem{\global\advance\equationno by 1 
		      \global\subeqno='140 \listsubitem}
\def\subequation{\eqno{\listsubitem}}
\def\beginsubequation{\eqno{\beginlistsubitem}}
%---------------------------------------------------------------------------
% Macros for automatic sequencing of citations
% To turn on this feature, use \Citation. It will input the reference
% definitions file bbmem.tex, if it exists. The default is to (re)create
% a new bbmem.tex file from the current input. The disadvantage of this 
% default is that the old bbmem.tex will be destroyed. However, it
% can be overridden by using \Citation{\NoNewRefs}.
% To refer to a citation, use \Ref\<name>, where <name> is a name given to
% that citation. To define a citation, use \reference\<name>{<citation>}.
% It might be necessary to run TeX twice to get the references right.
%
% Here's more detail. \reference\<name>{<citiation>} actually does two
% things, it assigns a number \refno to <citation> and puts them right
% there in the form  \item{\formref}<citation>  and patches it with \medskip.
% If \newbbmemtrue, then it defines \<name> to be \formref in the file
% bbmem.tex. \formref, defined below, controls how the citation appears.
% The TeX control sequence \bye has been redefined to check for any undefined
% references detected in the input.
\newif\ifnewbbmem\newbbmemfalse
\newif\ifrefundef\refundeffalse
\newwrite\bbmem
%
% First, read in the predefined references, if any. If bbmem.tex does not
% exist, then create a new one.
\def\NoNewRefs{\newbbmemfalse}
\def\Citation#1{\message{Auto-Citation On.}\newbbmemtrue
  \ifx#1\NoNewRefs#1\message{No New References.}\fi
  \openin3=bbmem.tex
  \ifeof3\message{File bbmem.tex does not exist.}
    \else \input bbmem.tex \fi
  \closein3
  \ifnewbbmem
    \immediate\openout\bbmem=bbmem.tex
    \message{Creating New bbmem.tex file.}
  \fi
  \refundeffalse
}
\def\CitationOff{\ifrefundef
  \message{There are undefined citations. Might have to run TeX again.}
  \fi}
\def\bye{\vfill\eject\CitationOff\end}
%
\newcount\refno
\refno=0
\def\formref{[\the\refno]}
\def\memref#1{
  \ifshowlabel\marginal{\string#1}\fi
  \immediate\write\bbmem{\def\string#1{\formref}}
  \global\edef#1{\formref}
}
\def\reference#1#2{
  \advance \refno by 1 \ifnewbbmem\memref{#1}\fi
  \item{\formref}{\ignorespaces#2}\medskip
}
\def\Ref#1{\ifx#1\undefined\refundeftrue 
   \write16{Undefined citation \string#1} \hbox{[ ]}
 \else{#1}\fi}
%-----------------------------------------------------------------------
% These macros are useful for placing material precisely on the page
% using a grid that can be turned off eventually.

\def\tick#1/{\vrule width\gridwidth height0pt depth#1truecm}
\def\nexttick#1#2/{\hbox to #1truecm{\hfil\tick#2/}}
\newcount\tickcount
\newif\ifshowfigname \showfignametrue
\newdimen\gridwidth \gridwidth=0.4pt
\newif\ifshowgrid \showgridtrue
\def\point#1|#2|#3{\vbox to 0pt{\kern#1truecm
   \hbox{\kern#2truecm{#3}}\vss}\nointerlineskip}

% The macro
%        \gridbox#1/#2/#3
% builds a box vertically to #1truecm and horizontally to #2 truecm,
% overlays that box with gridlines exactly 1truecm apart and \gridwidth thick
% (hence invisible if \gridwidth=0pt), and puts the material #3 inside this box 
% in the sense that the macro \point a|b|{...} mentioned inside #3 places
% the material {...} in such a way that the upper left corner of {...} ends
% up  a  truecm down and  b  truecm to the right of the upper left corner of the
% box being made.
%
% TeX should be in vertical mode when calling on \gridbox. See its uses in
% \Figpls, \Figinbox, etc. in ~/ps/figure.tex

\def\gridbox#1/#2/#3{
\vbox to #1truecm{
#3
\ifshowgrid\tickcount=0
  \loop
   \vbox to 0pt{\kern\tickcount truecm\hrule width#2truecm height\gridwidth\vss}
   \nointerlineskip \advance\tickcount by 1
   \ifdim\tickcount pt<#1pt\repeat % Note: #1, #2 need not be integers
  \hbox to 0pt{\tickcount=1\tick#1/
  \loop\ifdim\tickcount pt<#2pt\nexttick1 #1/\advance\tickcount by 1\repeat\hss}
\else \vbox to 0pt{\hrule width#2truecm height0pt\vss}
\fi\vfil}\vfil}
%------------------------------------------------------------------------------
% From tbemacros.tex by A. Borde
% FRAMING text
\def\frame #1#2#3#4{\vbox{\hrule height #1pt%    TOP RULE
 \hbox{\vrule width #1pt\kern #2pt%              RULE AND SPACE ON LEFT
 \vbox{\kern #2pt%                               SPACE AT TOP
 \vbox{\hsize #3\noindent #4}%                   MATERIAL THAT WILL BE BOXED
 \kern #2pt}%                                    SPACE AT BOTTOM
 \kern #2pt\vrule width #1pt}%                   SPACE AND RULE ON RIGHT
 \hrule height0pt depth #1pt}}%,                 BOTTOM RULE

\def\fitframe #1#2#3{\vbox{\hrule height#1pt%    TOP RULE
 \hbox{\vrule width#1pt\kern #2pt%               RULE AND SPACE ON LEFT
 \vbox{\kern #2pt\hbox{#3}\kern #2pt}%           TOP, MATERIAL, BOTTOM
 \kern #2pt\vrule width#1pt}%                    SPACE AND RULE ON RIGHT
 \hrule height0pt depth#1pt}}%                   BOTTOM RULE

\def\shframe #1#2#3#4{\vbox{\hrule height 0pt%   NO TOP SHADOW
 \hbox{\vrule width #1pt\kern 0pt%               LEFT SHADOW
 \vbox{\kern-#1pt\frame{.3}{#2}{#3}{#4}%         SHADOW STARTS #1 PT FROM TOP
 \kern-.3pt}%                                    MOVE UP RULE THICKNESS AT BOT.
 \kern-#1pt\vrule width 0pt}%                    STOPS #1 PT FROM RT; NO RT SHAD
 \hrule height #1pt}}%                           BOTTOM SHADOW

\def\s #1{\frame{.3}{2}{8pt}{\centerline{#1\vphantom{(}}}\ }
%------------------------------------------------------------------------------
% From Prof. John Strikwerda. 
% This works like \item for #1=1, \itemitem for #1=2, etc.
% Use:  \manyitems4{A.}
\def\manyitems#1{\par\noindent \hskip#1\parindent \hskip-\parindent%
\hangindent#1\parindent \textindent}
%
%An example.
%\item{I.}  Item one.
%\itemitem{A.}  Another
%\manyitems3{1.}  Again
%\manyitems4{a.}  Again
%------------------------------------------------------------------------
% boxit puts its argument into a box.
\newdimen\boxsize\boxsize=15.6truecm
\def\boxit#1{$$\vbox{\hrule\hbox{\vrule\kern10pt
     \vbox{\kern10pt\hbox{\hsize\boxsize \noindent \strut
#1\strut}\kern10pt}\kern10pt\vrule}\hrule}$$}
%------------------------------------------------------------------------------
% to leave a blank space of specified depth in true cm, use
\def\skipp#1{\hrule height0pt width0pt depth#1truecm}
%----------------------------------------------------------------------------
% make a square box outline, of sidelength #1 and with line thickness #2.
\def\makeblanksquare#1#2{
\dimen0=#1pt\advance\dimen0 by -#2pt
      \vrule height#1pt width#2pt depth0pt\kern-#2pt
      \vrule height#1pt width#1pt depth-\dimen0 \kern-#1pt
      \vrule height#2pt width#1pt depth0pt \kern-#2pt 
      \vrule height#1pt width#2pt depth0pt
}
% this is a particularly nice box, for end_of_proof or for the boxspline box
\def\boxx{\makeblanksquare6{.4}}
\def\subboxx{\makeblanksquare4{.3}}

% make a rectangular box outline, of width #1, line thickness #2 and length #3.
\def\Makeblanksquare#1#2#3{
\dimen0=#1pt\advance\dimen0 by -#2pt
      \vrule height#1pt width#2pt depth0pt\kern-#2pt
      \vrule height#1pt width#3pt depth-\dimen0 \kern-#3pt
      \vrule height#2pt width#3pt depth0pt \kern-#2pt 
      \vrule height#1pt width#2pt depth0pt
}
%-----------------------------------------------------------------------
%frac puts its arguments into a fraction
\def\frac#1#2{{#1\over#2}}
% sfract puts its arguments into continued fraction notation (S-fraction)
\def\sfract#1,#2,{{\vrule height2.6pt width.4pt depth10pt\hskip-.85pt
{{#1\over#2}} \hskip-.85pt\vrule height14pt width.4pt depth-2.3pt}}
%-----------------------------------------------------------------------
% the next macro sets up certain standard conditions for drafts
\def\draft{\hoffset=.8truecm\showlabeltrue
	  \line{\sevenrm{\tt draft}\hfill\today\ \ \hoursminutes}}
\def\today{\ifcase\month\or
   January\or February \or March \or April \or May \or June \or
   July \or August \or September \or October \or November \or December \fi
   \space \number\day, \number\year}
%  For computing the time of day use \hoursminutes
%  This was written by Prof. John Strikwerda.
\newcount\htime \newcount\mtime \newcount\hm
\def\hoursminutes{\htime=\time \mtime=\htime
\divide\htime by 60
\hm=\htime
\multiply\hm by 60
\advance\mtime by -\hm
\ifnum\htime<12
 \ifnum\htime=0 \htime=12 \fi
 \ifnum\mtime<10
  \the\htime:0\the\mtime am%
 \else
  \the\htime:\the\mtime am%
 \fi
\else
 \ifnum\htime>12 \advance\htime by -12 \fi
 \ifnum\mtime<10
  \the\htime:0\the\mtime pm%
 \else
  \the\htime:\the\mtime pm%
 \fi
\fi}
%-----------------------------------------------------------------------
\def\formal#1{\bigskip{\bf #1}\hskip1em}
\def\Proof#1{\indent{\it Proof#1.}\qquad}
\def\proof{\Proof{}}

% This is good for putting the endproof sign inside a displayed equation.
\def\Endproof{\hskip .12in \Makeblanksquare{8}{.4}{6}}

% This is good for putting the endproof sign in textmode.
\def\endproof{\hskip .12in \Makeblanksquare{8}{.4}{6}\par\medskip}
% ... and here are some alternatives
%\def\endproof{{\hskip .12in \vrule height6pt width6pt depth2pt}\par\smallskip}
%\def\endproof{\hbox{$\qquad\spadesuit$}}

\def\endstmt{\par\smallskip}
\def\drawline{\bigskip\hrule\bigskip}

% My matrices with square brackets:
\def\bmatrix#1{\left[\matrix{#1}\right]}

\def\bs{\hbox{$\backslash$}}
\def\Ccircle{\buildrel \circ \over C}
\def\picircle{\buildrel \circ \over \pi}
\def\comment#1{}
\def\ref#1{{\bf[}#1{\bf]}}
\def\rf#1 {[{\bf#1}]}
\def\suchthat{\hbox{\rm\ s.t.\ }}
\def\atoprightarrow#1{{{\ #1\ \over{}}\kern-1.1em\to}}
\def\belowrightarrow#1{{{{}\over\ #1\ }\kern-1.1em\to}}
\def\uniformly{\atoprightarrow{u}}
\def\strongly{\atoprightarrow{s}}
\def\weakly{\atoprightarrow{w}}
\def\convLtwo{\atoprightarrow{\scriptstyle L^2}}
\def\inv#1{#1^{-1}}
\def\operatorname#1{\mathop{\rm#1}}
\def\argmin{\mathop{\rm argmin}}
\def\argmax{\mathop{\rm argmax}}
\def\conv{\mathop{\rm conv}}
\def\cond{\mathop{\rm cond}}
\def\vol{\mathop{\rm vol}}
\def\dom{\mathop{\rm dom}}
\def\ran{\mathop{\rm ran}}
\def\Null{\operatorname{null}}
\def\tar{\mathop{\rm tar}}
\def\rank{\mathop{\rm rank}}
\def\jump{\mathop{\rm jump}}
\def\for{\mathop{\rm for}}
\def\all{\mathop{\rm all}}
% note: since  \span  is a plain TeX operator, use something else here
\def\spam{\mathop{\rm span}}
\def\Span{\mathop{\rm span}}
\def\diag{\mathop{\rm diag}}
\def\diam{\mathop{\rm diam}}
\def\dist{\mathop{\rm dist}}
\def\signum{\mathop{\rm signum}}
\def\area{\mathop{\rm area}}
\def\const{{\rm const}{}}
\def\Im{\mathop{\rm Im}}
\def\Re{\mathop{\rm Re}}
\def\supp{\mathop{\rm supp}}
\def\meas{\mathop{\rm meas}}
\def\area{\mathop{\rm area}}
\def\boldA{{{\bf A}}}
\def\boldB{{{\bf B}}}
\def\boldC{{{\bf C}}}
\def\boldK{{{\bf K}}}
\def\boldL{{{\bf L}}}
\def\boldO{{{\bf O}}}
\def\cA{\cal A}
\def\cB{\cal B}
\def\cD{\cal D}
\def\cZ{\cal Z}

\def\openA{{{\rm A}\kern-.63em{\rm A}}}
\def\openB{{{\rm I}\kern-.16em {\rm B}}}
\def\openC{{\rm C\kern-.18cm\vrule width.6pt height 6pt depth-.2pt \kern.18cm}}
\def\openD{{{\rm I}\kern-.16em {\rm D}}}
\def\openF{{{\rm I}\kern-.16em {\rm F}}}
\def\openI{{{\rm I}\kern-.2em {\rm I}}}
\def\openH{{{\rm I}\kern-.16em {\rm H}}}
\def\openK{{{\rm I}\kern-.16em {\rm K}}}
\def\openN{{{\rm I}\kern-.16em {\rm N}}}
\def\openP{{{\rm I}\kern-.16em {\rm P}}}
\def\openQ{{\rm Q\kern-.21cm\vrule width.6pt height 6.2ptdepth-.2pt \kern.21cm}}
\def\openQ{{{\rm Q}\kern-.63em {\rm Q}}}
\def\openR{{{\rm I}\kern-.16em {\rm R}}}
\def\openS{{{\rm S}\kern-.68em{\rm S}}}
\def\openT{{{\rm T}\kern-.30em {\rm T}}}
\def\openZ{{{\rm Z}\kern-.28em{\rm Z}}}

\def\lincomb#1#2#3{#1^1#2_1+#1^2#2_2+\ldots+#1^{#3}#2_{#3}}
\def\Sequ#1#2{#1^1,#1^2,\ldots,#1^{#2}}
\def\sequ#1#2{#1_1,#1_2,\ldots,#1_{#2}}
\def\Matrix#1{\left[\matrix{#1}\right]}

\def\reals{\openR}
\def\integers{\openN}
\def\Fm{\openF^m}
\def\Fn{\openF^n}
\def\Fmn{\openF^{m\times n}}
\def\Rm{\openR^m}
\def\Rn{\openR^n}
\def\Rd{\openR^d}
\def\Rs{\openR^s}
\def\Cmn{\openC^{m\times n}}
\def\Cn{\openC^n}
\def\Cs{\openC^s}
\def\Rmn{\openR^{m\times n}}
\def\Rnm{\openR^{n\times m}}
\def\Zm{\openZ^m}
\def\Zn{\openZ^n}
\def\Zd{\openZ^d}
\def\Zs{\openZ^s}
\def\sumZ{\sum_{j\in\Zd}}
\def\sb{_{\bf|}}
\def\comb#1{{{|#1|}\choose{#1}}}
\def\Iff{\hskip1em\Longleftrightarrow\hskip1em}
\def\iff{\Longleftrightarrow}
\def\Implies{\hskip1em\Longrightarrow\hskip1em}
\def\implies{\Longrightarrow}
\def\Implied{\hskip1em\Longleftarrow\hskip1em}
\def\implied{\Longleftarrow}
\def\braket#1{\hbox{$\bf [\![$}#1\hbox{$\bf ]\!]$}}
\def\norm#1{\|#1\|}
\def\inpro#1{\langle#1\rangle}
\def\sstar{\!*\!}
\def\scpro#1,#2{#1\sstar#2}
\def\floor#1{\lfloor#1\rfloor}
\def\ceil#1{\lceil#1\rceil}
\def\dd{\mathinner{\ldotp}{\dotp}}  % for interval spec. as in [a\dd b]
% this crown is good for \magnification = 1200
\def\crown{{\Omega\kern-.14truecm\vrule width.6pt depth-.1pt \kern.15truecm}}
\def\ga{\alpha}
\def\gA{{\rm A}}
\def\gb{\beta}
\def\gB{{\rm B}}
\def\gga{\gamma}
\def\gG{\Gamma}
\def\gd{\delta}
\def\gD{\Delta}
\def\gep{\epsilon}
\def\gz{\zeta}
\def\gZ{{\rm Z}}
\def\gth{\theta}
\def\gTh{\Theta}
\def\gf{\varphi}
\def\gF{\Phi}
\def\gy{\upsilon}
\def\gk{\kappa}
\def\gl{\lambda}
\def\glcrown{\buildrel \crown \over \gl}
\def\gL{\Lambda}
\def\gs{\sigma}
\def\gS{\Sigma}
\def\gt{\tau}
\def\gT{{\rm T}}
\def\gr{\varrho}
\def\gR{{\rm P}}
\def\Chi{{\rm X}}
\def\go{\omega}
\def\gO{\Omega}
\def\ntwo#1{\norm{#1}_2}
\def\bu{{\bf u}}
\def\inv#1{#1^{-1}}
\def\Matrix#1{\left[\matrix{#1}\right]}
\def\trace{{\rm trace\,}}
\def\sep{{\rm sep}}
\def\romex{\hbox{x}}
\def\normA#1{\norm{#1}_A}
\def\hr{\hat r}
\def\hx{\hat x}
\def\Rnn{\openR^{n\times n}}
\def\Cn{\openC^n}
\def\nneg{\hskip.14em--\hskip.14em}
