27063
|
1 |
%
|
|
2 |
\begin{isabellebody}%
|
|
3 |
\def\isabellecontext{Examples{\isadigit{2}}}%
|
|
4 |
%
|
|
5 |
\isadelimtheory
|
27080
|
6 |
\isanewline
|
|
7 |
\isanewline
|
27063
|
8 |
%
|
|
9 |
\endisadelimtheory
|
|
10 |
%
|
|
11 |
\isatagtheory
|
27080
|
12 |
\isacommand{theory}\isamarkupfalse%
|
|
13 |
\ Examples{\isadigit{2}}\isanewline
|
|
14 |
\isakeyword{imports}\ Examples\isanewline
|
|
15 |
\isakeyword{begin}%
|
27063
|
16 |
\endisatagtheory
|
|
17 |
{\isafoldtheory}%
|
|
18 |
%
|
|
19 |
\isadelimtheory
|
|
20 |
%
|
|
21 |
\endisadelimtheory
|
|
22 |
%
|
|
23 |
\begin{isamarkuptext}%
|
|
24 |
This is achieved by unfolding suitable equations during
|
|
25 |
interpretation. These equations are given after the keyword
|
|
26 |
\isakeyword{where} and require proofs. The revised command,
|
|
27 |
replacing \isa{{\isasymsqsubset}} by \isa{{\isacharless}}, is:%
|
|
28 |
\end{isamarkuptext}%
|
|
29 |
\isamarkuptrue%
|
|
30 |
%
|
|
31 |
\isadelimvisible
|
|
32 |
%
|
|
33 |
\endisadelimvisible
|
|
34 |
%
|
|
35 |
\isatagvisible
|
|
36 |
\isacommand{interpretation}\isamarkupfalse%
|
|
37 |
\ nat{\isacharcolon}\ partial{\isacharunderscore}order\ {\isacharbrackleft}{\isachardoublequoteopen}op\ {\isasymle}\ {\isacharcolon}{\isacharcolon}\ {\isacharbrackleft}nat{\isacharcomma}\ nat{\isacharbrackright}\ {\isasymRightarrow}\ bool{\isachardoublequoteclose}{\isacharbrackright}\isanewline
|
|
38 |
\ \ \isakeyword{where}\ {\isachardoublequoteopen}partial{\isacharunderscore}order{\isachardot}less\ op\ {\isasymle}\ {\isacharparenleft}x{\isacharcolon}{\isacharcolon}nat{\isacharparenright}\ y\ {\isacharequal}\ {\isacharparenleft}x\ {\isacharless}\ y{\isacharparenright}{\isachardoublequoteclose}\isanewline
|
|
39 |
\isacommand{proof}\isamarkupfalse%
|
|
40 |
\ {\isacharminus}%
|
|
41 |
\begin{isamarkuptxt}%
|
|
42 |
The goals are \begin{isabelle}%
|
|
43 |
\ {\isadigit{1}}{\isachardot}\ partial{\isacharunderscore}order\ op\ {\isasymle}\isanewline
|
|
44 |
\ {\isadigit{2}}{\isachardot}\ partial{\isacharunderscore}order{\isachardot}less\ op\ {\isasymle}\ x\ y\ {\isacharequal}\ {\isacharparenleft}x\ {\isacharless}\ y{\isacharparenright}%
|
|
45 |
\end{isabelle}
|
|
46 |
The proof that \isa{{\isasymle}} is a partial order is a above.%
|
|
47 |
\end{isamarkuptxt}%
|
|
48 |
\isamarkuptrue%
|
|
49 |
\ \ \isacommand{show}\isamarkupfalse%
|
|
50 |
\ {\isachardoublequoteopen}partial{\isacharunderscore}order\ {\isacharparenleft}op\ {\isasymle}\ {\isacharcolon}{\isacharcolon}\ nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ bool{\isacharparenright}{\isachardoublequoteclose}\isanewline
|
|
51 |
\ \ \ \ \isacommand{by}\isamarkupfalse%
|
|
52 |
\ unfold{\isacharunderscore}locales\ auto%
|
|
53 |
\begin{isamarkuptxt}%
|
|
54 |
The second goal is shown by unfolding the
|
|
55 |
definition of \isa{partial{\isacharunderscore}order{\isachardot}less}.%
|
|
56 |
\end{isamarkuptxt}%
|
|
57 |
\isamarkuptrue%
|
|
58 |
\ \ \isacommand{show}\isamarkupfalse%
|
|
59 |
\ {\isachardoublequoteopen}partial{\isacharunderscore}order{\isachardot}less\ op\ {\isasymle}\ {\isacharparenleft}x{\isacharcolon}{\isacharcolon}nat{\isacharparenright}\ y\ {\isacharequal}\ {\isacharparenleft}x\ {\isacharless}\ y{\isacharparenright}{\isachardoublequoteclose}\isanewline
|
|
60 |
\ \ \ \ \isacommand{unfolding}\isamarkupfalse%
|
|
61 |
\ partial{\isacharunderscore}order{\isachardot}less{\isacharunderscore}def\ {\isacharbrackleft}OF\ {\isacharbackquoteopen}partial{\isacharunderscore}order\ op\ {\isasymle}{\isacharbackquoteclose}{\isacharbrackright}\isanewline
|
|
62 |
\ \ \ \ \isacommand{by}\isamarkupfalse%
|
|
63 |
\ auto\isanewline
|
|
64 |
\isacommand{qed}\isamarkupfalse%
|
|
65 |
%
|
|
66 |
\endisatagvisible
|
|
67 |
{\isafoldvisible}%
|
|
68 |
%
|
|
69 |
\isadelimvisible
|
|
70 |
%
|
|
71 |
\endisadelimvisible
|
|
72 |
%
|
|
73 |
\begin{isamarkuptext}%
|
|
74 |
Note that the above proof is not in the context of a locale.
|
|
75 |
Hence, the correct interpretation of \isa{partial{\isacharunderscore}order{\isachardot}less{\isacharunderscore}def} is obtained manually with \isa{OF}.%
|
|
76 |
\end{isamarkuptext}%
|
|
77 |
\isamarkuptrue%
|
|
78 |
%
|
|
79 |
\isadelimtheory
|
|
80 |
%
|
|
81 |
\endisadelimtheory
|
|
82 |
%
|
|
83 |
\isatagtheory
|
27080
|
84 |
\isacommand{end}\isamarkupfalse%
|
27063
|
85 |
%
|
|
86 |
\endisatagtheory
|
|
87 |
{\isafoldtheory}%
|
|
88 |
%
|
|
89 |
\isadelimtheory
|
|
90 |
%
|
|
91 |
\endisadelimtheory
|
27080
|
92 |
\isanewline
|
27063
|
93 |
\end{isabellebody}%
|
|
94 |
%%% Local Variables:
|
|
95 |
%%% mode: latex
|
|
96 |
%%% TeX-master: "root"
|
|
97 |
%%% End:
|