| 9722 |      1 | %
 | 
|  |      2 | \begin{isabellebody}%
 | 
| 10267 |      3 | \def\isabellecontext{prime{\isacharunderscore}def}%
 | 
| 17056 |      4 | %
 | 
|  |      5 | \isadelimtheory
 | 
|  |      6 | %
 | 
|  |      7 | \endisadelimtheory
 | 
|  |      8 | %
 | 
|  |      9 | \isatagtheory
 | 
|  |     10 | %
 | 
|  |     11 | \endisatagtheory
 | 
|  |     12 | {\isafoldtheory}%
 | 
|  |     13 | %
 | 
|  |     14 | \isadelimtheory
 | 
|  |     15 | %
 | 
|  |     16 | \endisadelimtheory
 | 
| 9844 |     17 | %
 | 
| 8749 |     18 | \begin{isamarkuptext}%
 | 
| 9844 |     19 | \begin{warn}
 | 
|  |     20 | A common mistake when writing definitions is to introduce extra free
 | 
| 11456 |     21 | variables on the right-hand side.  Consider the following, flawed definition
 | 
|  |     22 | (where \isa{dvd} means ``divides''):
 | 
| 9844 |     23 | \begin{isabelle}%
 | 
| 10187 |     24 | \ \ \ \ \ {\isachardoublequote}prime\ p\ {\isasymequiv}\ {\isadigit{1}}\ {\isacharless}\ p\ {\isasymand}\ {\isacharparenleft}m\ dvd\ p\ {\isasymlongrightarrow}\ m\ {\isacharequal}\ {\isadigit{1}}\ {\isasymor}\ m\ {\isacharequal}\ p{\isacharparenright}{\isachardoublequote}%
 | 
| 9924 |     25 | \end{isabelle}
 | 
| 11457 |     26 | \par\noindent\hangindent=0pt
 | 
| 8749 |     27 | Isabelle rejects this ``definition'' because of the extra \isa{m} on the
 | 
| 11456 |     28 | right-hand side, which would introduce an inconsistency (why?). 
 | 
|  |     29 | The correct version is
 | 
| 9844 |     30 | \begin{isabelle}%
 | 
| 10187 |     31 | \ \ \ \ \ {\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}%
 | 
| 9924 |     32 | \end{isabelle}
 | 
| 9844 |     33 | \end{warn}%
 | 
| 8749 |     34 | \end{isamarkuptext}%
 | 
| 17175 |     35 | \isamarkuptrue%
 | 
| 17056 |     36 | %
 | 
|  |     37 | \isadelimtheory
 | 
|  |     38 | %
 | 
|  |     39 | \endisadelimtheory
 | 
|  |     40 | %
 | 
|  |     41 | \isatagtheory
 | 
|  |     42 | %
 | 
|  |     43 | \endisatagtheory
 | 
|  |     44 | {\isafoldtheory}%
 | 
|  |     45 | %
 | 
|  |     46 | \isadelimtheory
 | 
|  |     47 | %
 | 
|  |     48 | \endisadelimtheory
 | 
| 9844 |     49 | \end{isabellebody}%
 | 
| 9145 |     50 | %%% Local Variables:
 | 
|  |     51 | %%% mode: latex
 | 
|  |     52 | %%% TeX-master: "root"
 | 
|  |     53 | %%% End:
 |