8749
|
1 |
\begin{isabelle}%
|
|
2 |
%
|
|
3 |
\begin{isamarkuptext}%
|
|
4 |
\noindent
|
|
5 |
In particular, there are \isa{case}-expressions, for example%
|
|
6 |
\end{isamarkuptext}%
|
|
7 |
~{"}case~n~of~0~{\isasymRightarrow}~0~|~Suc~m~{\isasymRightarrow}~m{"}%
|
|
8 |
\begin{isamarkuptext}%
|
|
9 |
\noindent
|
|
10 |
primitive recursion, for example%
|
|
11 |
\end{isamarkuptext}%
|
|
12 |
\isacommand{consts}~sum~::~{"}nat~{\isasymRightarrow}~nat{"}\isanewline
|
|
13 |
\isacommand{primrec}~{"}sum~0~=~0{"}\isanewline
|
|
14 |
~~~~~~~~{"}sum~(Suc~n)~=~Suc~n~+~sum~n{"}%
|
|
15 |
\begin{isamarkuptext}%
|
|
16 |
\noindent
|
|
17 |
and induction, for example%
|
|
18 |
\end{isamarkuptext}%
|
|
19 |
\isacommand{lemma}~{"}sum~n~+~sum~n~=~n*(Suc~n){"}\isanewline
|
|
20 |
\isacommand{apply}(induct\_tac~n)\isanewline
|
|
21 |
\isacommand{apply}(auto)\isacommand{.}\isanewline
|
|
22 |
\end{isabelle}%
|