451 recursive call, and for the first argument nothing could be proved, |
451 recursive call, and for the first argument nothing could be proved, |
452 which is expressed by \isa{{\isacharquery}}. In general, there are the values |
452 which is expressed by \isa{{\isacharquery}}. In general, there are the values |
453 \isa{{\isacharless}}, \isa{{\isacharless}{\isacharequal}} and \isa{{\isacharquery}}. |
453 \isa{{\isacharless}}, \isa{{\isacharless}{\isacharequal}} and \isa{{\isacharquery}}. |
454 |
454 |
455 For the failed proof attempts, the unfinished subgoals are also |
455 For the failed proof attempts, the unfinished subgoals are also |
456 printed. Looking at these will often point to a missing lemma. |
456 printed. Looking at these will often point to a missing lemma.% |
457 |
457 \end{isamarkuptext}% |
458 % As a more real example, here is quicksort:% |
458 \isamarkuptrue% |
|
459 % |
|
460 \isamarkupsubsection{The \isa{size{\isacharunderscore}change} method% |
|
461 } |
|
462 \isamarkuptrue% |
|
463 % |
|
464 \begin{isamarkuptext}% |
|
465 Some termination goals that are beyond the powers of |
|
466 \isa{lexicographic{\isacharunderscore}order} can be solved automatically by the |
|
467 more powerful \isa{size{\isacharunderscore}change} method, which uses a variant of |
|
468 the size-change principle, together with some other |
|
469 techniques. While the details are discussed |
|
470 elsewhere\cite{krauss_phd}, |
|
471 here are a few typical situations where |
|
472 \isa{lexicographic{\isacharunderscore}order} has difficulties and \isa{size{\isacharunderscore}change} |
|
473 may be worth a try: |
|
474 \begin{itemize} |
|
475 \item Arguments are permuted in a recursive call. |
|
476 \item Several mutually recursive functions with multiple arguments. |
|
477 \item Unusual control flow (e.g., when some recursive calls cannot |
|
478 occur in sequence). |
|
479 \end{itemize} |
|
480 |
|
481 Loading the theory \isa{Multiset} makes the \isa{size{\isacharunderscore}change} |
|
482 method a bit stronger: it can then use multiset orders internally.% |
459 \end{isamarkuptext}% |
483 \end{isamarkuptext}% |
460 \isamarkuptrue% |
484 \isamarkuptrue% |
461 % |
485 % |
462 \isamarkupsection{Mutual Recursion% |
486 \isamarkupsection{Mutual Recursion% |
463 } |
487 } |