doc-src/TutorialI/Misc/document/asm_simp.tex
author nipkow
Fri, 01 Sep 2000 19:09:44 +0200
changeset 9792 bbefb6ce5cb2
parent 9722 a5f86aed785b
permissions -rw-r--r--
*** empty log message ***
nipkow@9722
     1
%
nipkow@9722
     2
\begin{isabellebody}%
nipkow@8749
     3
%
nipkow@8749
     4
\begin{isamarkuptext}%
nipkow@8749
     5
By default, assumptions are part of the simplification process: they are used
nipkow@8749
     6
as simplification rules and are simplified themselves. For example:%
nipkow@8749
     7
\end{isamarkuptext}%
wenzelm@9673
     8
\isacommand{lemma}\ {\isachardoublequote}{\isasymlbrakk}\ xs\ {\isacharat}\ zs\ {\isacharequal}\ ys\ {\isacharat}\ xs{\isacharsemicolon}\ {\isacharbrackleft}{\isacharbrackright}\ {\isacharat}\ xs\ {\isacharequal}\ {\isacharbrackleft}{\isacharbrackright}\ {\isacharat}\ {\isacharbrackleft}{\isacharbrackright}\ {\isasymrbrakk}\ {\isasymLongrightarrow}\ ys\ {\isacharequal}\ zs{\isachardoublequote}\isanewline
nipkow@9541
     9
\isacommand{by}\ simp%
nipkow@8749
    10
\begin{isamarkuptext}%
nipkow@8749
    11
\noindent
nipkow@9792
    12
The second assumption simplifies to \isa{xs\ {\isacharequal}\ {\isacharbrackleft}{\isacharbrackright}}, which in turn
nipkow@9792
    13
simplifies the first assumption to \isa{zs\ {\isacharequal}\ ys}, thus reducing the
nipkow@9792
    14
conclusion to \isa{ys\ {\isacharequal}\ ys} and hence to \isa{True}.
nipkow@8749
    15
nipkow@8749
    16
In some cases this may be too much of a good thing and may lead to
nipkow@8749
    17
nontermination:%
nipkow@8749
    18
\end{isamarkuptext}%
wenzelm@9673
    19
\isacommand{lemma}\ {\isachardoublequote}{\isasymforall}x{\isachardot}\ f\ x\ {\isacharequal}\ g\ {\isacharparenleft}f\ {\isacharparenleft}g\ x{\isacharparenright}{\isacharparenright}\ {\isasymLongrightarrow}\ f\ {\isacharbrackleft}{\isacharbrackright}\ {\isacharequal}\ f\ {\isacharbrackleft}{\isacharbrackright}\ {\isacharat}\ {\isacharbrackleft}{\isacharbrackright}{\isachardoublequote}%
nipkow@8749
    20
\begin{isamarkuptxt}%
nipkow@8749
    21
\noindent
nipkow@8749
    22
cannot be solved by an unmodified application of \isa{simp} because the
nipkow@9792
    23
simplification rule \isa{f\ x\ {\isacharequal}\ g\ {\isacharparenleft}f\ {\isacharparenleft}g\ x{\isacharparenright}{\isacharparenright}} extracted from the assumption
nipkow@8749
    24
does not terminate. Isabelle notices certain simple forms of
nipkow@8749
    25
nontermination but not this one. The problem can be circumvented by
nipkow@8749
    26
explicitly telling the simplifier to ignore the assumptions:%
nipkow@8749
    27
\end{isamarkuptxt}%
wenzelm@9673
    28
\isacommand{by}{\isacharparenleft}simp\ {\isacharparenleft}no{\isacharunderscore}asm{\isacharparenright}{\isacharparenright}%
nipkow@8749
    29
\begin{isamarkuptext}%
nipkow@8749
    30
\noindent
wenzelm@8823
    31
There are three options that influence the treatment of assumptions:
nipkow@8749
    32
\begin{description}
nipkow@9792
    33
\item[\isa{{\isacharparenleft}no{\isacharunderscore}asm{\isacharparenright}}]\indexbold{*no_asm}
nipkow@9494
    34
 means that assumptions are completely ignored.
nipkow@9792
    35
\item[\isa{{\isacharparenleft}no{\isacharunderscore}asm{\isacharunderscore}simp{\isacharparenright}}]\indexbold{*no_asm_simp}
nipkow@9494
    36
 means that the assumptions are not simplified but
nipkow@8749
    37
  are used in the simplification of the conclusion.
nipkow@9792
    38
\item[\isa{{\isacharparenleft}no{\isacharunderscore}asm{\isacharunderscore}use{\isacharparenright}}]\indexbold{*no_asm_use}
nipkow@9494
    39
 means that the assumptions are simplified but are not
nipkow@8749
    40
  used in the simplification of each other or the conclusion.
nipkow@8749
    41
\end{description}
nipkow@9792
    42
Neither \isa{{\isacharparenleft}no{\isacharunderscore}asm{\isacharunderscore}simp{\isacharparenright}} nor \isa{{\isacharparenleft}no{\isacharunderscore}asm{\isacharunderscore}use{\isacharparenright}} allow to simplify
nipkow@9792
    43
the above problematic subgoal.
nipkow@8749
    44
wenzelm@8823
    45
Note that only one of the above options is allowed, and it must precede all
wenzelm@8823
    46
other arguments.%
nipkow@8749
    47
\end{isamarkuptext}%
nipkow@9722
    48
\end{isabellebody}%
wenzelm@9145
    49
%%% Local Variables:
wenzelm@9145
    50
%%% mode: latex
wenzelm@9145
    51
%%% TeX-master: "root"
wenzelm@9145
    52
%%% End: