You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

426 lines
21 KiB

  1. % mangletex (11 May 1992) run at 22:09 GMT Monday 08 November 1993
  2. %%\title {\TeX\ macros for proof boxes}
  3. %%\author {Paul Taylor\\
  4. %% Department of Computing,\\
  5. %% Imperial College,\\
  6. %% London SW7 2BZ\\
  7. %% +44 71 589 5111 {\em ext.} 5057\\
  8. %% {\tt<pt@doc.ic.ac.uk>}}
  9. %%\date{8 November 1993}
  10. %% % to get the provisional user documentation do
  11. %% % grep ^%% boxproof.tex | sed 's/^%*//' > boxproof-manual.tex
  12. %%\documentstyle{article}
  13. %%\input boxproof.tex
  14. %%\def\meta#1{\mbox{$\langle\hbox{#1}\rangle$}}
  15. %%\def\macrowitharg#1#2{{\tt\string#1\bra\meta{#2}\ket}}
  16. %%{\escapechar-1 \xdef\bra{\string\{}\xdef\ket{\string\}}}
  17. %%\let\subsection\section
  18. %%\begin{document}
  19. %%\maketitle
  20. %%
  21. %% \subsection{Introduction}
  22. %% The proof
  23. %%\begin{proofbox}
  24. %% \(\"1"\:\alpha\leftrightarrow\psi(x,\top)\=\\
  25. %% \:\Some\beta.\psi(x,\beta)\=\mathsf{total}\\
  26. %% \[\exists\beta\kern-1em\:\psi(x,\beta)\\
  27. %% \(\:\beta\=\\
  28. %% \:\beta=\top\=(*)\\
  29. %% \:\psi(x,\!\top)\=\mathsf{subs}\\
  30. %% \:\alpha\=\elim\leftrightarrow(\ref{1})\\
  31. %% \*\:\alpha\=\\
  32. %% \:\psi(x,\!\top)\=\elim\leftrightarrow(\ref{1})\\
  33. %% \:\beta=\top\=\mathsf{func}\\
  34. %% \:\beta\=(*)\\
  35. %% \)\:\alpha=\beta\=\intro\leftrightarrow\\
  36. %% \:\psi(x,\alpha)\=\mathsf{subs}\\
  37. %% \] \:\psi(x,\alpha)\=\elim\exists\\
  38. %% \* \:\psi(x,\alpha)\=\\
  39. %% \(\:\alpha\=\\
  40. %% \:\alpha=\top\=(*)\\
  41. %% \:\phi(x,\!\top)\=\mathsf{subs}\\
  42. %% \*\:\psi(x,\!\top)\=\\
  43. %% \:\alpha=\top\=\mathsf{func}\\
  44. %% \:\alpha\=(*)\\
  45. %% \)\:\alpha\leftrightarrow\psi(x,\!\top)\=\intro\leftrightarrow\\
  46. %%% \) \:\psi(x,\alpha)\leftrightarrow(\alpha\leftrightarrow\psi(x,\!\top))
  47. %% \=\intro\leftrightarrow\\
  48. %%\end{proofbox}
  49. %% is produced by
  50. %%\begin{verbatim}
  51. %%\begin{proofbox}
  52. %% \(\"1"\:\alpha\leftrightarrow\psi(x,\top)\\
  53. %% \:\Some\beta.\psi(x,\beta) \=\mathsf{total}\\
  54. %% \[\exists\beta\kern-1em\:\psi(x,\beta)\\
  55. %% \(\:\beta\\
  56. %% \:\beta=\top \=(*)\\
  57. %% \:\psi(x,\!\top) \=\mathsf{subs}\\
  58. %% \:\alpha \=\elim\leftrightarrow(\ref{1})\\
  59. %% \*\:\alpha\\
  60. %% \:\psi(x,\!\top) \=\elim\leftrightarrow(\ref{1})\\
  61. %% \:\beta=\top \=\mathsf{func}\\
  62. %% \:\beta\=(*)\\
  63. %% \)\:\alpha=\beta \=\intro\leftrightarrow\\
  64. %% \:\psi(x,\alpha) \=\mathsf{subs}\\
  65. %% \] \:\psi(x,\alpha) \=\elim\exists\\
  66. %% \* \:\psi(x,\alpha)\\
  67. %% \(\:\alpha\\
  68. %% \:\alpha=\top \=(*)\\
  69. %% \:\phi(x,\!\top) \=\mathsf{subs}\\
  70. %% \*\:\psi(x,\!\top)\\
  71. %% \:\alpha=\top \=\mathsf{func}\\
  72. %% \:\alpha \=(*)\\
  73. %% \)\:\alpha\leftrightarrow\psi(x,\!\top) \=\intro\leftrightarrow\\
  74. %% \) \:\psi(x,\alpha)\leftrightarrow
  75. %% (\alpha\leftrightarrow\psi(x,\!\top)) \=\intro\leftrightarrow\\
  76. %%\end{proofbox}
  77. %%\end{verbatim}
  78. %%
  79. %% Syntax as follows:
  80. %% each line is of the form
  81. %% \begin{center}
  82. %% \meta{variables}
  83. %% \meta{name}
  84. %% \verb/\:/ \meta{formula}
  85. %% \verb/\=/ \meta{reason}
  86. %% \verb/\-/ \meta{use}
  87. %% \verb/\\/
  88. %% \end{center}
  89. %% where
  90. %% \begin{itemize}
  91. %% \item \meta{variables} is something like ``$x,y$'' ---
  92. %% it's for variables declared at the beginning of $\intro\forall$- and
  93. %% $\elim\exists$-boxes.
  94. %% \item \meta{name} is a command \verb/\label{fred}/ which
  95. %% defines \verb/fred/ to be the label text, which may be used anywhere
  96. %% as \verb/\ref{fred}/ --- see {\em The \LaTeX book.}
  97. %% Local labels are also available, using \macrowitharg\lbl{name}
  98. %% or \verb/\"/\meta{name}\verb/"/; these obey the scoping rules of
  99. %% the boxes.
  100. %% You may also refer to the previous line as \verb/\ref{-}/.
  101. %% \item \meta{formula} is the proposition being asserted.
  102. %% \item \meta{reason} is \verb/\intro\land(\ref{john},\ref{mary})/
  103. %% or \verb/\elim\forall(\ref{jim})/.
  104. %% \item \meta{use} is provided for linear logic, to record the step
  105. %%% which uses this one. How this accords with theory I don't yet know.
  106. %% \end{itemize}
  107. %% Note that the parts are separated by \verb/\:/, \verb/\=/ and \verb/\\/;
  108. %% these correspond to
  109. %% \begin{center}
  110. %% {\bf let } \meta{name} = \meta{expression} : \meta{type}
  111. %% \end{center}
  112. %% in a declarative language.
  113. %% The \verb/\:/, \verb/\=/ and \verb/\-/ fields are optional and may occur
  114. %% in any order. If any of them is repeated the last is taken.
  115. %% If none of them is present the \meta{variables} field is also ignored.
  116. %%
  117. %% Proof {\em boxes\/} are ``wrapped up'' as follows:
  118. %% \begin{itemize}
  119. %%% \item the whole proof in \verb/\begin{proofbox}/...\verb/\end{proofbox}/;
  120. %%% \item single-column boxes ($\intro\forall$, $\intro\imp$, $\elim\exists$),
  121. %% in \verb/\[/...\verb/\]/.
  122. %% \item multiple-column boxes are of two kinds:
  123. %% \begin{itemize}
  124. %%% \item separate ($\intro\land$) boxes: \verb/\(/...\verb/\*/...\verb/\)/.
  125. %% \item stuck together ($\elim\lor$) boxes:
  126. %% \verb/\(/...\verb/\+/...\verb/\)/.
  127. %% \end{itemize}
  128. %% \end{itemize}
  129. %% You may put more than two columns in \verb/\(/...\verb/\)/ and even mix
  130. %% the \verb/\+/ and \verb/\*/ separators.
  131. %%
  132. %% The whole proof is enclosed in \verb/\proofbox/...\verb/\endproofbox/
  133. %% or \verb/\begin{proofbox}/...\verb/\end{proofbox}/, but the \LaTeX\
  134. %% environment form {\em must not\/} be used for nested boxes.
  135. %%
  136. %% If the proof occurs in paragraph mode (ie in vertical or
  137. %% unrestricted horizontal mode) then it is set as a display, using the
  138. %% full width of the page. Otherwise it uses only the required width.
  139. %%
  140. %% A lot of the internals are potentially configurable, but there is not
  141. %% yet a user interface suitable for doing this. This will be provided
  142. %% in the next version.
  143. %%
  144. %% This is a {\em prototype\/} proof-box macro package;
  145. %% the syntax and implementation may change.
  146. %% It is {\tt boxproof.tex} in the \TeX\ system
  147. %% (so just \verb/\input boxproof/).
  148. %%
  149. %% There are some examples in
  150. %% \verb+~pt/utilities/proofs/proofboxeg.tex+ and
  151. %% \verb+proofboxeg1.tex+.
  152. %%
  153. %% The prototype version was begun on 2 August 1991, the new one on
  154. %% 4 June 1993.
  155. %%
  156. %%
  157. \message{}\edef\proofboxrestoreat
  158. {\noexpand\catcode`\noexpand\@\the\catcode`\@}\catcode`\@=11 \count@\year
  159. \multiply\count@12 \advance\count@\month\ifnum\count@> 23999 \message{}%
  160. \message{}\fi\let\pb@A\+\let\+\relax\let\pb@B\(\let\pb@C\)\def\pb@D{\pb@B
  161. \let\)\pb@C}\def\pb@E{\pb@B\displaystyle\let\]\pb@C}%%
  162. %% The following are user-settable dimensions.
  163. %%
  164. \newdimen\prooflinenowidth\prooflinenowidth1em \newdimen\proofboxfullwidth
  165. \newdimen\proofboxleftmargin\proofboxleftmargin3em \newdimen
  166. \proofboxrightmargin\newdimen\proofboxrulebreadth\proofboxrulebreadth.4pt
  167. \newdimen\proofboxseparation\proofboxseparation.2em \newdimen
  168. \proofboxbaselineskip\proofboxbaselineskip4ex %%
  169. %%
  170. %% The following are user-accessible numbers.
  171. %%
  172. \newcount\proofcolumns\newcount\prooflinetotal\newcount\prooflineinbox%%
  173. %%
  174. %% These boxes receive the fields of the proof steps.
  175. %% They are used in \verb/\proofboxmakeleftcolumn/ {\em etc}.
  176. %%
  177. \newbox\proofboxproposition\newbox\proofboxreason\newbox\proofboxuse\newbox
  178. \proofboxvariables%%
  179. %% The left-most switch is used by
  180. %%% \verb/\proofboxmakelabel/ to suppress the label in all but the first column.
  181. %% On the outside it is true.
  182. \newif\ifleftmostproofbox\leftmostproofboxtrue%%
  183. %%
  184. %% The following are obsolete: they are only included for reverse
  185. %% compatibility with the prototype version.
  186. \newdimen\proofboxintercol\newdimen\proofboxsurround\newdimen
  187. \proofboxformulawidth\newdimen\proofboxmargin\newskip\proofboxlefttabskip
  188. \newskip\proofboxrighttabskip%%
  189. %%
  190. %% \subsection{Redefinable macros}
  191. %% WARNING: most of these commands will be hidden and replaced with
  192. %% optional arguments to \verb/\proofbox/ in a future version.
  193. %% Do not rely on them.
  194. %%
  195. %% We provide three different ways of numbering the lines of the proof:
  196. %% \begin{itemize}
  197. %% \item \verb/\runningproofline/: a global running sequence (default),
  198. %%
  199. \def\runningproofline{\number\prooflinetotal}%%
  200. %% \item \verb/\nestedproofline/: a hierarchical system with dots,
  201. %%
  202. \def\nestedproofline{\relax\ifx\enclosingproofline\empty\else
  203. \enclosingproofline{.}\fi\number\prooflineinbox}\def\enclosingproofline{}%%
  204. %% \item \verb/\nestedproofline/: a fully hierarchical system which
  205. %% also includes the column number
  206. %% (\verb/\proof@columns/) as a letter (ASCII quote plus number).
  207. %%
  208. \def\proofboxcolumn{\ifnum\proofcolumns>\z@{\count@96\advance\count@
  209. \proofcolumns\char\count@}\fi}\def\fullynestedproofline{\relax\ifx
  210. \enclosingproofline\empty\enclosingproofline\proofboxcolumn.\else
  211. \proofboxcolumn\fi\number\prooflineinbox}%%
  212. %% \end{itemize}
  213. %% \verb/\theproofline/ is the default.
  214. %%
  215. \let\theproofline\runningproofline%%
  216. %% The macro \verb/\proofboxmakelabel#1/ is used to print the line label.
  217. %% We only put it in the leftmost box.
  218. %% It is printed in small non-ranging Arabic numerals
  219. %% ({\the\scriptfont1 0123456789}).
  220. %% Right-justify it in \verb/\prooflinenowidth/ if it will fit,
  221. %% otherwise let it stick out on the right, {\em i.e.}~left-justify it.
  222. %%
  223. \def\proofboxmakelabel#1{{\relax\ifleftmostproofbox\setbox\z@\hbox{\hss\the
  224. \scriptfont\@ne#1}\ifdim\wd\z@<\prooflinenowidth\setbox\z@\hbox to%
  225. \prooflinenowidth{\unhbox\z@}\fi\box\z@\quad\fi}}%%
  226. %% Kill the numbers altogether with \verb/\proofboxnonumbers/.
  227. %%
  228. \def\proofboxnonumbers{\def\proofboxmakelabel##1{}}%%
  229. %% How to make the left column of the proof box:
  230. %% use the variables field, a space if necessary and the line label.
  231. %%
  232. \def\proofboxmakeleftcolumn{\kern\proofboxseparation\hfil\dimen@\wd
  233. \proofboxvariables\unhbox\proofboxvariables\ifdim\dimen@>\z@\quad\fi
  234. \proofboxmakelabel\@currentlabel}%%
  235. %% How to make the middle column of the proof box:
  236. %% left justify the formula field.
  237. %%
  238. \def\proofboxmakemiddlecolumn{\unhbox\proofboxproposition\hfil\quad}%%
  239. %% How to make the right column of the proof box:
  240. %% use the reason and use fields.
  241. %%
  242. \def\proofboxmakerightcolumn{\box\proofboxreason\box\proofboxuse\hfil\kern
  243. \proofboxseparation}%%
  244. %%
  245. %% Make the four edges of a rectangular box and the separator
  246. %% between \verb/\+/ columns.
  247. %%
  248. \def\proofboxleftside{\leaders\hrule width\proofboxrulebreadth\vfill}\def
  249. \proofboxrightside{\leaders\hrule width\proofboxrulebreadth\vfill}\def
  250. \proofboxorseparator{\leaders\hrule width\proofboxrulebreadth\vfill}\def
  251. \proofboxtopside{\leaders\vrule height\proofboxrulebreadth depth\z@\hfill}%
  252. \def\proofboxbottomside{\leaders\vrule height\proofboxrulebreadth depth\z@
  253. \hfill}%%
  254. %%
  255. %% Use dotted lines: \verb/\dottedproofbox/.
  256. %%
  257. \def\dottedproofbox{\def\proofboxleftside{\leaders\pb@F\vfill} \def
  258. \proofboxrightside{\leaders\pb@F\vfill} \def\proofboxorseparator{\leaders
  259. \pb@F\vfill} \def\proofboxtopside{\leaders\pb@F\hfill}\def\proofboxbottomside
  260. {\leaders\pb@F\hfill}%%
  261. }\def\pb@F{\vbox to 5pt{\vss\hbox to 5pt{\hss.\hss}\vss}}%%
  262. %% Leave the boxes open at the bottom: \verb/\openproofbox/
  263. %%
  264. \def\openproofbox{\def\proofboxbottomside{\hfill}} %%
  265. %% \subsection{Miscellaneous logical notations}
  266. %%
  267. %% Print the names of the introduction and elimination rules, for example:
  268. %% \begin{quote}
  269. %% \verb/\elim\forall/ $\elim\forall$ \qquad
  270. %% \verb/\intro\land/ $\intro\land$ \qquad
  271. %% \end{quote}
  272. \def\intro#1{{{#1}{\cal I}}}\def\elim#1{{{#1}{\cal E}}}%%
  273. %% Recall that in \TeX\ the logical connectives and quantifiers are called
  274. %% \begin{center}
  275. %% \verb/\lor/ $\lor$\quad
  276. %% \verb/\land/ $\land$\quad
  277. %% \verb/\lnot/ $\lnot$\quad
  278. %% \verb/\forall/ $\forall$\quad
  279. %% \verb/\exists/ $\exists$
  280. %% \end{center}
  281. %% The following provide macros for the \verb/\implies/ {\em relation\/}
  282. %% and for the binary {\em operation\/} which yields the abstract
  283. %% \verb/\implic/ation between formulae.
  284. %% The point is that \TeX\ spaces them and breaks the lines differently:
  285. %% \begin{center}
  286. %% \verb/A\implies B/ $A\implies B$\quad{\em versus\/}\quad
  287. %% \verb/A\implic B/ $A\implic B$
  288. %% \end{center}
  289. %% There are forward and reverse, single and Double versions.
  290. %%
  291. \mathchardef\implies="3221 \mathchardef\impliedby="3220 \mathchardef\Implies=%
  292. "3229 \mathchardef\Impliedby="3228 \mathchardef\implic="2221 \mathchardef
  293. \implicby="2220 \mathchardef\Implic="2229 \mathchardef\Implicby="2228 \let
  294. \imp\to%%
  295. %% Handle the spacing after a variable (and optionally its type)
  296. %% bound by a quantifier symbol. For example
  297. %% \begin{quote}
  298. %% \verb/\All x:X. \phi(x)/\quad prints as\quad $\All x:X.\phi(x)$\quad
  299. %% instead of\quad $\forall x:X.\phi(x)$
  300. %% \end{quote}
  301. \def\Quantifier#1#2.{\pb@G{#1}#2::.}\def\pb@G#1#2:#3:#4.{{{#1}{#2}\def\next{#%
  302. 3}\ifx\next\empty{.}\mkern4mu \else\mkern1mu{\colon}\mkern1mu{#3}\mkern.5mu{.%
  303. }\mkern6mu \fi}}%
  304. %% We provide some commonly used forms; \verb/\iota/ ($\iota$) is Russell's
  305. %% description operator and should really be inverted.
  306. \def\All{\Quantifier\forall}\def\Some{\Quantifier\exists}\def\Function{%
  307. \Quantifier\lambda}\def\Product{\Quantifier\Pi}\def\Sum{\Quantifier\Sigma}%
  308. \def\TheOne{\Quantifier\iota}\def\Least{\Quantifier\mu}\def\Greatest{%
  309. \Quantifier\nu}%%
  310. %% There are several notations for substitution.
  311. %% After writing $a[x:=b]$ throughout my book I~thought I~might change to
  312. %% $[b/x]^*a$.
  313. %% This macro reads the source in the first form and prints in the second.
  314. %% If you use it you can, like me, defer the decision about
  315. %% which notation to use until the final stages, doing
  316. %% \begin{quote}
  317. %% \verb/\renewcommand{\Subst}{\plainsubstitution}/
  318. %% \end{quote}
  319. %% if you finally decide on making substitution act on the right.
  320. %% This is already an improvement on the literal text, because it
  321. %% automatically enlarges the brackets according to the text inside.
  322. %% \verb/\Subst/ itself is (following my book)
  323. %% defined in terms of the action of a context morphism (\verb/\CtxtMor/)
  324. %% on a term. Again you can do
  325. %% \begin{quote}
  326. %% \verb/\renewcommand{\CtxtMor}{\plaincontextmorphism}/
  327. %% \end{quote}
  328. %% for something simpler.
  329. %% This macro interprets its argument as a comma-separated list
  330. %% of items in the form $x:=b$, which it switches to $b/x$.
  331. \def\swappingsubstitution#1[#2]{{\CtxtMor[#2]^*{#1}}}%
  332. %\def\swappingcontextmorphism[#1]{{\let\pb@J\empty\left[\pb@H#1,[],\/\right]}}%
  333. \def\swappingcontextmorphism[#1]{{\let\pb@J\empty[\pb@H#1,[],\/]}}%
  334. \def\pb@H#1,{\def\next{#1}\ifx\next\pb@K\else\pb@J\let\pb@J,\pb@I#1:=:=,%
  335. \expandafter\pb@H\fi}\def\pb@I#1:=#2:=#3,{{\def\next{#2}\ifx\next\empty\else{%
  336. #2}/\fi{#1} }}\def\pb@K{[]}\def\Subst{\swappingsubstitution}\def\CtxtMor{%
  337. \swappingcontextmorphism}%%
  338. %% The simple versions.
  339. \def\plainsubstitution#1#2{{#1}{\left[{#2}\right]}}\def\plaincontextmorphism#%
  340. 1{{\left[#1\right]}}\newbox\pb@L\newdimen\pb@T\newdimen\pb@U\newdimen\pb@M
  341. \newdimen\pb@N\newdimen\pb@O\newdimen\pb@P\newdimen\pb@Q\newdimen\pb@R
  342. \newdimen\pb@S\def\pb@V#1#2{\relax\ifdim#1<#2\relax#1=#2\relax\fi}\count@
  343. \year\multiply\count@12 \advance\count@\month\ifnum\count@> 25000 \message{%
  344. because this one has expired and will no longer work!}\endinput\fi%%
  345. \def\proofbox{\relax\ifmmode\let\next\pb@a\else\let\next\pb@b\ifhmode\ifinner
  346. \let\next\pb@a\fi\fi\fi\next\global\prooflinetotal\@ne\boxmaxdepth\maxdimen
  347. \def\[{\pb@w\pb@f\pb@W}\def\({\pb@w\pb@f\pb@X}\def\proofbox{\[}\let\lbl\pb@y
  348. \def\"##1"{\pb@y{##1}}\def\:{\pb@v\proofboxproposition\displaystyle}\def\={%
  349. \pb@v\proofboxreason}\def\-{\pb@v\proofboxuse}\def\\{\pb@w\pb@u}\let\+\pb@c
  350. \let\*\pb@c\let\]\pb@c\pb@p\pb@s}\def\endproofbox{\pb@q\pb@IA\box\pb@L\egroup
  351. }\def\pb@W{\let\+\pb@d\let\*\pb@d\def\){\pb@e\[\)}\let\]\pb@Y\proofcolumns\z@
  352. }\def\pb@X{\proofcolumns\@ne\def\+{\pb@j\pb@l}\def\*{\pb@j\pb@m}\def\]{\pb@e
  353. \(\]}\let\)\pb@Y}\def\pb@Y{\pb@o\pb@u}\def\pb@a{\hbox\bgroup}\def\pb@b{$$%
  354. \kern-\displayindent\hbox to\hsize\bgroup\proofboxfullwidth\hsize\aftergroup$%
  355. \aftergroup$}\def\pb@c{\errmessage{Box proofs: \string\+, \string\*, \string
  356. \) and \string\] may not be used at the top level}}\def\pb@d{\errmessage{Box
  357. proofs: enclose \string\+ and \string\* in \string\(\string\), not \string\[%
  358. \string\]}}\def\pb@e#1#2{\errmessage{Box proofs: \string#1 closed by \string#%
  359. 2}\pb@Y}\def\pb@f#1{\setbox\pb@L\hbox\bgroup#1\let\pb@g\pb@n\let
  360. \enclosingproofline\@currentlabel\edef\pb@h{\the\prooflinetotal}\let\pb@i
  361. \pb@h\pb@O\z@\pb@M\z@\pb@N-\maxdimen\pb@P\z@\pb@p\pb@t}\def\pb@j#1{\pb@q\pb@k
  362. \let\pb@g#1\advance\proofcolumns\@ne\global\prooflinetotal\pb@h
  363. \leftmostproofboxfalse\pb@p\pb@t}\def\pb@k{\pb@g\pb@V\pb@M{\wd\pb@L}\advance
  364. \pb@O\wd\pb@L\ifnum\pb@i<\prooflinetotal\edef\pb@i{\the\prooflinetotal}\fi
  365. \ifdim\pb@N<\dp\pb@L\pb@N\dp\pb@L\pb@P\pb@Q\fi\setbox\z@\hbox{%
  366. \proofboxtopside}\wd\z@\z@\box\z@\setbox\z@\hbox{\proofboxbottomside}\wd\z@
  367. \z@\box\z@\kern\pb@R\box\pb@L\kern\pb@S}\def\pb@l{\vtop{\proofboxorseparator}%
  368. \penalty\thr@@}\def\pb@m{\vtop{\proofboxrightside}\kern\proofboxseparation
  369. \vtop{\proofboxleftside}\penalty\tw@}\def\pb@n{\pb@T\pb@R\setbox\z@\vtop{%
  370. \proofboxleftside}\dimen@\wd\z@\advance\pb@T\dimen@\advance\pb@T
  371. \proofboxseparation\kern-\pb@T\kern\proofboxseparation\box\z@\penalty\@ne}%
  372. \def\pb@o{\pb@q\pb@k\setbox\z@\vtop{\proofboxrightside}\global\advance\pb@S
  373. \wd\z@\box\z@\global\advance\pb@S\proofboxseparation\kern\proofboxseparation
  374. \global\prooflinetotal\pb@i\global\pb@R\pb@T\global\pb@Q\pb@P\ifnum
  375. \proofcolumns<\@ne\proofcolumns\@ne\fi\penalty\proofcolumns\kern-\pb@M\kern
  376. \pb@M\kern-\pb@O\kern\pb@O\kern-\pb@S\penalty\@ne\egroup\pb@r}\def\pb@p#1{%
  377. \setbox\pb@L\vtop\bgroup\baselineskip\proofboxbaselineskip\prooflineinbox\@ne
  378. \pb@T\z@\pb@U\z@#1\pb@u}\def\pb@q{\pb@w\global\pb@R\pb@T\global\pb@S\pb@U
  379. \egroup}\def\pb@r{\pb@V\pb@T\pb@R\pb@V\pb@U\pb@S\box\pb@L\prevdepth\pb@Q}\def
  380. \pb@s{}\def\pb@t{}\def\pb@u{\edef\@currentlabel{\theproofline}\let\label@name
  381. \@currentlabel\setbox\proofboxproposition\box\voidb@x\setbox\proofboxreason
  382. \box\voidb@x\setbox\proofboxuse\box\voidb@x\setbox\proofboxvariables\hbox
  383. \bgroup\let\pb@z\pb@AA\let\pb@w\pb@x$}\def\pb@v#1{$\egroup\setbox#1\hbox
  384. \bgroup\let\pb@z\pb@AA$}\def\pb@w{$\egroup\global\advance\prooflinetotal\@ne
  385. \advance\prooflineinbox\@ne\setbox\pb@L\hbox{\setbox\z@\hbox{%
  386. \proofboxmakeleftcolumn}\global\pb@R\wd\z@\kern-\pb@R\box\z@\hbox{%
  387. \proofboxmakemiddlecolumn}\setbox\z@\hbox{\proofboxmakerightcolumn}\global
  388. \pb@S\wd\z@\box\z@\kern-\pb@S\penalty\tw@}\global\pb@Q\dp\pb@L\pb@r}\def\pb@x
  389. {$\egroup}\def\pb@y#1{\aftergroup\pb@z\expandafter\aftergroup\csname r@#1%
  390. \endcsname}\def\pb@z#1{\edef#1{{\@currentlabel}{}}\expandafter\pb@@A\string#1%
  391. \\}\expandafter\def\expandafter\pb@@A\string\r@#1\\{\def\label@name{#1}}\def
  392. \pb@AA#1{\aftergroup\pb@z\aftergroup#1}\expandafter\def\csname r@-\endcsname{%
  393. {\previous@label}{}}\dimendef\pb@BA=\@ne\dimendef\pb@CA=\tw@\dimendef\pb@DA=%
  394. \thr@@\dimendef\pb@EA=4 \dimendef\pb@FA=5 \dimendef\pb@GA=6 \chardef\pb@HA=9
  395. \def\pb@IA{\pb@GA\proofboxfullwidth\pb@T\proofboxleftmargin\pb@V\pb@T\pb@R
  396. \advance\pb@GA-\pb@T\pb@U\proofboxrightmargin\pb@V\pb@U\pb@S\advance\pb@GA-%
  397. \pb@U\pb@V\pb@GA{\wd\pb@L}\pb@JA}\def\pb@JA{\setbox\pb@L\vtop{\unvbox\pb@L
  398. \loop\skip@\lastskip\unskip\setbox\pb@HA\lastbox\ifhbox\pb@HA\pb@KA\repeat
  399. \unvbox\pb@L\unskip}}\def\pb@KA{\pb@DA\dp\pb@HA\pb@EA\ht\pb@HA\pb@CA\wd\pb@HA
  400. \setbox\pb@HA\hbox{\unhbox\pb@HA\count@\lastpenalty\unpenalty\unkern\ifodd
  401. \count@\pb@LA\else\setbox\thr@@\lastbox\setbox\tw@\lastbox\setbox\@ne\lastbox
  402. \unkern\hbox to\pb@T{\unhbox\@ne}\hbox to\pb@GA{\unhbox\tw@}\hbox to\pb@U{%
  403. \unhbox\thr@@}\fi}\dp\pb@HA\pb@DA\ht\pb@HA\pb@EA\setbox\pb@L\vtop{\box\pb@HA
  404. \nointerlineskip\vskip\skip@\unvbox\pb@L}}\def\pb@LA{\pb@O\lastkern\unkern
  405. \unkern\pb@M\lastkern\unkern\unkern\proofcolumns\lastpenalty\unpenalty\pb@FA
  406. \pb@T\ifnum\@ne=\proofcolumns\let\pb@MA\pb@NA\else\advance\pb@GA-\pb@CA\pb@BA
  407. \pb@GA\advance\pb@GA\pb@O\ifdim\pb@GA<\proofcolumns\pb@M\divide\pb@BA
  408. \proofcolumns\let\pb@MA\pb@PA\else\divide\pb@GA\proofcolumns\let\pb@MA\pb@OA
  409. \fi\fi\dimen@\lastkern\unkern\setbox\@ne\lastbox\pb@RA\setbox\pb@HA\hbox{\box
  410. \@ne\kern\dimen@}\advance\pb@U-\wd\pb@HA\unkern\loop\setbox\pb@L\lastbox\pb@T
  411. \lastkern\unkern\setbox\tw@\lastbox\setbox\thr@@\lastbox\count@\lastpenalty
  412. \unpenalty\pb@MA\pb@JA\setbox\@ne\vbox{\offinterlineskip\pb@QA\thr@@\vfil
  413. \pb@QA\tw@}\pb@RA\pb@TA{\box\@ne\box\pb@L}\ifnum\count@>\@ne\pb@SA\pb@U
  414. \lastkern\unkern\repeat\unhbox\pb@HA}\def\pb@NA{\pb@T\pb@FA\setbox\@ne
  415. \lastbox\advance\pb@T-\wd\@ne\dimen@\lastkern\unkern\unkern\kern\dimen@\pb@RA
  416. \box\@ne\advance\pb@T-\dimen@}\def\pb@OA{\ifnum\@ne=\count@\pb@NA\fi}\def
  417. \pb@PA{\pb@GA\wd\pb@L\advance\pb@GA\pb@BA\pb@OA}\def\pb@QA#1{\setbox#1\hbox to%
  418. \wd\pb@L{\unhbox#1}\wd#1\z@\box#1\relax}\def\pb@RA{\setbox\@ne\vbox to\pb@EA{%
  419. \offinterlineskip\vskip-\proofboxseparation\unvbox\@ne\vskip-%
  420. \proofboxseparation\setbox\z@\null\ht\z@-\pb@DA\dp\z@\pb@DA\box\z@}}\def
  421. \pb@SA{\setbox\@ne\lastbox\pb@RA\pb@TA{\box\@ne}\ifodd\count@\else\dimen@
  422. \lastkern\unkern\setbox\@ne\lastbox\pb@RA\pb@TA{\box\@ne\kern\dimen@}\fi}\def
  423. \pb@TA#1{\setbox\pb@HA\hbox{#1\unhbox\pb@HA}}\let\+\pb@A\proofboxrestoreat
  424. \endinput\def\x{}%%
  425. %% \end{document}
  426. % \fi