author | wenzelm |
Tue, 12 Sep 2000 22:13:23 +0200 | |
changeset 9941 | fe05af7ec816 |
parent 9834 | 109b11c4e77e |
child 10171 | 59d6633835fa |
permissions | -rw-r--r-- |
(*<*) theory natsum = Main:; (*>*) text{*\noindent In particular, there are @{text"case"}-expressions, for example @{term[display]"case n of 0 => 0 | Suc m => m"} 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 (*>*)