doc-src/TutorialI/Misc/prime_def.thy
author paulson
Tue, 05 Sep 2000 13:12:00 +0200
changeset 9843 cc8aa63bdad6
parent 9792 bbefb6ce5cb2
child 9844 8016321c7de1
permissions -rw-r--r--
tidied, proving gcd_greatest_iff and using induct_tac

(*<*)
theory prime_def = Main:;
consts prime :: "nat \\<Rightarrow> bool"
(*>*)
(*<*)term(*>*)

    "prime(p) \\<equiv> 1 < p \\<and> (m dvd p \\<longrightarrow> (m=1 \\<or> m=p))";
text{*\noindent\small
where @{text"dvd"} means ``divides''.
Isabelle rejects this ``definition'' because of the extra @{term"m"} on the
right-hand side, which would introduce an inconsistency (why?). What you
should have written is
*}
(*<*)term(*>*)
 "prime(p) \\<equiv> 1 < p \\<and> (\\<forall>m. m dvd p \\<longrightarrow> (m=1 \\<or> m=p))"
(*<*)
end
(*>*)