doc-src/TutorialI/Misc/Plus.thy
author blanchet
Wed, 15 Sep 2010 15:48:52 +0200
changeset 39411 ec989bd98fc8
parent 27015 f8537d69f514
permissions -rw-r--r--
use "Metis_" prefix rather than "Metis" structure; the prefix can then be used not only for structures but also signatures and functors. A few other changes were made to the script, to eliminate the need for "metis_env.ML".

(*<*)
theory Plus imports Main begin
(*>*)

text{*\noindent Define the following addition function *}

primrec add :: "nat \<Rightarrow> nat \<Rightarrow> nat" where
"add m 0 = m" |
"add m (Suc n) = add (Suc m) n"

text{*\noindent and prove*}
(*<*)
lemma [simp]: "!m. add m n = m+n"
apply(induct_tac n)
by(auto)
(*>*)
lemma "add m n = m+n"
(*<*)
by(simp)

end
(*>*)