doc-src/TutorialI/Misc/cases.thy
author paulson
Wed, 24 May 2000 18:49:05 +0200
changeset 8962 633e1682455c
parent 8771 026f37a86ea7
child 9458 c613cd06d5cf
permissions -rw-r--r--
setsum is now overloaded on plus_ac0

(*<*)
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:
*}

apply(auto).;
(**)
(*<*)
end
(*>*)