245 General or press the Emacs key sequence C-c C-a C-s. |
245 General or press the Emacs key sequence C-c C-a C-s. |
246 Either way, Sledgehammer produces the following output after a few seconds: |
246 Either way, Sledgehammer produces the following output after a few seconds: |
247 |
247 |
248 \prew |
248 \prew |
249 \slshape |
249 \slshape |
250 Sledgehammer: ``\textit{e}'' for subgoal 1: \\ |
250 Sledgehammer: ``\textit{e}'' on goal: \\ |
251 $[a] = [b] \,\Longrightarrow\, a = b$ \\ |
251 $[a] = [b] \,\Longrightarrow\, a = b$ \\ |
252 Try this command: \textbf{by} (\textit{metis last\_ConsL}). \\ |
252 Try this command: \textbf{by} (\textit{metis last\_ConsL}). \\ |
253 To minimize: \textbf{sledgehammer} \textit{min} [\textit{prover} = \textit{e}] (\textit{last\_ConsL}). \\[3\smallskipamount] |
253 To minimize: \textbf{sledgehammer} \textit{min} [\textit{prover} = \textit{e}] (\textit{last\_ConsL}). \\[3\smallskipamount] |
254 % |
254 % |
255 Sledgehammer: ``\textit{vampire}'' for subgoal 1: \\ |
255 Sledgehammer: ``\textit{vampire}'' on goal: \\ |
256 $[a] = [b] \,\Longrightarrow\, a = b$ \\ |
256 $[a] = [b] \,\Longrightarrow\, a = b$ \\ |
257 Try this command: \textbf{by} (\textit{metis hd.simps}). \\ |
257 Try this command: \textbf{by} (\textit{metis hd.simps}). \\ |
258 To minimize: \textbf{sledgehammer} \textit{min} [\textit{prover} = \textit{vampire}] (\textit{hd.simps}). \\[3\smallskipamount] |
258 To minimize: \textbf{sledgehammer} \textit{min} [\textit{prover} = \textit{vampire}] (\textit{hd.simps}). \\[3\smallskipamount] |
259 % |
259 % |
260 Sledgehammer: ``\textit{spass}'' for subgoal 1: \\ |
260 Sledgehammer: ``\textit{spass}'' on goal: \\ |
261 $[a] = [b] \,\Longrightarrow\, a = b$ \\ |
261 $[a] = [b] \,\Longrightarrow\, a = b$ \\ |
262 Try this command: \textbf{by} (\textit{metis list.inject}). \\ |
262 Try this command: \textbf{by} (\textit{metis list.inject}). \\ |
263 To minimize: \textbf{sledgehammer} \textit{min} [\textit{prover} = \textit{spass}]~(\textit{list.inject}). \\[3\smallskipamount] |
263 To minimize: \textbf{sledgehammer} \textit{min} [\textit{prover} = \textit{spass}]~(\textit{list.inject}). \\[3\smallskipamount] |
264 % |
264 % |
265 %Sledgehammer: ``\textit{remote\_waldmeister}'' for subgoal 1: \\ |
265 Sledgehammer: ``\textit{remote\_waldmeister}'' on goal: \\ |
266 %$[a] = [b] \,\Longrightarrow\, a = b$ \\ |
266 $[a] = [b] \,\Longrightarrow\, a = b$ \\ |
267 %Try this command: \textbf{by} (\textit{metis hd.simps insert\_Nil}). \\ |
267 Try this command: \textbf{by} (\textit{metis hd.simps insert\_Nil}). \\ |
268 %To minimize: \textbf{sledgehammer} \textit{min} [\textit{prover} = \textit{remote\_waldmeister}] \\ |
268 To minimize: \textbf{sledgehammer} \textit{min} [\textit{prover} = \textit{remote\_waldmeister}] \\ |
269 %\phantom{\textbf{sledgehammer}~}(\textit{hd.simps insert\_Nil}). \\[3\smallskipamount] |
269 \phantom{To minimize: \textbf{sledgehammer}~}(\textit{hd.simps insert\_Nil}). \\[3\smallskipamount] |
270 % |
270 % |
271 Sledgehammer: ``\textit{remote\_sine\_e}'' for subgoal 1: \\ |
271 Sledgehammer: ``\textit{remote\_sine\_e}'' on goal: \\ |
272 $[a] = [b] \,\Longrightarrow\, a = b$ \\ |
272 $[a] = [b] \,\Longrightarrow\, a = b$ \\ |
273 Try this command: \textbf{by} (\textit{metis hd.simps}). \\ |
273 Try this command: \textbf{by} (\textit{metis hd.simps}). \\ |
274 To minimize: \textbf{sledgehammer} \textit{min} [\textit{prover} = \textit{remote\_sine\_e}]~(\textit{hd.simps}). \\[3\smallskipamount] |
274 To minimize: \textbf{sledgehammer} \textit{min} [\textit{prover} = \textit{remote\_sine\_e}]~(\textit{hd.simps}). \\[3\smallskipamount] |
275 % |
275 % |
276 Sledgehammer: ``\textit{remote\_z3}'' for subgoal 1: \\ |
276 Sledgehammer: ``\textit{remote\_z3}'' on goal: \\ |
277 $[a] = [b] \,\Longrightarrow\, a = b$ \\ |
277 $[a] = [b] \,\Longrightarrow\, a = b$ \\ |
278 Try this command: \textbf{by} (\textit{metis hd.simps}). \\ |
278 Try this command: \textbf{by} (\textit{metis hd.simps}). \\ |
279 To minimize: \textbf{sledgehammer} \textit{min} [\textit{prover} = \textit{remote\_z3}]~(\textit{hd.simps}). |
279 To minimize: \textbf{sledgehammer} \textit{min} [\textit{prover} = \textit{remote\_z3}]~(\textit{hd.simps}). |
280 \postw |
280 \postw |
281 |
281 |
282 Sledgehammer ran E, SInE-E, SPASS, Vampire, %Waldmeister, |
282 Sledgehammer ran E, SInE-E, SPASS, Vampire, Waldmeister, and Z3 in parallel. |
283 and Z3 in parallel. |
|
284 Depending on which provers are installed and how many processor cores are |
283 Depending on which provers are installed and how many processor cores are |
285 available, some of the provers might be missing or present with a |
284 available, some of the provers might be missing or present with a |
286 \textit{remote\_} prefix. |
285 \textit{remote\_} prefix. Waldmeister is run only for unit equational problems, |
287 %Waldmeister is run only for unit equational problems, |
286 where the goal's conclusion is a (universally quantified) equation. |
288 %where the goal's conclusion is a (universally quantified) equation. |
|
289 |
287 |
290 For each successful prover, Sledgehammer gives a one-liner proof that uses the |
288 For each successful prover, Sledgehammer gives a one-liner proof that uses the |
291 \textit{metis} or \textit{smt} method. You can click the proof to insert it into |
289 \textit{metis} or \textit{smt} method. You can click the proof to insert it into |
292 the theory text. You can click the ``\textbf{sledgehammer} \textit{minimize}'' |
290 the theory text. You can click the ``\textbf{sledgehammer} \textit{minimize}'' |
293 command if you want to look for a shorter (and probably faster) proof. But here |
291 command if you want to look for a shorter (and probably faster) proof. But here |
364 length of the Isar proofs can be controlled by setting |
362 length of the Isar proofs can be controlled by setting |
365 \textit{isar\_shrink\_factor} (\S\ref{output-format}). |
363 \textit{isar\_shrink\_factor} (\S\ref{output-format}). |
366 \end{enum} |
364 \end{enum} |
367 |
365 |
368 Options can be set globally using \textbf{sledgehammer\_params} |
366 Options can be set globally using \textbf{sledgehammer\_params} |
369 (\S\ref{command-syntax}). Fact selection can be influenced by specifying |
367 (\S\ref{command-syntax}). The command also prints the list of all available |
370 ``$(\textit{add}{:}~\textit{my\_facts})$'' after the \textbf{sledgehammer} |
368 options with their current value. Fact selection can be influenced by specifying |
371 call to ensure that certain facts are included, or simply |
369 ``$(\textit{add}{:}~\textit{my\_facts})$'' after the \textbf{sledgehammer} call |
372 ``$(\textit{my\_facts})$'' to force Sledgehammer to run only with |
370 to ensure that certain facts are included, or simply ``$(\textit{my\_facts})$'' |
373 $\textit{my\_facts}$. |
371 to force Sledgehammer to run only with $\textit{my\_facts}$. |
374 |
372 |
375 \section{Frequently Asked Questions} |
373 \section{Frequently Asked Questions} |
376 \label{frequently-asked-questions} |
374 \label{frequently-asked-questions} |
377 |
375 |
378 This sections answers frequently (and infrequently) asked questions about |
376 This sections answers frequently (and infrequently) asked questions about |
395 is usually stronger, but you need to have Z3 available to replay the proofs, |
393 is usually stronger, but you need to have Z3 available to replay the proofs, |
396 trust the SMT solver, or use certificates. See the documentation in the |
394 trust the SMT solver, or use certificates. See the documentation in the |
397 \emph{SMT} theory (\texttt{\$ISABELLE\_HOME/src/HOL/SMT.thy}) for details. |
395 \emph{SMT} theory (\texttt{\$ISABELLE\_HOME/src/HOL/SMT.thy}) for details. |
398 |
396 |
399 \item[$\bullet$] Try the \textit{blast} or \textit{auto} proof methods, passing |
397 \item[$\bullet$] Try the \textit{blast} or \textit{auto} proof methods, passing |
400 facts via \textbf{unfolding}, \textbf{using}, \textit{intro}{:}, |
398 the necessary facts via \textbf{unfolding}, \textbf{using}, \textit{intro}{:}, |
401 \textit{elim}{:}, \textit{dest}{:}, or \textit{simp}{:}, as appropriate. |
399 \textit{elim}{:}, \textit{dest}{:}, or \textit{simp}{:}, as appropriate. |
402 \end{enum} |
400 \end{enum} |
403 |
401 |
404 In some rare cases, Metis fails fairly quickly. This usually indicates that |
402 In some rare cases, Metis fails fairly quickly. This usually indicates that |
405 Sledgehammer found a type-incorrect proof. Sledgehammer erases some type |
403 Sledgehammer found a type-incorrect proof. Sledgehammer erases some type |