author | nipkow |
Tue, 05 Sep 2000 09:03:17 +0200 | |
changeset 9834 | 109b11c4e77e |
parent 9792 | bbefb6ce5cb2 |
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 (*>*)