doc-src/TutorialI/Misc/document/prime_def.tex
author paulson
Mon, 05 Mar 2001 15:25:11 +0100
changeset 11193 851c90b23a9e
parent 10267 325ead6d9457
child 11456 7eb63f63e6c6
permissions -rw-r--r--
reorganization of HOL/UNITY, moving examples to subdirectories Simple and Comp

%
\begin{isabellebody}%
\def\isabellecontext{prime{\isacharunderscore}def}%
%
\begin{isamarkuptext}%
\begin{warn}
A common mistake when writing definitions is to introduce extra free
variables on the right-hand side as in the following fictitious definition:
\begin{isabelle}%
\ \ \ \ \ {\isachardoublequote}prime\ p\ {\isasymequiv}\ {\isadigit{1}}\ {\isacharless}\ p\ {\isasymand}\ {\isacharparenleft}m\ dvd\ p\ {\isasymlongrightarrow}\ m\ {\isacharequal}\ {\isadigit{1}}\ {\isasymor}\ m\ {\isacharequal}\ p{\isacharparenright}{\isachardoublequote}%
\end{isabelle}
where \isa{dvd} means ``divides''.
Isabelle rejects this ``definition'' because of the extra \isa{m} on the
right-hand side, which would introduce an inconsistency (why?). What you
should have written is
\begin{isabelle}%
\ \ \ \ \ {\isachardoublequote}prime\ p\ {\isasymequiv}\ {\isadigit{1}}\ {\isacharless}\ p\ {\isasymand}\ {\isacharparenleft}{\isasymforall}m{\isachardot}\ m\ dvd\ p\ {\isasymlongrightarrow}\ m\ {\isacharequal}\ {\isadigit{1}}\ {\isasymor}\ m\ {\isacharequal}\ p{\isacharparenright}{\isachardoublequote}%
\end{isabelle}
\end{warn}%
\end{isamarkuptext}%
\end{isabellebody}%
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "root"
%%% End: