src/Doc/Tutorial/Misc/Plus.thy
author wenzelm
Tue, 16 Jan 2018 09:30:00 +0100
changeset 67443 3abf6a722518
parent 67406 23307fd33906
child 67613 ce654b0e6d69
permissions -rw-r--r--
standardized towards new-style formal comments: isabelle update_comments;

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

text\<open>\noindent Define the following addition function\<close>

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

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

end
(*>*)