doc-src/IsarRef/Thy/document/HOL_Specific.tex
changeset 28603 b40800eef8a7
parent 28562 4e74209f113e
child 28687 150a8a1eae1a
equal deleted inserted replaced
28602:a79582c29bd5 28603:b40800eef8a7
   777   The \hyperlink{attribute.HOL.arith-split}{\mbox{\isa{arith{\isacharunderscore}split}}} attribute declares case split
   777   The \hyperlink{attribute.HOL.arith-split}{\mbox{\isa{arith{\isacharunderscore}split}}} attribute declares case split
   778   rules to be expanded before the arithmetic procedure is invoked.
   778   rules to be expanded before the arithmetic procedure is invoked.
   779 
   779 
   780   Note that a simpler (but faster) version of arithmetic reasoning is
   780   Note that a simpler (but faster) version of arithmetic reasoning is
   781   already performed by the Simplifier.%
   781   already performed by the Simplifier.%
       
   782 \end{isamarkuptext}%
       
   783 \isamarkuptrue%
       
   784 %
       
   785 \isamarkupsection{Invoking automated reasoning tools -- The Sledgehammer%
       
   786 }
       
   787 \isamarkuptrue%
       
   788 %
       
   789 \begin{isamarkuptext}%
       
   790 Isabelle/HOL includes a generic \emph{ATP manager} that allows
       
   791   external automated reasoning tools to crunch a pending goal.
       
   792   Supported provers include E\footnote{\url{http://www.eprover.org}},
       
   793   SPASS\footnote{\url{http://www.spass-prover.org/}}, and Vampire.
       
   794   There is also a wrapper to invoke provers remotely via the
       
   795   SystemOnTPTP\footnote{\url{http://www.cs.miami.edu/~tptp/cgi-bin/SystemOnTPTP}}
       
   796   web service.
       
   797 
       
   798   The problem passed to external provers consists of the goal together
       
   799   with a smart selection of lemmas from the current theory context.
       
   800   The result of a successful proof search is some source text that
       
   801   usually reconstructs the proof within Isabelle, without requiring
       
   802   external provers again.  The Metis
       
   803   prover\footnote{\url{http://www.gilith.com/software/metis/}} that is
       
   804   integrated into Isabelle/HOL is being used here.
       
   805 
       
   806   In this mode of operation, heavy means of automated reasoning are
       
   807   used as a strong relevance filter, while the main proof checking
       
   808   works via explicit inferences going through the Isabelle kernel.
       
   809   Moreover, rechecking Isabelle proof texts with already specified
       
   810   auxiliary facts is much faster than performing fully automated
       
   811   search over and over again.
       
   812 
       
   813   \begin{matharray}{rcl}
       
   814     \indexdef{HOL}{command}{sledgehammer}\hypertarget{command.HOL.sledgehammer}{\hyperlink{command.HOL.sledgehammer}{\mbox{\isa{\isacommand{sledgehammer}}}}}\isa{{\isachardoublequote}\isactrlsup {\isacharasterisk}{\isachardoublequote}} & : & \isarkeep{proof} \\
       
   815     \indexdef{HOL}{command}{print\_atps}\hypertarget{command.HOL.print-atps}{\hyperlink{command.HOL.print-atps}{\mbox{\isa{\isacommand{print{\isacharunderscore}atps}}}}}\isa{{\isachardoublequote}\isactrlsup {\isacharasterisk}{\isachardoublequote}} & : & \isarkeep{theory~|~proof} \\
       
   816     \indexdef{HOL}{command}{atp\_info}\hypertarget{command.HOL.atp-info}{\hyperlink{command.HOL.atp-info}{\mbox{\isa{\isacommand{atp{\isacharunderscore}info}}}}}\isa{{\isachardoublequote}\isactrlsup {\isacharasterisk}{\isachardoublequote}} & : & \isarkeep{\cdot} \\
       
   817     \indexdef{HOL}{command}{atp\_kill}\hypertarget{command.HOL.atp-kill}{\hyperlink{command.HOL.atp-kill}{\mbox{\isa{\isacommand{atp{\isacharunderscore}kill}}}}}\isa{{\isachardoublequote}\isactrlsup {\isacharasterisk}{\isachardoublequote}} & : & \isarkeep{\cdot} \\
       
   818     \indexdef{HOL}{method}{metis}\hypertarget{method.HOL.metis}{\hyperlink{method.HOL.metis}{\mbox{\isa{metis}}}} & : & \isarmeth \\
       
   819   \end{matharray}
       
   820 
       
   821   \begin{rail}
       
   822   'sledgehammer' (nameref *)
       
   823   ;
       
   824 
       
   825   'metis' thmrefs
       
   826   ;
       
   827   \end{rail}
       
   828 
       
   829   \begin{descr}
       
   830 
       
   831   \item [\hyperlink{command.HOL.sledgehammer}{\mbox{\isa{\isacommand{sledgehammer}}}}~\isa{{\isachardoublequote}prover\isactrlsub {\isadigit{1}}\ {\isasymdots}\ prover\isactrlsub n{\isachardoublequote}}] invokes the specified automated theorem provers on
       
   832   the first subgoal.  Provers are run in parallel, the first
       
   833   successful result is displayed, and the other attempts are
       
   834   terminated.
       
   835 
       
   836   Provers are defined in the theory context, see also \hyperlink{command.HOL.print-atps}{\mbox{\isa{\isacommand{print{\isacharunderscore}atps}}}}.  If no provers are given as arguments to \hyperlink{command.HOL.sledgehammer}{\mbox{\isa{\isacommand{sledgehammer}}}}, the system refers to the default defined as
       
   837   ``ATP provers'' preference by the user interface.
       
   838 
       
   839   There are additional preferences for timeout (default: 60 seconds),
       
   840   and the maximum number of independent prover processes (default: 5);
       
   841   excessive provers are automatically terminated.
       
   842 
       
   843   \item [\hyperlink{command.HOL.print-atps}{\mbox{\isa{\isacommand{print{\isacharunderscore}atps}}}}] prints the list of automated
       
   844   theorem provers available to the \hyperlink{command.HOL.sledgehammer}{\mbox{\isa{\isacommand{sledgehammer}}}}
       
   845   command.
       
   846 
       
   847   \item [\hyperlink{command.HOL.atp-info}{\mbox{\isa{\isacommand{atp{\isacharunderscore}info}}}}] prints information about presently
       
   848   running provers, including elapsed runtime, and the remaining time
       
   849   until timeout.
       
   850 
       
   851   \item [\hyperlink{command.HOL.atp-kill}{\mbox{\isa{\isacommand{atp{\isacharunderscore}kill}}}}] terminates all presently running
       
   852   provers.
       
   853 
       
   854   \item [\hyperlink{method.HOL.metis}{\mbox{\isa{metis}}}~\isa{{\isachardoublequote}facts{\isachardoublequote}}] invokes the Metis
       
   855   prover with the given facts.  Metis is an automated proof tool of
       
   856   medium strength, but is fully integrated into Isabelle/HOL, with
       
   857   explicit inferences going through the kernel.  Thus its results are
       
   858   guaranteed to be ``correct by construction''.
       
   859 
       
   860   Note that all facts used with Metis need to be specified as explicit
       
   861   arguments.  There are no rule declarations as for other Isabelle
       
   862   provers, like \hyperlink{method.blast}{\mbox{\isa{blast}}} or \hyperlink{method.fast}{\mbox{\isa{fast}}}.
       
   863 
       
   864   \end{descr}%
   782 \end{isamarkuptext}%
   865 \end{isamarkuptext}%
   783 \isamarkuptrue%
   866 \isamarkuptrue%
   784 %
   867 %
   785 \isamarkupsection{Unstructured cases analysis and induction \label{sec:hol-induct-tac}%
   868 \isamarkupsection{Unstructured cases analysis and induction \label{sec:hol-induct-tac}%
   786 }
   869 }