Debian Codegraph @

texmf-dist/doc/latex/natded/extended_doc.tex

raw
1
2 %% natded package version 0.1
3 %% Copyright 2014 Mohammad M. Ajallooeian
4 %
5 % This work may be distributed and/or modified under the
6 % conditions of the LaTeX Project Public License, either version 1.3
7 % of this license or (at your option) any later version.
8 % The latest version of this license is in
9 % http://www.latex-project.org/lppl.txt
10 % and version 1.3 or later is part of all distributions of LaTeX
11 % version 2005/12/01 or later.
12 %
13 % This work has the LPPL maintenance status `maintained'.
14 %
15 % The Current Maintainer of this work is Mohammad M. Ajallooeian, [email protected].
16 %
17 % This work consists of the files natded.sty, natded.tex and extended_doc.tex
18 % and complied files natded.pdf and extended_doc.pdf.
19
20 \documentclass[11pt]{article}
21
22 \usepackage{latexsym, amssymb,amsmath,amsthm,wasysym}
23 \usepackage{bm} % Define \bm{} to use bold math fonts
24 \usepackage[normalem]{ulem}
25 \usepackage{listings}
26 \usepackage{paralist}
27
28 \usepackage{bussproofs} %Sam Buss's package for making Gentzen-like proof trees
29 \usepackage{fitch} % johan KlŸwer's sty file for making Fitch proofs
30 \usepackage{natded} %Mohammad Ajallooeian's sty file for making \Jas and \KM proofs.
31
32 \newcommand{\Jas}{Ja\'skowski }
33 \newcommand{\JasA}{Ja\'skowski}
34 \newcommand{\Jass}{Ja\'skowski's }
35 \newcommand{\JassA}{Ja\'skowski's}
36 \newcommand{\Gen}{Gentzen }
37 \newcommand{\GenA}{Gentzen}
38 \newcommand{\GensA}{Gentzen's}
39 \newcommand{\Gens}{Gentzen's }
40 \newcommand{\ND}{natural deduction }
41 \newcommand{\NDA}{natural deduction}
42 \newcommand{\KM}{Kalish-Montague }
43 \newcommand{\KMA}{Kalish-Montague}
44
45 \newcommand{\bx}{\square}
46 \newcommand{\dia}{\diamondsuit}
47
48 \title{Kalish/Montague and Ja{\'s}kowski Natural Deduction}
49 \author{Mohammad M. Ajallooeian\\ University of Alberta \and Francis Jeffry Pelletier \\
50 University of Alberta}
51
52 \date{}
53
54 \begin{document}
55 \maketitle
56
57
58 \noindent The Latex style file natded.sty will produce representations of natural deduction proofs in either \Jass original style or the modification of that style by \KMA. But before describing some of the details of the use of the natded.sty (including the use of ``guards''), we pause for some relevant historical information.
59
60 The history of the formal approach to natural deduction dates from 1934, when two papers appeared simultaneously in different journals written by authors who had no interaction of any type with one another. Stanis{\l}aw Ja{\'s}kowski (``On the Rules of Suppositions in Formal Logic'', \emph{Studia Logica}, v. 1) and Gerhard Gentzen (``Untersuchungen \"uber das logische Schlie\ss en'' [``Investigations into Logical Deduction''], \emph{Mathematische Zeitschrift} v. 39) worked on the same problem -- of trying to formally mimic the reasoning of ``ordinary mathematicians'' who would ``make assumptions and see where they lead'' and only later conclude with something that was not dependent on those assumptions.
61
62 Although they had essentially the same motivation, and arrived at similar but not quite identical conclusions, their methods of representing this sort of reasoning were quite different. Gentzen used a tree format, which can be mimicked using Sam Buss's bussproofs.sty. For example, the proof of the propositional logic theorem $\vdash(((p\rightarrow q)\land(\neg r\rightarrow\neg q))\rightarrow(p\rightarrow r))$ takes this form:
63
64
65 \begin{prooftree}
66 \AxiomC{\sout{ 3 } }
67 \noLine
68 \UnaryInfC{$\neg r$}
69 \AxiomC{\sout{ 1 } }
70 \noLine
71 \UnaryInfC{$((p\rightarrow q) \wedge (\neg r\rightarrow \neg q))$}
72 \LeftLabel{} \RightLabel{\scriptsize $\wedge$-E}
73 \UnaryInfC{$(\neg r\rightarrow \neg q)$}
74 \LeftLabel{} \RightLabel{\scriptsize $\rightarrow$-E}
75 \BinaryInfC{$\neg q$}
76 \AxiomC{\sout{ 1 } }
77 \noLine
78 \UnaryInfC{$((p\rightarrow q) \wedge (\neg r\rightarrow \neg q))$}
79 \LeftLabel{} \RightLabel{\scriptsize $\wedge$-E}
80 \UnaryInfC{$(p\rightarrow q)$}
81 \AxiomC{\sout{ 2 } }
82 \noLine
83 \UnaryInfC{$p$}
84 \LeftLabel{} \RightLabel{\scriptsize $\rightarrow$-E}
85 \BinaryInfC{$ q$}
86 \LeftLabel{} \RightLabel{\scriptsize $\bot$-I}
87 \BinaryInfC{$\bot$}
88 \LeftLabel{} \RightLabel{\scriptsize $\bot$-E (3)}
89 \UnaryInfC{$r$}
90 \LeftLabel{} \RightLabel{\scriptsize $\rightarrow$-I (2)}
91 \UnaryInfC{$(p\rightarrow r)$}
92 \LeftLabel{} \RightLabel{\scriptsize $\rightarrow$-I (1)}
93 \UnaryInfC{$(((p\rightarrow q) \wedge (\neg r\rightarrow \neg q))\rightarrow(p\rightarrow r))$}
94
95 \end{prooftree}
96
97 \medskip
98
99 A perhaps more familiar style of natural deduction proofs, especially among those who learned their elementary logic in philosophy departments, are the ones usually called ``Fitch'' representations. For this type of proof representation, there are two Latex packages in common use: Johan Kl\"uwer's fitch.sty and Peter Selinger's fitch.sty. Minor variants of these style packages are available, such as Richard Zach's lplfitch.sty. Here's that same proof using Kl\"uwer's fitch.sty:
100
101 \begin{equation*}
102 \begin{fitch}
103 \fa \fh ((p\rightarrow q) \wedge(\neg r\rightarrow\neg q)) \\
104 \fa \fa \fh p \\
105 \fa \fa \fa ((p\rightarrow q) \wedge(\neg r\rightarrow\neg q)) & 1, Reiteration \\
106 \fa \fa \fa (p\rightarrow q) & 3,$\wedge$E \\
107 \fa \fa \fa q & 2,4 $\rightarrow$E \\
108 \fa \fa \fa (\neg r\rightarrow\neg q) & 3,$\wedge$E \\
109 \fa \fa \fa \fh \neg r \\
110 \fa \fa \fa \fa (\neg r\rightarrow\neg q) & 6,Reiteration \\
111 \fa \fa \fa \fa \neg q & 7,8 $\rightarrow$E \\
112 \fa \fa \fa \fa q & 5,Reiteration \\
113 \fa \fa \fa r & 7--10, $\neg$E \\
114 \fa \fa (p\rightarrow r) & 2--11, $\rightarrow$I \\
115 \fa (((p\rightarrow q) \wedge(\neg r\rightarrow\neg q))) & 1--12,$\rightarrow$I
116 \end{fitch}
117 \end{equation*}
118
119 \noindent This method is derived from one (of two) methods for natural deduction proof representation described by \Jas (1934). However, this fitch method (from Fredric Fitch (1952) \emph{Symbolic Logic}) is not exactly the way \Jas did his proofs. Here's that same proof in this one of his methods:
120
121 \[
122 \Jproof{
123 \cablk{
124 \proofline {((p\rightarrow q)\land(\neg r \rightarrow\neg q))}{Supposition}
125 \cablk{
126 \proofline {p}{Supposition}
127 \proofline {((p\rightarrow q)\land(\neg r\rightarrow\neg q))}{1 Repeat}
128 \proofline {(p\rightarrow q)}{3 Simplification}
129 \proofline {q}{2, 4 Modus Ponens}
130 \proofline {(\neg r\rightarrow\neg q)}{3 Simplification}
131 \cablk{
132 \proofline {\neg r}{Supposition}
133 \proofline {(\neg r\rightarrow\neg q)}{6 Repeat}
134 \proofline {\neg q}{7, 8 Modus Ponens}
135 \proofline {q}{5 Repeat}
136 }{
137 \proofline {r}{7--10 Reductio ad Absurdum}
138 }
139 }{
140 \proofline {p\supset r}{2-11 Conditionalization}
141 }
142 }{
143 \proofline {(((p\rightarrow q)\land(\neg r\rightarrow\neg q)) \rightarrow(p \rightarrow r))}{1--12 Conditionalization}
144 }
145 }
146 \]
147
148
149 \noindent It can be seen that what Fitch did was to remove all but the left-side of the boxes (rectangles) that \Jas employed to indicate the new ``world of the supposition''. And Fitch underlined the assumption or hypothesis or supposition of each such world, which is the first line inside one of \Jass boxes. Although the difficulty of typesetting these boxes caused Fitch's method to became more common, at least one textbook employed a variant on this method of \JassA, namely D. Kalish \& R. Montague's (1964) \emph{Logic} and the expanded D. Kalish, R. Montague \& G. Mar (1980) \emph{Logic}. One noticeable difference is that the \KM method placed the conclusion of each one of the boxes at the \emph{beginning} of the subproof, just before the assumption. This was indicated by the word {\sc show}, so that when engaged in a (sub)proof, one starts by writing the desired conclusion of that (sub)proof, prefixed by this {\sc show}. And when one legitimately completes that subproof, one ``cancels'' the {\sc show} by drawing a line through it, which indicates that the conclusion can become a part of the next-outer (sub)proof. Here is that same theorem proved in the \KM system.
150
151 The codes for producing the \Jas and \KM proofs are in Listings~\ref{basicJproof} and \ref{basicKMproof}, respectively.
152
153 \scriptsize
154 \[
155 \KMproof{
156 \cbblk{
157 \proofline {(((p\rightarrow q)\land(\neg r\rightarrow\neg q))\rightarrow(p\rightarrow r))}{2--13 Conditionalization}
158 }{
159 \proofline {((p\rightarrow q)\land(\neg r\rightarrow\neg q))}{Supposition}
160 \cbblk{
161 \proofline {p\rightarrow r}{4--13 Conditionalization}
162 }{
163 \proofline {p}{Supposition}
164 \proofline {((p\rightarrow q)\land(\neg r\rightarrow\neg q))}{2 Repeat}
165 \proofline {(p\rightarrow q)}{5 Simplification}
166 \proofline {q}{4, 6 Modus Ponens}
167 \proofline {(\neg r\rightarrow\neg q)}{5 Simplification}
168 \cbblk{
169 \proofline {r}{10--13 Reductio ad Absurdum}
170 }{
171 \proofline {\neg r}{Supposition}
172 \proofline {(\neg r\rightarrow\neg q)}{8 Repeat}
173 \proofline {\neg q}{10, 11 Modus Ponens}
174 \proofline {q}{7 Repeat}
175 }
176 }
177 }
178 }
179 \]
180
181
182 \begin{lstlisting}[caption={\LaTeX\, code for Ja\'skowski-style proof},label={basicJproof},numbers=left,escapeinside={@}{@}]
183 \[
184 \Jproof{
185 \cablk{
186 \proofline {((p\rightarrow q)\land(\neg r \rightarrow\neg q))}{Supposition}
187 \cablk{
188 \proofline {p}{Supposition}
189 \proofline {((p\rightarrow q)\land(\neg r\rightarrow\neg q))}{1 Repeat}
190 \proofline {(p\rightarrow q)}{3 Simplification}
191 \proofline {q}{2, 4 Modus Ponens}
192 \proofline {(\neg r\rightarrow\neg q)}{3 Simplification}
193 \cablk{
194 \proofline {\neg r}{Supposition}
195 \proofline {(\neg r\rightarrow\neg q)}{6 Repeat}
196 \proofline {\neg q}{7, 8 Modus Ponens}
197 \proofline {q}{5 Repeat}
198 }{
199 \proofline {r}{7--10 Reductio ad Absurdum}
200 }
201 }{
202 \proofline {p\supset r}{2-11 Conditionalization}
203 }
204 }{
205 \proofline {(((p\rightarrow q)\land(\neg r\rightarrow\neg q)) \rightarrow(p \rightarrow r))}{1--12 Conditionalization}
206 }
207 }
208 \]
209 \end{lstlisting}
210
211 \begin{lstlisting}[caption={\LaTeX\, code for Kalish-Montague-style proof},label={basicKMproof},numbers=left,escapeinside={@}{@}]
212 \[
213 \KMproof{
214 \cbblk{
215 \proofline {(((p\rightarrow q)\land(\neg r\rightarrow\neg q))\rightarrow(p\rightarrow r))}{2--13 Conditionalization}
216 }{
217 \proofline {((p\rightarrow q)\land(\neg r\rightarrow\neg q))}{Supposition}
218 \cbblk{
219 \proofline {p\rightarrow r}{4--13 Conditionalization}
220 }{
221 \proofline {p}{Supposition}
222 \proofline {((p\rightarrow q)\land(\neg r\rightarrow\neg q))}{2 Repeat}
223 \proofline {(p\rightarrow q)}{5 Simplification}
224 \proofline {q}{4, 6 Modus Ponens}
225 \proofline {(\neg r\rightarrow\neg q)}{5 Simplification}
226 \cbblk{
227 \proofline {r}{10--13 Reductio ad Absurdum}
228 }{
229 \proofline {\neg r}{Supposition}
230 \proofline {(\neg r\rightarrow\neg q)}{8 Repeat}
231 \proofline {\neg q}{10, 11 Modus Ponens}
232 \proofline {q}{7 Repeat}
233 }
234 }
235 }
236 }
237 \]
238 \end{lstlisting}
239
240 \normalsize
241 \medskip
242
243 \noindent Within the code to produce the \Jas and the Kalish-Montague proofs we see two differences: First, the \Jas proofs use the main control \verb+\Jproof+, while the Kalish-Montague proofs employ \verb+\KMproof+. Secondly, within each of these different proof controls are the commands for typesetting the conclusion: in the \verb+\Jproof+, conclusions go \emph{after} the supporting subproof, so we use \verb+\cablk+ for \uline{c}onclusion \uline{a}fter block; in the \verb+\KMproof+ the conclusions come before the subproof so we use \verb+\cbblk+ for \uline{c}onclusion \uline{b}efore block. And we have written the block structure before the conclusion in the \Jas proof, while it is written after the conclusion in the Kalish-Montague proof.
244
245 \medskip
246
247 On Kl\"uwer's and Selinger's pages describing their two fitch.sty files, the following argument is displayed:
248
249 \begin{equation*}
250 \begin{fitch}
251 \fh \exists x\forall y P(x,y) \\
252 \fa \fitchmodal{v} \fitchmodalh{u} \forall y P(u,y) \\
253 \fa \fa \fa P(u,v) & $\forall${\bf E}, 2 \\
254 \fa \fa \fa \exists x P(x,v) & $\exists${\bf i}, 3 \\
255 \fa \fa \exists x P(x,v) & $\exists${\bf E}, 1, 2--4 \\
256 \fa \forall y\exists x P(x,y) & $\forall${\bf I}, 2--5 \\
257 \end{fitch}
258 \end{equation*}
259
260 \noindent The idea is that $u$ and $v$ are \emph{guards}, whose role is to prevent certain variables being imported into or exported out of the relevant subproof that they are guarding. A \Jas style proof of this theorem is given in Figure~\ref{fig:JasVarGuard} and is generated by Listing~\ref{lst:JasVarGuard}.
261
262 \scriptsize
263
264 \begin{figure}[h!]
265 \caption{A Ja\'skowski-style proof with guarded variables\label{fig:JasVarGuard}}
266 \scriptsize
267 \[
268 \Jproof
269 {\proofline{\exists x\forall yP(x,y)}{Premise}
270 \cablk[v]{
271 \cablk[u]{
272 \proofline{\forall yP(u,y)}{Supposition}
273 \proofline{P(u,v)}{2, $\forall\bm{E}$}
274 \proofline{\exists xP(x,v)}{3, $\exists\bm{I}$}
275 }
276 {\proofline{\exists xP(x,v)}{1,2--4, $\exists\bm{E}$} }
277 }
278 {\proofline{\forall y\exists xP(x,y)}{2--5, $\forall\bm{I}$}
279 }
280 }
281 \]
282 \end{figure}
283
284 \begin{lstlisting}[caption={\LaTeX\, code for \JasA-style proof with guarded variables},label={lst:JasVarGuard},numbers=left,escapeinside={@}{@}]
285 \[
286 \Jproof
287 {\proofline{\exists x\forall yP(x,y)}{Premise}
288 \cablk[v]{
289 \cablk[u]{
290 \proofline{\forall yP(u,y)}{Supposition}
291 \proofline{P(u,v)}{2, $\forall\bm{E}$}
292 \proofline{\exists xP(x,v)}{3, $\exists\bm{I}$}
293 }
294 {\proofline{\exists xP(x,v)}{1,2--4, $\exists\bm{E}$} }
295 }
296 {\proofline{\forall y\exists xP(x,y)}{2--5, $\forall\bm{I}$}
297 }
298 }
299 \]
300 \end{lstlisting}
301
302 \normalsize
303
304 \medskip
305 Kalish-Montague's strategy of putting {\sc show} lines at the beginning of a subproof and of counting the (free) variables in that formula as if they actually occurred in the proof at the time one wishes to reiterate into the area beneath such an uncancelled {\sc show} (or to do $\exists\bm{E}$ by instantiating to variables that occur in the {\sc show} formula), makes it unnecessary to have explicit guards to protect $\forall\bm{I}$ and $\exists\bm{E}$, since these are the only reasons to have guards for variables -- although one could indicate them using the present \verb+\KMproof+, if one wished. (Another peculiarity of the Kalish-Montague system is that their $\exists$-elimination rule does not employ a subproof, but directly introduces a (completely) new variable into the proof, including being completely distinct from variables in {\sc show} lines -- even uncancelled ones.) For these reasons we do not display the use of guards for variables in the Kalish-Montague system. But such guards are more logically useful in a \JasA-style proof.
306
307
308 Another use of guards is in modal logic, where -- depending on the particular modal system that we are providing a proof system for -- certain formulas cannot be reiterated into a guarded-with-a-$\bx$ scope line. Here is an example in modal system S$_4$ (or any stronger one). A \Jas style proof of the valid argument $\bx p\land\bx q\vdash\bx(p\land q)$ is given in Figure~\ref{fig:JmodalGuard} and is generated by Listing~\ref{lst:JmodalGuard}. It is followed by a \KM style proof of the same argument in Figure~\ref{fig:KMmodalGuard} together with its code in Listing~\ref{lst:KMmodalGuard}.
309
310 \scriptsize
311
312 \begin{figure}[h!]
313 \caption{A \JasA-style proof with modal guards\label{fig:JmodalGuard}}
314 \scriptsize
315 \[
316 \Jproof{
317 \proofline{\bx p\land\bx q}{premise}
318 \proofline{\bx p}{1,$\land\bm{E}$}
319 \proofline{\bx q}{1,$\land\bm{E}$}
320 \cablk[\bx]
321 {\proofline{\bx p}{2, Reiterate}
322 \proofline{\bx q}{3, Reiterate}
323 \proofline{p}{4, $\bx\bm{E}$}
324 \proofline{q}{5, $\bx\bm{E}$}
325 \proofline{p\land q}{6,7, $\land\bm{I}$}
326 }
327 {\proofline{\bx(p\land q)}{4--8, $\bx\bm{I}$} }
328 }
329 \]
330 \end{figure}
331
332 \begin{lstlisting}[caption={\LaTeX\, code for \JasA-style proof with modal guards},label={lst:JmodalGuard},numbers=left,escapeinside={@}{@}]
333 \[
334 \Jproof{
335 \proofline{\bx p\land\bx q}{premise}
336 \proofline{\bx p}{1,$\land\bm{E}$}
337 \proofline{\bx q}{1,$\land\bm{E}$}
338 \cablk[\bx]
339 {\proofline{\bx p}{2, Reiterate}
340 \proofline{\bx q}{3, Reiterate}
341 \proofline{p}{4, $\bx\bm{E}$}
342 \proofline{q}{5, $\bx\bm{E}$}
343 \proofline{p\land q}{6,7, $\land\bm{I}$}
344 }
345 {\proofline{\bx(p\land q)}{4--8, $\bx\bm{I}$} }
346 }
347 \]
348 \end{lstlisting}
349
350 \begin{figure}[h!]
351 \caption{A Kalish/Montague-style proof with modal guards\label{fig:KMmodalGuard}}
352 \[
353 \KMproof{
354 \cbblk
355 {\proofline{\bx (p \land q)}{5, Direct Proof} }
356 {\proofline{\bx p \land \bx q}{Premise}
357 \proofline{\bx p}{2, $\land\bm{E}$ }
358 \proofline{\bx q}{2, $\land\bm{E}$ }
359 \cbblk[\bx]
360 { \proofline{\bx (p \land q)}{6--10, $\bx\bm{I}$} }
361 { \proofline{\bx p}{3, Reiterate}
362 \proofline{\bx q}{4, Reiterate}
363 \proofline{p}{6, $\bx\bm{E}$}
364 \proofline{q}{7, $\bx\bm{E}$}
365 \proofline{(p\land q)}{8,9 $\land\bm{I}$} }
366 }
367 }
368 \]
369 \end{figure}
370
371 \begin{lstlisting}[caption={\LaTeX\, code for \KMA-style proof with modal guards},label={lst:KMmodalGuard},numbers=left,escapeinside={@}{@}]
372 \[
373 \KMproof{
374 \cbblk
375 {\proofline{\bx (p \land q)}{5, Direct Proof} }
376 {\proofline{\bx p \land \bx q}{Premise}
377 \proofline{\bx p}{2, $\land\bm{E}$ }
378 \proofline{\bx q}{2, $\land\bm{E}$ }
379 \cbblk[\bx]
380 { \proofline{\bx (p \land q)}{6--10, $\bx\bm{I}$} }
381 { \proofline{\bx p}{3, Reiterate}
382 \proofline{\bx q}{4, Reiterate}
383 \proofline{p}{6, $\bx\bm{E}$}
384 \proofline{q}{7, $\bx\bm{E}$}
385 \proofline{(p\land q)}{8,9 $\land\bm{I}$} }
386 }
387 }
388 \]
389
390 \end{lstlisting}
391
392
393 \normalsize
394
395 \bigskip
396
397 For further details on the history of natural deduction, including how it became the standard method in elementary logic textbooks, especially in the years 1950-1990 and beyond, see F.J. Pelletier (1999) ``A Brief History of Natural Deduction'' \emph{History and Philosophy of Logic}, v. 20, pp. 1--31. Also discussed are the four main styles of representing natural deduction proofs: the Gentzen trees, the \JasA-Fitch graphical (boxes) method, the \JasA-Quine (1950) bookkeeping method, and the Suppes (1957) sequent natural deduction method. A discussion of how comparatively wide-spread these four methods have become is also indicated by a survey of many elementary natural deduction textbooks.
398
399 \end{document}