| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
\documentclass[12pt]{article} |
| 5 |
\usepackage{bussproofs} |
| 6 |
\usepackage{amssymb} |
| 7 |
\usepackage{latexsym} |
| 8 |
|
| 9 |
% This is the "centered" symbol |
| 10 |
\def\fCenter{{\mbox{\Large$\rightarrow$}}} |
| 11 |
|
| 12 |
% Optional to turn on the short abbreviations |
| 13 |
\EnableBpAbbreviations |
| 14 |
|
| 15 |
% \alwaysRootAtTop % makes proofs upside down |
| 16 |
% \alwaysRootAtBottom % -- this is the default setting |
| 17 |
|
| 18 |
\begin{document} |
| 19 |
\thispagestyle{empty} |
| 20 |
|
| 21 |
When the {\tt bussproofs.sty} code was first written, the |
| 22 |
only documention for the {\tt bussproofs} style was in the |
| 23 |
comments at the beginning of the style file {\tt bussproofs.sty}. |
| 24 |
But recently (July 2004), Peter Smith has written an excellent |
| 25 |
exposition of {\tt bussproofs.sty}, presently available |
| 26 |
at |
| 27 |
\begin{center} |
| 28 |
\tt |
| 29 |
http://www.phil.cam.ac.uk/teaching\_staff/Smith/LaTeX/nd.html |
| 30 |
\end{center} |
| 31 |
|
| 32 |
The present document is |
| 33 |
a sample \LaTeX{} file that was created for testing |
| 34 |
purposes while writing the {\tt bussproofs} code and you might |
| 35 |
find that it useful as an example of how to |
| 36 |
use special features of the style. |
| 37 |
|
| 38 |
Author: Sam Buss \hspace*{1in} Email: {\tt [email protected]}. |
| 39 |
\vspace*{0.25in} |
| 40 |
|
| 41 |
Here is some text. |
| 42 |
\begin{center} |
| 43 |
\Axiom$\Gamma^\prime\fCenter\Delta,A,A$ |
| 44 |
\LeftLabel{Weakening}\RightLabel{} |
| 45 |
\UnaryInf$\lnot A,\Gamma^\prime \fCenter \Delta, A$ |
| 46 |
\LeftLabel{.}\RightLabel{\small $\lor$:right} |
| 47 |
\UnaryInf$\lnot A,\lnot A,\Gamma^\prime \fCenter \Delta$ |
| 48 |
\LeftLabel{eigenvariable $x$}\RightLabel{$\forall$:right} |
| 49 |
\UnaryInf$\Gamma \fCenter \Delta$ |
| 50 |
\DisplayProof |
| 51 |
\end{center} |
| 52 |
Here is more text. |
| 53 |
\begin{prooftree} |
| 54 |
\alwaysDashedLine |
| 55 |
\alwaysDoubleLine |
| 56 |
\Axiom$\Delta\fCenter\Pi$ |
| 57 |
\Axiom$\Gamma^\prime\fCenter\Delta,A$ |
| 58 |
\dottedLine |
| 59 |
\singleLine |
| 60 |
\UnaryInf$\lnot A,\Gamma^\prime \fCenter \Delta$ |
| 61 |
\UnaryInf$\lnot A,\lnot A,\Gamma^\prime \fCenter \Delta$ |
| 62 |
\singleLine |
| 63 |
\UnaryInf$\Gamma \fCenter \Delta$ |
| 64 |
\BinaryInf$\Gamma,\Pi,A \fCenter \Delta, \Delta,B$ |
| 65 |
\Axiom$\fCenter\mbox{\rm Hi there}$ |
| 66 |
\singleLine |
| 67 |
\BinaryInf$\Gamma\fCenter\Delta$ |
| 68 |
\end{prooftree} |
| 69 |
\begin{center} |
| 70 |
\alwaysDoubleLine |
| 71 |
\AX$\Delta\fCenter\Pi$ |
| 72 |
\AX$\Gamma^\prime\fCenter\Delta,A$ |
| 73 |
\singleLine |
| 74 |
\UI$\lnot A,\Gamma^\prime \fCenter \Delta$ |
| 75 |
\UI$\lnot A,\lnot A,\Gamma^\prime \fCenter \Delta$ |
| 76 |
\singleLine |
| 77 |
\UI$\Gamma \fCenter \Delta$ |
| 78 |
\LL{.}\RightLabel{$\lor$:left} |
| 79 |
\BI$\Gamma,\Pi,A \fCenter \Delta, \Delta,B$ |
| 80 |
\AXC{Hi there} |
| 81 |
\singleLine |
| 82 |
\BI$\Gamma\fCenter\Delta$ |
| 83 |
\DisplayProof |
| 84 |
\end{center} |
| 85 |
The above examples show `displayed' proofs. |
| 86 |
On the other hand, |
| 87 |
for putting proofs inline instead of displayed, |
| 88 |
it is also permissable to put proofs into text rather than into |
| 89 |
centered environments. For example, one can write a proof right |
| 90 |
here: |
| 91 |
\centerAlignProof %Which ever one of these is LAST sets the vertical alignment |
| 92 |
\bottomAlignProof %Try commenting out all but one of these three lines. |
| 93 |
\normalAlignProof |
| 94 |
\Axiom$\Gamma^\prime\fCenter\Delta,A$ |
| 95 |
\doubleLine |
| 96 |
\UnaryInf$\lnot A,\Gamma^\prime \fCenter \Delta$ |
| 97 |
\UnaryInf$\lnot A,\lnot A,\Gamma^\prime \fCenter \Delta$ |
| 98 |
\doubleLine |
| 99 |
\UnaryInf$\Gamma \fCenter \Delta$ |
| 100 |
\Axiom$\Delta\fCenter\Pi$ |
| 101 |
\kernHyps{-.5in}\insertBetweenHyps{\hskip-.25in} |
| 102 |
\BinaryInf$\Gamma,\Pi,A \fCenter \Delta, \Delta,B$ |
| 103 |
\Axiom$\fCenter\mbox{\rm Hi there}$ |
| 104 |
\doubleLine |
| 105 |
\BinaryInf$\Gamma\fCenter\Delta$ |
| 106 |
\DisplayProof{} %% NOTE THE USE OF "{}" |
| 107 |
although of course the proof is quite big compared to the text. |
| 108 |
There is no reason you could not add \verb+\subscriptstyle+ or \verb+\small+ |
| 109 |
commands to the lines of the proofs to shrink things down. |
| 110 |
The previous proof looks strange because it is illustrated the usage |
| 111 |
of \verb+\kernHyps+ and \verb+\insertBetweenHyps+. Finally |
| 112 |
a 3-ary inference with a usage of \verb+\noLine+ is: |
| 113 |
\begin{prooftree} |
| 114 |
\AxiomC{$A\lor B$} |
| 115 |
\AxiomC{$[A]$} |
| 116 |
\noLine |
| 117 |
\UnaryInfC{$C$} |
| 118 |
\AxiomC{$[B]$} |
| 119 |
\noLine |
| 120 |
\UnaryInfC{$C$} |
| 121 |
\TrinaryInfC{$C$} |
| 122 |
\end{prooftree} |
| 123 |
|
| 124 |
|
| 125 |
Two more examples: |
| 126 |
\begin{center} |
| 127 |
\AxiomC{A,B} \AxiomC{C} \BIC{A-B-C} |
| 128 |
\AXC{good} \AXC{bad} \BIC{$\frac{good}{bad}$A} |
| 129 |
\BIC{done} |
| 130 |
\DP |
| 131 |
\end{center} |
| 132 |
|
| 133 |
\begin{center} |
| 134 |
\Axiom$\fCenter A,B$ \Axiom$\fCenter C$ \BI$\fCenter A-B-C$ |
| 135 |
\AX$\fCenter good$ \AX$\fCenter bad$ \BI$\fCenter\frac{good}{bad}A$ |
| 136 |
\BI$\fCenter done$ |
| 137 |
\DP |
| 138 |
\end{center} |
| 139 |
|
| 140 |
|
| 141 |
Small labels can be created as in the third proof below: |
| 142 |
\[ |
| 143 |
\AxiomC{A} |
| 144 |
\RightLabel{1} |
| 145 |
\UnaryInfC{$\bot$} |
| 146 |
\DisplayProof |
| 147 |
\quad |
| 148 |
\AxiomC{A} |
| 149 |
\RightLabel{(2)} |
| 150 |
\UnaryInfC{$\bot$} |
| 151 |
\DisplayProof |
| 152 |
\quad |
| 153 |
\AxiomC{A} |
| 154 |
\RightLabel{\scriptsize(3)} |
| 155 |
\UnaryInfC{$\bot$} |
| 156 |
\DisplayProof |
| 157 |
\quad |
| 158 |
\AxiomC{A} |
| 159 |
\LeftLabel{(4)} |
| 160 |
\UnaryInfC{$\bot$} |
| 161 |
\DisplayProof |
| 162 |
\] |
| 163 |
Arnold's example of inline proof: The figure |
| 164 |
\AxiomC{$\dots\Gamma_\iota\dots(\iota\in I)$} |
| 165 |
\RightLabel{$I$} |
| 166 |
\UnaryInfC{$\Gamma$} |
| 167 |
\DisplayProof{} |
| 168 |
is called ... |
| 169 |
%% NOTE THE USE OF "{}" after \DisplayProof to keep LaTeX from eating subsequent spaces! |
| 170 |
|
| 171 |
\bigskip |
| 172 |
|
| 173 |
\noindent{\bf Upside down proofs} |
| 174 |
Proofs can be rendered upside down. For instance the proof above with |
| 175 |
a 3-ary inference can be made upside down by giving the command |
| 176 |
\verb+\rootAtTop+. This is useful if you want your proof trees to have |
| 177 |
their root at the top. |
| 178 |
|
| 179 |
\alwaysRootAtTop % Henceforth puts the root at the top |
| 180 |
|
| 181 |
\begin{prooftree} |
| 182 |
\AxiomC{$A\lor B$} |
| 183 |
\AxiomC{$[A]$} |
| 184 |
\noLine |
| 185 |
\UnaryInfC{$C$} |
| 186 |
\AxiomC{$[B]$} |
| 187 |
\noLine |
| 188 |
\UnaryInfC{$C$} |
| 189 |
\TrinaryInfC{$C$} |
| 190 |
\end{prooftree} |
| 191 |
|
| 192 |
To make the change permanent for the rest of your document, use the |
| 193 |
command \verb+\alwaysRootAtTop+ |
| 194 |
|
| 195 |
\bigskip |
| 196 |
|
| 197 |
\noindent |
| 198 |
Another upside-down example, from Alex Hertel: |
| 199 |
\bigskip |
| 200 |
|
| 201 |
\hbox{\kern-2cm% |
| 202 |
\tiny |
| 203 |
\rootAtTop |
| 204 |
\AxiomC{$= 1$} |
| 205 |
\noLine |
| 206 |
\UnaryInfC{$( ( (1 \wedge 1) \vee 0 ) \vee ( (0 \wedge 0) \vee 0 ) )$} |
| 207 |
\AxiomC{$= 1$} |
| 208 |
\noLine |
| 209 |
\UnaryInfC{$( ( (1 \wedge 1) \vee 1 ) \vee ( (0 \wedge 0) \vee 1 ) )$} |
| 210 |
\LeftLabel{$[0/z]$} |
| 211 |
\RightLabel{$[1/z]$} |
| 212 |
\BinaryInfC{$\forall z ( ( (1 \wedge 1) \vee z ) \vee ( (0 \wedge 0) \vee z ) )$} |
| 213 |
\RightLabel{$[0/y]$} |
| 214 |
\UnaryInfC{$\exists y \forall z ( ( (1 \wedge \neg y) \vee z ) \vee ( (0 \wedge y) \vee z ) )$} |
| 215 |
\RightLabel{$[0/y]$} |
| 216 |
\UnaryInfC{$\exists y \forall z ( ( (1 \wedge \neg y) \vee z ) \vee ( (0 \wedge y) \vee z ) )$} |
| 217 |
|
| 218 |
\AxiomC{$= 1$} |
| 219 |
\noLine |
| 220 |
\UnaryInfC{$( ( (0 \wedge 0) \vee 0 ) \vee ( (1 \wedge 1) \vee 0 ) )$} |
| 221 |
\AxiomC{$= 1$} |
| 222 |
\noLine |
| 223 |
\UnaryInfC{$( ( (0 \wedge 0) \vee 1 ) \vee ( (1 \wedge 1) \vee 1 ) )$} |
| 224 |
\LeftLabel{$[0/z]$} |
| 225 |
\RightLabel{$[1/z]$} |
| 226 |
\BinaryInfC{$\forall z ( ( (0 \wedge 0) \vee z ) \vee ( (1 \wedge 1) \vee z ) )$} |
| 227 |
\RightLabel{$[1/y]$} |
| 228 |
\UnaryInfC{$\exists y \forall z ( ( (0 \wedge \neg y) \vee z ) \vee ( (1 \wedge y) \vee z ) )$} |
| 229 |
|
| 230 |
\LeftLabel{$[0/x]$} |
| 231 |
\RightLabel{$[1/x]$} |
| 232 |
\BinaryInfC{$\forall x \exists y \forall z ( ( (\neg x \wedge \neg y) \vee z ) \vee ( (x \wedge y) \vee z ) )$} |
| 233 |
\DisplayProof |
| 234 |
} % End of \hbox |
| 235 |
|
| 236 |
\bigskip |
| 237 |
|
| 238 |
|
| 239 |
\alwaysRootAtBottom |
| 240 |
Testing of quaternary and quinary inferences (a bit scrunched due a use of |
| 241 |
\verb+\insertBetweenHyps+): |
| 242 |
\begin{prooftree} |
| 243 |
\insertBetweenHyps{\hskip-1em} |
| 244 |
\AxiomC{$A^B$} |
| 245 |
\Axiom$A_B\fCenter A_{B_C}$ |
| 246 |
\Axiom$A^B\fCenter A^{B^C}$ |
| 247 |
\Axiom$A^{B^C}\fCenter A^{B^{C^D}}$ |
| 248 |
\Axiom$A^{B^{C^D}}\fCenter A^{B^{C^{D^E}}}A^{B^{C^{D^E}}}$ |
| 249 |
\QuinaryInf$X\fCenter XXXXX$ |
| 250 |
\UnaryInf$YYYY\fCenter Y$ |
| 251 |
\insertBetweenHyps{\hskip-1em} |
| 252 |
\Axiom$A^B\fCenter A^{B^C}$ |
| 253 |
\Axiom$A^{B^C}\fCenter A^{B^{C^D}}$ |
| 254 |
\Axiom$A^{B^{C^D}}\fCenter A^{B^{C^{D^E}}}A^{B^{C^{D^E}}}$ |
| 255 |
\QuaternaryInf$X\fCenter XXXXX$ |
| 256 |
\UnaryInf$YYYY\fCenter Y$ |
| 257 |
\end{prooftree} |
| 258 |
|
| 259 |
\alwaysRootAtTop |
| 260 |
Testing of quaternary and quinary inferences (a bit scrunched due a use of |
| 261 |
\verb+\insertBetweenHyps+): |
| 262 |
\begin{prooftree} |
| 263 |
\insertBetweenHyps{\hskip-1em} |
| 264 |
\AxiomC{$A^B$} |
| 265 |
\Axiom$A_B\fCenter A_{B_C}$ |
| 266 |
\Axiom$A^B\fCenter A^{B^C}$ |
| 267 |
\Axiom$A^{B^C}\fCenter A^{B^{C^D}}$ |
| 268 |
\Axiom$A^{B^{C^D}}\fCenter A^{B^{C^{D^E}}}A^{B^{C^{D^E}}}$ |
| 269 |
\QuinaryInf$X\fCenter XXXXX$ |
| 270 |
\UnaryInf$YYYY\fCenter Y$ |
| 271 |
\insertBetweenHyps{\hskip-1em} |
| 272 |
\Axiom$A^B\fCenter A^{B^C}$ |
| 273 |
\Axiom$A^{B^C}\fCenter A^{B^{C^D}}$ |
| 274 |
\Axiom$A^{B^{C^D}}\fCenter A^{B^{C^{D^E}}}A^{B^{C^{D^E}}}$ |
| 275 |
\QuaternaryInf$X\fCenter XXXXX$ |
| 276 |
\UnaryInf$YYYY\fCenter Y$ |
| 277 |
\end{prooftree} |
| 278 |
|
| 279 |
\begin{prooftree} |
| 280 |
\insertBetweenHyps{\hskip-1em} |
| 281 |
\Axiom$A^B\fCenter A^{B^C}$ |
| 282 |
\Axiom$A^{B^C}\fCenter A^{B^{C^D}}$ |
| 283 |
\Axiom$A^{B^{C^D}}\fCenter A^{B^{C^{D^E}}}A^{B^{C^{D^E}}}$ |
| 284 |
\TrinaryInf$X\fCenter XXXXX$ |
| 285 |
\end{prooftree} |
| 286 |
|
| 287 |
\newenvironment{proof}{\begin{trivlist}\item[]{\bf Proof\ }}% |
| 288 |
{\end{trivlist}} |
| 289 |
\newenvironment{proofX}{\noindent{\bf Proof\ }}% |
| 290 |
{} |
| 291 |
|
| 292 |
\begin{proofX} |
| 293 |
\begin{prooftree} |
| 294 |
\Axiom$A^{B^C}\fCenter A^{B^{C^D}}$ |
| 295 |
\Axiom$A^{B^{C^D}}\fCenter A^{B^{C^{D^E}}}A^{B^{C^{D^E}}}$ |
| 296 |
\BinaryInf$X\fCenter XXXXX$ |
| 297 |
\end{prooftree} |
| 298 |
\end{proofX} |
| 299 |
|
| 300 |
\newbox\gnBoxA |
| 301 |
\newdimen\gnCornerHgt |
| 302 |
\setbox\gnBoxA=\hbox{$\ulcorner$} |
| 303 |
\global\gnCornerHgt=\ht\gnBoxA |
| 304 |
\newdimen\gnArgHgt |
| 305 |
|
| 306 |
\def\Godelnum #1{% |
| 307 |
\setbox\gnBoxA=\hbox{$#1$}% |
| 308 |
\gnArgHgt=\ht\gnBoxA% |
| 309 |
\ifnum \gnArgHgt<\gnCornerHgt |
| 310 |
\gnArgHgt=0pt% |
| 311 |
\else |
| 312 |
\advance \gnArgHgt by -\gnCornerHgt% |
| 313 |
\fi |
| 314 |
\raise\gnArgHgt\hbox{$\ulcorner$} \box\gnBoxA % |
| 315 |
\raise\gnArgHgt\hbox{$\urcorner$}} |
| 316 |
|
| 317 |
This last sentence has nothing to do with proof trees, but shows my |
| 318 |
macros for G\"odel number delimeters: |
| 319 |
$\Godelnum A, \Godelnum B$ |
| 320 |
$\Godelnum s$ |
| 321 |
\end{document} |