doc-src/Intro/getting.tex
changeset 3127 4cc2fe62f7c3
parent 3103 98af809fee46
child 3199 c572a6c21b28
equal deleted inserted replaced
3126:feb7a5d01c1e 3127:4cc2fe62f7c3
   881         {Chap.\ts\ref{chap:classical}}. 
   881         {Chap.\ts\ref{chap:classical}}. 
   882 
   882 
   883 Rules are packaged into {\bf classical sets}.  The classical reasoner
   883 Rules are packaged into {\bf classical sets}.  The classical reasoner
   884 provides several tactics, which apply rules using naive algorithms.
   884 provides several tactics, which apply rules using naive algorithms.
   885 Unification handles quantifiers as shown above.  The most useful tactic
   885 Unification handles quantifiers as shown above.  The most useful tactic
   886 is~\ttindex{fast_tac}.  
   886 is~\ttindex{Blast_tac}.  
   887 
   887 
   888 Let us solve problems~40 and~60 of Pelletier~\cite{pelletier86}.  (The
   888 Let us solve problems~40 and~60 of Pelletier~\cite{pelletier86}.  (The
   889 backslashes~\hbox{\verb|\|\ldots\verb|\|} are an \ML{} string escape
   889 backslashes~\hbox{\verb|\|\ldots\verb|\|} are an \ML{} string escape
   890 sequence, to break the long string over two lines.)
   890 sequence, to break the long string over two lines.)
   891 \begin{ttbox}
   891 \begin{ttbox}
   895 {\out (EX y. ALL x. J(y,x) <-> ~J(x,x)) -->}
   895 {\out (EX y. ALL x. J(y,x) <-> ~J(x,x)) -->}
   896 {\out ~(ALL x. EX y. ALL z. J(z,y) <-> ~J(z,x))}
   896 {\out ~(ALL x. EX y. ALL z. J(z,y) <-> ~J(z,x))}
   897 {\out  1. (EX y. ALL x. J(y,x) <-> ~J(x,x)) -->}
   897 {\out  1. (EX y. ALL x. J(y,x) <-> ~J(x,x)) -->}
   898 {\out     ~(ALL x. EX y. ALL z. J(z,y) <-> ~J(z,x))}
   898 {\out     ~(ALL x. EX y. ALL z. J(z,y) <-> ~J(z,x))}
   899 \end{ttbox}
   899 \end{ttbox}
   900 The rules of classical logic are bundled as {\tt FOL_cs}.  We may solve
   900 \ttindex{Blast_tac} proves subgoal~1 at a stroke.
   901 subgoal~1 at a stroke, using~\ttindex{fast_tac}.
   901 \begin{ttbox}
   902 \begin{ttbox}
   902 by (Blast_tac 1);
   903 by (fast_tac FOL_cs 1);
   903 {\out Depth = 0}
       
   904 {\out Depth = 1}
   904 {\out Level 1}
   905 {\out Level 1}
   905 {\out (EX y. ALL x. J(y,x) <-> ~J(x,x)) -->}
   906 {\out (EX y. ALL x. J(y,x) <-> ~J(x,x)) -->}
   906 {\out ~(ALL x. EX y. ALL z. J(z,y) <-> ~J(z,x))}
   907 {\out ~(ALL x. EX y. ALL z. J(z,y) <-> ~J(z,x))}
   907 {\out No subgoals!}
   908 {\out No subgoals!}
   908 \end{ttbox}
   909 \end{ttbox}
   917 {\out  1. ALL x. P(x,f(x)) <->}
   918 {\out  1. ALL x. P(x,f(x)) <->}
   918 {\out     (EX y. (ALL z. P(z,y) --> P(z,f(x))) & P(x,y))}
   919 {\out     (EX y. (ALL z. P(z,y) --> P(z,f(x))) & P(x,y))}
   919 \end{ttbox}
   920 \end{ttbox}
   920 Again, subgoal~1 succumbs immediately.
   921 Again, subgoal~1 succumbs immediately.
   921 \begin{ttbox}
   922 \begin{ttbox}
   922 by (fast_tac FOL_cs 1);
   923 by (Blast_tac 1);
       
   924 {\out Depth = 0}
       
   925 {\out Depth = 1}
   923 {\out Level 1}
   926 {\out Level 1}
   924 {\out ALL x. P(x,f(x)) <-> (EX y. (ALL z. P(z,y) --> P(z,f(x))) & P(x,y))}
   927 {\out ALL x. P(x,f(x)) <-> (EX y. (ALL z. P(z,y) --> P(z,f(x))) & P(x,y))}
   925 {\out No subgoals!}
   928 {\out No subgoals!}
   926 \end{ttbox}
   929 \end{ttbox}
   927 The classical reasoner is not restricted to the usual logical connectives.
   930 The classical reasoner is not restricted to the usual logical connectives.