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