doc-src/TutorialI/Misc/document/simp.tex
changeset 15481 fc075ae929e4
parent 13814 5402c2eaf393
child 15614 b098158a3f39
equal deleted inserted replaced
15480:cb3612cc41a3 15481:fc075ae929e4
   112 as simplification rules and are simplified themselves. For example:%
   112 as simplification rules and are simplified themselves. For example:%
   113 \end{isamarkuptext}%
   113 \end{isamarkuptext}%
   114 \isamarkuptrue%
   114 \isamarkuptrue%
   115 \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
   115 \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
   116 \isamarkupfalse%
   116 \isamarkupfalse%
   117 \isacommand{apply}\ simp\isanewline
   117 \isamarkupfalse%
   118 \isamarkupfalse%
   118 \isamarkupfalse%
   119 \isacommand{done}\isamarkupfalse%
       
   120 %
   119 %
   121 \begin{isamarkuptext}%
   120 \begin{isamarkuptext}%
   122 \noindent
   121 \noindent
   123 The second assumption simplifies to \isa{xs\ {\isacharequal}\ {\isacharbrackleft}{\isacharbrackright}}, which in turn
   122 The second assumption simplifies to \isa{xs\ {\isacharequal}\ {\isacharbrackleft}{\isacharbrackright}}, which in turn
   124 simplifies the first assumption to \isa{zs\ {\isacharequal}\ ys}, thus reducing the
   123 simplifies the first assumption to \isa{zs\ {\isacharequal}\ ys}, thus reducing the
   126 
   125 
   127 In some cases, using the assumptions can lead to nontermination:%
   126 In some cases, using the assumptions can lead to nontermination:%
   128 \end{isamarkuptext}%
   127 \end{isamarkuptext}%
   129 \isamarkuptrue%
   128 \isamarkuptrue%
   130 \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}\isamarkupfalse%
   129 \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}\isamarkupfalse%
   131 %
   130 \isamarkuptrue%
   132 \begin{isamarkuptxt}%
   131 \isamarkupfalse%
   133 \noindent
   132 \isamarkupfalse%
   134 An unmodified application of \isa{simp} loops.  The culprit is the
       
   135 simplification rule \isa{f\ x\ {\isacharequal}\ g\ {\isacharparenleft}f\ {\isacharparenleft}g\ x{\isacharparenright}{\isacharparenright}}, which is extracted from
       
   136 the assumption.  (Isabelle notices certain simple forms of
       
   137 nontermination but not this one.)  The problem can be circumvented by
       
   138 telling the simplifier to ignore the assumptions:%
       
   139 \end{isamarkuptxt}%
       
   140 \isamarkuptrue%
       
   141 \isacommand{apply}{\isacharparenleft}simp\ {\isacharparenleft}no{\isacharunderscore}asm{\isacharparenright}{\isacharparenright}\isanewline
       
   142 \isamarkupfalse%
       
   143 \isacommand{done}\isamarkupfalse%
       
   144 %
   133 %
   145 \begin{isamarkuptext}%
   134 \begin{isamarkuptext}%
   146 \noindent
   135 \noindent
   147 Three modifiers influence the treatment of assumptions:
   136 Three modifiers influence the treatment of assumptions:
   148 \begin{description}
   137 \begin{description}
   196 \noindent
   185 \noindent
   197 we may want to prove%
   186 we may want to prove%
   198 \end{isamarkuptext}%
   187 \end{isamarkuptext}%
   199 \isamarkuptrue%
   188 \isamarkuptrue%
   200 \isacommand{lemma}\ {\isachardoublequote}xor\ A\ {\isacharparenleft}{\isasymnot}A{\isacharparenright}{\isachardoublequote}\isamarkupfalse%
   189 \isacommand{lemma}\ {\isachardoublequote}xor\ A\ {\isacharparenleft}{\isasymnot}A{\isacharparenright}{\isachardoublequote}\isamarkupfalse%
   201 %
   190 \isamarkuptrue%
   202 \begin{isamarkuptxt}%
   191 \isamarkupfalse%
   203 \noindent
   192 \isamarkuptrue%
   204 Typically, we begin by unfolding some definitions:
   193 \isamarkupfalse%
   205 \indexbold{definitions!unfolding}%
   194 \isamarkupfalse%
   206 \end{isamarkuptxt}%
   195 \isamarkupfalse%
   207 \isamarkuptrue%
       
   208 \isacommand{apply}{\isacharparenleft}simp\ only{\isacharcolon}\ xor{\isacharunderscore}def{\isacharparenright}\isamarkupfalse%
       
   209 %
       
   210 \begin{isamarkuptxt}%
       
   211 \noindent
       
   212 In this particular case, the resulting goal
       
   213 \begin{isabelle}%
       
   214 \ {\isadigit{1}}{\isachardot}\ A\ {\isasymand}\ {\isasymnot}\ {\isasymnot}\ A\ {\isasymor}\ {\isasymnot}\ A\ {\isasymand}\ {\isasymnot}\ A%
       
   215 \end{isabelle}
       
   216 can be proved by simplification. Thus we could have proved the lemma outright by%
       
   217 \end{isamarkuptxt}%
       
   218 \isamarkuptrue%
       
   219 \isamarkupfalse%
       
   220 \isamarkupfalse%
       
   221 \isacommand{apply}{\isacharparenleft}simp\ add{\isacharcolon}\ xor{\isacharunderscore}def{\isacharparenright}\isamarkupfalse%
       
   222 \isamarkupfalse%
   196 \isamarkupfalse%
   223 %
   197 %
   224 \begin{isamarkuptext}%
   198 \begin{isamarkuptext}%
   225 \noindent
   199 \noindent
   226 Of course we can also unfold definitions in the middle of a proof.
   200 Of course we can also unfold definitions in the middle of a proof.
   253 means rewriting with \tdx{Let_def}:%
   227 means rewriting with \tdx{Let_def}:%
   254 \end{isamarkuptext}%
   228 \end{isamarkuptext}%
   255 \isamarkuptrue%
   229 \isamarkuptrue%
   256 \isacommand{lemma}\ {\isachardoublequote}{\isacharparenleft}let\ xs\ {\isacharequal}\ {\isacharbrackleft}{\isacharbrackright}\ in\ xs{\isacharat}ys{\isacharat}xs{\isacharparenright}\ {\isacharequal}\ ys{\isachardoublequote}\isanewline
   230 \isacommand{lemma}\ {\isachardoublequote}{\isacharparenleft}let\ xs\ {\isacharequal}\ {\isacharbrackleft}{\isacharbrackright}\ in\ xs{\isacharat}ys{\isacharat}xs{\isacharparenright}\ {\isacharequal}\ ys{\isachardoublequote}\isanewline
   257 \isamarkupfalse%
   231 \isamarkupfalse%
   258 \isacommand{apply}{\isacharparenleft}simp\ add{\isacharcolon}\ Let{\isacharunderscore}def{\isacharparenright}\isanewline
   232 \isamarkupfalse%
   259 \isamarkupfalse%
   233 \isamarkupfalse%
   260 \isacommand{done}\isamarkupfalse%
       
   261 %
   234 %
   262 \begin{isamarkuptext}%
   235 \begin{isamarkuptext}%
   263 If, in a particular context, there is no danger of a combinatorial explosion
   236 If, in a particular context, there is no danger of a combinatorial explosion
   264 of nested \isa{let}s, you could even simplify with \isa{Let{\isacharunderscore}def} by
   237 of nested \isa{let}s, you could even simplify with \isa{Let{\isacharunderscore}def} by
   265 default:%
   238 default:%
   277 accepts \emph{conditional} equations, for example%
   250 accepts \emph{conditional} equations, for example%
   278 \end{isamarkuptext}%
   251 \end{isamarkuptext}%
   279 \isamarkuptrue%
   252 \isamarkuptrue%
   280 \isacommand{lemma}\ hd{\isacharunderscore}Cons{\isacharunderscore}tl{\isacharbrackleft}simp{\isacharbrackright}{\isacharcolon}\ {\isachardoublequote}xs\ {\isasymnoteq}\ {\isacharbrackleft}{\isacharbrackright}\ \ {\isasymLongrightarrow}\ \ hd\ xs\ {\isacharhash}\ tl\ xs\ {\isacharequal}\ xs{\isachardoublequote}\isanewline
   253 \isacommand{lemma}\ hd{\isacharunderscore}Cons{\isacharunderscore}tl{\isacharbrackleft}simp{\isacharbrackright}{\isacharcolon}\ {\isachardoublequote}xs\ {\isasymnoteq}\ {\isacharbrackleft}{\isacharbrackright}\ \ {\isasymLongrightarrow}\ \ hd\ xs\ {\isacharhash}\ tl\ xs\ {\isacharequal}\ xs{\isachardoublequote}\isanewline
   281 \isamarkupfalse%
   254 \isamarkupfalse%
   282 \isacommand{apply}{\isacharparenleft}case{\isacharunderscore}tac\ xs{\isacharcomma}\ simp{\isacharcomma}\ simp{\isacharparenright}\isanewline
   255 \isamarkupfalse%
   283 \isamarkupfalse%
   256 \isamarkupfalse%
   284 \isacommand{done}\isamarkupfalse%
       
   285 %
   257 %
   286 \begin{isamarkuptext}%
   258 \begin{isamarkuptext}%
   287 \noindent
   259 \noindent
   288 Note the use of ``\ttindexboldpos{,}{$Isar}'' to string together a
   260 Note the use of ``\ttindexboldpos{,}{$Isar}'' to string together a
   289 sequence of methods. Assuming that the simplification rule
   261 sequence of methods. Assuming that the simplification rule
   315 are usually proved by case
   287 are usually proved by case
   316 distinction on the boolean condition.  Here is an example:%
   288 distinction on the boolean condition.  Here is an example:%
   317 \end{isamarkuptext}%
   289 \end{isamarkuptext}%
   318 \isamarkuptrue%
   290 \isamarkuptrue%
   319 \isacommand{lemma}\ {\isachardoublequote}{\isasymforall}xs{\isachardot}\ if\ xs\ {\isacharequal}\ {\isacharbrackleft}{\isacharbrackright}\ then\ rev\ xs\ {\isacharequal}\ {\isacharbrackleft}{\isacharbrackright}\ else\ rev\ xs\ {\isasymnoteq}\ {\isacharbrackleft}{\isacharbrackright}{\isachardoublequote}\isamarkupfalse%
   291 \isacommand{lemma}\ {\isachardoublequote}{\isasymforall}xs{\isachardot}\ if\ xs\ {\isacharequal}\ {\isacharbrackleft}{\isacharbrackright}\ then\ rev\ xs\ {\isacharequal}\ {\isacharbrackleft}{\isacharbrackright}\ else\ rev\ xs\ {\isasymnoteq}\ {\isacharbrackleft}{\isacharbrackright}{\isachardoublequote}\isamarkupfalse%
   320 %
   292 \isamarkuptrue%
   321 \begin{isamarkuptxt}%
   293 \isamarkupfalse%
   322 \noindent
       
   323 The goal can be split by a special method, \methdx{split}:%
       
   324 \end{isamarkuptxt}%
       
   325 \isamarkuptrue%
       
   326 \isacommand{apply}{\isacharparenleft}split\ split{\isacharunderscore}if{\isacharparenright}\isamarkupfalse%
       
   327 %
       
   328 \begin{isamarkuptxt}%
       
   329 \noindent
       
   330 \begin{isabelle}%
       
   331 \ {\isadigit{1}}{\isachardot}\ {\isasymforall}xs{\isachardot}\ {\isacharparenleft}xs\ {\isacharequal}\ {\isacharbrackleft}{\isacharbrackright}\ {\isasymlongrightarrow}\ rev\ xs\ {\isacharequal}\ {\isacharbrackleft}{\isacharbrackright}{\isacharparenright}\ {\isasymand}\ {\isacharparenleft}xs\ {\isasymnoteq}\ {\isacharbrackleft}{\isacharbrackright}\ {\isasymlongrightarrow}\ rev\ xs\ {\isasymnoteq}\ {\isacharbrackleft}{\isacharbrackright}{\isacharparenright}%
       
   332 \end{isabelle}
       
   333 where \tdx{split_if} is a theorem that expresses splitting of
       
   334 \isa{if}s. Because
       
   335 splitting the \isa{if}s is usually the right proof strategy, the
       
   336 simplifier does it automatically.  Try \isacommand{apply}\isa{{\isacharparenleft}simp{\isacharparenright}}
       
   337 on the initial goal above.
       
   338 
       
   339 This splitting idea generalizes from \isa{if} to \sdx{case}.
       
   340 Let us simplify a case analysis over lists:\index{*list.split (theorem)}%
       
   341 \end{isamarkuptxt}%
       
   342 \isamarkuptrue%
   294 \isamarkuptrue%
   343 \isamarkupfalse%
   295 \isamarkupfalse%
   344 \isacommand{lemma}\ {\isachardoublequote}{\isacharparenleft}case\ xs\ of\ {\isacharbrackleft}{\isacharbrackright}\ {\isasymRightarrow}\ zs\ {\isacharbar}\ y{\isacharhash}ys\ {\isasymRightarrow}\ y{\isacharhash}{\isacharparenleft}ys{\isacharat}zs{\isacharparenright}{\isacharparenright}\ {\isacharequal}\ xs{\isacharat}zs{\isachardoublequote}\isanewline
   296 \isacommand{lemma}\ {\isachardoublequote}{\isacharparenleft}case\ xs\ of\ {\isacharbrackleft}{\isacharbrackright}\ {\isasymRightarrow}\ zs\ {\isacharbar}\ y{\isacharhash}ys\ {\isasymRightarrow}\ y{\isacharhash}{\isacharparenleft}ys{\isacharat}zs{\isacharparenright}{\isacharparenright}\ {\isacharequal}\ xs{\isacharat}zs{\isachardoublequote}\isanewline
   345 \isamarkupfalse%
   297 \isamarkupfalse%
   346 \isacommand{apply}{\isacharparenleft}split\ list{\isachardot}split{\isacharparenright}\isamarkupfalse%
   298 \isamarkupfalse%
   347 %
   299 \isamarkuptrue%
   348 \begin{isamarkuptxt}%
   300 \isamarkupfalse%
   349 \begin{isabelle}%
   301 \isamarkupfalse%
   350 \ {\isadigit{1}}{\isachardot}\ {\isacharparenleft}xs\ {\isacharequal}\ {\isacharbrackleft}{\isacharbrackright}\ {\isasymlongrightarrow}\ zs\ {\isacharequal}\ xs\ {\isacharat}\ zs{\isacharparenright}\ {\isasymand}\isanewline
   302 \isamarkupfalse%
   351 \isaindent{\ {\isadigit{1}}{\isachardot}\ }{\isacharparenleft}{\isasymforall}a\ list{\isachardot}\ xs\ {\isacharequal}\ a\ {\isacharhash}\ list\ {\isasymlongrightarrow}\ a\ {\isacharhash}\ list\ {\isacharat}\ zs\ {\isacharequal}\ xs\ {\isacharat}\ zs{\isacharparenright}%
       
   352 \end{isabelle}
       
   353 The simplifier does not split
       
   354 \isa{case}-expressions, as it does \isa{if}-expressions, 
       
   355 because with recursive datatypes it could lead to nontermination.
       
   356 Instead, the simplifier has a modifier
       
   357 \isa{split}\index{*split (modifier)} 
       
   358 for adding splitting rules explicitly.  The
       
   359 lemma above can be proved in one step by%
       
   360 \end{isamarkuptxt}%
       
   361 \isamarkuptrue%
       
   362 \isamarkupfalse%
       
   363 \isamarkupfalse%
       
   364 \isacommand{apply}{\isacharparenleft}simp\ split{\isacharcolon}\ list{\isachardot}split{\isacharparenright}\isamarkupfalse%
       
   365 \isamarkupfalse%
   303 \isamarkupfalse%
   366 %
   304 %
   367 \begin{isamarkuptext}%
   305 \begin{isamarkuptext}%
   368 \noindent
   306 \noindent
   369 whereas \isacommand{apply}\isa{{\isacharparenleft}simp{\isacharparenright}} alone will not succeed.
   307 whereas \isacommand{apply}\isa{{\isacharparenleft}simp{\isacharparenright}} alone will not succeed.
   380 The \isa{split} attribute can be removed with the \isa{del} modifier,
   318 The \isa{split} attribute can be removed with the \isa{del} modifier,
   381 either locally%
   319 either locally%
   382 \end{isamarkuptext}%
   320 \end{isamarkuptext}%
   383 \isamarkuptrue%
   321 \isamarkuptrue%
   384 \isamarkupfalse%
   322 \isamarkupfalse%
   385 \isacommand{apply}{\isacharparenleft}simp\ split\ del{\isacharcolon}\ split{\isacharunderscore}if{\isacharparenright}\isamarkupfalse%
   323 \isamarkupfalse%
   386 \isamarkupfalse%
   324 \isamarkupfalse%
   387 %
   325 %
   388 \begin{isamarkuptext}%
   326 \begin{isamarkuptext}%
   389 \noindent
   327 \noindent
   390 or globally:%
   328 or globally:%
   405 $t$\isa{{\isachardot}split{\isacharunderscore}asm}:%
   343 $t$\isa{{\isachardot}split{\isacharunderscore}asm}:%
   406 \end{isamarkuptext}%
   344 \end{isamarkuptext}%
   407 \isamarkuptrue%
   345 \isamarkuptrue%
   408 \isacommand{lemma}\ {\isachardoublequote}if\ xs\ {\isacharequal}\ {\isacharbrackleft}{\isacharbrackright}\ then\ ys\ {\isasymnoteq}\ {\isacharbrackleft}{\isacharbrackright}\ else\ ys\ {\isacharequal}\ {\isacharbrackleft}{\isacharbrackright}\ {\isasymLongrightarrow}\ xs\ {\isacharat}\ ys\ {\isasymnoteq}\ {\isacharbrackleft}{\isacharbrackright}{\isachardoublequote}\isanewline
   346 \isacommand{lemma}\ {\isachardoublequote}if\ xs\ {\isacharequal}\ {\isacharbrackleft}{\isacharbrackright}\ then\ ys\ {\isasymnoteq}\ {\isacharbrackleft}{\isacharbrackright}\ else\ ys\ {\isacharequal}\ {\isacharbrackleft}{\isacharbrackright}\ {\isasymLongrightarrow}\ xs\ {\isacharat}\ ys\ {\isasymnoteq}\ {\isacharbrackleft}{\isacharbrackright}{\isachardoublequote}\isanewline
   409 \isamarkupfalse%
   347 \isamarkupfalse%
   410 \isacommand{apply}{\isacharparenleft}split\ split{\isacharunderscore}if{\isacharunderscore}asm{\isacharparenright}\isamarkupfalse%
   348 \isamarkupfalse%
   411 %
       
   412 \begin{isamarkuptxt}%
       
   413 \noindent
       
   414 Unlike splitting the conclusion, this step creates two
       
   415 separate subgoals, which here can be solved by \isa{simp{\isacharunderscore}all}:
       
   416 \begin{isabelle}%
       
   417 \ {\isadigit{1}}{\isachardot}\ {\isasymlbrakk}xs\ {\isacharequal}\ {\isacharbrackleft}{\isacharbrackright}{\isacharsemicolon}\ ys\ {\isasymnoteq}\ {\isacharbrackleft}{\isacharbrackright}{\isasymrbrakk}\ {\isasymLongrightarrow}\ xs\ {\isacharat}\ ys\ {\isasymnoteq}\ {\isacharbrackleft}{\isacharbrackright}\isanewline
       
   418 \ {\isadigit{2}}{\isachardot}\ {\isasymlbrakk}xs\ {\isasymnoteq}\ {\isacharbrackleft}{\isacharbrackright}{\isacharsemicolon}\ ys\ {\isacharequal}\ {\isacharbrackleft}{\isacharbrackright}{\isasymrbrakk}\ {\isasymLongrightarrow}\ xs\ {\isacharat}\ ys\ {\isasymnoteq}\ {\isacharbrackleft}{\isacharbrackright}%
       
   419 \end{isabelle}
       
   420 If you need to split both in the assumptions and the conclusion,
       
   421 use $t$\isa{{\isachardot}splits} which subsumes $t$\isa{{\isachardot}split} and
       
   422 $t$\isa{{\isachardot}split{\isacharunderscore}asm}. Analogously, there is \isa{if{\isacharunderscore}splits}.
       
   423 
       
   424 \begin{warn}
       
   425   The simplifier merely simplifies the condition of an 
       
   426   \isa{if}\index{*if expressions!simplification of} but not the
       
   427   \isa{then} or \isa{else} parts. The latter are simplified only after the
       
   428   condition reduces to \isa{True} or \isa{False}, or after splitting. The
       
   429   same is true for \sdx{case}-expressions: only the selector is
       
   430   simplified at first, until either the expression reduces to one of the
       
   431   cases or it is split.
       
   432 \end{warn}%
       
   433 \end{isamarkuptxt}%
       
   434 \isamarkuptrue%
   349 \isamarkuptrue%
   435 \isamarkupfalse%
   350 \isamarkupfalse%
   436 %
   351 %
   437 \isamarkupsubsection{Tracing%
   352 \isamarkupsubsection{Tracing%
   438 }
   353 }
   444 \isa{trace_simp}\index{*trace_simp (flag)} flag\index{flags} 
   359 \isa{trace_simp}\index{*trace_simp (flag)} flag\index{flags} 
   445 to get a better idea of what is going
   360 to get a better idea of what is going
   446 on:%
   361 on:%
   447 \end{isamarkuptext}%
   362 \end{isamarkuptext}%
   448 \isamarkuptrue%
   363 \isamarkuptrue%
   449 \isacommand{ML}\ {\isachardoublequote}set\ trace{\isacharunderscore}simp{\isachardoublequote}\isanewline
       
   450 \isamarkupfalse%
   364 \isamarkupfalse%
   451 \isacommand{lemma}\ {\isachardoublequote}rev\ {\isacharbrackleft}a{\isacharbrackright}\ {\isacharequal}\ {\isacharbrackleft}{\isacharbrackright}{\isachardoublequote}\isanewline
   365 \isacommand{lemma}\ {\isachardoublequote}rev\ {\isacharbrackleft}a{\isacharbrackright}\ {\isacharequal}\ {\isacharbrackleft}{\isacharbrackright}{\isachardoublequote}\isanewline
   452 \isamarkupfalse%
   366 \isamarkupfalse%
   453 \isacommand{apply}{\isacharparenleft}simp{\isacharparenright}\isamarkupfalse%
   367 \isamarkupfalse%
   454 \isamarkupfalse%
   368 \isamarkupfalse%
   455 %
   369 %
   456 \begin{isamarkuptext}%
   370 \begin{isamarkuptext}%
   457 \noindent
   371 \noindent
   458 produces the trace
   372 produces the trace
   485 In more complicated cases, the trace can be quite lengthy.  Invocations of the
   399 In more complicated cases, the trace can be quite lengthy.  Invocations of the
   486 simplifier are often nested, for instance when solving conditions of rewrite
   400 simplifier are often nested, for instance when solving conditions of rewrite
   487 rules.  Thus it is advisable to reset it:%
   401 rules.  Thus it is advisable to reset it:%
   488 \end{isamarkuptext}%
   402 \end{isamarkuptext}%
   489 \isamarkuptrue%
   403 \isamarkuptrue%
   490 \isacommand{ML}\ {\isachardoublequote}reset\ trace{\isacharunderscore}simp{\isachardoublequote}\isanewline
       
   491 \isamarkupfalse%
   404 \isamarkupfalse%
   492 \isamarkupfalse%
   405 \isamarkupfalse%
   493 \end{isabellebody}%
   406 \end{isabellebody}%
   494 %%% Local Variables:
   407 %%% Local Variables:
   495 %%% mode: latex
   408 %%% mode: latex