doc-src/TutorialI/Misc/document/cases.tex
author wenzelm
Sun, 25 Jun 2000 23:46:39 +0200
changeset 9122 addbea344673
parent 8771 026f37a86ea7
child 9145 9f7b8de5bfaf
permissions -rw-r--r--
added state: 'a * 'b -> 'a * ('a * 'b);

\begin{isabelle}%
\isanewline
\isacommand{lemma}~{"}(case~xs~of~[]~{\isasymRightarrow}~[]~|~y\#ys~{\isasymRightarrow}~xs)~=~xs{"}\isanewline
\isacommand{apply}(case\_tac~xs)%
\begin{isamarkuptxt}%
\noindent
results in the proof state
\begin{isabellepar}%
~1.~xs~=~[]~{\isasymLongrightarrow}~(case~xs~of~[]~{\isasymRightarrow}~[]~|~y~\#~ys~{\isasymRightarrow}~xs)~=~xs\isanewline
~2.~{\isasymAnd}a~list.~xs=a\#list~{\isasymLongrightarrow}~(case~xs~of~[]~{\isasymRightarrow}~[]~|~y\#ys~{\isasymRightarrow}~xs)~=~xs%
\end{isabellepar}%
which is solved automatically:%
\end{isamarkuptxt}%
\isacommand{apply}(auto)\isacommand{.}\isanewline
\end{isabelle}%