author | nipkow |
Fri, 05 Jul 2002 17:48:05 +0200 | |
changeset 13305 | f88d0c363582 |
child 16417 | 9bc16273c2d4 |
permissions | -rw-r--r-- |
13305 | 1 |
(*<*) |
2 |
theory Plus = Main: |
|
3 |
(*>*) |
|
4 |
||
5 |
text{*\noindent Define the following addition function *} |
|
6 |
||
7 |
consts plus :: "nat \<Rightarrow> nat \<Rightarrow> nat" |
|
8 |
primrec |
|
9 |
"plus m 0 = m" |
|
10 |
"plus m (Suc n) = plus (Suc m) n" |
|
11 |
||
12 |
text{*\noindent and prove*} |
|
13 |
(*<*) |
|
14 |
lemma [simp]: "!m. plus m n = m+n" |
|
15 |
apply(induct_tac n) |
|
16 |
by(auto) |
|
17 |
(*>*) |
|
18 |
lemma "plus m n = m+n" |
|
19 |
(*<*) |
|
20 |
by(simp) |
|
21 |
||
22 |
end |
|
23 |
(*>*) |