doc-src/Locales/Locales/document/Examples3.tex
changeset 32836 4c6e3e7ac2bf
parent 31960 1984af09eb41
child 32981 0114e04a0d64
equal deleted inserted replaced
32835:00c14c4a6b4f 32836:4c6e3e7ac2bf
    40 \endisadelimvisible
    40 \endisadelimvisible
    41 %
    41 %
    42 \isatagvisible
    42 \isatagvisible
    43 \isacommand{interpretation}\isamarkupfalse%
    43 \isacommand{interpretation}\isamarkupfalse%
    44 \ nat{\isacharcolon}\ partial{\isacharunderscore}order\ {\isachardoublequoteopen}op\ {\isasymle}\ {\isacharcolon}{\isacharcolon}\ nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ bool{\isachardoublequoteclose}\isanewline
    44 \ nat{\isacharcolon}\ partial{\isacharunderscore}order\ {\isachardoublequoteopen}op\ {\isasymle}\ {\isacharcolon}{\isacharcolon}\ nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ bool{\isachardoublequoteclose}\isanewline
    45 \ \ \isakeyword{where}\ nat{\isacharunderscore}less{\isacharunderscore}eq{\isacharcolon}\ {\isachardoublequoteopen}partial{\isacharunderscore}order{\isachardot}less\ op\ {\isasymle}\ {\isacharparenleft}x{\isacharcolon}{\isacharcolon}nat{\isacharparenright}\ y\ {\isacharequal}\ {\isacharparenleft}x\ {\isacharless}\ y{\isacharparenright}{\isachardoublequoteclose}\isanewline
    45 \ \ \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
    46 \isacommand{proof}\isamarkupfalse%
    46 \isacommand{proof}\isamarkupfalse%
    47 \ {\isacharminus}\isanewline
    47 \ {\isacharminus}\isanewline
    48 \ \ \isacommand{show}\isamarkupfalse%
    48 \ \ \isacommand{show}\isamarkupfalse%
    49 \ {\isachardoublequoteopen}partial{\isacharunderscore}order\ {\isacharparenleft}op\ {\isasymle}\ {\isacharcolon}{\isacharcolon}\ nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ bool{\isacharparenright}{\isachardoublequoteclose}\isanewline
    49 \ {\isachardoublequoteopen}partial{\isacharunderscore}order\ {\isacharparenleft}op\ {\isasymle}\ {\isacharcolon}{\isacharcolon}\ nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ bool{\isacharparenright}{\isachardoublequoteclose}\isanewline
    50 \ \ \ \ \isacommand{by}\isamarkupfalse%
    50 \ \ \ \ \isacommand{by}\isamarkupfalse%
    99 \endisadelimvisible
    99 \endisadelimvisible
   100 %
   100 %
   101 \isatagvisible
   101 \isatagvisible
   102 \isacommand{interpretation}\isamarkupfalse%
   102 \isacommand{interpretation}\isamarkupfalse%
   103 \ nat{\isacharcolon}\ lattice\ {\isachardoublequoteopen}op\ {\isasymle}\ {\isacharcolon}{\isacharcolon}\ nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ bool{\isachardoublequoteclose}\isanewline
   103 \ nat{\isacharcolon}\ lattice\ {\isachardoublequoteopen}op\ {\isasymle}\ {\isacharcolon}{\isacharcolon}\ nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ bool{\isachardoublequoteclose}\isanewline
   104 \ \ \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
   104 \ \ \isakeyword{where}\ {\isachardoublequoteopen}lattice{\isachardot}meet\ op\ {\isasymle}\ {\isacharparenleft}x{\isacharcolon}{\isacharcolon}nat{\isacharparenright}\ y\ {\isacharequal}\ min\ x\ y{\isachardoublequoteclose}\isanewline
   105 \ \ \ \ \isakeyword{and}\ nat{\isacharunderscore}meet{\isacharunderscore}eq{\isacharcolon}\ {\isachardoublequoteopen}lattice{\isachardot}meet\ op\ {\isasymle}\ {\isacharparenleft}x{\isacharcolon}{\isacharcolon}nat{\isacharparenright}\ y\ {\isacharequal}\ min\ x\ y{\isachardoublequoteclose}\isanewline
   105 \ \ \ \ \isakeyword{and}\ {\isachardoublequoteopen}lattice{\isachardot}join\ op\ {\isasymle}\ {\isacharparenleft}x{\isacharcolon}{\isacharcolon}nat{\isacharparenright}\ y\ {\isacharequal}\ max\ x\ y{\isachardoublequoteclose}\isanewline
   106 \ \ \ \ \isakeyword{and}\ nat{\isacharunderscore}join{\isacharunderscore}eq{\isacharcolon}\ {\isachardoublequoteopen}lattice{\isachardot}join\ op\ {\isasymle}\ {\isacharparenleft}x{\isacharcolon}{\isacharcolon}nat{\isacharparenright}\ y\ {\isacharequal}\ max\ x\ y{\isachardoublequoteclose}\isanewline
       
   107 \isacommand{proof}\isamarkupfalse%
   106 \isacommand{proof}\isamarkupfalse%
   108 \ {\isacharminus}\isanewline
   107 \ {\isacharminus}\isanewline
   109 \ \ \isacommand{show}\isamarkupfalse%
   108 \ \ \isacommand{show}\isamarkupfalse%
   110 \ lattice{\isacharcolon}\ {\isachardoublequoteopen}lattice\ {\isacharparenleft}op\ {\isasymle}\ {\isacharcolon}{\isacharcolon}\ nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ bool{\isacharparenright}{\isachardoublequoteclose}%
   109 \ {\isachardoublequoteopen}lattice\ {\isacharparenleft}op\ {\isasymle}\ {\isacharcolon}{\isacharcolon}\ nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ bool{\isacharparenright}{\isachardoublequoteclose}%
   111 \begin{isamarkuptxt}%
   110 \begin{isamarkuptxt}%
   112 We have already shown that this is a partial order,%
   111 We have already shown that this is a partial order,%
   113 \end{isamarkuptxt}%
   112 \end{isamarkuptxt}%
   114 \isamarkuptrue%
   113 \isamarkuptrue%
   115 \ \ \ \ \isacommand{apply}\isamarkupfalse%
   114 \ \ \ \ \isacommand{apply}\isamarkupfalse%
   132 \end{isamarkuptxt}%
   131 \end{isamarkuptxt}%
   133 \isamarkuptrue%
   132 \isamarkuptrue%
   134 \ \ \ \ \isacommand{by}\isamarkupfalse%
   133 \ \ \ \ \isacommand{by}\isamarkupfalse%
   135 \ arith{\isacharplus}%
   134 \ arith{\isacharplus}%
   136 \begin{isamarkuptxt}%
   135 \begin{isamarkuptxt}%
   137 For the first of the equations, we refer to the theorem
   136 In order to show the equations, we put ourselves in a
   138   shown in the previous interpretation.%
       
   139 \end{isamarkuptxt}%
       
   140 \isamarkuptrue%
       
   141 \ \ \isacommand{show}\isamarkupfalse%
       
   142 \ {\isachardoublequoteopen}partial{\isacharunderscore}order{\isachardot}less\ op\ {\isasymle}\ {\isacharparenleft}x{\isacharcolon}{\isacharcolon}nat{\isacharparenright}\ y\ {\isacharequal}\ {\isacharparenleft}x\ {\isacharless}\ y{\isacharparenright}{\isachardoublequoteclose}\isanewline
       
   143 \ \ \ \ \isacommand{by}\isamarkupfalse%
       
   144 \ {\isacharparenleft}rule\ nat{\isacharunderscore}less{\isacharunderscore}eq{\isacharparenright}%
       
   145 \begin{isamarkuptxt}%
       
   146 In order to show the remaining equations, we put ourselves in a
       
   147     situation where the lattice theorems can be used in a convenient way.%
   137     situation where the lattice theorems can be used in a convenient way.%
   148 \end{isamarkuptxt}%
   138 \end{isamarkuptxt}%
   149 \isamarkuptrue%
   139 \isamarkuptrue%
   150 \ \ \isacommand{from}\isamarkupfalse%
   140 \ \ \isacommand{then}\isamarkupfalse%
   151 \ lattice\ \isacommand{interpret}\isamarkupfalse%
   141 \ \isacommand{interpret}\isamarkupfalse%
   152 \ nat{\isacharcolon}\ lattice\ {\isachardoublequoteopen}op\ {\isasymle}\ {\isacharcolon}{\isacharcolon}\ nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ bool{\isachardoublequoteclose}\ \isacommand{{\isachardot}}\isamarkupfalse%
   142 \ nat{\isacharcolon}\ lattice\ {\isachardoublequoteopen}op\ {\isasymle}\ {\isacharcolon}{\isacharcolon}\ nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ bool{\isachardoublequoteclose}\ \isacommand{{\isachardot}}\isamarkupfalse%
   153 \isanewline
   143 \isanewline
   154 \ \ \isacommand{show}\isamarkupfalse%
   144 \ \ \isacommand{show}\isamarkupfalse%
   155 \ {\isachardoublequoteopen}lattice{\isachardot}meet\ op\ {\isasymle}\ {\isacharparenleft}x{\isacharcolon}{\isacharcolon}nat{\isacharparenright}\ y\ {\isacharequal}\ min\ x\ y{\isachardoublequoteclose}\isanewline
   145 \ {\isachardoublequoteopen}lattice{\isachardot}meet\ op\ {\isasymle}\ {\isacharparenleft}x{\isacharcolon}{\isacharcolon}nat{\isacharparenright}\ y\ {\isacharequal}\ min\ x\ y{\isachardoublequoteclose}\isanewline
   156 \ \ \ \ \isacommand{by}\isamarkupfalse%
   146 \ \ \ \ \isacommand{by}\isamarkupfalse%
   178 \endisadelimvisible
   168 \endisadelimvisible
   179 %
   169 %
   180 \isatagvisible
   170 \isatagvisible
   181 \isacommand{interpretation}\isamarkupfalse%
   171 \isacommand{interpretation}\isamarkupfalse%
   182 \ nat{\isacharcolon}\ total{\isacharunderscore}order\ {\isachardoublequoteopen}op\ {\isasymle}\ {\isacharcolon}{\isacharcolon}\ nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ bool{\isachardoublequoteclose}\isanewline
   172 \ nat{\isacharcolon}\ total{\isacharunderscore}order\ {\isachardoublequoteopen}op\ {\isasymle}\ {\isacharcolon}{\isacharcolon}\ nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ bool{\isachardoublequoteclose}\isanewline
   183 \ \ \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
       
   184 \ \ \ \ \isakeyword{and}\ {\isachardoublequoteopen}lattice{\isachardot}meet\ op\ {\isasymle}\ {\isacharparenleft}x{\isacharcolon}{\isacharcolon}nat{\isacharparenright}\ y\ {\isacharequal}\ min\ x\ y{\isachardoublequoteclose}\isanewline
       
   185 \ \ \ \ \isakeyword{and}\ {\isachardoublequoteopen}lattice{\isachardot}join\ op\ {\isasymle}\ {\isacharparenleft}x{\isacharcolon}{\isacharcolon}nat{\isacharparenright}\ y\ {\isacharequal}\ max\ x\ y{\isachardoublequoteclose}\isanewline
       
   186 \isacommand{proof}\isamarkupfalse%
       
   187 \ {\isacharminus}\isanewline
       
   188 \ \ \isacommand{show}\isamarkupfalse%
       
   189 \ {\isachardoublequoteopen}total{\isacharunderscore}order\ {\isacharparenleft}op\ {\isasymle}\ {\isacharcolon}{\isacharcolon}\ nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ bool{\isacharparenright}{\isachardoublequoteclose}\isanewline
       
   190 \ \ \ \ \isacommand{by}\isamarkupfalse%
       
   191 \ unfold{\isacharunderscore}locales\ arith\isanewline
       
   192 \isacommand{qed}\isamarkupfalse%
       
   193 \ {\isacharparenleft}rule\ nat{\isacharunderscore}less{\isacharunderscore}eq\ nat{\isacharunderscore}meet{\isacharunderscore}eq\ nat{\isacharunderscore}join{\isacharunderscore}eq{\isacharparenright}{\isacharplus}%
       
   194 \endisatagvisible
       
   195 {\isafoldvisible}%
       
   196 %
       
   197 \isadelimvisible
       
   198 %
       
   199 \endisadelimvisible
       
   200 %
       
   201 \begin{isamarkuptext}%
       
   202 Since the locale hierarchy reflects that total
       
   203   orders are distributive lattices, an explicit interpretation of
       
   204   distributive lattices for the order relation on natural numbers is
       
   205   only necessary for mapping the definitions to the right operators on
       
   206   \isa{nat}.%
       
   207 \end{isamarkuptext}%
       
   208 \isamarkuptrue%
       
   209 %
       
   210 \isadelimvisible
       
   211 %
       
   212 \endisadelimvisible
       
   213 %
       
   214 \isatagvisible
       
   215 \isacommand{interpretation}\isamarkupfalse%
       
   216 \ nat{\isacharcolon}\ distrib{\isacharunderscore}lattice\ {\isachardoublequoteopen}op\ {\isasymle}\ {\isacharcolon}{\isacharcolon}\ nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ bool{\isachardoublequoteclose}\isanewline
       
   217 \ \ \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
       
   218 \ \ \ \ \isakeyword{and}\ {\isachardoublequoteopen}lattice{\isachardot}meet\ op\ {\isasymle}\ {\isacharparenleft}x{\isacharcolon}{\isacharcolon}nat{\isacharparenright}\ y\ {\isacharequal}\ min\ x\ y{\isachardoublequoteclose}\isanewline
       
   219 \ \ \ \ \isakeyword{and}\ {\isachardoublequoteopen}lattice{\isachardot}join\ op\ {\isasymle}\ {\isacharparenleft}x{\isacharcolon}{\isacharcolon}nat{\isacharparenright}\ y\ {\isacharequal}\ max\ x\ y{\isachardoublequoteclose}\isanewline
       
   220 \ \ \isacommand{by}\isamarkupfalse%
   173 \ \ \isacommand{by}\isamarkupfalse%
   221 \ unfold{\isacharunderscore}locales\ {\isacharbrackleft}{\isadigit{1}}{\isacharbrackright}\ {\isacharparenleft}rule\ nat{\isacharunderscore}less{\isacharunderscore}eq\ nat{\isacharunderscore}meet{\isacharunderscore}eq\ nat{\isacharunderscore}join{\isacharunderscore}eq{\isacharparenright}{\isacharplus}%
   174 \ unfold{\isacharunderscore}locales\ arith%
   222 \endisatagvisible
   175 \endisatagvisible
   223 {\isafoldvisible}%
   176 {\isafoldvisible}%
   224 %
   177 %
   225 \isadelimvisible
   178 \isadelimvisible
   226 %
   179 %
   246 \end{tabular}
   199 \end{tabular}
   247 \end{center}
   200 \end{center}
   248 \hrule
   201 \hrule
   249 \caption{Interpreted theorems for \isa{{\isasymle}} on the natural numbers.}
   202 \caption{Interpreted theorems for \isa{{\isasymle}} on the natural numbers.}
   250 \label{tab:nat-lattice}
   203 \label{tab:nat-lattice}
   251 \end{table}%
   204 \end{table}
       
   205 
       
   206   Note that since the locale hierarchy reflects that total orders are
       
   207   distributive lattices, an explicit interpretation of distributive
       
   208   lattices for the order relation on natural numbers is not neccessary.
       
   209 
       
   210   Why not push this idea further and just give the last interpretation
       
   211   as a single interpretation instead of the sequence of three?  The
       
   212   reasons for this are twofold:
       
   213 \begin{itemize}
       
   214 \item
       
   215   Often it is easier to work in an incremental fashion, because later
       
   216   interpretations require theorems provided by earlier
       
   217   interpretations.
       
   218 \item
       
   219   Assume that a definition is made in some locale $l_1$, and that $l_2$
       
   220   imports $l_1$.  Let an equation for the definition be
       
   221   proved in an interpretation of $l_2$.  The equation will be unfolded
       
   222   in interpretations of theorems added to $l_2$ or below in the import
       
   223   hierarchy, but not for theorems added above $l_2$.
       
   224   Hence, an equation interpreting a definition should always be given in
       
   225   an interpretation of the locale where the definition is made, not in
       
   226   an interpretation of a locale further down the hierarchy.
       
   227 \end{itemize}%
   252 \end{isamarkuptext}%
   228 \end{isamarkuptext}%
   253 \isamarkuptrue%
   229 \isamarkuptrue%
   254 %
   230 %
   255 \isamarkupsubsection{Lattice \isa{dvd} on \isa{nat}%
   231 \isamarkupsubsection{Lattice \isa{dvd} on \isa{nat}%
   256 }
   232 }
   262   incrementally.%
   238   incrementally.%
   263 \end{isamarkuptext}%
   239 \end{isamarkuptext}%
   264 \isamarkuptrue%
   240 \isamarkuptrue%
   265 \isacommand{interpretation}\isamarkupfalse%
   241 \isacommand{interpretation}\isamarkupfalse%
   266 \ nat{\isacharunderscore}dvd{\isacharcolon}\ partial{\isacharunderscore}order\ {\isachardoublequoteopen}op\ dvd\ {\isacharcolon}{\isacharcolon}\ nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ bool{\isachardoublequoteclose}\isanewline
   242 \ nat{\isacharunderscore}dvd{\isacharcolon}\ partial{\isacharunderscore}order\ {\isachardoublequoteopen}op\ dvd\ {\isacharcolon}{\isacharcolon}\ nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ bool{\isachardoublequoteclose}\isanewline
   267 \ \ \isakeyword{where}\ nat{\isacharunderscore}dvd{\isacharunderscore}less{\isacharunderscore}eq{\isacharcolon}\isanewline
   243 \ \ \isakeyword{where}\ {\isachardoublequoteopen}partial{\isacharunderscore}order{\isachardot}less\ op\ dvd\ {\isacharparenleft}x{\isacharcolon}{\isacharcolon}nat{\isacharparenright}\ y\ {\isacharequal}\ {\isacharparenleft}x\ dvd\ y\ {\isasymand}\ x\ {\isasymnoteq}\ y{\isacharparenright}{\isachardoublequoteclose}\isanewline
   268 \ \ \ \ {\isachardoublequoteopen}partial{\isacharunderscore}order{\isachardot}less\ op\ dvd\ {\isacharparenleft}x{\isacharcolon}{\isacharcolon}nat{\isacharparenright}\ y\ {\isacharequal}\ {\isacharparenleft}x\ dvd\ y\ {\isasymand}\ x\ {\isasymnoteq}\ y{\isacharparenright}{\isachardoublequoteclose}\isanewline
       
   269 %
   244 %
   270 \isadelimproof
   245 \isadelimproof
   271 %
   246 %
   272 \endisadelimproof
   247 \endisadelimproof
   273 %
   248 %
   304   divisibility.  Instead, interpretation substitutes \isa{x\ dvd\ y\ {\isasymand}\ x\ {\isasymnoteq}\ y}.%
   279   divisibility.  Instead, interpretation substitutes \isa{x\ dvd\ y\ {\isasymand}\ x\ {\isasymnoteq}\ y}.%
   305 \end{isamarkuptext}%
   280 \end{isamarkuptext}%
   306 \isamarkuptrue%
   281 \isamarkuptrue%
   307 \isacommand{interpretation}\isamarkupfalse%
   282 \isacommand{interpretation}\isamarkupfalse%
   308 \ nat{\isacharunderscore}dvd{\isacharcolon}\ lattice\ {\isachardoublequoteopen}op\ dvd\ {\isacharcolon}{\isacharcolon}\ nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ bool{\isachardoublequoteclose}\isanewline
   283 \ nat{\isacharunderscore}dvd{\isacharcolon}\ lattice\ {\isachardoublequoteopen}op\ dvd\ {\isacharcolon}{\isacharcolon}\ nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ bool{\isachardoublequoteclose}\isanewline
   309 \ \ \isakeyword{where}\ {\isachardoublequoteopen}partial{\isacharunderscore}order{\isachardot}less\ op\ dvd\ {\isacharparenleft}x{\isacharcolon}{\isacharcolon}nat{\isacharparenright}\ y\ {\isacharequal}\ {\isacharparenleft}x\ dvd\ y\ {\isasymand}\ x\ {\isasymnoteq}\ y{\isacharparenright}{\isachardoublequoteclose}\isanewline
   284 \ \ \isakeyword{where}\ nat{\isacharunderscore}dvd{\isacharunderscore}meet{\isacharunderscore}eq{\isacharcolon}\ {\isachardoublequoteopen}lattice{\isachardot}meet\ {\isacharparenleft}op\ dvd\ {\isacharcolon}{\isacharcolon}\ nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ bool{\isacharparenright}\ {\isacharequal}\ gcd{\isachardoublequoteclose}\isanewline
   310 \ \ \ \ \isakeyword{and}\ nat{\isacharunderscore}dvd{\isacharunderscore}meet{\isacharunderscore}eq{\isacharcolon}\ {\isachardoublequoteopen}lattice{\isachardot}meet\ {\isacharparenleft}op\ dvd\ {\isacharcolon}{\isacharcolon}\ nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ bool{\isacharparenright}\ {\isacharequal}\ gcd{\isachardoublequoteclose}\isanewline
       
   311 \ \ \ \ \isakeyword{and}\ nat{\isacharunderscore}dvd{\isacharunderscore}join{\isacharunderscore}eq{\isacharcolon}\ {\isachardoublequoteopen}lattice{\isachardot}join\ {\isacharparenleft}op\ dvd\ {\isacharcolon}{\isacharcolon}\ nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ bool{\isacharparenright}\ {\isacharequal}\ lcm{\isachardoublequoteclose}\isanewline
   285 \ \ \ \ \isakeyword{and}\ nat{\isacharunderscore}dvd{\isacharunderscore}join{\isacharunderscore}eq{\isacharcolon}\ {\isachardoublequoteopen}lattice{\isachardot}join\ {\isacharparenleft}op\ dvd\ {\isacharcolon}{\isacharcolon}\ nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ bool{\isacharparenright}\ {\isacharequal}\ lcm{\isachardoublequoteclose}\isanewline
   312 %
   286 %
   313 \isadelimproof
   287 \isadelimproof
   314 %
   288 %
   315 \endisadelimproof
   289 \endisadelimproof
   335 \isanewline
   309 \isanewline
   336 \ \ \isacommand{then}\isamarkupfalse%
   310 \ \ \isacommand{then}\isamarkupfalse%
   337 \ \isacommand{interpret}\isamarkupfalse%
   311 \ \isacommand{interpret}\isamarkupfalse%
   338 \ nat{\isacharunderscore}dvd{\isacharcolon}\ lattice\ {\isachardoublequoteopen}op\ dvd\ {\isacharcolon}{\isacharcolon}\ nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ bool{\isachardoublequoteclose}\ \isacommand{{\isachardot}}\isamarkupfalse%
   312 \ nat{\isacharunderscore}dvd{\isacharcolon}\ lattice\ {\isachardoublequoteopen}op\ dvd\ {\isacharcolon}{\isacharcolon}\ nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ bool{\isachardoublequoteclose}\ \isacommand{{\isachardot}}\isamarkupfalse%
   339 \isanewline
   313 \isanewline
   340 \ \ \isacommand{show}\isamarkupfalse%
       
   341 \ {\isachardoublequoteopen}partial{\isacharunderscore}order{\isachardot}less\ op\ dvd\ {\isacharparenleft}x{\isacharcolon}{\isacharcolon}nat{\isacharparenright}\ y\ {\isacharequal}\ {\isacharparenleft}x\ dvd\ y\ {\isasymand}\ x\ {\isasymnoteq}\ y{\isacharparenright}{\isachardoublequoteclose}\isanewline
       
   342 \ \ \ \ \isacommand{by}\isamarkupfalse%
       
   343 \ {\isacharparenleft}rule\ nat{\isacharunderscore}dvd{\isacharunderscore}less{\isacharunderscore}eq{\isacharparenright}\isanewline
       
   344 \ \ \isacommand{show}\isamarkupfalse%
   314 \ \ \isacommand{show}\isamarkupfalse%
   345 \ {\isachardoublequoteopen}lattice{\isachardot}meet\ {\isacharparenleft}op\ dvd\ {\isacharcolon}{\isacharcolon}\ nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ bool{\isacharparenright}\ {\isacharequal}\ gcd{\isachardoublequoteclose}\isanewline
   315 \ {\isachardoublequoteopen}lattice{\isachardot}meet\ {\isacharparenleft}op\ dvd\ {\isacharcolon}{\isacharcolon}\ nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ bool{\isacharparenright}\ {\isacharequal}\ gcd{\isachardoublequoteclose}\isanewline
   346 \ \ \ \ \isacommand{apply}\isamarkupfalse%
   316 \ \ \ \ \isacommand{apply}\isamarkupfalse%
   347 \ {\isacharparenleft}auto\ simp\ add{\isacharcolon}\ expand{\isacharunderscore}fun{\isacharunderscore}eq{\isacharparenright}\isanewline
   317 \ {\isacharparenleft}auto\ simp\ add{\isacharcolon}\ expand{\isacharunderscore}fun{\isacharunderscore}eq{\isacharparenright}\isanewline
   348 \ \ \ \ \isacommand{apply}\isamarkupfalse%
   318 \ \ \ \ \isacommand{apply}\isamarkupfalse%
   406 %
   376 %
   407 \isatagvisible
   377 \isatagvisible
   408 \isacommand{interpretation}\isamarkupfalse%
   378 \isacommand{interpretation}\isamarkupfalse%
   409 \ nat{\isacharunderscore}dvd{\isacharcolon}\isanewline
   379 \ nat{\isacharunderscore}dvd{\isacharcolon}\isanewline
   410 \ \ distrib{\isacharunderscore}lattice\ {\isachardoublequoteopen}op\ dvd\ {\isacharcolon}{\isacharcolon}\ nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ bool{\isachardoublequoteclose}\isanewline
   380 \ \ distrib{\isacharunderscore}lattice\ {\isachardoublequoteopen}op\ dvd\ {\isacharcolon}{\isacharcolon}\ nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ bool{\isachardoublequoteclose}\isanewline
   411 \ \ \isakeyword{where}\ {\isachardoublequoteopen}partial{\isacharunderscore}order{\isachardot}less\ op\ dvd\ {\isacharparenleft}x{\isacharcolon}{\isacharcolon}nat{\isacharparenright}\ y\ {\isacharequal}\ {\isacharparenleft}x\ dvd\ y\ {\isasymand}\ x\ {\isasymnoteq}\ y{\isacharparenright}{\isachardoublequoteclose}\isanewline
   381 \ \ \isacommand{apply}\isamarkupfalse%
   412 \ \ \ \ \isakeyword{and}\ {\isachardoublequoteopen}lattice{\isachardot}meet\ {\isacharparenleft}op\ dvd\ {\isacharcolon}{\isacharcolon}\ nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ bool{\isacharparenright}\ {\isacharequal}\ gcd{\isachardoublequoteclose}\isanewline
       
   413 \ \ \ \ \isakeyword{and}\ {\isachardoublequoteopen}lattice{\isachardot}join\ {\isacharparenleft}op\ dvd\ {\isacharcolon}{\isacharcolon}\ nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ bool{\isacharparenright}\ {\isacharequal}\ lcm{\isachardoublequoteclose}\isanewline
       
   414 \isacommand{proof}\isamarkupfalse%
       
   415 \ {\isacharminus}\isanewline
       
   416 \ \ \isacommand{show}\isamarkupfalse%
       
   417 \ {\isachardoublequoteopen}distrib{\isacharunderscore}lattice\ {\isacharparenleft}op\ dvd\ {\isacharcolon}{\isacharcolon}\ nat\ {\isasymRightarrow}\ nat\ {\isasymRightarrow}\ bool{\isacharparenright}{\isachardoublequoteclose}\isanewline
       
   418 \ \ \ \ \isacommand{apply}\isamarkupfalse%
       
   419 \ unfold{\isacharunderscore}locales%
   382 \ unfold{\isacharunderscore}locales%
   420 \begin{isamarkuptxt}%
   383 \begin{isamarkuptxt}%
   421 \begin{isabelle}%
   384 \begin{isabelle}%
   422 \ {\isadigit{1}}{\isachardot}\ {\isasymAnd}x\ y\ z{\isachardot}\isanewline
   385 \ {\isadigit{1}}{\isachardot}\ {\isasymAnd}x\ y\ z{\isachardot}\isanewline
   423 \isaindent{\ {\isadigit{1}}{\isachardot}\ \ \ \ }lattice{\isachardot}meet\ op\ dvd\ x\ {\isacharparenleft}lattice{\isachardot}join\ op\ dvd\ y\ z{\isacharparenright}\ {\isacharequal}\isanewline
   386 \isaindent{\ {\isadigit{1}}{\isachardot}\ \ \ \ }lattice{\isachardot}meet\ op\ dvd\ x\ {\isacharparenleft}lattice{\isachardot}join\ op\ dvd\ y\ z{\isacharparenright}\ {\isacharequal}\isanewline
   424 \isaindent{\ {\isadigit{1}}{\isachardot}\ \ \ \ }lattice{\isachardot}join\ op\ dvd\ {\isacharparenleft}lattice{\isachardot}meet\ op\ dvd\ x\ y{\isacharparenright}\isanewline
   387 \isaindent{\ {\isadigit{1}}{\isachardot}\ \ \ \ }lattice{\isachardot}join\ op\ dvd\ {\isacharparenleft}lattice{\isachardot}meet\ op\ dvd\ x\ y{\isacharparenright}\isanewline
   425 \isaindent{\ {\isadigit{1}}{\isachardot}\ \ \ \ \ }{\isacharparenleft}lattice{\isachardot}meet\ op\ dvd\ x\ z{\isacharparenright}%
   388 \isaindent{\ {\isadigit{1}}{\isachardot}\ \ \ \ \ }{\isacharparenleft}lattice{\isachardot}meet\ op\ dvd\ x\ z{\isacharparenright}%
   426 \end{isabelle}%
   389 \end{isabelle}%
   427 \end{isamarkuptxt}%
   390 \end{isamarkuptxt}%
   428 \isamarkuptrue%
   391 \isamarkuptrue%
   429 \ \ \ \ \isacommand{apply}\isamarkupfalse%
   392 \ \ \isacommand{apply}\isamarkupfalse%
   430 \ {\isacharparenleft}unfold\ nat{\isacharunderscore}dvd{\isacharunderscore}meet{\isacharunderscore}eq\ nat{\isacharunderscore}dvd{\isacharunderscore}join{\isacharunderscore}eq{\isacharparenright}%
   393 \ {\isacharparenleft}unfold\ nat{\isacharunderscore}dvd{\isacharunderscore}meet{\isacharunderscore}eq\ nat{\isacharunderscore}dvd{\isacharunderscore}join{\isacharunderscore}eq{\isacharparenright}%
   431 \begin{isamarkuptxt}%
   394 \begin{isamarkuptxt}%
   432 \begin{isabelle}%
   395 \begin{isabelle}%
   433 \ {\isadigit{1}}{\isachardot}\ {\isasymAnd}x\ y\ z{\isachardot}\ gcd\ x\ {\isacharparenleft}lcm\ y\ z{\isacharparenright}\ {\isacharequal}\ lcm\ {\isacharparenleft}gcd\ x\ y{\isacharparenright}\ {\isacharparenleft}gcd\ x\ z{\isacharparenright}%
   396 \ {\isadigit{1}}{\isachardot}\ {\isasymAnd}x\ y\ z{\isachardot}\ gcd\ x\ {\isacharparenleft}lcm\ y\ z{\isacharparenright}\ {\isacharequal}\ lcm\ {\isacharparenleft}gcd\ x\ y{\isacharparenright}\ {\isacharparenleft}gcd\ x\ z{\isacharparenright}%
   434 \end{isabelle}%
   397 \end{isabelle}%
   435 \end{isamarkuptxt}%
   398 \end{isamarkuptxt}%
   436 \isamarkuptrue%
   399 \isamarkuptrue%
   437 \ \ \ \ \isacommand{apply}\isamarkupfalse%
   400 \ \ \isacommand{apply}\isamarkupfalse%
   438 \ {\isacharparenleft}rule\ gcd{\isacharunderscore}lcm{\isacharunderscore}distr{\isacharparenright}\isanewline
   401 \ {\isacharparenleft}rule\ gcd{\isacharunderscore}lcm{\isacharunderscore}distr{\isacharparenright}\ \isacommand{done}\isamarkupfalse%
   439 \ \ \ \ \isacommand{done}\isamarkupfalse%
   402 %
   440 \isanewline
       
   441 \isacommand{qed}\isamarkupfalse%
       
   442 \ {\isacharparenleft}rule\ nat{\isacharunderscore}dvd{\isacharunderscore}less{\isacharunderscore}eq\ nat{\isacharunderscore}dvd{\isacharunderscore}meet{\isacharunderscore}eq\ nat{\isacharunderscore}dvd{\isacharunderscore}join{\isacharunderscore}eq{\isacharparenright}{\isacharplus}%
       
   443 \endisatagvisible
   403 \endisatagvisible
   444 {\isafoldvisible}%
   404 {\isafoldvisible}%
   445 %
   405 %
   446 \isadelimvisible
   406 \isadelimvisible
   447 %
   407 %