doc-src/Sledgehammer/sledgehammer.tex
changeset 46298 e9a2d81fa725
parent 46242 99a2a541c125
child 46299 14459b9671a1
equal deleted inserted replaced
46297:0a4907baf9db 46298:e9a2d81fa725
   121 Sledgehammer is run on every newly entered theorem. The time limit for Auto
   121 Sledgehammer is run on every newly entered theorem. The time limit for Auto
   122 Sledgehammer and other automatic tools can be set using the ``Auto Tools Time
   122 Sledgehammer and other automatic tools can be set using the ``Auto Tools Time
   123 Limit'' option.
   123 Limit'' option.
   124 
   124 
   125 \newbox\boxA
   125 \newbox\boxA
   126 \setbox\boxA=\hbox{\texttt{nospam}}
   126 \setbox\boxA=\hbox{\texttt{NOSPAM}}
   127 
   127 
   128 \newcommand\authoremail{\texttt{blan{\color{white}nospam}\kern-\wd\boxA{}chette@\allowbreak
   128 \newcommand\authoremail{\texttt{blan{\color{white}NOSPAM}\kern-\wd\boxA{}chette@\allowbreak
   129 in.\allowbreak tum.\allowbreak de}}
   129 in.\allowbreak tum.\allowbreak de}}
   130 
   130 
   131 To run Sledgehammer, you must make sure that the theory \textit{Sledgehammer} is
   131 To run Sledgehammer, you must make sure that the theory \textit{Sledgehammer} is
   132 imported---this is rarely a problem in practice since it is part of
   132 imported---this is rarely a problem in practice since it is part of
   133 \textit{Main}. Examples of Sledgehammer use can be found in Isabelle's
   133 \textit{Main}. Examples of Sledgehammer use can be found in Isabelle's
   490 research into transforming resolution proofs into natural deduction proofs (such
   490 research into transforming resolution proofs into natural deduction proofs (such
   491 as Isar proofs), which we hope to leverage. In the meantime, a workaround is to
   491 as Isar proofs), which we hope to leverage. In the meantime, a workaround is to
   492 set the \textit{isar\_shrink\_factor} option (\S\ref{output-format}) to a larger
   492 set the \textit{isar\_shrink\_factor} option (\S\ref{output-format}) to a larger
   493 value or to try several provers and keep the nicest-looking proof.
   493 value or to try several provers and keep the nicest-looking proof.
   494 
   494 
   495 \point{What are the \textit{full\_types} and \textit{no\_types} arguments to
   495 \point{What are the \textit{full\_types}, \textit{no\_types}, and
   496 Metis?}
   496 \textit{mono\_tags} arguments to Metis?}
   497 
   497 
   498 The \textit{metis}~(\textit{full\_types}) proof method is the fully-typed
   498 The \textit{metis}~(\textit{full\_types}) proof method
       
   499 and its cousin \textit{metis}~(\textit{mono\_tags}) are fully-typed
   499 version of Metis. It is somewhat slower than \textit{metis}, but the proof
   500 version of Metis. It is somewhat slower than \textit{metis}, but the proof
   500 search is fully typed, and it also includes more powerful rules such as the
   501 search is fully typed, and it also includes more powerful rules such as the
   501 axiom ``$x = \const{True} \mathrel{\lor} x = \const{False}$'' for reasoning in
   502 axiom ``$x = \const{True} \mathrel{\lor} x = \const{False}$'' for reasoning in
   502 higher-order places (e.g., in set comprehensions). The method kicks in
   503 higher-order places (e.g., in set comprehensions). The method kicks in
   503 automatically as a fallback when \textit{metis} fails, and it is sometimes
   504 automatically as a fallback when \textit{metis} fails, and it is sometimes
   504 generated by Sledgehammer instead of \textit{metis} if the proof obviously
   505 generated by Sledgehammer instead of \textit{metis} if the proof obviously
   505 requires type information or if \textit{metis} failed when Sledgehammer
   506 requires type information or if \textit{metis} failed when Sledgehammer
   506 preplayed the proof. (By default, Sledgehammer tries to run \textit{metis} with
   507 preplayed the proof. (By default, Sledgehammer tries to run \textit{metis} with
   507 various options for up to 4 seconds to ensure that the generated one-line proofs
   508 various options for up to 3 seconds each time to ensure that the generated
   508 actually work and to display timing information. This can be configured using
   509 one-line proofs actually work and to display timing information. This can be
   509 the \textit{preplay\_timeout} option (\S\ref{timeouts}).)
   510 configured using the \textit{preplay\_timeout} option (\S\ref{timeouts}).)
   510 
   511 %
   511 At the other end of the soundness spectrum, \textit{metis} (\textit{no\_types})
   512 At the other end of the soundness spectrum, \textit{metis} (\textit{no\_types})
   512 uses no type information at all during the proof search, which is more efficient
   513 uses no type information at all during the proof search, which is more efficient
   513 but often fails. Calls to \textit{metis} (\textit{no\_types}) are occasionally
   514 but often fails. Calls to \textit{metis} (\textit{no\_types}) are occasionally
   514 generated by Sledgehammer.
   515 generated by Sledgehammer.
   515 
   516 %
   516 Incidentally, if you see the warning
   517 See the \textit{type\_enc} option (\S\ref{problem-encoding}) for details.
       
   518 
       
   519 Incidentally, if you ever see warnings such as
   517 
   520 
   518 \prew
   521 \prew
   519 \slshape
   522 \slshape
   520 Metis: Falling back on ``\textit{metis} (\textit{full\_types})''.
   523 Metis: Falling back on ``\textit{metis} (\textit{full\_types})''.
   521 \postw
   524 \postw
   522 
   525 
   523 for a successful \textit{metis} proof, you can advantageously pass the
   526 for a successful \textit{metis} proof, you can advantageously pass the
   524 \textit{full\_types} option to \textit{metis} directly.
   527 \textit{full\_types} option to \textit{metis} directly.
       
   528 
       
   529 \point{And what are the \textit{lam\_lifting} and \textit{hide\_lams} arguments
       
   530 to Metis?}
       
   531 
       
   532 Orthogonally to the encoding of types, it is important to choose an appropriate
       
   533 translation of $\lambda$-abstractions. Metis supports three translation schemes,
       
   534 in decreasing order of power: Curry combinators (the default),
       
   535 $\lambda$-lifting, and a ``hiding'' scheme that disables all reasoning under
       
   536 $\lambda$-abstractions. The more powerful schemes also give the automatic
       
   537 provers more rope to hang themselves. See the \textit{lam\_trans} option (\S\ref{problem-encoding}) for details.
   525 
   538 
   526 \point{Are generated proofs minimal?}
   539 \point{Are generated proofs minimal?}
   527 
   540 
   528 Automatic provers frequently use many more facts than are necessary.
   541 Automatic provers frequently use many more facts than are necessary.
   529 Sledgehammer inclues a minimization tool that takes a set of facts returned by a
   542 Sledgehammer inclues a minimization tool that takes a set of facts returned by a
   681 \textit{lam\_lifting}, and \textit{combinators} (the default).
   694 \textit{lam\_lifting}, and \textit{combinators} (the default).
   682 %
   695 %
   683 All the untyped type encodings listed in \S\ref{problem-encoding} are supported.
   696 All the untyped type encodings listed in \S\ref{problem-encoding} are supported.
   684 For convenience, the following aliases are provided:
   697 For convenience, the following aliases are provided:
   685 \begin{enum}
   698 \begin{enum}
   686 \item[\labelitemi] \textbf{\textit{full\_types}:} An appropriate type-sound encoding.
   699 \item[\labelitemi] \textbf{\textit{full\_types}:} Synonym for An appropriate type-sound encoding.
   687 \item[\labelitemi] \textbf{\textit{partial\_types}:} Synonym for \textit{poly\_args}.
   700 \item[\labelitemi] \textbf{\textit{partial\_types}:} Synonym for \textit{poly\_args}.
   688 \item[\labelitemi] \textbf{\textit{no\_types}:} Synonym for \textit{erased}.
   701 \item[\labelitemi] \textbf{\textit{no\_types}:} Synonym for \textit{erased}.
   689 \end{enum}
   702 \end{enum}
   690 
   703 
   691 \section{Option Reference}
   704 \section{Option Reference}
  1213 Specifies the maximum number of seconds that the automatic provers should spend
  1226 Specifies the maximum number of seconds that the automatic provers should spend
  1214 searching for a proof. This excludes problem preparation and is a soft limit.
  1227 searching for a proof. This excludes problem preparation and is a soft limit.
  1215 For historical reasons, the default value of this option can be overridden using
  1228 For historical reasons, the default value of this option can be overridden using
  1216 the option ``Sledgehammer: Time Limit'' in Proof General's ``Isabelle'' menu.
  1229 the option ``Sledgehammer: Time Limit'' in Proof General's ``Isabelle'' menu.
  1217 
  1230 
  1218 \opdefault{preplay\_timeout}{float\_or\_none}{\upshape 4}
  1231 \opdefault{preplay\_timeout}{float\_or\_none}{\upshape 3}
  1219 Specifies the maximum number of seconds that \textit{metis} or \textit{smt}
  1232 Specifies the maximum number of seconds that \textit{metis} or \textit{smt}
  1220 should spend trying to ``preplay'' the found proof. If this option is set to 0,
  1233 should spend trying to ``preplay'' the found proof. If this option is set to 0,
  1221 no preplaying takes place, and no timing information is displayed next to the
  1234 no preplaying takes place, and no timing information is displayed next to the
  1222 suggested \textit{metis} calls.
  1235 suggested \textit{metis} calls.
  1223 
  1236