Skip to content

Commit febb97d

Browse files
committed
add proof-theory/natural-deduction and /normalization
1 parent 30e4f19 commit febb97d

18 files changed

Lines changed: 2774 additions & 1 deletion
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
% Part: proof-theory
2+
% Chapter: natural-deduction
3+
% Section: grafting
4+
5+
\documentclass[../../../include/open-logic-section]{subfiles}
6+
7+
\begin{document}
8+
9+
\olfileid{pt}{nat}{gra}
10+
11+
\olsection{Grafting \usetoken{P}{proof}}
12+
13+
!!^{proof}s in \Log{N1ci} are !!{proof}s of !!{formula}s~$!A$ from
14+
assumptions~$!B$. Suppose $!B$ itself has !!a{proof}. How do we
15+
combine the !!{proof} of~$!B$ with the !!{proof} of $!A$ from~$!B$ to
16+
get !!a{proof} of~$!A$ that doesn't use the assumption~$!B$?
17+
18+
One option is to remove the assumption~$!B$ from the !!{proof} of~$!A$
19+
by applying~\Intro{\lif}. Then we can combine the resulting !!{proof}
20+
of~$!B \lif !A$ with the !!{proof} of~$!B$ to obtain
21+
\[
22+
\AxiomC{$\Discharge{!B}{x}$}
23+
\DeduceC{$!A$}
24+
\DischargeRule{\Intro{\lif}}{x}
25+
\UnaryInfC{$!B \lif !C$}
26+
\AxiomC{}
27+
\DeduceC{$!B$}
28+
\RightLabel{\Elim{\lif}}
29+
\BinaryInfC{$!A$}
30+
\DisplayProof
31+
\]
32+
This is straightforward, but somewhat ugly: why introduce $\lif$ only
33+
to eliminate it right away? It should be possible to avoid this kind
34+
of ``detour'' through $!B \lif !A$. (That they can always be avoided
35+
is in fact the content of the normalization theorem.)
36+
37+
In \Log{N1ci} we can actually avoid it in this case quite easily: we
38+
can simply replace the assumptions~$!B^x$ by the entire !!{proof}
39+
of~$!B$. This ``grafting'' of !!{proof}s onto the assumptions of
40+
others is quite useful and so we record it as a definition.
41+
42+
\begin{defn}
43+
If $\delta_1$ is a \Log{N1ci}-!!{proof} of~$!A$ from open
44+
assumption~$!B^x$, and $\delta_2$ is a \Log{N1ci}-!!{proof} of~$!B$,
45+
then $\Subst{\delta_1}{\delta_2}{!B^x}$ is the result of replacing
46+
every undischarged occurrence of~$!B^x$ in~$\delta_1$ by~$\delta_2$.
47+
\end{defn}
48+
49+
Provided that $\delta_1$ and $\delta_2$ don't have different
50+
assumption !!{formula}s labelled with the same label, and no open
51+
assumption of~$\delta_2$ contains an eigenvariable of~$\delta_1$, the
52+
resulting $\Subst{\delta_1}{\delta_2}{!B^x}$ is a correct !!{proof},
53+
and its open assumptions are those of $\delta_1$ together with those
54+
of~$\delta_2$. When grafting !!{proof}s, these conditions will
55+
typically be satisfied. The first is satisfied whenever $\delta_1$ and
56+
$\delta_2$ are subproofs of a larger !!{proof}. If the second is not
57+
satisfied, we can rename the eigenvariables of~$\delta_1$ so that it
58+
is.
59+
60+
A corresponding definition applies to \Log{N2ci}.
61+
62+
\begin{defn}
63+
If $\delta_1$ is a \Log{N2ci}-!!{proof} of~$x:!B, \Gamma_1 \Sequent
64+
!A$, and $\delta_2$ is a \Log{N1ci}-!!{proof} of~$\Gamma_2 \Sequent
65+
!B$, then $\Subst{\delta_1}{\delta_2}{x:!B}$ is the result of
66+
replacing every axiom $x:!B \Sequent !B$ in~$\delta_1$ by~$\delta_2$,
67+
and adding $\Gamma_2$ to the context of every sequent below such
68+
axioms.
69+
\end{defn}
70+
71+
\begin{prop}
72+
If $\delta_1 \Proves x:!B, \Gamma_1 \Sequent
73+
!A$ and $\delta_2 \Proves \Gamma_2 \Sequent !B$, then
74+
$\Subst{\delta_1}{\delta_2}{x:!B} \Proves \Gamma_1, \Gamma_2 \Sequent
75+
!A$, provided no eigenvariable of~$\delta_1$ occurs in~$\Gamma_2$.
76+
\end{prop}
77+
78+
79+
\begin{proof}
80+
By induction on $\pheight{\delta}$.
81+
\end{proof}
82+
83+
\end{document}
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
% Part: proof-theory
2+
% Chapter: natural-deduction
3+
% Section: introduction
4+
5+
\documentclass[../../../include/open-logic-section]{subfiles}
6+
7+
\begin{document}
8+
9+
\olfileid{pt}{nat}{int}
10+
11+
\olsection{Introduction}
12+
13+
Natural deduction is a family of !!{proof} systems in which each
14+
logical connective or quantifier has a pair of inferences, one that
15+
``introduces'' the operator (!!a{introduction} rule) and one that
16+
``eliminates'' the operator (!!a{elimination} rule). For instance,
17+
\Intro{\lif} has !!{formula}s of the form~$!A \lif !B$ as conclusion,
18+
and \Elim{\lif} has !!{formula}s of the form~$!A \lif !B$ as premises.
19+
20+
The first two versions of natural deduction were introduced in the
21+
1930s by Gerhard Gentzen and Stanisław Jaśkowski. Gentzen's is the
22+
system proof theorists discuss mostly, and Jaśkowski gave rise to the
23+
systems most widely used in teaching. In both systems, one can start
24+
with \emph{assumptions}---!!{formula}s that don't need to be
25+
!!{prove}d, but that can be used in !!{prove}ing other !!{formula}s.
26+
An entire !!{proof} may depend on such assumptions, and since those
27+
are unproven, the !!{proof} does not establish its conclusion (its
28+
\emph{end-!!{formula}}), but only that its conclusion follows from the
29+
assumptions.
30+
31+
Some inference rules are such that their conclusions no longer depend
32+
on some assumptions: they ``discharge'' assumptions. For instance, the
33+
\Intro{\lif} rule takes !!a{proof} of the conclusion~$!B$ from an
34+
assumption~$!A$, and has $!A \lif !B$ as its conclusion. The !!{proof}
35+
ending in $!A \lif !B$ no longer depends on~$!A$; the assumption $!A$
36+
is discharged. In Gentzen's systems, !!{proof}s are trees of
37+
!!{formula}s, the assumptions are the topmost !!{formula}s, and rules
38+
like~\Intro{\lif} carry labels that indicate which assumptions are
39+
discharged. In Jaśkowski's systems, parts of the !!{proof} that depend
40+
on an assumption are set off in some way, e.g, indented behind a
41+
vertical line or in a box, with the assumption~$!A$ discharged and the
42+
consequent $!B$ of the conditional the first and last line in the box,
43+
and the conclusion~$!A \lif !B$ of \Intro{\lif} outside the box.
44+
45+
The systems are ``natural'' because the inference rules mirror how we
46+
(or mathematicians, at least) reason naturally. To establish a
47+
hypothetical result (a conditional), we assume the antecedent and use
48+
it to prove the consequent. That's~\Intro{\lif}. When we know a
49+
conditional $!A \lif !B$ and its antecedent~$!A$, we conclude~$!B$.
50+
That's~\Elim{\lif}. We use proof-by-cases to show that, assuming a
51+
disjunction~$!A \lor !B$, some conclusion holds. That's~\Elim{\lor}.
52+
To prove a general claim~$\lforall[x][!A(x)]$ we prove that $!A(c)$
53+
holds, for an arbitrary~$c$. That's~\Intro{\lforall}. And so on.
54+
55+
For instance here's a simple !!{proof} of~$!A \lif (!A \lor !B)$ in
56+
Gentzen-style natural deduction:
57+
\[
58+
\AxiomC{$\Discharge{!A}{x}$}
59+
\RightLabel{\Intro{\lor}}
60+
\UnaryInfC{$!A \lor !B$}
61+
\DischargeRule{\Intro{\lif}}{x}
62+
\UnaryInfC{$!A \lif (!A \lor !B)$}
63+
\DisplayProof
64+
\]
65+
It starts with the assumption~$!A$, uses \Intro{\lor} to infer~$!A
66+
\lor !B$, and then \Intro{\lif} to infer~$!A \lif (!A \lor !B)$. The
67+
\Intro{\lif} inference discharges the assumption~$!A$; that's
68+
indicated by the label~$x$.
69+
70+
Proof theorists prefer Gentzen's original systems working with trees
71+
of !!{formula}s, although one variant is also important in proof
72+
theory. !!^a{proof} of~$!A$ from assumptions~$\Gamma$ shows that $!A$
73+
follows from~$\Gamma$, i.e., $\Gamma \Entails !A$. The inference rules
74+
of natural deduction can naturally be read as telling us something
75+
about such entailments, e.g., \Intro{\lif} says that if $\Gamma + !A
76+
\Entails !B$ then $\Gamma \Entails !B$. It is only natural to
77+
formulate the rules directly so that they operate on both the
78+
assumptions and the conclusion that follow from them in the premises
79+
and conclusion of the inference rule, i.e., they operate on sequents
80+
$\Gamma \Sequent !A$. The simple proof above would look like this in
81+
such a system:
82+
\[
83+
\Axiom$x:!A \fCenter !A$
84+
\RightLabel{\Intro{\lor}}
85+
\UnaryInf$x:!A \fCenter !A \lor !B$
86+
\DischargeRule{\Intro{\lif}}{x}
87+
\UnaryInf$\fCenter !A \lif (!A \lor !B)$
88+
\DisplayProof
89+
\]
90+
As you see, the rules are the same: they work on the !!{formula} to
91+
the right of~$\Sequent$, the !!{formula}s on the left just list the
92+
assumptions they depend on at each step.
93+
94+
The complete set of !!{introduction}/!!{elimination} rule pairs is not
95+
complete for classical logic by itself. We need to add two additional
96+
rules that have to do with~$\lfalse$. The first is the
97+
``intuitionistic absurdity rule''~\FalseInt, or ``explosion,'' which
98+
says that from $\lfalse$ we can infer anything. The second is the
99+
classical principle of indirect proof~\FalseCl{} (or the ``classical
100+
absurdity rule'') which says that if we can !!{prove}~$\lfalse$
101+
from~$\lnot !A$, we have !!{prove}d~$!A$. If we leave out~\FalseCl, we
102+
get a system appropriate for intuitionsitic logic. If we leave out
103+
both, we have what's known as ``minimal logic.''
104+
105+
We will discuss Gentzen-style natural deduction for classical and
106+
intuitionsitic logic. These are the systems \Log{N1c} and \Log{N1i}.
107+
The systems \Log{N2c} and \Log{N2i} are the corresponding systems
108+
working on sequents $\Gamma \Sequent !A$ rather than single
109+
!!{formula}s~$!A$.
110+
111+
\end{document}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
% Part: proof-theory
2+
% Chapter: natural-deduction
3+
4+
\documentclass[../../../include/open-logic-chapter]{subfiles}
5+
6+
\begin{document}
7+
8+
\olchapter{pt}{nat}{Natural Deduction}
9+
10+
\olimport{introduction}
11+
\olimport{rules-proofs}
12+
\olimport{sequents}
13+
\olimport{quantifiers}
14+
\olimport{grafting}
15+
\olimport{translation-G2i}
16+
\olimport{translation-N2i}
17+
18+
\OLEndChapterHook
19+
20+
\end{document}

0 commit comments

Comments
 (0)