Debian Codegraph @

texmf-dist/doc/latex/bussproofs/BussGuide2.tex

raw
1 %
2 %Documentation by Peter Smith, July 2004, March 2012
3 %
4 %comments to [email protected]
5 %
6
7 \documentclass[11pt]{article}
8 \usepackage{graphicx}
9 \usepackage{amssymb}
10 %\usepackage{epstopdf}
11
12 \usepackage{bussproofs}
13 \def\fCenter{{\mbox{$\vdash$}}}
14
15 \DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `basename #1 .tif`.png}
16
17 \textwidth = 6.5 in
18 \textheight = 9 in
19 \oddsidemargin = 0.0 in
20 \evensidemargin = 0.0 in
21 \topmargin = 0.0 in
22 \headheight = 0.0 in
23 \headsep = 0.0 in
24 \parskip = 0.0in
25 \parindent = 0.2in
26
27
28 \newtheorem{theorem}{Theorem}
29 \newtheorem{corollary}[theorem]{Corollary}
30 \newtheorem{definition}{Definition}
31
32 \begin{document}
33
34 %%%%%%%%%%%%%%%%%%
35 %%%
36 %%% front matter
37 %%%
38 %%%%%%%%%%%%%%%%%%
39
40 \thispagestyle{empty}
41 \begin{center}
42 \Huge{\LaTeX\ for Logicians}\\[16pt]
43 \huge{\texttt{bussproofs.sty}}\\[8pt]
44 \huge{A User Guide}\\[16pt]
45 \end{center}
46 \vspace{0.5in}
47 \tableofcontents
48 \vspace{0.3in}
49 \begin{center}
50 \fbox{\parbox{4.5in}{\begin{center}The latest version of \texttt{bussproofs.sty}
51 is 1.1, July 2011.\end{center}}}
52 \end{center}
53 \vspace{0.4in}
54 \begin{center}
55 \small{Guide version 1.1 March 2012. Corrections/suggestions to
56 \texttt{peter}\_$\!$\_\texttt{[email protected]}}
57 \\
58 \small{\LaTeX\ for Logicians is at \texttt{http://www.logicmatters.net}}
59 \end{center}
60 \newpage
61
62 %%%%%%%%%%%%%%%%%%
63 %%%
64 %%% main matter
65 %%%
66 %%%%%%%%%%%%%%%%%%
67 \section{Introduction}
68
69 \noindent Sam Buss's powerful and flexible package {\texttt{bussproofs.sty}} offers macros for setting natural deduction and sequent proofs in two different styles. The key difference between the two styles is illustrated by the difference between
70 \begin{prooftree}
71 \AxiomC{$\Gamma, A, B \vdash C$}
72 \UnaryInfC{$\Gamma, A \vdash (B \to C)$}
73 \UnaryInfC{$\Gamma \vdash (A \to (B \to C))$}
74 \end{prooftree}
75 and
76 \begin{prooftree}
77 \Axiom$\Gamma, A, B\ \fCenter\ C$
78 \UnaryInf$\Gamma, A\ \fCenter\ (B \to C)$
79 \UnaryInf$\Gamma\ \fCenter\ (A \to (B \to C))$
80 \end{prooftree}
81 In one style, the sequents above and below the inference line are centered; in the other, the sequents are placed so as to align their deducibility signs.
82
83 We can divide {\texttt{bussproofs.sty}}'s commands for building proofs into four types:
84 \begin{itemize}\setlength{\itemsep}{0.0in}
85 \item \emph{the structural commands} for producing proof trees in the \emph{centering} style;
86 \item \emph{more structural commands} for producing proof trees in the \emph{sequent-aligning} style;
87 \item \emph{additional commands} for adding labels, and changing the setting of inference lines (selecting double, dashed lines, etc.);
88 \item \emph{fine-tuning commands} for adjusting the spacing and layout of the proof.
89 \end{itemize}
90 {\texttt{bussproofs.sty}} also provides an additional command which enables some very laconic shorthand for the most commonly used commands. We describe these in Section~\ref{abbrev}; but we avoid using shorthand until the full commands have been explained and made familiar.
91
92
93
94 \section{`Centered' proofs: the structural commands}
95 \subsection{The commands} There are four basic proof-building commands for producing proofs in the centered style:
96 \begin{quote}
97 \begin{description}\setlength{\itemsep}{0.0in}
98 \item \verb=\AxiomC{=\textit{form}\verb=}=
99 \item \verb=\UnaryInfC{=\textit{form}\verb=}=
100 \item \verb=\BinaryInfC{=\textit{form}\verb=}=
101 \item \verb=\TrinaryInfC{=\textit{form}\verb=}=
102 \end{description}
103 \end{quote}
104 where `\textit{form}' holds the place for a formula or sequent. Note
105 \begin{itemize}\setlength{\itemsep}{0.0in}
106 \item The use of the surrounding `\verb={}='s is mandatory.
107 \item By default, \textit{form} is set in text mode: if you want to set some or all of \textit{form} in math mode, then you need to use \verb=$='s in the usual way.
108 \end{itemize}
109 Chaining a series of those commands, however, is not enough to cause a proof to be set. To display a proof you must use one of
110 \begin{quote}
111 \begin{description}\setlength{\itemsep}{0.0in}
112 \item \verb=\DisplayProof=, a command placed at the end of a list of proof-building commands, which produces an in-line proof at the current insertion point.
113 \item \verb=\begin{prooftree} ... \end{prooftree}=, an environment which contains a list of proof-building commands, and which produces a proof in a centered display.
114 \end{description}
115 \end{quote}
116 Again, note
117 \begin{itemize}\setlength{\itemsep}{0.0in}
118 \item The \verb=\DisplayProof= command allows you to put proofs anywhere normal text might appear; for example, in a paragraph, in a table, in a tabbing environment, etc.
119 \item To generate a proof in a centered display, do \emph{not} use \verb=$$ ... $$= or \verb=\[ ... \]=.
120 \end{itemize}
121
122 \subsection{Usage} It will be a \emph{lot} clearer if we start with examples rather than begin with an abstract description of the principles for chaining proof-building commands! So here goes \ldots
123 \begin{quote}
124 \begin{verbatim}
125 \AxiomC{A}
126 \UnaryInfC{D}
127 \DisplayProof
128 \end{verbatim}
129 \end{quote}
130 produces the one-step proof
131 \AxiomC{A}
132 \UnaryInfC{D}
133 \DisplayProof
134 in the current line. While
135 \begin{quote}
136 \begin{verbatim}
137 \begin{prooftree}
138 \AxiomC{A}
139 \AxiomC{B}
140 \BinaryInfC{D}
141 \end{prooftree}
142 \end{verbatim}
143 \end{quote}
144 displays the proof
145 \begin{prooftree}
146 \AxiomC{A}
147 \AxiomC{B}
148 \BinaryInfC{D}
149 \end{prooftree}
150 centered and set off from the surrounding text. So it will be no surprise to learn that
151 \begin{quote}
152 \begin{verbatim}
153 \begin{prooftree}
154 \AxiomC{A}
155 \AxiomC{B}
156 \AxiomC{C}
157 \TrinaryInfC{D}
158 \end{prooftree}
159 \end{verbatim}
160 \end{quote}
161 produces the proof
162 \begin{prooftree}
163 \AxiomC{A}
164 \AxiomC{B}
165 \AxiomC{C}
166 \TrinaryInfC{D}
167 \end{prooftree}
168 Two comments:
169 \begin{itemize}\setlength{\itemsep}{0.0in}
170 \item You'll get an error message if there's a mismatch between the arity of the \verb=\...aryInfC= command and the number of inputs.
171 \item \texttt{bussproof.sty} does not allow arbitrary numbers of premisses appearing as separate \textit{form} items above the inference line.
172 \end{itemize}
173
174 So much for one-step proofs. Now things get a little more fun \ldots.
175 Consider
176 \begin{quote}
177 \begin{verbatim}
178 \begin{prooftree}
179 \AxiomC{A}
180 \AxiomC{B}
181 \AxiomC{C}
182 \BinaryInfC{D}
183 \BinaryInfC{E}
184 \end{prooftree}
185 \end{verbatim}
186 \end{quote}
187 This produces the proof
188 \begin{quote}
189 \begin{prooftree}
190 \AxiomC{A}
191 \AxiomC{B}
192 \AxiomC{C}
193 \BinaryInfC{D}
194 \BinaryInfC{E}
195 \end{prooftree}
196 \end{quote}
197 Why? Think of the first \verb=\BinaryInfC= command as `using up' as premisses the two axioms immediately above it. Then the second \verb=\BinaryInfC= command takes as premisses `D' immediately above it and then searches up to the next `unused' item, i.e. `A'. The inputs to a particular \verb=\BinaryInfC= command are then set right-to-left in the order in which the {command} finds them as it looks {up} the series of commands. Which means, as we want, that {the inputs to a particular inference are set left-to-right in the same order as they occur in the chain of commands}.
198
199 It probably helps if we set out the proof-building commands like this:
200 \begin{quote}
201 \begin{verbatim}
202 \begin{prooftree}
203 \AxiomC{A}
204 \AxiomC{B}
205 \AxiomC{C}
206 \BinaryInfC{D}
207 \BinaryInfC{E}
208 \end{prooftree}
209 \end{verbatim}
210 \end{quote}
211 That pretty much replicates the layout of the tree we want. This indeed is one of the \emph{very} nice features of \texttt{bussproofs.sty} -- the instructions to build a proof-tree can be set out to look very like the proof we want.
212
213 Suppose then that we want to set a tree that is arranged like this:
214 \begin{prooftree}
215 \AxiomC{A}
216 \UnaryInfC{B}
217 \AxiomC{C}
218 \BinaryInfC{D}
219 \AxiomC{E}
220 \AxiomC{F}
221 \BinaryInfC{G}
222 \UnaryInfC{H}
223 \BinaryInfC{J}
224 \end{prooftree}
225 The following does the trick:
226 \begin{quote}
227 \begin{verbatim}
228 \begin{prooftree}
229 \AxiomC{A}
230 \UnaryInfC{B}
231 \AxiomC{C}
232 \BinaryInfC{D}
233 \AxiomC{E}
234 \AxiomC{F}
235 \BinaryInfC{G}
236 \UnaryInfC{H}
237 \BinaryInfC{J}
238 \end{prooftree}
239 \end{verbatim}
240 \end{quote}
241 In sum, then, the rule to produce a given tree is
242 \begin{quote}
243 \emph{Set out the commands for the left-hand sub-proof first; and then within a sub-proof, do its left-hand sub-sub-proof first; and so on.}
244 \end{quote}
245 Two more points about general structure:
246 \begin{itemize}\setlength{\itemsep}{0.0in}
247 \item The command \verb=\noLine= can be inserted before any inference command to suppress the drawing of an inference line.
248 \item Null axioms are allowed!
249 \end{itemize}
250 Hence, the commands
251 \begin{quote}
252 \begin{verbatim}
253 \begin{prooftree}
254 \AxiomC{$A \lor B$}
255 \AxiomC{[$A$]}
256 \noLine
257 \UnaryInfC{$C$}
258 \AxiomC{[$B$]}
259 \noLine
260 \UnaryInfC{$C$}
261 \TrinaryInfC{$C$}
262 \end{prooftree}
263 \end{verbatim}
264 \end{quote}
265 yield
266 \begin{prooftree}
267 \AxiomC{$A \lor B$}
268 \AxiomC{[$A$]}
269 \noLine
270 \UnaryInfC{$C$}
271 \AxiomC{[$B$]}
272 \noLine
273 \UnaryInfC{$C$}
274 \TrinaryInfC{$C$}
275 \end{prooftree}
276 And we can use the fact that null axioms are allowed to generate natural deduction proofs with formulae overlined to indicate the discharge of premisses (by treating the formula to be overlined as a unary inference from a null axiom). For example:
277 \begin{quote}
278 \begin{verbatim}
279 \begin{prooftree}
280 \AxiomC{$P$}
281 \AxiomC{}
282 \UnaryInfC{$\neg P$}
283 \BinaryInfC{$\bot$}
284 \UnaryInfC{$\neg\neg P$}
285 \end{prooftree}
286 \end{verbatim}
287 \end{quote}
288 generates the proof
289 \begin{prooftree}
290 \AxiomC{$P$}
291 \AxiomC{}
292 \UnaryInfC{$\neg P$}
293 \BinaryInfC{$\bot$}
294 \UnaryInfC{$\neg\neg P$}
295 \end{prooftree}
296
297 \subsection{More than three premisses}
298
299 So far we've only considered inference steps that take one premiss (like double negation), two premisses (like modus ponens), or three inputs (like or-elimination). But Buss proofs in fact supplies -- should you want it -- the capacity to deal with four or five premisses. The syntax is as you would expect. We have the two commands
300 \begin{quote}
301 \begin{description}\setlength{\itemsep}{0.0in}
302 \item \verb=\QuaternaryInfC{=\textit{form}\verb=}=
303 \item \verb=\QuinaryInfC{=\textit{form}\verb=}=
304 \end{description}
305 \end{quote}
306 These aren't pointless! After all, you might want to illustrate the $\omega$-rule thus:
307 \begin{quote}
308 \begin{verbatim}
309 \begin{prooftree}
310 \AxiomC{$\varphi(0)$}
311 \AxiomC{$\varphi(1)$}
312 \AxiomC{$\varphi(2)$}
313 \AxiomC{$\varphi(3)$}
314 \AxiomC{$\ldots$}
315 \QuinaryInfC{$\forall n\varphi(n)$}
316 \end{prooftree}
317 \end{verbatim}
318 \end{quote}
319 to give
320 \begin{quote}
321 \begin{prooftree}
322 \AxiomC{$\varphi(0)$}
323 \AxiomC{$\varphi(1)$}
324 \AxiomC{$\varphi(2)$}
325 \AxiomC{$\varphi(3)$}
326 \AxiomC{$\ldots$}
327 \QuinaryInfC{$\forall n\varphi(n)$}
328 \end{prooftree}
329 \end{quote}
330
331
332
333
334 \section{`Sequent-aligned' proofs: the structural commands}
335 \subsection{The commands} There are four basic proof-building commands for producing proofs in the second style:
336 \begin{quote}
337 \begin{description}\setlength{\itemsep}{0.0in}
338 \item \verb=\Axiom$= \textit{form} \verb=\fCenter= \textit{form} \verb=$=
339 \item \verb=\UnaryInf$= \textit{form} \verb=\fCenter= \textit{form} \verb=$=
340 \item \verb=\BinaryInf$= \textit{form} \verb=\fCenter= \textit{form} \verb=$=
341 \item \verb=\TrinaryInf$= \textit{form} \verb=\fCenter= \textit{form} \verb=$=
342 \end{description}
343 \end{quote}
344 where `\textit{form}' holds the place for a formula or formulae, and \verb=\fCenter= marks the point of alignment.
345 \begin{itemize}\setlength{\itemsep}{0.0in}
346 \item This time, the use of the surrounding `\verb=$='s is mandatory; and material between the `\verb=$='s is set in math mode.
347 \item The `\verb=\fCenter=' is by default just a place-marker; however, it can be redefined to be printed character such as a sequent arrow or turnstile.
348 \end{itemize}
349 And for multi-premiss usage, we also have the additional commands:
350 \begin{quote}
351 \begin{description}\setlength{\itemsep}{0.0in}
352 \item \verb=\QuaternaryInf$= \textit{form} \verb=\fCenter= \textit{form} \verb=$=
353 \item \verb=\QuinaryInf$= \textit{form} \verb=\fCenter= \textit{form} \verb=$=\end{description}
354 \end{quote}
355
356 \subsection{Usage}
357 The basic usage is illustrated by the following:
358 \def\fCenter{}
359 \begin{quote}
360 \begin{verbatim}
361 \begin{prooftree}
362 \Axiom$A, B, C, D,\fCenter\ E, F$
363 \UnaryInf$A, B,\fCenter\ C, D, E, F$
364 \end{prooftree}
365 \end{verbatim}
366 \end{quote}
367 \begin{prooftree}
368 \Axiom$A, B, C, D,\fCenter\ E, F$
369 \UnaryInf$A, B,\fCenter\ C, D, E, F$
370 \end{prooftree}
371 Now let's redefine \verb=\fCenter= to be the turnstile surrounded by spaces. Then
372 \begin{quote}
373 \begin{verbatim}
374 \begin{prooftree}
375 \def\fCenter{\ \vdash\ }
376 \Axiom$A, B, C, D \fCenter E, F$
377 \UnaryInf$A, B \fCenter C, D, E, F$
378 \end{prooftree}
379 \end{verbatim}
380 \end{quote}
381 produces
382 \begin{prooftree}
383 \def\fCenter{\ \vdash\ }
384 \Axiom$A, B, C, D \fCenter E, F$
385 \UnaryInf$A, B \fCenter C, D, E, F$
386 \end{prooftree}
387 However, it is in general preferable to redefine \verb=\fCenter= using an \verb=\mbox= as in the next example (this allows more options):
388 \begin{quote}
389 \begin{verbatim}
390 \def\fCenter{\mbox{\Large$\rightarrow$}}
391 \begin{prooftree}
392 \Axiom$\Gamma, A, B\ \fCenter\ B$
393 \UnaryInf$\Gamma, A\ \fCenter\ (B \to C)$
394 \UnaryInf$\Gamma\ \fCenter\ (A \to (B \to C))$
395 \end{prooftree}
396 \end{verbatim}
397 \end{quote}
398 produces
399 \def\fCenter{\mbox{\Large$\rightarrow$}}
400 \begin{prooftree}
401 \Axiom$\Gamma, A, B\ \fCenter\ B$
402 \UnaryInf$\Gamma, A\ \fCenter\ (B \to C)$
403 \UnaryInf$\Gamma\ \fCenter\ (A \to (B \to C))$
404 \end{prooftree}
405 And this time, since the \verb=\def\fCenter{...}= command precedes the following \verb=prooftree= environment, it will stay in effect until overridden later in the document.
406 \begin{itemize}
407 \item The chaining of multiple sequent-aligning commands to build complex proofs works just as with the earlier centering-style commands.
408 \item It should go without saying that the point of the \verb=\BinaryInf$...$= command is not to align the sequent turnstile, (arrow, or whatever) in the conclusion of the two-premiss inference with the turnstiles in the premisses, but to provide a new alignment point for later sequents.
409 \item Mixing and matching sensible combinations of \verb=C{...}=-type centering commands and \verb=$...$=-type sequent-aligning commands is in fact legitimate.
410 \end{itemize}
411 Thus, to illustrate the last point,
412 \begin{quote}
413 \begin{verbatim}
414 \begin{prooftree}
415 \def\fCenter{\mbox{\ $\vdash$\ }}
416 \AxiomC{$\Gamma \vdash A$}
417 \AxiomC{$A, B \vdash C$}
418 \BinaryInf$\Gamma, B \fCenter C$
419 \UnaryInf$\Gamma \fCenter B \to C$
420 \end{prooftree}
421 \end{verbatim}
422 \end{quote}
423 is acceptable, and yields
424 \begin{prooftree}
425 \def\fCenter{\mbox{\ $\vdash$\ }}
426 \AxiomC{$\Gamma \vdash A$}
427 \AxiomC{$A, B \vdash C$}
428 \BinaryInf$\Gamma, B \fCenter C$
429 \UnaryInf$\Gamma \fCenter B \to C$
430 \end{prooftree}
431
432
433
434 \section{Additional layout commands}
435 Conventionally, the proof
436 \begin{prooftree}
437 \AxiomC{$P$}
438 \AxiomC{}
439 \UnaryInfC{$\neg P$}
440 \BinaryInfC{$\bot$}
441 \UnaryInfC{$\neg\neg P$}
442 \end{prooftree}
443 needs labelling. This section describes how to add labels to proofs, and also how to change the style of inference-line (to double lines, etc.).
444
445 \subsection{Adding labels} There are two commands for decorating a proof with labels:
446 \begin{quote}
447 \begin{description}\setlength{\itemsep}{0.0in}
448 \item \verb=\LeftLabel{text}=
449 \item \verb=\RightLabel{text}=
450 \end{description}
451 \end{quote}
452 These put \verb=text= as a label to the left/right of the next inference line (and they work even if \verb=\noLine= is used and line isn't actually drawn).
453
454 So, for example, the commands
455 \begin{quote}
456 \begin{verbatim}
457 \begin{prooftree}
458 \AxiomC{$\Gamma, A \vdash B$}
459 \LeftLabel{Conditional Proof:}
460 \UnaryInfC{$\Gamma \vdash A \rightarrow B$}
461 \end{prooftree}
462 \end{verbatim}
463 \end{quote}
464 will generate
465 \begin{prooftree}
466 \AxiomC{$\Gamma, A \vdash B$}
467 \LeftLabel{Conditional Proof:}
468 \UnaryInfC{$\Gamma \vdash A \rightarrow B$}
469 \end{prooftree}
470 You can insert spacing commands and other text commands into the label text, so e.g. substituting \verb=\LeftLabel{Conditional Proof:\quad}= will generate
471 \begin{prooftree}
472 \AxiomC{$\Gamma, A \vdash B$}
473 \LeftLabel{Conditional Proof:\quad}
474 \UnaryInfC{$\Gamma \vdash A \rightarrow B$}
475 \end{prooftree}
476 However, there is also a global command for adjusting the position of labels, and in general it might be better to use that.
477
478 You can reduce the size of the label font, so that
479 \begin{quote}
480 \begin{verbatim}
481 \begin{prooftree}
482 \AxiomC{$P$}
483 \AxiomC{}
484 \RightLabel{\scriptsize(1)}
485 \UnaryInfC{$\neg P$}
486 \BinaryInfC{$\bot$}
487 \RightLabel{\scriptsize(1)}
488 \UnaryInfC{$\neg\neg P$}
489 \end{prooftree}
490 \end{verbatim}
491 \end{quote}
492 will set the conventionally annotated proof
493 \begin{prooftree}
494 \AxiomC{$P$}
495 \AxiomC{}
496 \RightLabel{\scriptsize(1)}
497 \UnaryInfC{$\neg P$}
498 \BinaryInfC{$\bot$}
499 \RightLabel{\scriptsize(1)}
500 \UnaryInfC{$\neg\neg P$}
501 \end{prooftree}
502 \subsection{Varieties of inference lines} The inference line between premiss and derived conclusion defaults, as we've seen, to a single solid line. But this can be changed, either locally or more globally. The local change commands are
503 \begin{quote}
504 \begin{description}\setlength{\itemsep}{0.0in}
505 \item \verb=\noLine=
506 \item \verb=\singleLine=
507 \item \verb=\doubleLine=
508 \item \verb=\solidLine=
509 \item \verb=\dottedLine=
510 \item \verb=\dashedLine=
511 \end{description}
512 \end{quote}
513 Each applies to the next inference, and line-\emph{number} and line-\emph{type} commands can be combined: so, for example,
514 \begin{quote}
515 \begin{verbatim}
516 \begin{prooftree}
517 \AxiomC{$\Gamma, A \vdash B$}
518 \doubleLine\dashedLine
519 \UnaryInfC{$\Gamma \vdash A \rightarrow B$}
520 \end{prooftree}
521 \end{verbatim}
522 \end{quote}
523 produces the following:
524 \begin{prooftree}
525 \AxiomC{$\Gamma, A \vdash B$}
526 \doubleLine\dashedLine
527 \UnaryInfC{$\Gamma \vdash A \rightarrow B$}
528 \end{prooftree}
529 There are corresponding global commands that can be placed anywhere in a proof and will affect all succeeding lines unless and until overridden.
530 \begin{quote}
531 \begin{description}\setlength{\itemsep}{0.0in}
532 \item \verb=\alwaysNoLine=
533 \item \verb=\alwaysSingleLine=
534 \item \verb=\alwaysDoubleLine=
535 \item \verb=\alwaysSolidLine=
536 \item \verb=\alwaysDottedLine=
537 \item \verb=\alwaysDashedLine=
538 \end{description}
539 \end{quote}
540 Here `succeeding lines' means `succeeding in the (vertical) order that commands are given' not `logically succeeding'. (Note: Sam Buss comments that \verb=\alwaysNoLine= is `untested': but it seems to work fine on my trials.)
541
542 So, for example, the commands
543 \begin{quote}
544 \begin{verbatim}
545 \begin{prooftree}
546 \alwaysNoLine
547 \AxiomC{$\Pi_1$}
548 \UnaryInfC{$A$}
549 \AxiomC{[$A$]}
550 \UnaryInfC{$\Pi_2$}
551 \UnaryInfC{$B$}
552 \alwaysSingleLine
553 \UnaryInfC{$A \to B$}
554 \BinaryInfC{$B$}
555 \end{prooftree}
556 \end{verbatim}
557 \end{quote}
558 produces the following:
559 \begin{prooftree}
560
561 \alwaysNoLine
562 \AxiomC{$\Pi_1$}
563 \UnaryInfC{$A$}
564 \AxiomC{[$A$]}
565 \UnaryInfC{$\Pi_2$}
566 \UnaryInfC{$B$}
567 \alwaysSingleLine
568 \UnaryInfC{$A \to B$}
569 \BinaryInfC{$B$}
570 \end{prooftree}
571
572 \subsection{Turning a proof upside down}
573
574 Suppose you want to set a proof-tree the other way up, i.e. get a \emph{downward} branching tree with the root at the \emph{top}. Then you need the command \verb=\rootAtTop=. Note, this applies only to the current proof. If you want to make this behaviour persistent, then use \verb=\alwaysRootAtTop=. (The default behaviour can be restored using \verb=\rootAtBottom= and \verb=\alwaysRootAtBottom=.)
575
576
577 \section{Fine-tuning the proof layout}
578 \texttt{bussproofs.sty} allows a lot of user-modification of the default style of proof lay-out, either by global modifications of parameters, or by local tweakings within a proof. We'll divide these commands into
579 \begin{itemize}\setlength{\itemsep}{0.0in}
580 \item commands for determining \emph{where a whole proof is set};
581 \item commands for \emph{adjusting the `geometry' within a proof};
582 \item commands for \emph{redefining line styles}.
583 \end{itemize}
584
585 \subsection{Where a proof is set}
586
587 \noindent\textbf{i}\quad The amount of \emph{space above and below} a proof-tree display is set by the parameter
588 \begin{quote}
589 \begin{description}\setlength{\itemsep}{0.0in}
590 \item \verb=\proofSkipAmount=
591 \end{description}
592 \end{quote}
593 Its default setting is \verb={\vskip.8ex plus.8ex minus.4ex}=. This can be modified, and negative values of \verb=\vskip= are accepted.
594
595 To change the space above the tree (which you'll want to do if the top lines are null axioms, which generate additional white space), use \verb=\def\proofSkipAmount{\vskip= \emph{new-skip}\verb=}= \emph{before} the opening command \verb=\begin{prooftree}=; the size of the skip after the proof can then be reset by another \verb=\def\proofSkipAmount{...}= command before the proof closes.
596
597 \vspace{12pt}\noindent\textbf{ii}\quad Whole proofs set using the proof-tree environment can be \emph{nudged sideways} by using the command \verb=\hskip= \emph{nudge} (no brackets!) placed e.g. immediately after the command \verb=\begin{prooftree}=. A positive value of \emph{nudge} such as \verb=0.5in= shifts the proof to the right, a negative value such as \verb=-20pt= shifts the proof left.
598
599 \EnableBpAbbreviations
600 \vspace{4pt}\noindent\textbf{iii}\quad For \emph{vertical positioning of in-line proofs}, compare \AXC{$\phi \land \psi$}\UIC{$\phi$}\DP with \centerAlignProof\AXC{$\phi \land \psi$}\UIC{$\phi$}\DP and \bottomAlignProof\AXC{$\phi \land \psi$}\UIC{$\phi$}\DP\hspace{-6pt}. The first is set vertically centered within the current line (the default position), the second is set rather lower so (at least with a one-step proof) the inference line is on a level with the foot of the current line, and the third is set with the conclusion aligned to the current line. To produce the second tree, use the command \verb=\centerAlignProof=; to produce the third tree, use \verb=\bottomAlignProof=; to restore the default positioning
601 use \verb=\normalAlignProof=.
602
603 \subsection{Layout within a proof}
604 In this section, we consider the use of
605
606 \begin{quote}
607 \begin{description}\setlength{\itemsep}{0.0in}
608 \item \verb=\ScoreOverhang= (controls how far inference lines `overhang' the premisses/conclusion)
609 \item \verb=\extraVskip= (controls the extra space above and below lines)
610 \item \verb=\labelSpacing= (controls horizontal space separating labels and inference lines)
611 \item \verb=\defaultHypSeparation= (controls horizontal spread of proof tree)
612 \item \verb=\insertBetweenHyps= (can be used to adjust position of hypotheses in next inference)
613 \item \verb=\kernHyps= (nudges hypotheses left or right)
614 \end{description}
615 \end{quote}
616
617 \noindent\textbf{i}\quad The default setting of \verb=\ScoreOverhang= is \verb={4pt}=. This produces e.g. the tree
618 \begin{prooftree}
619 \AxiomC{$\phi \land \psi$}
620 \UnaryInfC{$\psi$}
621 \AxiomC{$\phi \land \psi$}
622 \UnaryInfC{$\phi$}
623 \BinaryInfC{$\psi \land \phi$}
624 \end{prooftree}
625 Inserting, for example, the line \verb=\def\ScoreOverhang{1pt}= at the beginning of the chain of proof-commands changes (improves!?) the look of the tree by reducing the `overhang' of inference lines:
626 \begin{prooftree}
627 \def\ScoreOverhang{1pt}
628 \AxiomC{$\phi \land \psi$}
629 \UnaryInfC{$\psi$}
630 \AxiomC{$\phi \land \psi$}
631 \UnaryInfC{$\phi$}
632 \BinaryInfC{$\psi \land \phi$}
633 \end{prooftree}
634 \vspace{12pt}
635 \noindent\textbf{ii}\quad The default setting of \verb=\extraVskip= is \verb={2pt}=, which inserts 2 pt spacing above and below an inference line, as in the last two proofs. To increase this throughout the proof, use e.g. the line \verb=\def\extraVskip{3pt}= at the beginning of the chain of proof-commands to get
636 \begin{prooftree}
637 \def\extraVskip{3pt}
638 \def\ScoreOverhang{1pt}
639 \AxiomC{$\phi \land \psi$}
640 \UnaryInfC{$\psi$}
641 \AxiomC{$\phi \land \psi$}
642 \UnaryInfC{$\phi$}
643 \BinaryInfC{$\psi \land \phi$}
644 \end{prooftree}
645 You can also change the interline skip on the fly, during a proof, to improve alignments. Thus compare
646 \begin{center}
647 \alwaysNoLine
648 \AxiomC{$\Pi_1$}
649 \UnaryInfC{$A$}
650 \AxiomC{[$A$]}
651 \UnaryInfC{$\Pi_2$}
652 \UnaryInfC{$B$}
653 \alwaysSingleLine
654 \UnaryInfC{$A \to B$}
655 \BinaryInfC{$B$}
656 \DisplayProof
657 \hspace{24pt}
658 \alwaysNoLine
659 \AxiomC{$\Pi_1$}
660 \def\extraVskip{1pt}\UnaryInfC{$A$}
661 \AxiomC{[$A$]}
662 \def\extraVskip{2pt}
663 \UnaryInfC{$\Pi_2$}
664 \UnaryInfC{$B$}
665 \def\extraVskip{2.5pt}
666 \alwaysSingleLine
667 \UnaryInfC{$A \to B$}
668 \BinaryInfC{$B$}
669 \DisplayProof
670 \end{center}
671 Here, the proof on the left was created by using the default settings, and the one on the right was created by the following commands (with the two proofs being set in the same line in a \verb=\begin{center} ... \end{center}= environment):
672 \begin{quote}
673 \begin{verbatim}
674 \alwaysNoLine
675 \AxiomC{$\Pi_1$}
676 \def\extraVskip{1pt}
677 \UnaryInfC{$A$}
678 \AxiomC{[$A$]}
679 \def\extraVskip{2pt}
680 \UnaryInfC{$\Pi_2$}
681 \UnaryInfC{$B$}
682 \def\extraVskip{2.5pt}
683 \alwaysSingleLine
684 \UnaryInfC{$A \to B$}
685 \BinaryInfC{$B$}
686 \DisplayProof
687 \end{verbatim}
688 \end{quote}
689
690 \vspace{4pt}
691 \noindent\textbf{iii}\quad The default setting of \verb=\labelSpacing= is \verb={3pt}=, which inserts 3 pt between inference lines and their associated labels. To change this, use the command \verb=\def\labelSpacing{=\emph{new-space}\verb=}= at the beginning of a chain of proof-commands. For example
692 \begin{prooftree}
693 \def\extraVskip{2pt}
694 \def\labelSpacing{8pt}
695 \def\ScoreOverhang{1.2pt}
696 \AxiomC{$(\phi \land \psi)$}
697 \UnaryInfC{$\psi$}
698 \AxiomC{}
699 \RightLabel{\scriptsize(1)}
700 \def\extraVskip{1pt}
701 \UnaryInfC{$\neg\psi$}
702 \def\extraVskip{2pt}
703 \BinaryInfC{$\bot$}
704 \RightLabel{\scriptsize(1)}
705 \UnaryInfC{$\neg(\psi \land \phi)$}
706 \end{prooftree}
707 is set with \verb=\def\labelSpacing{8pt}=.
708
709
710
711
712 \vspace{12pt}
713
714 \noindent\textbf{iv}\quad The default setting of \verb=\defaultHypSeparation= is \verb={\hskip.2in}=. Increase this to spread out a spread out a proof horizontally, decrease it to squeeze the proof. Thus compare
715 \begin{center}
716 \def\defaultHypSeparation{\hskip .1in}
717 \def\ScoreOverhang{1pt}
718 \AxiomC{$\phi \land \psi$}
719 \UnaryInfC{$\psi$}
720 \AxiomC{$\phi \land \psi$}
721 \UnaryInfC{$\phi$}
722 \BinaryInfC{$\psi \land \phi$}
723 \DisplayProof
724 \hspace{24pt}
725 \def\defaultHypSeparation{\hskip.5in}
726 \def\ScoreOverhang{1pt}
727 \AxiomC{$\phi \land \psi$}
728 \UnaryInfC{$\psi$}
729 \AxiomC{$\phi \land \psi$}
730 \UnaryInfC{$\phi$}
731 \BinaryInfC{$\psi \land \phi$}
732 \DisplayProof
733 \end{center}
734 where the proof commands for the left tree start \verb=\def\defaultHypSeparation{\hskip .1in}=, and for the right tree start \verb=\def\defaultHypSeparation{\hskip .5in}=.
735
736 \vspace{12pt}
737 \noindent\textbf{v}\quad Use the command \verb=\insertBetweenHyps{=\emph{stuff}\verb=}= before a binary or trinary inference command to insert \emph{stuff} between the hypotheses of that inference. The obvious use of this is to adjust the spacing between the hypotheses of that inference, by using e.g.
738 \verb=\insertBetweenHyps{\hskip -4pt}=.
739
740 \vspace{12pt}
741 \noindent\textbf{vi}\quad Use the command \verb=\kernHyps{=\emph{kern}\verb=}= before an inference command to nudge the hypotheses of that inference right by the distance \emph{kern}, e.g. \verb=4pt=. Negative values of \emph{kern} nudge the hypotheses to the left.
742
743 \subsection{Inference-line styles}
744
745 In this section, we consider the use of
746
747 \begin{quote}
748 \begin{description}\setlength{\itemsep}{0.0in}
749 \item \verb=\ruleScoreFiller= (sets the style of solid rules)
750 \item \verb=\dottedScoreFiller= (sets the style of dotted rules)
751 \item \verb=\dashedBuildScore= (sets the style of dashed rules)
752 \end{description}
753 \end{quote}
754 \noindent\textbf{i}\quad The default setting of \verb=\ruleScoreFiller= is \verb={\hrule}=, and in \LaTeX\ an unqualified \verb=\hrule= command produces a horizontal line of thickness 0.4 pt. To change the rule's thickness, use the command \verb=\def\ruleScoreFiller{\hrule height= \emph{new-thickness}\verb=}=.
755
756 \vspace{12pt}
757 \noindent\textbf{ii}\quad The default setting of \verb=\dottedScoreFiller= is \verb={\hbox to4pt{\hss.\hss}}=. The default for \verb=\dashedBuildScore= is \begin{quote}
758 \verb={\hbox to2.8mm{\hss\vrule width1.4mm height0.4pt depth0.0pt\hss}}=
759 \end{quote} Both defaults can be altered to produce any other desired type of line.
760
761 \section{Abbreviating the commands}\label{abbrev}
762 Using the command \verb=\EnableBpAbbreviations= enables some laconic shorthand for various commands:
763 \begin{quote}
764 \begin{description}\setlength{\itemsep}{0.0in}
765 \item \verb=\AX= and \verb=\AXC= abbreviate \verb=\Axiom= and \verb=\AxiomC=
766 \item \verb=\UI= and \verb=\UIC= abbreviate \verb=\UnaryInf= and \verb=\UnaryInfC=
767 \item \verb=\BI= and \verb=\BIC= abbreviate \verb=\BinaryInf= and \verb=\BinaryInfC=
768 \item \verb=\TI= and \verb=\TIC= abbreviate \verb=\TrinaryInf= and \verb=\TrinaryInfC=
769 \item \verb=\DP= abbreviates \verb=\DisplayProof=
770 \end{description}
771 \end{quote}
772 The enabling of these short abbreviations is optional, and users should guard against conflicts with commands from other
773 macro packages or their own defined abbreviations.
774
775 \end{document}