doc-src/TutorialI/Misc/cases.thy
author wenzelm
Tue, 01 Aug 2000 13:43:22 +0200
changeset 9490 c2606af9922c
parent 9458 c613cd06d5cf
child 9721 7e51c9f3d5a0
permissions -rw-r--r--
tuned msg;

(*<*)
theory "cases" = Main:;
(*>*)

lemma "(case xs of [] \\<Rightarrow> [] | y#ys \\<Rightarrow> xs) = xs";
apply(case_tac xs);

txt{*\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:
*}

by(auto);
(**)
(*<*)
end
(*>*)