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