author | wenzelm |
Tue, 01 Aug 2000 13:43:22 +0200 | |
changeset 9490 | c2606af9922c |
parent 9458 | c613cd06d5cf |
child 9541 | d17c0b34d5c8 |
permissions | -rw-r--r-- |
(*<*) theory natsum = Main:; (*>*) text{*\noindent In particular, there are \isa{case}-expressions, for example *} (*<*)term(*>*) "case n of 0 \\<Rightarrow> 0 | Suc m \\<Rightarrow> m"; text{*\noindent primitive recursion, for example *} consts sum :: "nat \\<Rightarrow> nat"; primrec "sum 0 = 0" "sum (Suc n) = Suc n + sum n"; text{*\noindent and induction, for example *} lemma "sum n + sum n = n*(Suc n)"; apply(induct_tac n); by(auto); (*<*) end (*>*)