ProgTutorial/Tactical.thy
changeset 378 8d160d79b48c
parent 370 2494b5b7a85d
child 384 0b24a016f6dd
equal deleted inserted replaced
377:272ba2cceeb2 378:8d160d79b48c
  1804 *}
  1804 *}
  1805 
  1805 
  1806 lemma 
  1806 lemma 
  1807   shows "Suc 0 = 1"
  1807   shows "Suc 0 = 1"
  1808 apply(simp)
  1808 apply(simp)
  1809 (*<*)oops(*>*)
  1809 txt{*
  1810 
  1810   \begin{minipage}{\textwidth}
  1811 text {*
  1811   \small@{text "> The redex: Suc 0"}\\
  1812   \begin{isabelle}
       
  1813   @{text "> The redex: Suc 0"}\\
  1812   @{text "> The redex: Suc 0"}\\
  1814   @{text "> The redex: Suc 0"}\\
  1813   \end{minipage}*}(*<*)oops(*>*)
  1815   \end{isabelle}
  1814 
  1816 
  1815 text {* 
  1817   This will print out the message twice: once for the left-hand side and
  1816   This will print out the message twice: once for the left-hand side and
  1818   once for the right-hand side. The reason is that during simplification the
  1817   once for the right-hand side. The reason is that during simplification the
  1819   simplifier will at some point reduce the term @{term "1::nat"} to @{term "Suc
  1818   simplifier will at some point reduce the term @{term "1::nat"} to @{term "Suc
  1820   0"}, and then the simproc ``fires'' also on that term. 
  1819   0"}, and then the simproc ``fires'' also on that term. 
  1821 
  1820