author | wenzelm |
Sat, 30 Dec 2006 12:41:59 +0100 | |
changeset 21961 | 8d34e64eeaf6 |
parent 14158 | 15bab630ae31 |
child 30099 | dde11464969c |
permissions | -rw-r--r-- |
6121
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
1 |
%% $Id$ |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
2 |
\chapter{First-Order Logic} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
3 |
\index{first-order logic|(} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
4 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
5 |
Isabelle implements Gentzen's natural deduction systems {\sc nj} and {\sc |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
6 |
nk}. Intuitionistic first-order logic is defined first, as theory |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
7 |
\thydx{IFOL}. Classical logic, theory \thydx{FOL}, is |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
8 |
obtained by adding the double negation rule. Basic proof procedures are |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
9 |
provided. The intuitionistic prover works with derived rules to simplify |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
10 |
implications in the assumptions. Classical~\texttt{FOL} employs Isabelle's |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
11 |
classical reasoner, which simulates a sequent calculus. |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
12 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
13 |
\section{Syntax and rules of inference} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
14 |
The logic is many-sorted, using Isabelle's type classes. The class of |
14154 | 15 |
first-order terms is called \cldx{term} and is a subclass of \isa{logic}. |
6121
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
16 |
No types of individuals are provided, but extensions can define types such |
14154 | 17 |
as \isa{nat::term} and type constructors such as \isa{list::(term)term} |
6121
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
18 |
(see the examples directory, \texttt{FOL/ex}). Below, the type variable |
14154 | 19 |
$\alpha$ ranges over class \isa{term}; the equality symbol and quantifiers |
6121
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
20 |
are polymorphic (many-sorted). The type of formulae is~\tydx{o}, which |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
21 |
belongs to class~\cldx{logic}. Figure~\ref{fol-syntax} gives the syntax. |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
22 |
Note that $a$\verb|~=|$b$ is translated to $\neg(a=b)$. |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
23 |
|
14154 | 24 |
Figure~\ref{fol-rules} shows the inference rules with their names. |
6121
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
25 |
Negation is defined in the usual way for intuitionistic logic; $\neg P$ |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
26 |
abbreviates $P\imp\bot$. The biconditional~($\bimp$) is defined through |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
27 |
$\conj$ and~$\imp$; introduction and elimination rules are derived for it. |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
28 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
29 |
The unique existence quantifier, $\exists!x.P(x)$, is defined in terms |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
30 |
of~$\exists$ and~$\forall$. An Isabelle binder, it admits nested |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
31 |
quantifications. For instance, $\exists!x\;y.P(x,y)$ abbreviates |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
32 |
$\exists!x. \exists!y.P(x,y)$; note that this does not mean that there |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
33 |
exists a unique pair $(x,y)$ satisfying~$P(x,y)$. |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
34 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
35 |
Some intuitionistic derived rules are shown in |
14154 | 36 |
Fig.\ts\ref{fol-int-derived}, again with their names. These include |
6121
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
37 |
rules for the defined symbols $\neg$, $\bimp$ and $\exists!$. Natural |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
38 |
deduction typically involves a combination of forward and backward |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
39 |
reasoning, particularly with the destruction rules $(\conj E)$, |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
40 |
$({\imp}E)$, and~$(\forall E)$. Isabelle's backward style handles these |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
41 |
rules badly, so sequent-style rules are derived to eliminate conjunctions, |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
42 |
implications, and universal quantifiers. Used with elim-resolution, |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
43 |
\tdx{allE} eliminates a universal quantifier while \tdx{all_dupE} |
14154 | 44 |
re-inserts the quantified formula for later use. The rules |
45 |
\isa{conj\_impE}, etc., support the intuitionistic proof procedure |
|
6121
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
46 |
(see~\S\ref{fol-int-prover}). |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
47 |
|
14154 | 48 |
See the on-line theory library for complete listings of the rules and |
6121
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
49 |
derived rules. |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
50 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
51 |
\begin{figure} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
52 |
\begin{center} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
53 |
\begin{tabular}{rrr} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
54 |
\it name &\it meta-type & \it description \\ |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
55 |
\cdx{Trueprop}& $o\To prop$ & coercion to $prop$\\ |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
56 |
\cdx{Not} & $o\To o$ & negation ($\neg$) \\ |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
57 |
\cdx{True} & $o$ & tautology ($\top$) \\ |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
58 |
\cdx{False} & $o$ & absurdity ($\bot$) |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
59 |
\end{tabular} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
60 |
\end{center} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
61 |
\subcaption{Constants} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
62 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
63 |
\begin{center} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
64 |
\begin{tabular}{llrrr} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
65 |
\it symbol &\it name &\it meta-type & \it priority & \it description \\ |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
66 |
\sdx{ALL} & \cdx{All} & $(\alpha\To o)\To o$ & 10 & |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
67 |
universal quantifier ($\forall$) \\ |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
68 |
\sdx{EX} & \cdx{Ex} & $(\alpha\To o)\To o$ & 10 & |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
69 |
existential quantifier ($\exists$) \\ |
14154 | 70 |
\isa{EX!} & \cdx{Ex1} & $(\alpha\To o)\To o$ & 10 & |
6121
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
71 |
unique existence ($\exists!$) |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
72 |
\end{tabular} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
73 |
\index{*"E"X"! symbol} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
74 |
\end{center} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
75 |
\subcaption{Binders} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
76 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
77 |
\begin{center} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
78 |
\index{*"= symbol} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
79 |
\index{&@{\tt\&} symbol} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
80 |
\index{*"| symbol} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
81 |
\index{*"-"-"> symbol} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
82 |
\index{*"<"-"> symbol} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
83 |
\begin{tabular}{rrrr} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
84 |
\it symbol & \it meta-type & \it priority & \it description \\ |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
85 |
\tt = & $[\alpha,\alpha]\To o$ & Left 50 & equality ($=$) \\ |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
86 |
\tt \& & $[o,o]\To o$ & Right 35 & conjunction ($\conj$) \\ |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
87 |
\tt | & $[o,o]\To o$ & Right 30 & disjunction ($\disj$) \\ |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
88 |
\tt --> & $[o,o]\To o$ & Right 25 & implication ($\imp$) \\ |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
89 |
\tt <-> & $[o,o]\To o$ & Right 25 & biconditional ($\bimp$) |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
90 |
\end{tabular} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
91 |
\end{center} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
92 |
\subcaption{Infixes} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
93 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
94 |
\dquotes |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
95 |
\[\begin{array}{rcl} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
96 |
formula & = & \hbox{expression of type~$o$} \\ |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
97 |
& | & term " = " term \quad| \quad term " \ttilde= " term \\ |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
98 |
& | & "\ttilde\ " formula \\ |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
99 |
& | & formula " \& " formula \\ |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
100 |
& | & formula " | " formula \\ |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
101 |
& | & formula " --> " formula \\ |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
102 |
& | & formula " <-> " formula \\ |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
103 |
& | & "ALL~" id~id^* " . " formula \\ |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
104 |
& | & "EX~~" id~id^* " . " formula \\ |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
105 |
& | & "EX!~" id~id^* " . " formula |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
106 |
\end{array} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
107 |
\] |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
108 |
\subcaption{Grammar} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
109 |
\caption{Syntax of \texttt{FOL}} \label{fol-syntax} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
110 |
\end{figure} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
111 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
112 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
113 |
\begin{figure} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
114 |
\begin{ttbox} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
115 |
\tdx{refl} a=a |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
116 |
\tdx{subst} [| a=b; P(a) |] ==> P(b) |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
117 |
\subcaption{Equality rules} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
118 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
119 |
\tdx{conjI} [| P; Q |] ==> P&Q |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
120 |
\tdx{conjunct1} P&Q ==> P |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
121 |
\tdx{conjunct2} P&Q ==> Q |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
122 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
123 |
\tdx{disjI1} P ==> P|Q |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
124 |
\tdx{disjI2} Q ==> P|Q |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
125 |
\tdx{disjE} [| P|Q; P ==> R; Q ==> R |] ==> R |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
126 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
127 |
\tdx{impI} (P ==> Q) ==> P-->Q |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
128 |
\tdx{mp} [| P-->Q; P |] ==> Q |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
129 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
130 |
\tdx{FalseE} False ==> P |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
131 |
\subcaption{Propositional rules} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
132 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
133 |
\tdx{allI} (!!x. P(x)) ==> (ALL x.P(x)) |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
134 |
\tdx{spec} (ALL x.P(x)) ==> P(x) |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
135 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
136 |
\tdx{exI} P(x) ==> (EX x.P(x)) |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
137 |
\tdx{exE} [| EX x.P(x); !!x. P(x) ==> R |] ==> R |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
138 |
\subcaption{Quantifier rules} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
139 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
140 |
\tdx{True_def} True == False-->False |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
141 |
\tdx{not_def} ~P == P-->False |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
142 |
\tdx{iff_def} P<->Q == (P-->Q) & (Q-->P) |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
143 |
\tdx{ex1_def} EX! x. P(x) == EX x. P(x) & (ALL y. P(y) --> y=x) |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
144 |
\subcaption{Definitions} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
145 |
\end{ttbox} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
146 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
147 |
\caption{Rules of intuitionistic logic} \label{fol-rules} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
148 |
\end{figure} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
149 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
150 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
151 |
\begin{figure} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
152 |
\begin{ttbox} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
153 |
\tdx{sym} a=b ==> b=a |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
154 |
\tdx{trans} [| a=b; b=c |] ==> a=c |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
155 |
\tdx{ssubst} [| b=a; P(a) |] ==> P(b) |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
156 |
\subcaption{Derived equality rules} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
157 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
158 |
\tdx{TrueI} True |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
159 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
160 |
\tdx{notI} (P ==> False) ==> ~P |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
161 |
\tdx{notE} [| ~P; P |] ==> R |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
162 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
163 |
\tdx{iffI} [| P ==> Q; Q ==> P |] ==> P<->Q |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
164 |
\tdx{iffE} [| P <-> Q; [| P-->Q; Q-->P |] ==> R |] ==> R |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
165 |
\tdx{iffD1} [| P <-> Q; P |] ==> Q |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
166 |
\tdx{iffD2} [| P <-> Q; Q |] ==> P |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
167 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
168 |
\tdx{ex1I} [| P(a); !!x. P(x) ==> x=a |] ==> EX! x. P(x) |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
169 |
\tdx{ex1E} [| EX! x.P(x); !!x.[| P(x); ALL y. P(y) --> y=x |] ==> R |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
170 |
|] ==> R |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
171 |
\subcaption{Derived rules for \(\top\), \(\neg\), \(\bimp\) and \(\exists!\)} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
172 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
173 |
\tdx{conjE} [| P&Q; [| P; Q |] ==> R |] ==> R |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
174 |
\tdx{impE} [| P-->Q; P; Q ==> R |] ==> R |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
175 |
\tdx{allE} [| ALL x.P(x); P(x) ==> R |] ==> R |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
176 |
\tdx{all_dupE} [| ALL x.P(x); [| P(x); ALL x.P(x) |] ==> R |] ==> R |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
177 |
\subcaption{Sequent-style elimination rules} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
178 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
179 |
\tdx{conj_impE} [| (P&Q)-->S; P-->(Q-->S) ==> R |] ==> R |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
180 |
\tdx{disj_impE} [| (P|Q)-->S; [| P-->S; Q-->S |] ==> R |] ==> R |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
181 |
\tdx{imp_impE} [| (P-->Q)-->S; [| P; Q-->S |] ==> Q; S ==> R |] ==> R |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
182 |
\tdx{not_impE} [| ~P --> S; P ==> False; S ==> R |] ==> R |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
183 |
\tdx{iff_impE} [| (P<->Q)-->S; [| P; Q-->S |] ==> Q; [| Q; P-->S |] ==> P; |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
184 |
S ==> R |] ==> R |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
185 |
\tdx{all_impE} [| (ALL x.P(x))-->S; !!x.P(x); S ==> R |] ==> R |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
186 |
\tdx{ex_impE} [| (EX x.P(x))-->S; P(a)-->S ==> R |] ==> R |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
187 |
\end{ttbox} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
188 |
\subcaption{Intuitionistic simplification of implication} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
189 |
\caption{Derived rules for intuitionistic logic} \label{fol-int-derived} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
190 |
\end{figure} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
191 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
192 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
193 |
\section{Generic packages} |
9695 | 194 |
FOL instantiates most of Isabelle's generic packages. |
6121
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
195 |
\begin{itemize} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
196 |
\item |
14154 | 197 |
It instantiates the simplifier, which is invoked through the method |
198 |
\isa{simp}. Both equality ($=$) and the biconditional |
|
199 |
($\bimp$) may be used for rewriting. |
|
6121
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
200 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
201 |
\item |
14154 | 202 |
It instantiates the classical reasoner, which is invoked mainly through the |
203 |
methods \isa{blast} and \isa{auto}. See~\S\ref{fol-cla-prover} |
|
6121
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
204 |
for details. |
14154 | 205 |
% |
206 |
%\item FOL provides the tactic \ttindex{hyp_subst_tac}, which substitutes for |
|
207 |
% an equality throughout a subgoal and its hypotheses. This tactic uses FOL's |
|
208 |
% general substitution rule. |
|
6121
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
209 |
\end{itemize} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
210 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
211 |
\begin{warn}\index{simplification!of conjunctions}% |
14154 | 212 |
Simplifying $a=b\conj P(a)$ to $a=b\conj P(b)$ is often advantageous. The |
6121
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
213 |
left part of a conjunction helps in simplifying the right part. This effect |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
214 |
is not available by default: it can be slow. It can be obtained by |
14154 | 215 |
including the theorem \isa{conj_cong}\index{*conj_cong (rule)}% |
216 |
as a congruence rule in |
|
217 |
simplification, \isa{simp cong:\ conj\_cong}. |
|
6121
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
218 |
\end{warn} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
219 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
220 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
221 |
\section{Intuitionistic proof procedures} \label{fol-int-prover} |
14154 | 222 |
Implication elimination (the rules~\isa{mp} and~\isa{impE}) pose |
6121
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
223 |
difficulties for automated proof. In intuitionistic logic, the assumption |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
224 |
$P\imp Q$ cannot be treated like $\neg P\disj Q$. Given $P\imp Q$, we may |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
225 |
use~$Q$ provided we can prove~$P$; the proof of~$P$ may require repeated |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
226 |
use of $P\imp Q$. If the proof of~$P$ fails then the whole branch of the |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
227 |
proof must be abandoned. Thus intuitionistic propositional logic requires |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
228 |
backtracking. |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
229 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
230 |
For an elementary example, consider the intuitionistic proof of $Q$ from |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
231 |
$P\imp Q$ and $(P\imp Q)\imp P$. The implication $P\imp Q$ is needed |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
232 |
twice: |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
233 |
\[ \infer[({\imp}E)]{Q}{P\imp Q & |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
234 |
\infer[({\imp}E)]{P}{(P\imp Q)\imp P & P\imp Q}} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
235 |
\] |
14154 | 236 |
The theorem prover for intuitionistic logic does not use~\isa{impE}.\@ |
6121
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
237 |
Instead, it simplifies implications using derived rules |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
238 |
(Fig.\ts\ref{fol-int-derived}). It reduces the antecedents of implications |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
239 |
to atoms and then uses Modus Ponens: from $P\imp Q$ and~$P$ deduce~$Q$. |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
240 |
The rules \tdx{conj_impE} and \tdx{disj_impE} are |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
241 |
straightforward: $(P\conj Q)\imp S$ is equivalent to $P\imp (Q\imp S)$, and |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
242 |
$(P\disj Q)\imp S$ is equivalent to the conjunction of $P\imp S$ and $Q\imp |
14154 | 243 |
S$. The other \ldots\isa{\_impE} rules are unsafe; the method requires |
6121
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
244 |
backtracking. All the rules are derived in the same simple manner. |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
245 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
246 |
Dyckhoff has independently discovered similar rules, and (more importantly) |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
247 |
has demonstrated their completeness for propositional |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
248 |
logic~\cite{dyckhoff}. However, the tactics given below are not complete |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
249 |
for first-order logic because they discard universally quantified |
14154 | 250 |
assumptions after a single use. These are \ML{} functions, and are listed |
251 |
below with their \ML{} type: |
|
6121
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
252 |
\begin{ttbox} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
253 |
mp_tac : int -> tactic |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
254 |
eq_mp_tac : int -> tactic |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
255 |
IntPr.safe_step_tac : int -> tactic |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
256 |
IntPr.safe_tac : tactic |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
257 |
IntPr.inst_step_tac : int -> tactic |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
258 |
IntPr.step_tac : int -> tactic |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
259 |
IntPr.fast_tac : int -> tactic |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
260 |
IntPr.best_tac : int -> tactic |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
261 |
\end{ttbox} |
14158 | 262 |
Most of these belong to the structure \ML{} structure \texttt{IntPr} and resemble the |
263 |
tactics of Isabelle's classical reasoner. There are no corresponding |
|
264 |
Isar methods, but you can use the |
|
14154 | 265 |
\isa{tactic} method to call \ML{} tactics in an Isar script: |
266 |
\begin{isabelle} |
|
267 |
\isacommand{apply}\ (tactic\ {* IntPr.fast\_tac 1*}) |
|
268 |
\end{isabelle} |
|
269 |
Here is a description of each tactic: |
|
6121
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
270 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
271 |
\begin{ttdescription} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
272 |
\item[\ttindexbold{mp_tac} {\it i}] |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
273 |
attempts to use \tdx{notE} or \tdx{impE} within the assumptions in |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
274 |
subgoal $i$. For each assumption of the form $\neg P$ or $P\imp Q$, it |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
275 |
searches for another assumption unifiable with~$P$. By |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
276 |
contradiction with $\neg P$ it can solve the subgoal completely; by Modus |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
277 |
Ponens it can replace the assumption $P\imp Q$ by $Q$. The tactic can |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
278 |
produce multiple outcomes, enumerating all suitable pairs of assumptions. |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
279 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
280 |
\item[\ttindexbold{eq_mp_tac} {\it i}] |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
281 |
is like \texttt{mp_tac} {\it i}, but may not instantiate unknowns --- thus, it |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
282 |
is safe. |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
283 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
284 |
\item[\ttindexbold{IntPr.safe_step_tac} $i$] performs a safe step on |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
285 |
subgoal~$i$. This may include proof by assumption or Modus Ponens (taking |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
286 |
care not to instantiate unknowns), or \texttt{hyp_subst_tac}. |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
287 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
288 |
\item[\ttindexbold{IntPr.safe_tac}] repeatedly performs safe steps on all |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
289 |
subgoals. It is deterministic, with at most one outcome. |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
290 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
291 |
\item[\ttindexbold{IntPr.inst_step_tac} $i$] is like \texttt{safe_step_tac}, |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
292 |
but allows unknowns to be instantiated. |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
293 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
294 |
\item[\ttindexbold{IntPr.step_tac} $i$] tries \texttt{safe_tac} or {\tt |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
295 |
inst_step_tac}, or applies an unsafe rule. This is the basic step of |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
296 |
the intuitionistic proof procedure. |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
297 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
298 |
\item[\ttindexbold{IntPr.fast_tac} $i$] applies \texttt{step_tac}, using |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
299 |
depth-first search, to solve subgoal~$i$. |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
300 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
301 |
\item[\ttindexbold{IntPr.best_tac} $i$] applies \texttt{step_tac}, using |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
302 |
best-first search (guided by the size of the proof state) to solve subgoal~$i$. |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
303 |
\end{ttdescription} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
304 |
Here are some of the theorems that \texttt{IntPr.fast_tac} proves |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
305 |
automatically. The latter three date from {\it Principia Mathematica} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
306 |
(*11.53, *11.55, *11.61)~\cite{principia}. |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
307 |
\begin{ttbox} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
308 |
~~P & ~~(P --> Q) --> ~~Q |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
309 |
(ALL x y. P(x) --> Q(y)) <-> ((EX x. P(x)) --> (ALL y. Q(y))) |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
310 |
(EX x y. P(x) & Q(x,y)) <-> (EX x. P(x) & (EX y. Q(x,y))) |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
311 |
(EX y. ALL x. P(x) --> Q(x,y)) --> (ALL x. P(x) --> (EX y. Q(x,y))) |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
312 |
\end{ttbox} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
313 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
314 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
315 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
316 |
\begin{figure} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
317 |
\begin{ttbox} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
318 |
\tdx{excluded_middle} ~P | P |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
319 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
320 |
\tdx{disjCI} (~Q ==> P) ==> P|Q |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
321 |
\tdx{exCI} (ALL x. ~P(x) ==> P(a)) ==> EX x.P(x) |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
322 |
\tdx{impCE} [| P-->Q; ~P ==> R; Q ==> R |] ==> R |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
323 |
\tdx{iffCE} [| P<->Q; [| P; Q |] ==> R; [| ~P; ~Q |] ==> R |] ==> R |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
324 |
\tdx{notnotD} ~~P ==> P |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
325 |
\tdx{swap} ~P ==> (~Q ==> P) ==> Q |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
326 |
\end{ttbox} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
327 |
\caption{Derived rules for classical logic} \label{fol-cla-derived} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
328 |
\end{figure} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
329 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
330 |
|
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
331 |
\section{Classical proof procedures} \label{fol-cla-prover} |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
332 |
The classical theory, \thydx{FOL}, consists of intuitionistic logic plus |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
333 |
the rule |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
334 |
$$ \vcenter{\infer{P}{\infer*{P}{[\neg P]}}} \eqno(classical) $$ |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
335 |
\noindent |
9695 | 336 |
Natural deduction in classical logic is not really all that natural. FOL |
337 |
derives classical introduction rules for $\disj$ and~$\exists$, as well as |
|
338 |
classical elimination rules for~$\imp$ and~$\bimp$, and the swap rule (see |
|
339 |
Fig.\ts\ref{fol-cla-derived}). |
|
6121
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
340 |
|
14154 | 341 |
The classical reasoner is installed. The most useful methods are |
342 |
\isa{blast} (pure classical reasoning) and \isa{auto} (classical reasoning |
|
343 |
combined with simplification), but the full range of |
|
344 |
methods is available, including \isa{clarify}, |
|
345 |
\isa{fast}, \isa{best} and \isa{force}. |
|
346 |
See the |
|
6121
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
347 |
\iflabelundefined{chap:classical}{the {\em Reference Manual\/}}% |
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
348 |
{Chap.\ts\ref{chap:classical}} |
14154 | 349 |
and the \emph{Tutorial}~\cite{isa-tutorial} |
6121
5fe77b9b5185
the separate FOL and ZF logics manual, with new material on datatypes and
paulson
parents:
diff
changeset
|
350 |
for more discussion of classical proof methods. |