8749
|
1 |
\begin{isabelle}%
|
|
2 |
%
|
|
3 |
\begin{isamarkuptext}%
|
|
4 |
\noindent
|
9541
|
5 |
In particular, there are \isa{case}-expressions, for example
|
|
6 |
\begin{quote}
|
|
7 |
|
|
8 |
\begin{isabelle}%
|
9644
|
9 |
case\ \mbox{n}\ of\ 0\ {\isasymRightarrow}\ 0\ |\ Suc\ \mbox{m}\ {\isasymRightarrow}\ \mbox{m}
|
9541
|
10 |
\end{isabelle}%
|
|
11 |
|
|
12 |
\end{quote}
|
8749
|
13 |
primitive recursion, for example%
|
|
14 |
\end{isamarkuptext}%
|
9541
|
15 |
\isacommand{consts}\ sum\ ::\ {"}nat\ {\isasymRightarrow}\ nat{"}\isanewline
|
|
16 |
\isacommand{primrec}\ {"}sum\ 0\ =\ 0{"}\isanewline
|
|
17 |
\ \ \ \ \ \ \ \ {"}sum\ (Suc\ n)\ =\ Suc\ n\ +\ sum\ n{"}%
|
8749
|
18 |
\begin{isamarkuptext}%
|
|
19 |
\noindent
|
|
20 |
and induction, for example%
|
|
21 |
\end{isamarkuptext}%
|
9541
|
22 |
\isacommand{lemma}\ {"}sum\ n\ +\ sum\ n\ =\ n*(Suc\ n){"}\isanewline
|
|
23 |
\isacommand{apply}(induct\_tac\ n)\isanewline
|
9458
|
24 |
\isacommand{by}(auto)\isanewline
|
8749
|
25 |
\end{isabelle}%
|
9145
|
26 |
%%% Local Variables:
|
|
27 |
%%% mode: latex
|
|
28 |
%%% TeX-master: "root"
|
|
29 |
%%% End:
|