doc-src/IsarRef/Thy/document/HOL_Specific.tex
changeset 45408 7156f63ce3c2
parent 45232 eb56e1774c26
child 45409 5abb0e738b00
equal deleted inserted replaced
45402:1fac64bbdb4f 45408:7156f63ce3c2
  2555     \indexdef{HOL}{command}{code\_instance}\hypertarget{command.HOL.code-instance}{\hyperlink{command.HOL.code-instance}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}instance}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
  2555     \indexdef{HOL}{command}{code\_instance}\hypertarget{command.HOL.code-instance}{\hyperlink{command.HOL.code-instance}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}instance}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
  2556     \indexdef{HOL}{command}{code\_reserved}\hypertarget{command.HOL.code-reserved}{\hyperlink{command.HOL.code-reserved}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}reserved}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
  2556     \indexdef{HOL}{command}{code\_reserved}\hypertarget{command.HOL.code-reserved}{\hyperlink{command.HOL.code-reserved}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}reserved}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
  2557     \indexdef{HOL}{command}{code\_monad}\hypertarget{command.HOL.code-monad}{\hyperlink{command.HOL.code-monad}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}monad}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
  2557     \indexdef{HOL}{command}{code\_monad}\hypertarget{command.HOL.code-monad}{\hyperlink{command.HOL.code-monad}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}monad}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
  2558     \indexdef{HOL}{command}{code\_include}\hypertarget{command.HOL.code-include}{\hyperlink{command.HOL.code-include}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}include}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
  2558     \indexdef{HOL}{command}{code\_include}\hypertarget{command.HOL.code-include}{\hyperlink{command.HOL.code-include}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}include}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
  2559     \indexdef{HOL}{command}{code\_modulename}\hypertarget{command.HOL.code-modulename}{\hyperlink{command.HOL.code-modulename}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}modulename}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
  2559     \indexdef{HOL}{command}{code\_modulename}\hypertarget{command.HOL.code-modulename}{\hyperlink{command.HOL.code-modulename}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}modulename}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
  2560     \indexdef{HOL}{command}{code\_reflect}\hypertarget{command.HOL.code-reflect}{\hyperlink{command.HOL.code-reflect}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}reflect}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}}
  2560     \indexdef{HOL}{command}{code\_reflect}\hypertarget{command.HOL.code-reflect}{\hyperlink{command.HOL.code-reflect}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}reflect}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
       
  2561     \indexdef{HOL}{command}{code\_pred}\hypertarget{command.HOL.code-pred}{\hyperlink{command.HOL.code-pred}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}pred}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ proof{\isaliteral{28}{\isacharparenleft}}prove{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}
  2561   \end{matharray}
  2562   \end{matharray}
  2562 
  2563 
  2563   \begin{railoutput}
  2564   \begin{railoutput}
  2564 \rail@begin{11}{}
  2565 \rail@begin{11}{}
  2565 \rail@term{\hyperlink{command.HOL.export-code}{\mbox{\isa{\isacommand{export{\isaliteral{5F}{\isacharunderscore}}code}}}}}[]
  2566 \rail@term{\hyperlink{command.HOL.export-code}{\mbox{\isa{\isacommand{export{\isaliteral{5F}{\isacharunderscore}}code}}}}}[]
  2855 \rail@nextbar{9}
  2856 \rail@nextbar{9}
  2856 \rail@term{\isa{\isakeyword{file}}}[]
  2857 \rail@term{\isa{\isakeyword{file}}}[]
  2857 \rail@nont{\hyperlink{syntax.string}{\mbox{\isa{string}}}}[]
  2858 \rail@nont{\hyperlink{syntax.string}{\mbox{\isa{string}}}}[]
  2858 \rail@endbar
  2859 \rail@endbar
  2859 \rail@end
  2860 \rail@end
       
  2861 \rail@begin{6}{}
       
  2862 \rail@term{\hyperlink{command.HOL.code-pred}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}pred}}}}}[]
       
  2863 \rail@cr{2}
       
  2864 \rail@bar
       
  2865 \rail@nextbar{3}
       
  2866 \rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
       
  2867 \rail@term{\isa{\isakeyword{modes}}}[]
       
  2868 \rail@term{\isa{{\isaliteral{3A}{\isacharcolon}}}}[]
       
  2869 \rail@nont{\isa{modedecl}}[]
       
  2870 \rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
       
  2871 \rail@endbar
       
  2872 \rail@cr{5}
       
  2873 \rail@nont{\isa{const}}[]
       
  2874 \rail@end
  2860 \rail@begin{4}{\isa{syntax}}
  2875 \rail@begin{4}{\isa{syntax}}
  2861 \rail@bar
  2876 \rail@bar
  2862 \rail@nont{\hyperlink{syntax.string}{\mbox{\isa{string}}}}[]
  2877 \rail@nont{\hyperlink{syntax.string}{\mbox{\isa{string}}}}[]
  2863 \rail@nextbar{1}
  2878 \rail@nextbar{1}
  2864 \rail@bar
  2879 \rail@bar
  2869 \rail@term{\isa{\isakeyword{infixr}}}[]
  2884 \rail@term{\isa{\isakeyword{infixr}}}[]
  2870 \rail@endbar
  2885 \rail@endbar
  2871 \rail@nont{\hyperlink{syntax.nat}{\mbox{\isa{nat}}}}[]
  2886 \rail@nont{\hyperlink{syntax.nat}{\mbox{\isa{nat}}}}[]
  2872 \rail@nont{\hyperlink{syntax.string}{\mbox{\isa{string}}}}[]
  2887 \rail@nont{\hyperlink{syntax.string}{\mbox{\isa{string}}}}[]
  2873 \rail@endbar
  2888 \rail@endbar
       
  2889 \rail@end
       
  2890 \rail@begin{6}{\isa{modedecl}}
       
  2891 \rail@bar
       
  2892 \rail@nont{\isa{modes}}[]
       
  2893 \rail@nextbar{1}
       
  2894 \rail@nont{\isa{const}}[]
       
  2895 \rail@term{\isa{{\isaliteral{3A}{\isacharcolon}}}}[]
       
  2896 \rail@nont{\isa{modes}}[]
       
  2897 \rail@cr{3}
       
  2898 \rail@bar
       
  2899 \rail@nextbar{4}
       
  2900 \rail@term{\isa{\isakeyword{and}}}[]
       
  2901 \rail@plus
       
  2902 \rail@nont{\isa{const}}[]
       
  2903 \rail@term{\isa{{\isaliteral{3A}{\isacharcolon}}}}[]
       
  2904 \rail@nont{\isa{modes}}[]
       
  2905 \rail@term{\isa{\isakeyword{and}}}[]
       
  2906 \rail@nextplus{5}
       
  2907 \rail@endplus
       
  2908 \rail@endbar
       
  2909 \rail@endbar
       
  2910 \rail@end
       
  2911 \rail@begin{1}{\isa{modes}}
       
  2912 \rail@nont{\isa{mode}}[]
       
  2913 \rail@term{\isa{\isakeyword{as}}}[]
       
  2914 \rail@nont{\isa{const}}[]
  2874 \rail@end
  2915 \rail@end
  2875 \end{railoutput}
  2916 \end{railoutput}
  2876 
  2917 
  2877 
  2918 
  2878   \begin{description}
  2919   \begin{description}
  2983   runtime code generation referring to one of the ``\isa{{\isaliteral{22}{\isachardoublequote}}datatypes{\isaliteral{22}{\isachardoublequote}}}'' or ``\isa{{\isaliteral{22}{\isachardoublequote}}functions{\isaliteral{22}{\isachardoublequote}}}'' entities use these precompiled
  3024   runtime code generation referring to one of the ``\isa{{\isaliteral{22}{\isachardoublequote}}datatypes{\isaliteral{22}{\isachardoublequote}}}'' or ``\isa{{\isaliteral{22}{\isachardoublequote}}functions{\isaliteral{22}{\isachardoublequote}}}'' entities use these precompiled
  2984   entities.  With a ``\isa{{\isaliteral{22}{\isachardoublequote}}file{\isaliteral{22}{\isachardoublequote}}}'' argument, the corresponding code
  3025   entities.  With a ``\isa{{\isaliteral{22}{\isachardoublequote}}file{\isaliteral{22}{\isachardoublequote}}}'' argument, the corresponding code
  2985   is generated into that specified file without modifying the code
  3026   is generated into that specified file without modifying the code
  2986   generator setup.
  3027   generator setup.
  2987 
  3028 
       
  3029   \item \hyperlink{command.HOL.code-pred}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}pred}}}} creates code equations for a predicate
       
  3030     given a set of introduction rules. Optional mode annotations determine
       
  3031     which arguments are supposed to be input or output. If alternative 
       
  3032     introduction rules are declared, one must prove a corresponding elimination
       
  3033     rule.
       
  3034 
  2988   \end{description}%
  3035   \end{description}%
  2989 \end{isamarkuptext}%
  3036 \end{isamarkuptext}%
  2990 \isamarkuptrue%
  3037 \isamarkuptrue%
  2991 %
  3038 %
  2992 \isamarkupsection{Definition by specification \label{sec:hol-specification}%
  3039 \isamarkupsection{Definition by specification \label{sec:hol-specification}%