doc-src/IsarRef/Thy/document/Generic.tex
author wenzelm
Thu, 09 Jun 2011 22:25:25 +0200
changeset 43332 dca2c7c598f0
parent 42930 41394a61cca9
child 43365 f8944cb2468f
permissions -rw-r--r--
document depth arguments of method "auto";
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
     1
%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
     2
\begin{isabellebody}%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
     3
\def\isabellecontext{Generic}%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
     4
%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
     5
\isadelimtheory
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
     6
%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
     7
\endisadelimtheory
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
     8
%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
     9
\isatagtheory
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
    10
\isacommand{theory}\isamarkupfalse%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
    11
\ Generic\isanewline
42651
e3fdb7c96be5 formal Base theory;
wenzelm
parents: 42626
diff changeset
    12
\isakeyword{imports}\ Base\ Main\isanewline
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
    13
\isakeyword{begin}%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
    14
\endisatagtheory
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
    15
{\isafoldtheory}%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
    16
%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
    17
\isadelimtheory
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
    18
%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
    19
\endisadelimtheory
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
    20
%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
    21
\isamarkupchapter{Generic tools and packages \label{ch:gen-tools}%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
    22
}
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
    23
\isamarkuptrue%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
    24
%
42655
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
    25
\isamarkupsection{Configuration options \label{sec:config}%
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
    26
}
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
    27
\isamarkuptrue%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
    28
%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
    29
\begin{isamarkuptext}%
40291
012ed4426fda support for real valued configuration options;
wenzelm
parents: 40255
diff changeset
    30
Isabelle/Pure maintains a record of named configuration
012ed4426fda support for real valued configuration options;
wenzelm
parents: 40255
diff changeset
    31
  options within the theory or proof context, with values of type
012ed4426fda support for real valued configuration options;
wenzelm
parents: 40255
diff changeset
    32
  \verb|bool|, \verb|int|, \verb|real|, or \verb|string|.  Tools may declare options in ML, and then refer to these
012ed4426fda support for real valued configuration options;
wenzelm
parents: 40255
diff changeset
    33
  values (relative to the context).  Thus global reference variables
012ed4426fda support for real valued configuration options;
wenzelm
parents: 40255
diff changeset
    34
  are easily avoided.  The user may change the value of a
012ed4426fda support for real valued configuration options;
wenzelm
parents: 40255
diff changeset
    35
  configuration option by means of an associated attribute of the same
012ed4426fda support for real valued configuration options;
wenzelm
parents: 40255
diff changeset
    36
  name.  This form of context declaration works particularly well with
42655
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
    37
  commands such as \hyperlink{command.declare}{\mbox{\isa{\isacommand{declare}}}} or \hyperlink{command.using}{\mbox{\isa{\isacommand{using}}}} like
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
    38
  this:%
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
    39
\end{isamarkuptext}%
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
    40
\isamarkuptrue%
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
    41
\isacommand{declare}\isamarkupfalse%
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
    42
\ {\isaliteral{5B}{\isacharbrackleft}}{\isaliteral{5B}{\isacharbrackleft}}show{\isaliteral{5F}{\isacharunderscore}}main{\isaliteral{5F}{\isacharunderscore}}goal\ {\isaliteral{3D}{\isacharequal}}\ false{\isaliteral{5D}{\isacharbrackright}}{\isaliteral{5D}{\isacharbrackright}}\isanewline
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
    43
\isanewline
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
    44
\isacommand{notepad}\isamarkupfalse%
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
    45
\isanewline
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
    46
\isakeyword{begin}\isanewline
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
    47
%
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
    48
\isadelimproof
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
    49
\ \ %
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
    50
\endisadelimproof
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
    51
%
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
    52
\isatagproof
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
    53
\isacommand{note}\isamarkupfalse%
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
    54
\ {\isaliteral{5B}{\isacharbrackleft}}{\isaliteral{5B}{\isacharbrackleft}}show{\isaliteral{5F}{\isacharunderscore}}main{\isaliteral{5F}{\isacharunderscore}}goal\ {\isaliteral{3D}{\isacharequal}}\ true{\isaliteral{5D}{\isacharbrackright}}{\isaliteral{5D}{\isacharbrackright}}%
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
    55
\endisatagproof
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
    56
{\isafoldproof}%
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
    57
%
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
    58
\isadelimproof
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
    59
\isanewline
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
    60
%
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
    61
\endisadelimproof
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
    62
\isacommand{end}\isamarkupfalse%
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
    63
%
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
    64
\begin{isamarkuptext}%
eb95e2f3b218 updated configuration options -- no ML here;
wenzelm
parents: 42651
diff changeset
    65
For historical reasons, some tools cannot take the full proof
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
    66
  context into account and merely refer to the background theory.
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
    67
  This is accommodated by configuration options being declared as
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
    68
  ``global'', which may not be changed within a local context.
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
    69
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
    70
  \begin{matharray}{rcll}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
    71
    \indexdef{}{command}{print\_configs}\hypertarget{command.print-configs}{\hyperlink{command.print-configs}{\mbox{\isa{\isacommand{print{\isaliteral{5F}{\isacharunderscore}}configs}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}context\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}{\isaliteral{22}{\isachardoublequote}}} \\
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
    72
  \end{matharray}
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
    73
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
    74
  \begin{railoutput}
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
    75
\rail@begin{6}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
    76
\rail@nont{\hyperlink{syntax.name}{\mbox{\isa{name}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
    77
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
    78
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
    79
\rail@term{\isa{{\isaliteral{3D}{\isacharequal}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
    80
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
    81
\rail@term{\isa{true}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
    82
\rail@nextbar{2}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
    83
\rail@term{\isa{false}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
    84
\rail@nextbar{3}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
    85
\rail@nont{\hyperlink{syntax.int}{\mbox{\isa{int}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
    86
\rail@nextbar{4}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
    87
\rail@nont{\hyperlink{syntax.float}{\mbox{\isa{float}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
    88
\rail@nextbar{5}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
    89
\rail@nont{\hyperlink{syntax.name}{\mbox{\isa{name}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
    90
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
    91
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
    92
\rail@end
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
    93
\end{railoutput}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
    94
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
    95
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
    96
  \begin{description}
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
    97
  
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
    98
  \item \hyperlink{command.print-configs}{\mbox{\isa{\isacommand{print{\isaliteral{5F}{\isacharunderscore}}configs}}}} prints the available configuration
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
    99
  options, with names, types, and current values.
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   100
  
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   101
  \item \isa{{\isaliteral{22}{\isachardoublequote}}name\ {\isaliteral{3D}{\isacharequal}}\ value{\isaliteral{22}{\isachardoublequote}}} as an attribute expression modifies the
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   102
  named option, with the syntax of the value depending on the option's
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   103
  type.  For \verb|bool| the default value is \isa{true}.  Any
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   104
  attempt to change a global option in a local context is ignored.
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   105
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   106
  \end{description}%
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   107
\end{isamarkuptext}%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   108
\isamarkuptrue%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   109
%
27042
8fcf19f2168b updated generated file;
wenzelm
parents: 26907
diff changeset
   110
\isamarkupsection{Basic proof tools%
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   111
}
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   112
\isamarkuptrue%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   113
%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   114
\isamarkupsubsection{Miscellaneous methods and attributes \label{sec:misc-meth-att}%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   115
}
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   116
\isamarkuptrue%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   117
%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   118
\begin{isamarkuptext}%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   119
\begin{matharray}{rcl}
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   120
    \indexdef{}{method}{unfold}\hypertarget{method.unfold}{\hyperlink{method.unfold}{\mbox{\isa{unfold}}}} & : & \isa{method} \\
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   121
    \indexdef{}{method}{fold}\hypertarget{method.fold}{\hyperlink{method.fold}{\mbox{\isa{fold}}}} & : & \isa{method} \\
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   122
    \indexdef{}{method}{insert}\hypertarget{method.insert}{\hyperlink{method.insert}{\mbox{\isa{insert}}}} & : & \isa{method} \\[0.5ex]
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   123
    \indexdef{}{method}{erule}\hypertarget{method.erule}{\hyperlink{method.erule}{\mbox{\isa{erule}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{method} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   124
    \indexdef{}{method}{drule}\hypertarget{method.drule}{\hyperlink{method.drule}{\mbox{\isa{drule}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{method} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   125
    \indexdef{}{method}{frule}\hypertarget{method.frule}{\hyperlink{method.frule}{\mbox{\isa{frule}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{method} \\
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   126
    \indexdef{}{method}{succeed}\hypertarget{method.succeed}{\hyperlink{method.succeed}{\mbox{\isa{succeed}}}} & : & \isa{method} \\
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   127
    \indexdef{}{method}{fail}\hypertarget{method.fail}{\hyperlink{method.fail}{\mbox{\isa{fail}}}} & : & \isa{method} \\
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   128
  \end{matharray}
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   129
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   130
  \begin{railoutput}
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
   131
\rail@begin{3}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   132
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   133
\rail@term{\hyperlink{method.fold}{\mbox{\isa{fold}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   134
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   135
\rail@term{\hyperlink{method.unfold}{\mbox{\isa{unfold}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   136
\rail@nextbar{2}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   137
\rail@term{\hyperlink{method.insert}{\mbox{\isa{insert}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   138
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   139
\rail@nont{\hyperlink{syntax.thmrefs}{\mbox{\isa{thmrefs}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   140
\rail@end
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
   141
\rail@begin{3}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   142
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   143
\rail@term{\hyperlink{method.erule}{\mbox{\isa{erule}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   144
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   145
\rail@term{\hyperlink{method.drule}{\mbox{\isa{drule}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   146
\rail@nextbar{2}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   147
\rail@term{\hyperlink{method.frule}{\mbox{\isa{frule}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   148
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   149
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   150
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   151
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   152
\rail@nont{\hyperlink{syntax.nat}{\mbox{\isa{nat}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   153
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   154
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   155
\rail@nont{\hyperlink{syntax.thmrefs}{\mbox{\isa{thmrefs}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   156
\rail@end
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   157
\end{railoutput}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   158
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   159
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   160
  \begin{description}
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   161
  
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   162
  \item \hyperlink{method.unfold}{\mbox{\isa{unfold}}}~\isa{{\isaliteral{22}{\isachardoublequote}}a\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ a\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{22}{\isachardoublequote}}} and \hyperlink{method.fold}{\mbox{\isa{fold}}}~\isa{{\isaliteral{22}{\isachardoublequote}}a\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ a\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{22}{\isachardoublequote}}} expand (or fold back) the given definitions throughout
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   163
  all goals; any chained facts provided are inserted into the goal and
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   164
  subject to rewriting as well.
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   165
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   166
  \item \hyperlink{method.insert}{\mbox{\isa{insert}}}~\isa{{\isaliteral{22}{\isachardoublequote}}a\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ a\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{22}{\isachardoublequote}}} inserts theorems as facts
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   167
  into all goals of the proof state.  Note that current facts
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   168
  indicated for forward chaining are ignored.
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   169
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   170
  \item \hyperlink{method.erule}{\mbox{\isa{erule}}}~\isa{{\isaliteral{22}{\isachardoublequote}}a\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ a\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{22}{\isachardoublequote}}}, \hyperlink{method.drule}{\mbox{\isa{drule}}}~\isa{{\isaliteral{22}{\isachardoublequote}}a\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ a\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{22}{\isachardoublequote}}}, and \hyperlink{method.frule}{\mbox{\isa{frule}}}~\isa{{\isaliteral{22}{\isachardoublequote}}a\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ a\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{22}{\isachardoublequote}}} are similar to the basic \hyperlink{method.rule}{\mbox{\isa{rule}}}
30397
b6212ae21656 markup antiquotation options;
wenzelm
parents: 30269
diff changeset
   171
  method (see \secref{sec:pure-meth-att}), but apply rules by
b6212ae21656 markup antiquotation options;
wenzelm
parents: 30269
diff changeset
   172
  elim-resolution, destruct-resolution, and forward-resolution,
b6212ae21656 markup antiquotation options;
wenzelm
parents: 30269
diff changeset
   173
  respectively \cite{isabelle-implementation}.  The optional natural
b6212ae21656 markup antiquotation options;
wenzelm
parents: 30269
diff changeset
   174
  number argument (default 0) specifies additional assumption steps to
b6212ae21656 markup antiquotation options;
wenzelm
parents: 30269
diff changeset
   175
  be performed here.
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   176
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   177
  Note that these methods are improper ones, mainly serving for
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   178
  experimentation and tactic script emulation.  Different modes of
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   179
  basic rule application are usually expressed in Isar at the proof
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   180
  language level, rather than via implicit proof state manipulations.
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   181
  For example, a proper single-step elimination would be done using
26902
8db1e960d636 updated generated file;
wenzelm
parents: 26895
diff changeset
   182
  the plain \hyperlink{method.rule}{\mbox{\isa{rule}}} method, with forward chaining of current
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   183
  facts.
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   184
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   185
  \item \hyperlink{method.succeed}{\mbox{\isa{succeed}}} yields a single (unchanged) result; it is
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   186
  the identity of the ``\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{2C}{\isacharcomma}}{\isaliteral{22}{\isachardoublequote}}}'' method combinator (cf.\
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   187
  \secref{sec:proof-meth}).
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   188
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   189
  \item \hyperlink{method.fail}{\mbox{\isa{fail}}} yields an empty result sequence; it is the
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   190
  identity of the ``\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}}'' method combinator (cf.\
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   191
  \secref{sec:proof-meth}).
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   192
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   193
  \end{description}
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   194
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   195
  \begin{matharray}{rcl}
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   196
    \indexdef{}{attribute}{tagged}\hypertarget{attribute.tagged}{\hyperlink{attribute.tagged}{\mbox{\isa{tagged}}}} & : & \isa{attribute} \\
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   197
    \indexdef{}{attribute}{untagged}\hypertarget{attribute.untagged}{\hyperlink{attribute.untagged}{\mbox{\isa{untagged}}}} & : & \isa{attribute} \\[0.5ex]
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   198
    \indexdef{}{attribute}{THEN}\hypertarget{attribute.THEN}{\hyperlink{attribute.THEN}{\mbox{\isa{THEN}}}} & : & \isa{attribute} \\
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   199
    \indexdef{}{attribute}{COMP}\hypertarget{attribute.COMP}{\hyperlink{attribute.COMP}{\mbox{\isa{COMP}}}} & : & \isa{attribute} \\[0.5ex]
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   200
    \indexdef{}{attribute}{unfolded}\hypertarget{attribute.unfolded}{\hyperlink{attribute.unfolded}{\mbox{\isa{unfolded}}}} & : & \isa{attribute} \\
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   201
    \indexdef{}{attribute}{folded}\hypertarget{attribute.folded}{\hyperlink{attribute.folded}{\mbox{\isa{folded}}}} & : & \isa{attribute} \\[0.5ex]
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   202
    \indexdef{}{attribute}{rotated}\hypertarget{attribute.rotated}{\hyperlink{attribute.rotated}{\mbox{\isa{rotated}}}} & : & \isa{attribute} \\
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   203
    \indexdef{Pure}{attribute}{elim\_format}\hypertarget{attribute.Pure.elim-format}{\hyperlink{attribute.Pure.elim-format}{\mbox{\isa{elim{\isaliteral{5F}{\isacharunderscore}}format}}}} & : & \isa{attribute} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   204
    \indexdef{}{attribute}{standard}\hypertarget{attribute.standard}{\hyperlink{attribute.standard}{\mbox{\isa{standard}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{attribute} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   205
    \indexdef{}{attribute}{no\_vars}\hypertarget{attribute.no-vars}{\hyperlink{attribute.no-vars}{\mbox{\isa{no{\isaliteral{5F}{\isacharunderscore}}vars}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{attribute} \\
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   206
  \end{matharray}
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   207
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   208
  \begin{railoutput}
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
   209
\rail@begin{1}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   210
\rail@term{\hyperlink{attribute.tagged}{\mbox{\isa{tagged}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   211
\rail@nont{\hyperlink{syntax.name}{\mbox{\isa{name}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   212
\rail@nont{\hyperlink{syntax.name}{\mbox{\isa{name}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   213
\rail@end
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
   214
\rail@begin{1}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   215
\rail@term{\hyperlink{attribute.untagged}{\mbox{\isa{untagged}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   216
\rail@nont{\hyperlink{syntax.name}{\mbox{\isa{name}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   217
\rail@end
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
   218
\rail@begin{2}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   219
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   220
\rail@term{\hyperlink{attribute.THEN}{\mbox{\isa{THEN}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   221
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   222
\rail@term{\hyperlink{attribute.COMP}{\mbox{\isa{COMP}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   223
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   224
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   225
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   226
\rail@term{\isa{{\isaliteral{5B}{\isacharbrackleft}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   227
\rail@nont{\hyperlink{syntax.nat}{\mbox{\isa{nat}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   228
\rail@term{\isa{{\isaliteral{5D}{\isacharbrackright}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   229
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   230
\rail@nont{\hyperlink{syntax.thmref}{\mbox{\isa{thmref}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   231
\rail@end
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
   232
\rail@begin{2}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   233
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   234
\rail@term{\hyperlink{attribute.unfolded}{\mbox{\isa{unfolded}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   235
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   236
\rail@term{\hyperlink{attribute.folded}{\mbox{\isa{folded}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   237
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   238
\rail@nont{\hyperlink{syntax.thmrefs}{\mbox{\isa{thmrefs}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   239
\rail@end
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
   240
\rail@begin{2}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   241
\rail@term{\hyperlink{attribute.rotated}{\mbox{\isa{rotated}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   242
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   243
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   244
\rail@nont{\hyperlink{syntax.int}{\mbox{\isa{int}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   245
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   246
\rail@end
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   247
\end{railoutput}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   248
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   249
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   250
  \begin{description}
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   251
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   252
  \item \hyperlink{attribute.tagged}{\mbox{\isa{tagged}}}~\isa{{\isaliteral{22}{\isachardoublequote}}name\ value{\isaliteral{22}{\isachardoublequote}}} and \hyperlink{attribute.untagged}{\mbox{\isa{untagged}}}~\isa{name} add and remove \emph{tags} of some theorem.
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   253
  Tags may be any list of string pairs that serve as formal comment.
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   254
  The first string is considered the tag name, the second its value.
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   255
  Note that \hyperlink{attribute.untagged}{\mbox{\isa{untagged}}} removes any tags of the same name.
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   256
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   257
  \item \hyperlink{attribute.THEN}{\mbox{\isa{THEN}}}~\isa{a} and \hyperlink{attribute.COMP}{\mbox{\isa{COMP}}}~\isa{a}
26902
8db1e960d636 updated generated file;
wenzelm
parents: 26895
diff changeset
   258
  compose rules by resolution.  \hyperlink{attribute.THEN}{\mbox{\isa{THEN}}} resolves with the
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   259
  first premise of \isa{a} (an alternative position may be also
26902
8db1e960d636 updated generated file;
wenzelm
parents: 26895
diff changeset
   260
  specified); the \hyperlink{attribute.COMP}{\mbox{\isa{COMP}}} version skips the automatic
30463
f1cb00030d4f updated generated files;
wenzelm
parents: 30397
diff changeset
   261
  lifting process that is normally intended (cf.\ \verb|op RS| and
f1cb00030d4f updated generated files;
wenzelm
parents: 30397
diff changeset
   262
  \verb|op COMP| in \cite{isabelle-implementation}).
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   263
  
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   264
  \item \hyperlink{attribute.unfolded}{\mbox{\isa{unfolded}}}~\isa{{\isaliteral{22}{\isachardoublequote}}a\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ a\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{22}{\isachardoublequote}}} and \hyperlink{attribute.folded}{\mbox{\isa{folded}}}~\isa{{\isaliteral{22}{\isachardoublequote}}a\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ a\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{22}{\isachardoublequote}}} expand and fold back again the given
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   265
  definitions throughout a rule.
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   266
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   267
  \item \hyperlink{attribute.rotated}{\mbox{\isa{rotated}}}~\isa{n} rotate the premises of a
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   268
  theorem by \isa{n} (default 1).
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   269
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   270
  \item \hyperlink{attribute.Pure.elim-format}{\mbox{\isa{elim{\isaliteral{5F}{\isacharunderscore}}format}}} turns a destruction rule into
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   271
  elimination rule format, by resolving with the rule \isa{{\isaliteral{22}{\isachardoublequote}}PROP\ A\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{28}{\isacharparenleft}}PROP\ A\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ PROP\ B{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ PROP\ B{\isaliteral{22}{\isachardoublequote}}}.
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   272
  
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   273
  Note that the Classical Reasoner (\secref{sec:classical}) provides
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   274
  its own version of this operation.
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   275
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   276
  \item \hyperlink{attribute.standard}{\mbox{\isa{standard}}} puts a theorem into the standard form of
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   277
  object-rules at the outermost theory level.  Note that this
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   278
  operation violates the local proof context (including active
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   279
  locales).
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   280
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   281
  \item \hyperlink{attribute.no-vars}{\mbox{\isa{no{\isaliteral{5F}{\isacharunderscore}}vars}}} replaces schematic variables by free
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   282
  ones; this is mainly for tuning output of pretty printed theorems.
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   283
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   284
  \end{description}%
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   285
\end{isamarkuptext}%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   286
\isamarkuptrue%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   287
%
27047
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   288
\isamarkupsubsection{Low-level equational reasoning%
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   289
}
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   290
\isamarkuptrue%
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   291
%
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   292
\begin{isamarkuptext}%
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   293
\begin{matharray}{rcl}
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   294
    \indexdef{}{method}{subst}\hypertarget{method.subst}{\hyperlink{method.subst}{\mbox{\isa{subst}}}} & : & \isa{method} \\
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   295
    \indexdef{}{method}{hypsubst}\hypertarget{method.hypsubst}{\hyperlink{method.hypsubst}{\mbox{\isa{hypsubst}}}} & : & \isa{method} \\
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   296
    \indexdef{}{method}{split}\hypertarget{method.split}{\hyperlink{method.split}{\mbox{\isa{split}}}} & : & \isa{method} \\
27047
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   297
  \end{matharray}
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   298
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   299
  \begin{railoutput}
42704
3f19e324ff59 tuned rail diagrams and layout;
wenzelm
parents: 42662
diff changeset
   300
\rail@begin{6}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   301
\rail@term{\hyperlink{method.subst}{\mbox{\isa{subst}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   302
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   303
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   304
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   305
\rail@term{\isa{asm}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   306
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   307
\rail@endbar
42704
3f19e324ff59 tuned rail diagrams and layout;
wenzelm
parents: 42662
diff changeset
   308
\rail@cr{3}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   309
\rail@bar
42704
3f19e324ff59 tuned rail diagrams and layout;
wenzelm
parents: 42662
diff changeset
   310
\rail@nextbar{4}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   311
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   312
\rail@plus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   313
\rail@nont{\hyperlink{syntax.nat}{\mbox{\isa{nat}}}}[]
42704
3f19e324ff59 tuned rail diagrams and layout;
wenzelm
parents: 42662
diff changeset
   314
\rail@nextplus{5}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   315
\rail@endplus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   316
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   317
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   318
\rail@nont{\hyperlink{syntax.thmref}{\mbox{\isa{thmref}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   319
\rail@end
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
   320
\rail@begin{2}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   321
\rail@term{\hyperlink{method.split}{\mbox{\isa{split}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   322
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   323
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   324
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   325
\rail@term{\isa{asm}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   326
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   327
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   328
\rail@nont{\hyperlink{syntax.thmrefs}{\mbox{\isa{thmrefs}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   329
\rail@end
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   330
\end{railoutput}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   331
27047
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   332
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   333
  These methods provide low-level facilities for equational reasoning
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   334
  that are intended for specialized applications only.  Normally,
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   335
  single step calculations would be performed in a structured text
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   336
  (see also \secref{sec:calculation}), while the Simplifier methods
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   337
  provide the canonical way for automated normalization (see
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   338
  \secref{sec:simplifier}).
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   339
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   340
  \begin{description}
27047
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   341
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   342
  \item \hyperlink{method.subst}{\mbox{\isa{subst}}}~\isa{eq} performs a single substitution step
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   343
  using rule \isa{eq}, which may be either a meta or object
27047
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   344
  equality.
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   345
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   346
  \item \hyperlink{method.subst}{\mbox{\isa{subst}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}asm{\isaliteral{29}{\isacharparenright}}\ eq{\isaliteral{22}{\isachardoublequote}}} substitutes in an
27047
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   347
  assumption.
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   348
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   349
  \item \hyperlink{method.subst}{\mbox{\isa{subst}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}i\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ j{\isaliteral{29}{\isacharparenright}}\ eq{\isaliteral{22}{\isachardoublequote}}} performs several
27047
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   350
  substitutions in the conclusion. The numbers \isa{i} to \isa{j}
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   351
  indicate the positions to substitute at.  Positions are ordered from
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   352
  the top of the term tree moving down from left to right. For
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   353
  example, in \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}a\ {\isaliteral{2B}{\isacharplus}}\ b{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{2B}{\isacharplus}}\ {\isaliteral{28}{\isacharparenleft}}c\ {\isaliteral{2B}{\isacharplus}}\ d{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} there are three positions
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   354
  where commutativity of \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{2B}{\isacharplus}}{\isaliteral{22}{\isachardoublequote}}} is applicable: 1 refers to \isa{{\isaliteral{22}{\isachardoublequote}}a\ {\isaliteral{2B}{\isacharplus}}\ b{\isaliteral{22}{\isachardoublequote}}}, 2 to the whole term, and 3 to \isa{{\isaliteral{22}{\isachardoublequote}}c\ {\isaliteral{2B}{\isacharplus}}\ d{\isaliteral{22}{\isachardoublequote}}}.
27047
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   355
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   356
  If the positions in the list \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}i\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ j{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} are non-overlapping
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   357
  (e.g.\ \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isadigit{2}}\ {\isadigit{3}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} in \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}a\ {\isaliteral{2B}{\isacharplus}}\ b{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{2B}{\isacharplus}}\ {\isaliteral{28}{\isacharparenleft}}c\ {\isaliteral{2B}{\isacharplus}}\ d{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}) you may
27047
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   358
  assume all substitutions are performed simultaneously.  Otherwise
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   359
  the behaviour of \isa{subst} is not specified.
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   360
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   361
  \item \hyperlink{method.subst}{\mbox{\isa{subst}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}asm{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{28}{\isacharparenleft}}i\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ j{\isaliteral{29}{\isacharparenright}}\ eq{\isaliteral{22}{\isachardoublequote}}} performs the
27072
051a88965e50 updated generated file;
wenzelm
parents: 27047
diff changeset
   362
  substitutions in the assumptions. The positions refer to the
051a88965e50 updated generated file;
wenzelm
parents: 27047
diff changeset
   363
  assumptions in order from left to right.  For example, given in a
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   364
  goal of the form \isa{{\isaliteral{22}{\isachardoublequote}}P\ {\isaliteral{28}{\isacharparenleft}}a\ {\isaliteral{2B}{\isacharplus}}\ b{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ P\ {\isaliteral{28}{\isacharparenleft}}c\ {\isaliteral{2B}{\isacharplus}}\ d{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{22}{\isachardoublequote}}}, position 1 of
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   365
  commutativity of \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{2B}{\isacharplus}}{\isaliteral{22}{\isachardoublequote}}} is the subterm \isa{{\isaliteral{22}{\isachardoublequote}}a\ {\isaliteral{2B}{\isacharplus}}\ b{\isaliteral{22}{\isachardoublequote}}} and
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   366
  position 2 is the subterm \isa{{\isaliteral{22}{\isachardoublequote}}c\ {\isaliteral{2B}{\isacharplus}}\ d{\isaliteral{22}{\isachardoublequote}}}.
27047
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   367
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   368
  \item \hyperlink{method.hypsubst}{\mbox{\isa{hypsubst}}} performs substitution using some
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   369
  assumption; this only works for equations of the form \isa{{\isaliteral{22}{\isachardoublequote}}x\ {\isaliteral{3D}{\isacharequal}}\ t{\isaliteral{22}{\isachardoublequote}}} where \isa{x} is a free or bound variable.
27047
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   370
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   371
  \item \hyperlink{method.split}{\mbox{\isa{split}}}~\isa{{\isaliteral{22}{\isachardoublequote}}a\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ a\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{22}{\isachardoublequote}}} performs single-step case
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   372
  splitting using the given rules.  By default, splitting is performed
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   373
  in the conclusion of a goal; the \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}asm{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} option indicates to
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   374
  operate on assumptions instead.
27047
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   375
  
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   376
  Note that the \hyperlink{method.simp}{\mbox{\isa{simp}}} method already involves repeated
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   377
  application of split rules as declared in the current context.
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   378
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   379
  \end{description}%
27047
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   380
\end{isamarkuptext}%
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   381
\isamarkuptrue%
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
   382
%
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   383
\isamarkupsubsection{Further tactic emulations \label{sec:tactics}%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   384
}
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   385
\isamarkuptrue%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   386
%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   387
\begin{isamarkuptext}%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   388
The following improper proof methods emulate traditional tactics.
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   389
  These admit direct access to the goal state, which is normally
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   390
  considered harmful!  In particular, this may involve both numbered
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   391
  goal addressing (default 1), and dynamic instantiation within the
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   392
  scope of some subgoal.
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   393
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   394
  \begin{warn}
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   395
    Dynamic instantiations refer to universally quantified parameters
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   396
    of a subgoal (the dynamic context) rather than fixed variables and
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   397
    term abbreviations of a (static) Isar context.
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   398
  \end{warn}
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   399
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   400
  Tactic emulation methods, unlike their ML counterparts, admit
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   401
  simultaneous instantiation from both dynamic and static contexts.
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   402
  If names occur in both contexts goal parameters hide locally fixed
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   403
  variables.  Likewise, schematic variables refer to term
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   404
  abbreviations, if present in the static context.  Otherwise the
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   405
  schematic variable is interpreted as a schematic variable and left
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   406
  to be solved by unification with certain parts of the subgoal.
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   407
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   408
  Note that the tactic emulation proof methods in Isabelle/Isar are
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   409
  consistently named \isa{foo{\isaliteral{5F}{\isacharunderscore}}tac}.  Note also that variable names
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   410
  occurring on left hand sides of instantiations must be preceded by a
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   411
  question mark if they coincide with a keyword or contain dots.  This
26902
8db1e960d636 updated generated file;
wenzelm
parents: 26895
diff changeset
   412
  is consistent with the attribute \hyperlink{attribute.where}{\mbox{\isa{where}}} (see
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   413
  \secref{sec:pure-meth-att}).
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   414
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   415
  \begin{matharray}{rcl}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   416
    \indexdef{}{method}{rule\_tac}\hypertarget{method.rule-tac}{\hyperlink{method.rule-tac}{\mbox{\isa{rule{\isaliteral{5F}{\isacharunderscore}}tac}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{method} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   417
    \indexdef{}{method}{erule\_tac}\hypertarget{method.erule-tac}{\hyperlink{method.erule-tac}{\mbox{\isa{erule{\isaliteral{5F}{\isacharunderscore}}tac}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{method} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   418
    \indexdef{}{method}{drule\_tac}\hypertarget{method.drule-tac}{\hyperlink{method.drule-tac}{\mbox{\isa{drule{\isaliteral{5F}{\isacharunderscore}}tac}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{method} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   419
    \indexdef{}{method}{frule\_tac}\hypertarget{method.frule-tac}{\hyperlink{method.frule-tac}{\mbox{\isa{frule{\isaliteral{5F}{\isacharunderscore}}tac}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{method} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   420
    \indexdef{}{method}{cut\_tac}\hypertarget{method.cut-tac}{\hyperlink{method.cut-tac}{\mbox{\isa{cut{\isaliteral{5F}{\isacharunderscore}}tac}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{method} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   421
    \indexdef{}{method}{thin\_tac}\hypertarget{method.thin-tac}{\hyperlink{method.thin-tac}{\mbox{\isa{thin{\isaliteral{5F}{\isacharunderscore}}tac}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{method} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   422
    \indexdef{}{method}{subgoal\_tac}\hypertarget{method.subgoal-tac}{\hyperlink{method.subgoal-tac}{\mbox{\isa{subgoal{\isaliteral{5F}{\isacharunderscore}}tac}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{method} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   423
    \indexdef{}{method}{rename\_tac}\hypertarget{method.rename-tac}{\hyperlink{method.rename-tac}{\mbox{\isa{rename{\isaliteral{5F}{\isacharunderscore}}tac}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{method} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   424
    \indexdef{}{method}{rotate\_tac}\hypertarget{method.rotate-tac}{\hyperlink{method.rotate-tac}{\mbox{\isa{rotate{\isaliteral{5F}{\isacharunderscore}}tac}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{method} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   425
    \indexdef{}{method}{tactic}\hypertarget{method.tactic}{\hyperlink{method.tactic}{\mbox{\isa{tactic}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{method} \\
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   426
    \indexdef{}{method}{raw\_tactic}\hypertarget{method.raw-tactic}{\hyperlink{method.raw-tactic}{\mbox{\isa{raw{\isaliteral{5F}{\isacharunderscore}}tactic}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{method} \\
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   427
  \end{matharray}
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   428
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   429
  \begin{railoutput}
42704
3f19e324ff59 tuned rail diagrams and layout;
wenzelm
parents: 42662
diff changeset
   430
\rail@begin{9}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   431
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   432
\rail@term{\hyperlink{method.rule-tac}{\mbox{\isa{rule{\isaliteral{5F}{\isacharunderscore}}tac}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   433
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   434
\rail@term{\hyperlink{method.erule-tac}{\mbox{\isa{erule{\isaliteral{5F}{\isacharunderscore}}tac}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   435
\rail@nextbar{2}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   436
\rail@term{\hyperlink{method.drule-tac}{\mbox{\isa{drule{\isaliteral{5F}{\isacharunderscore}}tac}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   437
\rail@nextbar{3}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   438
\rail@term{\hyperlink{method.frule-tac}{\mbox{\isa{frule{\isaliteral{5F}{\isacharunderscore}}tac}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   439
\rail@nextbar{4}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   440
\rail@term{\hyperlink{method.cut-tac}{\mbox{\isa{cut{\isaliteral{5F}{\isacharunderscore}}tac}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   441
\rail@nextbar{5}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   442
\rail@term{\hyperlink{method.thin-tac}{\mbox{\isa{thin{\isaliteral{5F}{\isacharunderscore}}tac}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   443
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   444
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   445
\rail@nextbar{1}
42705
528a2ba8fa74 tuned some syntax names;
wenzelm
parents: 42704
diff changeset
   446
\rail@nont{\hyperlink{syntax.goal-spec}{\mbox{\isa{goal{\isaliteral{5F}{\isacharunderscore}}spec}}}}[]
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   447
\rail@endbar
42704
3f19e324ff59 tuned rail diagrams and layout;
wenzelm
parents: 42662
diff changeset
   448
\rail@cr{7}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   449
\rail@bar
42617
77d239840285 more precise rail diagrams;
wenzelm
parents: 42596
diff changeset
   450
\rail@nont{\isa{dynamic{\isaliteral{5F}{\isacharunderscore}}insts}}[]
77d239840285 more precise rail diagrams;
wenzelm
parents: 42596
diff changeset
   451
\rail@term{\isa{\isakeyword{in}}}[]
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   452
\rail@nont{\hyperlink{syntax.thmref}{\mbox{\isa{thmref}}}}[]
42704
3f19e324ff59 tuned rail diagrams and layout;
wenzelm
parents: 42662
diff changeset
   453
\rail@nextbar{8}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   454
\rail@nont{\hyperlink{syntax.thmrefs}{\mbox{\isa{thmrefs}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   455
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   456
\rail@end
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
   457
\rail@begin{2}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   458
\rail@term{\hyperlink{method.subgoal-tac}{\mbox{\isa{subgoal{\isaliteral{5F}{\isacharunderscore}}tac}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   459
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   460
\rail@nextbar{1}
42705
528a2ba8fa74 tuned some syntax names;
wenzelm
parents: 42704
diff changeset
   461
\rail@nont{\hyperlink{syntax.goal-spec}{\mbox{\isa{goal{\isaliteral{5F}{\isacharunderscore}}spec}}}}[]
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   462
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   463
\rail@plus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   464
\rail@nont{\hyperlink{syntax.prop}{\mbox{\isa{prop}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   465
\rail@nextplus{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   466
\rail@endplus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   467
\rail@end
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
   468
\rail@begin{2}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   469
\rail@term{\hyperlink{method.rename-tac}{\mbox{\isa{rename{\isaliteral{5F}{\isacharunderscore}}tac}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   470
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   471
\rail@nextbar{1}
42705
528a2ba8fa74 tuned some syntax names;
wenzelm
parents: 42704
diff changeset
   472
\rail@nont{\hyperlink{syntax.goal-spec}{\mbox{\isa{goal{\isaliteral{5F}{\isacharunderscore}}spec}}}}[]
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   473
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   474
\rail@plus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   475
\rail@nont{\hyperlink{syntax.name}{\mbox{\isa{name}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   476
\rail@nextplus{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   477
\rail@endplus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   478
\rail@end
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
   479
\rail@begin{2}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   480
\rail@term{\hyperlink{method.rotate-tac}{\mbox{\isa{rotate{\isaliteral{5F}{\isacharunderscore}}tac}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   481
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   482
\rail@nextbar{1}
42705
528a2ba8fa74 tuned some syntax names;
wenzelm
parents: 42704
diff changeset
   483
\rail@nont{\hyperlink{syntax.goal-spec}{\mbox{\isa{goal{\isaliteral{5F}{\isacharunderscore}}spec}}}}[]
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   484
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   485
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   486
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   487
\rail@nont{\hyperlink{syntax.int}{\mbox{\isa{int}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   488
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   489
\rail@end
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
   490
\rail@begin{2}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   491
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   492
\rail@term{\hyperlink{method.tactic}{\mbox{\isa{tactic}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   493
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   494
\rail@term{\hyperlink{method.raw-tactic}{\mbox{\isa{raw{\isaliteral{5F}{\isacharunderscore}}tactic}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   495
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   496
\rail@nont{\hyperlink{syntax.text}{\mbox{\isa{text}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   497
\rail@end
42617
77d239840285 more precise rail diagrams;
wenzelm
parents: 42596
diff changeset
   498
\rail@begin{2}{\isa{dynamic{\isaliteral{5F}{\isacharunderscore}}insts}}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   499
\rail@plus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   500
\rail@nont{\hyperlink{syntax.name}{\mbox{\isa{name}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   501
\rail@term{\isa{{\isaliteral{3D}{\isacharequal}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   502
\rail@nont{\hyperlink{syntax.term}{\mbox{\isa{term}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   503
\rail@nextplus{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   504
\rail@cterm{\isa{\isakeyword{and}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   505
\rail@endplus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   506
\rail@end
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   507
\end{railoutput}
42617
77d239840285 more precise rail diagrams;
wenzelm
parents: 42596
diff changeset
   508
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   509
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   510
\begin{description}
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   511
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   512
  \item \hyperlink{method.rule-tac}{\mbox{\isa{rule{\isaliteral{5F}{\isacharunderscore}}tac}}} etc. do resolution of rules with explicit
30397
b6212ae21656 markup antiquotation options;
wenzelm
parents: 30269
diff changeset
   513
  instantiation.  This works the same way as the ML tactics \verb|res_inst_tac| etc. (see \cite{isabelle-implementation})
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   514
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   515
  Multiple rules may be only given if there is no instantiation; then
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   516
  \hyperlink{method.rule-tac}{\mbox{\isa{rule{\isaliteral{5F}{\isacharunderscore}}tac}}} is the same as \verb|resolve_tac| in ML (see
30397
b6212ae21656 markup antiquotation options;
wenzelm
parents: 30269
diff changeset
   517
  \cite{isabelle-implementation}).
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   518
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   519
  \item \hyperlink{method.cut-tac}{\mbox{\isa{cut{\isaliteral{5F}{\isacharunderscore}}tac}}} inserts facts into the proof state as
27210
2a8d03e0bbb9 updated geenrated file;
wenzelm
parents: 27094
diff changeset
   520
  assumption of a subgoal, see also \verb|Tactic.cut_facts_tac| in
30397
b6212ae21656 markup antiquotation options;
wenzelm
parents: 30269
diff changeset
   521
  \cite{isabelle-implementation}.  Note that the scope of schematic
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   522
  variables is spread over the main goal statement.  Instantiations
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   523
  may be given as well, see also ML tactic \verb|cut_inst_tac| in
30397
b6212ae21656 markup antiquotation options;
wenzelm
parents: 30269
diff changeset
   524
  \cite{isabelle-implementation}.
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   525
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   526
  \item \hyperlink{method.thin-tac}{\mbox{\isa{thin{\isaliteral{5F}{\isacharunderscore}}tac}}}~\isa{{\isaliteral{5C3C7068693E}{\isasymphi}}} deletes the specified assumption
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   527
  from a subgoal; note that \isa{{\isaliteral{5C3C7068693E}{\isasymphi}}} may contain schematic variables.
30397
b6212ae21656 markup antiquotation options;
wenzelm
parents: 30269
diff changeset
   528
  See also \verb|thin_tac| in \cite{isabelle-implementation}.
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   529
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   530
  \item \hyperlink{method.subgoal-tac}{\mbox{\isa{subgoal{\isaliteral{5F}{\isacharunderscore}}tac}}}~\isa{{\isaliteral{5C3C7068693E}{\isasymphi}}} adds \isa{{\isaliteral{5C3C7068693E}{\isasymphi}}} as an
30397
b6212ae21656 markup antiquotation options;
wenzelm
parents: 30269
diff changeset
   531
  assumption to a subgoal.  See also \verb|subgoal_tac| and \verb|subgoals_tac| in \cite{isabelle-implementation}.
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   532
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   533
  \item \hyperlink{method.rename-tac}{\mbox{\isa{rename{\isaliteral{5F}{\isacharunderscore}}tac}}}~\isa{{\isaliteral{22}{\isachardoublequote}}x\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ x\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{22}{\isachardoublequote}}} renames parameters of a
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   534
  goal according to the list \isa{{\isaliteral{22}{\isachardoublequote}}x\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{2C}{\isacharcomma}}\ x\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{22}{\isachardoublequote}}}, which refers to the
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   535
  \emph{suffix} of variables.
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   536
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   537
  \item \hyperlink{method.rotate-tac}{\mbox{\isa{rotate{\isaliteral{5F}{\isacharunderscore}}tac}}}~\isa{n} rotates the assumptions of a
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   538
  goal by \isa{n} positions: from right to left if \isa{n} is
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   539
  positive, and from left to right if \isa{n} is negative; the
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   540
  default value is 1.  See also \verb|rotate_tac| in
30397
b6212ae21656 markup antiquotation options;
wenzelm
parents: 30269
diff changeset
   541
  \cite{isabelle-implementation}.
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   542
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   543
  \item \hyperlink{method.tactic}{\mbox{\isa{tactic}}}~\isa{{\isaliteral{22}{\isachardoublequote}}text{\isaliteral{22}{\isachardoublequote}}} produces a proof method from
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   544
  any ML text of type \verb|tactic|.  Apart from the usual ML
27224
ac158759125c updated generated file;
wenzelm
parents: 27210
diff changeset
   545
  environment and the current proof context, the ML code may refer to
ac158759125c updated generated file;
wenzelm
parents: 27210
diff changeset
   546
  the locally bound values \verb|facts|, which indicates any
ac158759125c updated generated file;
wenzelm
parents: 27210
diff changeset
   547
  current facts used for forward-chaining.
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   548
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   549
  \item \hyperlink{method.raw-tactic}{\mbox{\isa{raw{\isaliteral{5F}{\isacharunderscore}}tactic}}} is similar to \hyperlink{method.tactic}{\mbox{\isa{tactic}}}, but
27224
ac158759125c updated generated file;
wenzelm
parents: 27210
diff changeset
   550
  presents the goal state in its raw internal form, where simultaneous
ac158759125c updated generated file;
wenzelm
parents: 27210
diff changeset
   551
  subgoals appear as conjunction of the logical framework instead of
ac158759125c updated generated file;
wenzelm
parents: 27210
diff changeset
   552
  the usual split into several subgoals.  While feature this is useful
ac158759125c updated generated file;
wenzelm
parents: 27210
diff changeset
   553
  for debugging of complex method definitions, it should not never
ac158759125c updated generated file;
wenzelm
parents: 27210
diff changeset
   554
  appear in production theories.
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   555
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   556
  \end{description}%
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   557
\end{isamarkuptext}%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   558
\isamarkuptrue%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   559
%
27042
8fcf19f2168b updated generated file;
wenzelm
parents: 26907
diff changeset
   560
\isamarkupsection{The Simplifier \label{sec:simplifier}%
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   561
}
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   562
\isamarkuptrue%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   563
%
27042
8fcf19f2168b updated generated file;
wenzelm
parents: 26907
diff changeset
   564
\isamarkupsubsection{Simplification methods%
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   565
}
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   566
\isamarkuptrue%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   567
%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   568
\begin{isamarkuptext}%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   569
\begin{matharray}{rcl}
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   570
    \indexdef{}{method}{simp}\hypertarget{method.simp}{\hyperlink{method.simp}{\mbox{\isa{simp}}}} & : & \isa{method} \\
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   571
    \indexdef{}{method}{simp\_all}\hypertarget{method.simp-all}{\hyperlink{method.simp-all}{\mbox{\isa{simp{\isaliteral{5F}{\isacharunderscore}}all}}}} & : & \isa{method} \\
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   572
  \end{matharray}
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   573
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   574
  \begin{railoutput}
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
   575
\rail@begin{2}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   576
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   577
\rail@term{\hyperlink{method.simp}{\mbox{\isa{simp}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   578
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   579
\rail@term{\hyperlink{method.simp-all}{\mbox{\isa{simp{\isaliteral{5F}{\isacharunderscore}}all}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   580
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   581
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   582
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   583
\rail@nont{\isa{opt}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   584
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   585
\rail@plus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   586
\rail@nextplus{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   587
\rail@cnont{\hyperlink{syntax.simpmod}{\mbox{\isa{simpmod}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   588
\rail@endplus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   589
\rail@end
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   590
\rail@begin{4}{\isa{opt}}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   591
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   592
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   593
\rail@term{\isa{no{\isaliteral{5F}{\isacharunderscore}}asm}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   594
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   595
\rail@term{\isa{no{\isaliteral{5F}{\isacharunderscore}}asm{\isaliteral{5F}{\isacharunderscore}}simp}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   596
\rail@nextbar{2}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   597
\rail@term{\isa{no{\isaliteral{5F}{\isacharunderscore}}asm{\isaliteral{5F}{\isacharunderscore}}use}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   598
\rail@nextbar{3}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   599
\rail@term{\isa{asm{\isaliteral{5F}{\isacharunderscore}}lr}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   600
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   601
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   602
\rail@end
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   603
\rail@begin{9}{\indexdef{}{syntax}{simpmod}\hypertarget{syntax.simpmod}{\hyperlink{syntax.simpmod}{\mbox{\isa{simpmod}}}}}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   604
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   605
\rail@term{\isa{add}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   606
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   607
\rail@term{\isa{del}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   608
\rail@nextbar{2}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   609
\rail@term{\isa{only}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   610
\rail@nextbar{3}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   611
\rail@term{\isa{cong}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   612
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   613
\rail@nextbar{4}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   614
\rail@term{\isa{add}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   615
\rail@nextbar{5}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   616
\rail@term{\isa{del}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   617
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   618
\rail@nextbar{6}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   619
\rail@term{\isa{split}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   620
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   621
\rail@nextbar{7}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   622
\rail@term{\isa{add}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   623
\rail@nextbar{8}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   624
\rail@term{\isa{del}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   625
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   626
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   627
\rail@term{\isa{{\isaliteral{3A}{\isacharcolon}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   628
\rail@nont{\hyperlink{syntax.thmrefs}{\mbox{\isa{thmrefs}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   629
\rail@end
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   630
\end{railoutput}
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   631
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   632
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   633
  \begin{description}
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   634
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   635
  \item \hyperlink{method.simp}{\mbox{\isa{simp}}} invokes the Simplifier, after declaring
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   636
  additional rules according to the arguments given.  Note that the
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   637
  \isa{only} modifier first removes all other rewrite rules,
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   638
  congruences, and looper tactics (including splits), and then behaves
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   639
  like \isa{add}.
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   640
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   641
  \medskip The \isa{cong} modifiers add or delete Simplifier
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   642
  congruence rules (see also \cite{isabelle-ref}), the default is to
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   643
  add.
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   644
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   645
  \medskip The \isa{split} modifiers add or delete rules for the
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   646
  Splitter (see also \cite{isabelle-ref}), the default is to add.
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   647
  This works only if the Simplifier method has been properly setup to
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   648
  include the Splitter (all major object logics such HOL, HOLCF, FOL,
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   649
  ZF do this already).
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   650
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   651
  \item \hyperlink{method.simp-all}{\mbox{\isa{simp{\isaliteral{5F}{\isacharunderscore}}all}}} is similar to \hyperlink{method.simp}{\mbox{\isa{simp}}}, but acts on
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   652
  all goals (backwards from the last to the first one).
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   653
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   654
  \end{description}
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   655
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   656
  By default the Simplifier methods take local assumptions fully into
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   657
  account, using equational assumptions in the subsequent
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   658
  normalization process, or simplifying assumptions themselves (cf.\
30397
b6212ae21656 markup antiquotation options;
wenzelm
parents: 30269
diff changeset
   659
  \verb|asm_full_simp_tac| in \cite{isabelle-ref}).  In structured
b6212ae21656 markup antiquotation options;
wenzelm
parents: 30269
diff changeset
   660
  proofs this is usually quite well behaved in practice: just the
b6212ae21656 markup antiquotation options;
wenzelm
parents: 30269
diff changeset
   661
  local premises of the actual goal are involved, additional facts may
b6212ae21656 markup antiquotation options;
wenzelm
parents: 30269
diff changeset
   662
  be inserted via explicit forward-chaining (via \hyperlink{command.then}{\mbox{\isa{\isacommand{then}}}},
35613
9d3ff36ad4e1 eliminated Args.bang_facts (legacy feature);
wenzelm
parents: 30463
diff changeset
   663
  \hyperlink{command.from}{\mbox{\isa{\isacommand{from}}}}, \hyperlink{command.using}{\mbox{\isa{\isacommand{using}}}} etc.).
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   664
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   665
  Additional Simplifier options may be specified to tune the behavior
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   666
  further (mostly for unstructured scripts with many accidental local
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   667
  facts): ``\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}no{\isaliteral{5F}{\isacharunderscore}}asm{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}'' means assumptions are ignored
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   668
  completely (cf.\ \verb|simp_tac|), ``\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}no{\isaliteral{5F}{\isacharunderscore}}asm{\isaliteral{5F}{\isacharunderscore}}simp{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}'' means
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   669
  assumptions are used in the simplification of the conclusion but are
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   670
  not themselves simplified (cf.\ \verb|asm_simp_tac|), and ``\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}no{\isaliteral{5F}{\isacharunderscore}}asm{\isaliteral{5F}{\isacharunderscore}}use{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}'' means assumptions are simplified but are not used
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   671
  in the simplification of each other or the conclusion (cf.\ \verb|full_simp_tac|).  For compatibility reasons, there is also an option
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   672
  ``\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}asm{\isaliteral{5F}{\isacharunderscore}}lr{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}'', which means that an assumption is only used
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   673
  for simplifying assumptions which are to the right of it (cf.\ \verb|asm_lr_simp_tac|).
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   674
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   675
  The configuration option \isa{{\isaliteral{22}{\isachardoublequote}}depth{\isaliteral{5F}{\isacharunderscore}}limit{\isaliteral{22}{\isachardoublequote}}} limits the number of
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   676
  recursive invocations of the simplifier during conditional
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   677
  rewriting.
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   678
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   679
  \medskip The Splitter package is usually configured to work as part
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   680
  of the Simplifier.  The effect of repeatedly applying \verb|split_tac| can be simulated by ``\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}simp\ only{\isaliteral{3A}{\isacharcolon}}\ split{\isaliteral{3A}{\isacharcolon}}\ a\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ a\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}''.  There is also a separate \isa{split}
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   681
  method available for single-step case splitting.%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   682
\end{isamarkuptext}%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   683
\isamarkuptrue%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   684
%
27042
8fcf19f2168b updated generated file;
wenzelm
parents: 26907
diff changeset
   685
\isamarkupsubsection{Declaring rules%
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   686
}
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   687
\isamarkuptrue%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   688
%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   689
\begin{isamarkuptext}%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   690
\begin{matharray}{rcl}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   691
    \indexdef{}{command}{print\_simpset}\hypertarget{command.print-simpset}{\hyperlink{command.print-simpset}{\mbox{\isa{\isacommand{print{\isaliteral{5F}{\isacharunderscore}}simpset}}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}context\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}{\isaliteral{22}{\isachardoublequote}}} \\
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   692
    \indexdef{}{attribute}{simp}\hypertarget{attribute.simp}{\hyperlink{attribute.simp}{\mbox{\isa{simp}}}} & : & \isa{attribute} \\
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   693
    \indexdef{}{attribute}{cong}\hypertarget{attribute.cong}{\hyperlink{attribute.cong}{\mbox{\isa{cong}}}} & : & \isa{attribute} \\
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   694
    \indexdef{}{attribute}{split}\hypertarget{attribute.split}{\hyperlink{attribute.split}{\mbox{\isa{split}}}} & : & \isa{attribute} \\
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   695
  \end{matharray}
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   696
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   697
  \begin{railoutput}
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
   698
\rail@begin{3}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   699
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   700
\rail@term{\hyperlink{attribute.simp}{\mbox{\isa{simp}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   701
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   702
\rail@term{\hyperlink{attribute.cong}{\mbox{\isa{cong}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   703
\rail@nextbar{2}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   704
\rail@term{\hyperlink{attribute.split}{\mbox{\isa{split}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   705
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   706
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   707
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   708
\rail@term{\isa{add}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   709
\rail@nextbar{2}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   710
\rail@term{\isa{del}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   711
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   712
\rail@end
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   713
\end{railoutput}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   714
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   715
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   716
  \begin{description}
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   717
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   718
  \item \hyperlink{command.print-simpset}{\mbox{\isa{\isacommand{print{\isaliteral{5F}{\isacharunderscore}}simpset}}}} prints the collection of rules
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   719
  declared to the Simplifier, which is also known as ``simpset''
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   720
  internally \cite{isabelle-ref}.
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   721
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   722
  \item \hyperlink{attribute.simp}{\mbox{\isa{simp}}} declares simplification rules.
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   723
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   724
  \item \hyperlink{attribute.cong}{\mbox{\isa{cong}}} declares congruence rules.
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   725
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   726
  \item \hyperlink{attribute.split}{\mbox{\isa{split}}} declares case split rules.
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   727
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   728
  \end{description}%
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   729
\end{isamarkuptext}%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   730
\isamarkuptrue%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   731
%
27042
8fcf19f2168b updated generated file;
wenzelm
parents: 26907
diff changeset
   732
\isamarkupsubsection{Simplification procedures%
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   733
}
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   734
\isamarkuptrue%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   735
%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   736
\begin{isamarkuptext}%
42925
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   737
Simplification procedures are ML functions that produce proven
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   738
  rewrite rules on demand.  They are associated with higher-order
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   739
  patterns that approximate the left-hand sides of equations.  The
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   740
  Simplifier first matches the current redex against one of the LHS
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   741
  patterns; if this succeeds, the corresponding ML function is
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   742
  invoked, passing the Simplifier context and redex term.  Thus rules
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   743
  may be specifically fashioned for particular situations, resulting
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   744
  in a more powerful mechanism than term rewriting by a fixed set of
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   745
  rules.
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   746
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   747
  Any successful result needs to be a (possibly conditional) rewrite
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   748
  rule \isa{{\isaliteral{22}{\isachardoublequote}}t\ {\isaliteral{5C3C65717569763E}{\isasymequiv}}\ u{\isaliteral{22}{\isachardoublequote}}} that is applicable to the current redex.  The
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   749
  rule will be applied just as any ordinary rewrite rule.  It is
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   750
  expected to be already in \emph{internal form}, bypassing the
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   751
  automatic preprocessing of object-level equivalences.
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   752
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   753
  \begin{matharray}{rcl}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   754
    \indexdef{}{command}{simproc\_setup}\hypertarget{command.simproc-setup}{\hyperlink{command.simproc-setup}{\mbox{\isa{\isacommand{simproc{\isaliteral{5F}{\isacharunderscore}}setup}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}local{\isaliteral{5F}{\isacharunderscore}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ local{\isaliteral{5F}{\isacharunderscore}}theory{\isaliteral{22}{\isachardoublequote}}} \\
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   755
    simproc & : & \isa{attribute} \\
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   756
  \end{matharray}
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   757
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   758
  \begin{railoutput}
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
   759
\rail@begin{6}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   760
\rail@term{\hyperlink{command.simproc-setup}{\mbox{\isa{\isacommand{simproc{\isaliteral{5F}{\isacharunderscore}}setup}}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   761
\rail@nont{\hyperlink{syntax.name}{\mbox{\isa{name}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   762
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   763
\rail@plus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   764
\rail@nont{\hyperlink{syntax.term}{\mbox{\isa{term}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   765
\rail@nextplus{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   766
\rail@cterm{\isa{{\isaliteral{7C}{\isacharbar}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   767
\rail@endplus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   768
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   769
\rail@term{\isa{{\isaliteral{3D}{\isacharequal}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   770
\rail@nont{\hyperlink{syntax.text}{\mbox{\isa{text}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   771
\rail@cr{3}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   772
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   773
\rail@nextbar{4}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   774
\rail@term{\isa{\isakeyword{identifier}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   775
\rail@plus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   776
\rail@nont{\hyperlink{syntax.nameref}{\mbox{\isa{nameref}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   777
\rail@nextplus{5}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   778
\rail@endplus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   779
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   780
\rail@end
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
   781
\rail@begin{3}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   782
\rail@term{\hyperlink{attribute.simproc}{\mbox{\isa{simproc}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   783
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   784
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   785
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   786
\rail@term{\isa{add}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   787
\rail@term{\isa{{\isaliteral{3A}{\isacharcolon}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   788
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   789
\rail@nextbar{2}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   790
\rail@term{\isa{del}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   791
\rail@term{\isa{{\isaliteral{3A}{\isacharcolon}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   792
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   793
\rail@plus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   794
\rail@nont{\hyperlink{syntax.name}{\mbox{\isa{name}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   795
\rail@nextplus{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   796
\rail@endplus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   797
\rail@end
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   798
\end{railoutput}
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   799
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   800
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   801
  \begin{description}
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   802
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   803
  \item \hyperlink{command.simproc-setup}{\mbox{\isa{\isacommand{simproc{\isaliteral{5F}{\isacharunderscore}}setup}}}} defines a named simplification
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   804
  procedure that is invoked by the Simplifier whenever any of the
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   805
  given term patterns match the current redex.  The implementation,
30269
2fab27ea2a1f updated generated file -- changed since @{ML} now ignores source flag;
wenzelm
parents: 30172
diff changeset
   806
  which is provided as ML source text, needs to be of type \verb|morphism -> simpset -> cterm -> thm option|, where the \verb|cterm| represents the current redex \isa{r} and the result is
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   807
  supposed to be some proven rewrite rule \isa{{\isaliteral{22}{\isachardoublequote}}r\ {\isaliteral{5C3C65717569763E}{\isasymequiv}}\ r{\isaliteral{27}{\isacharprime}}{\isaliteral{22}{\isachardoublequote}}} (or a
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   808
  generalized version), or \verb|NONE| to indicate failure.  The
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   809
  \verb|simpset| argument holds the full context of the current
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   810
  Simplifier invocation, including the actual Isar proof context.  The
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   811
  \verb|morphism| informs about the difference of the original
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   812
  compilation context wrt.\ the one of the actual application later
26902
8db1e960d636 updated generated file;
wenzelm
parents: 26895
diff changeset
   813
  on.  The optional \hyperlink{keyword.identifier}{\mbox{\isa{\isakeyword{identifier}}}} specifies theorems that
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   814
  represent the logical content of the abstract theory of this
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   815
  simproc.
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   816
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   817
  Morphisms and identifiers are only relevant for simprocs that are
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   818
  defined within a local target context, e.g.\ in a locale.
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   819
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   820
  \item \isa{{\isaliteral{22}{\isachardoublequote}}simproc\ add{\isaliteral{3A}{\isacharcolon}}\ name{\isaliteral{22}{\isachardoublequote}}} and \isa{{\isaliteral{22}{\isachardoublequote}}simproc\ del{\isaliteral{3A}{\isacharcolon}}\ name{\isaliteral{22}{\isachardoublequote}}}
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   821
  add or delete named simprocs to the current Simplifier context.  The
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   822
  default is to add a simproc.  Note that \hyperlink{command.simproc-setup}{\mbox{\isa{\isacommand{simproc{\isaliteral{5F}{\isacharunderscore}}setup}}}}
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   823
  already adds the new simproc to the subsequent context.
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   824
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   825
  \end{description}%
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   826
\end{isamarkuptext}%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   827
\isamarkuptrue%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   828
%
42925
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   829
\isamarkupsubsubsection{Example%
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   830
}
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   831
\isamarkuptrue%
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   832
%
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   833
\begin{isamarkuptext}%
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   834
The following simplification procedure for \isa{{\isaliteral{28}{\isacharparenleft}}{\isaliteral{3F}{\isacharquery}}u{\isaliteral{5C3C436F6C6F6E3E}{\isasymColon}}unit{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{3D}{\isacharequal}}\ {\isaliteral{28}{\isacharparenleft}}{\isaliteral{29}{\isacharparenright}}} in HOL performs fine-grained
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   835
  control over rule application, beyond higher-order pattern matching.
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   836
  Declaring \isa{unit{\isaliteral{5F}{\isacharunderscore}}eq} as \hyperlink{attribute.simp}{\mbox{\isa{simp}}} directly would make
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   837
  the simplifier loop!  Note that a version of this simplification
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   838
  procedure is already active in Isabelle/HOL.%
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   839
\end{isamarkuptext}%
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   840
\isamarkuptrue%
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   841
%
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   842
\isadelimML
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   843
%
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   844
\endisadelimML
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   845
%
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   846
\isatagML
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   847
\isacommand{simproc{\isaliteral{5F}{\isacharunderscore}}setup}\isamarkupfalse%
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   848
\ unit\ {\isaliteral{28}{\isacharparenleft}}{\isaliteral{22}{\isachardoublequoteopen}}x{\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}unit{\isaliteral{22}{\isachardoublequoteclose}}{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{3D}{\isacharequal}}\ {\isaliteral{7B2A}{\isacharverbatimopen}}\isanewline
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   849
\ \ fn\ {\isaliteral{5F}{\isacharunderscore}}\ {\isaliteral{3D}{\isacharequal}}{\isaliteral{3E}{\isachargreater}}\ fn\ {\isaliteral{5F}{\isacharunderscore}}\ {\isaliteral{3D}{\isacharequal}}{\isaliteral{3E}{\isachargreater}}\ fn\ ct\ {\isaliteral{3D}{\isacharequal}}{\isaliteral{3E}{\isachargreater}}\isanewline
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   850
\ \ \ \ if\ HOLogic{\isaliteral{2E}{\isachardot}}is{\isaliteral{5F}{\isacharunderscore}}unit\ {\isaliteral{28}{\isacharparenleft}}term{\isaliteral{5F}{\isacharunderscore}}of\ ct{\isaliteral{29}{\isacharparenright}}\ then\ NONE\isanewline
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   851
\ \ \ \ else\ SOME\ {\isaliteral{28}{\isacharparenleft}}mk{\isaliteral{5F}{\isacharunderscore}}meta{\isaliteral{5F}{\isacharunderscore}}eq\ %
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   852
\isaantiq
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   853
thm\ unit{\isaliteral{5F}{\isacharunderscore}}eq{}%
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   854
\endisaantiq
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   855
{\isaliteral{29}{\isacharparenright}}\isanewline
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   856
{\isaliteral{2A7D}{\isacharverbatimclose}}%
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   857
\endisatagML
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   858
{\isafoldML}%
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   859
%
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   860
\isadelimML
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   861
%
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   862
\endisadelimML
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   863
%
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   864
\begin{isamarkuptext}%
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   865
Since the Simplifier applies simplification procedures
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   866
  frequently, it is important to make the failure check in ML
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   867
  reasonably fast.%
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   868
\end{isamarkuptext}%
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   869
\isamarkuptrue%
c6c4f997ad87 updated and re-unified material on simprocs;
wenzelm
parents: 42705
diff changeset
   870
%
27042
8fcf19f2168b updated generated file;
wenzelm
parents: 26907
diff changeset
   871
\isamarkupsubsection{Forward simplification%
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   872
}
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   873
\isamarkuptrue%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   874
%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   875
\begin{isamarkuptext}%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   876
\begin{matharray}{rcl}
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   877
    \indexdef{}{attribute}{simplified}\hypertarget{attribute.simplified}{\hyperlink{attribute.simplified}{\mbox{\isa{simplified}}}} & : & \isa{attribute} \\
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   878
  \end{matharray}
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   879
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   880
  \begin{railoutput}
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
   881
\rail@begin{2}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   882
\rail@term{\hyperlink{attribute.simplified}{\mbox{\isa{simplified}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   883
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   884
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   885
\rail@nont{\isa{opt}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   886
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   887
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   888
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   889
\rail@nont{\hyperlink{syntax.thmrefs}{\mbox{\isa{thmrefs}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   890
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   891
\rail@end
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   892
\rail@begin{3}{\isa{opt}}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   893
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   894
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   895
\rail@term{\isa{no{\isaliteral{5F}{\isacharunderscore}}asm}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   896
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   897
\rail@term{\isa{no{\isaliteral{5F}{\isacharunderscore}}asm{\isaliteral{5F}{\isacharunderscore}}simp}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   898
\rail@nextbar{2}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   899
\rail@term{\isa{no{\isaliteral{5F}{\isacharunderscore}}asm{\isaliteral{5F}{\isacharunderscore}}use}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   900
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   901
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   902
\rail@end
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
   903
\end{railoutput}
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   904
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   905
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   906
  \begin{description}
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   907
  
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   908
  \item \hyperlink{attribute.simplified}{\mbox{\isa{simplified}}}~\isa{{\isaliteral{22}{\isachardoublequote}}a\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ a\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{22}{\isachardoublequote}}} causes a theorem to
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   909
  be simplified, either by exactly the specified rules \isa{{\isaliteral{22}{\isachardoublequote}}a\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{2C}{\isacharcomma}}\ a\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{22}{\isachardoublequote}}}, or the implicit Simplifier context if no arguments are given.
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   910
  The result is fully simplified by default, including assumptions and
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
   911
  conclusion; the options \isa{no{\isaliteral{5F}{\isacharunderscore}}asm} etc.\ tune the Simplifier in
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   912
  the same way as the for the \isa{simp} method.
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   913
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   914
  Note that forward simplification restricts the simplifier to its
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   915
  most basic operation of term rewriting; solver and looper tactics
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   916
  \cite{isabelle-ref} are \emph{not} involved here.  The \isa{simplified} attribute should be only rarely required under normal
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   917
  circumstances.
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   918
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
   919
  \end{description}%
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   920
\end{isamarkuptext}%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   921
\isamarkuptrue%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   922
%
27042
8fcf19f2168b updated generated file;
wenzelm
parents: 26907
diff changeset
   923
\isamarkupsection{The Classical Reasoner \label{sec:classical}%
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   924
}
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   925
\isamarkuptrue%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
   926
%
42930
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
   927
\isamarkupsubsection{Basic concepts%
42927
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   928
}
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   929
\isamarkuptrue%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   930
%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   931
\begin{isamarkuptext}%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   932
Although Isabelle is generic, many users will be working in
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   933
  some extension of classical first-order logic.  Isabelle/ZF is built
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   934
  upon theory FOL, while Isabelle/HOL conceptually contains
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   935
  first-order logic as a fragment.  Theorem-proving in predicate logic
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   936
  is undecidable, but many automated strategies have been developed to
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   937
  assist in this task.
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   938
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   939
  Isabelle's classical reasoner is a generic package that accepts
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   940
  certain information about a logic and delivers a suite of automatic
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   941
  proof tools, based on rules that are classified and declared in the
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   942
  context.  These proof procedures are slow and simplistic compared
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   943
  with high-end automated theorem provers, but they can save
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   944
  considerable time and effort in practice.  They can prove theorems
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   945
  such as Pelletier's \cite{pelletier86} problems 40 and 41 in a few
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   946
  milliseconds (including full proof reconstruction):%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   947
\end{isamarkuptext}%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   948
\isamarkuptrue%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   949
\isacommand{lemma}\isamarkupfalse%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   950
\ {\isaliteral{22}{\isachardoublequoteopen}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6578697374733E}{\isasymexists}}y{\isaliteral{2E}{\isachardot}}\ {\isaliteral{5C3C666F72616C6C3E}{\isasymforall}}x{\isaliteral{2E}{\isachardot}}\ F\ x\ y\ {\isaliteral{5C3C6C6F6E676C65667472696768746172726F773E}{\isasymlongleftrightarrow}}\ F\ x\ x{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}\ {\isaliteral{5C3C6E6F743E}{\isasymnot}}\ {\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C666F72616C6C3E}{\isasymforall}}x{\isaliteral{2E}{\isachardot}}\ {\isaliteral{5C3C6578697374733E}{\isasymexists}}y{\isaliteral{2E}{\isachardot}}\ {\isaliteral{5C3C666F72616C6C3E}{\isasymforall}}z{\isaliteral{2E}{\isachardot}}\ F\ z\ y\ {\isaliteral{5C3C6C6F6E676C65667472696768746172726F773E}{\isasymlongleftrightarrow}}\ {\isaliteral{5C3C6E6F743E}{\isasymnot}}\ F\ z\ x{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequoteclose}}\isanewline
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   951
%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   952
\isadelimproof
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   953
\ \ %
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   954
\endisadelimproof
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   955
%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   956
\isatagproof
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   957
\isacommand{by}\isamarkupfalse%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   958
\ blast%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   959
\endisatagproof
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   960
{\isafoldproof}%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   961
%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   962
\isadelimproof
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   963
\isanewline
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   964
%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   965
\endisadelimproof
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   966
\isanewline
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   967
\isacommand{lemma}\isamarkupfalse%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   968
\ {\isaliteral{22}{\isachardoublequoteopen}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C666F72616C6C3E}{\isasymforall}}z{\isaliteral{2E}{\isachardot}}\ {\isaliteral{5C3C6578697374733E}{\isasymexists}}y{\isaliteral{2E}{\isachardot}}\ {\isaliteral{5C3C666F72616C6C3E}{\isasymforall}}x{\isaliteral{2E}{\isachardot}}\ f\ x\ y\ {\isaliteral{5C3C6C6F6E676C65667472696768746172726F773E}{\isasymlongleftrightarrow}}\ f\ x\ z\ {\isaliteral{5C3C616E643E}{\isasymand}}\ {\isaliteral{5C3C6E6F743E}{\isasymnot}}\ f\ x\ x{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}\ {\isaliteral{5C3C6E6F743E}{\isasymnot}}\ {\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6578697374733E}{\isasymexists}}z{\isaliteral{2E}{\isachardot}}\ {\isaliteral{5C3C666F72616C6C3E}{\isasymforall}}x{\isaliteral{2E}{\isachardot}}\ f\ x\ z{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequoteclose}}\isanewline
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   969
%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   970
\isadelimproof
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   971
\ \ %
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   972
\endisadelimproof
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   973
%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   974
\isatagproof
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   975
\isacommand{by}\isamarkupfalse%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   976
\ blast%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   977
\endisatagproof
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   978
{\isafoldproof}%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   979
%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   980
\isadelimproof
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   981
%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   982
\endisadelimproof
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   983
%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   984
\begin{isamarkuptext}%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   985
The proof tools are generic.  They are not restricted to
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   986
  first-order logic, and have been heavily used in the development of
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   987
  the Isabelle/HOL library and applications.  The tactics can be
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   988
  traced, and their components can be called directly; in this manner,
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   989
  any proof can be viewed interactively.%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   990
\end{isamarkuptext}%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   991
\isamarkuptrue%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   992
%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   993
\isamarkupsubsubsection{The sequent calculus%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   994
}
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   995
\isamarkuptrue%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   996
%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   997
\begin{isamarkuptext}%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   998
Isabelle supports natural deduction, which is easy to use for
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
   999
  interactive proof.  But natural deduction does not easily lend
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1000
  itself to automation, and has a bias towards intuitionism.  For
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1001
  certain proofs in classical logic, it can not be called natural.
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1002
  The \emph{sequent calculus}, a generalization of natural deduction,
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1003
  is easier to automate.
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1004
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1005
  A \textbf{sequent} has the form \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ {\isaliteral{5C3C44656C74613E}{\isasymDelta}}{\isaliteral{22}{\isachardoublequote}}}, where \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}{\isaliteral{22}{\isachardoublequote}}}
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1006
  and \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C44656C74613E}{\isasymDelta}}{\isaliteral{22}{\isachardoublequote}}} are sets of formulae.\footnote{For first-order
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1007
  logic, sequents can equivalently be made from lists or multisets of
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1008
  formulae.} The sequent \isa{{\isaliteral{22}{\isachardoublequote}}P\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{2C}{\isacharcomma}}\ P\isaliteral{5C3C5E7375623E}{}\isactrlsub m\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ Q\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{2C}{\isacharcomma}}\ Q\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{22}{\isachardoublequote}}} is
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1009
  \textbf{valid} if \isa{{\isaliteral{22}{\isachardoublequote}}P\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C616E643E}{\isasymand}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{5C3C616E643E}{\isasymand}}\ P\isaliteral{5C3C5E7375623E}{}\isactrlsub m{\isaliteral{22}{\isachardoublequote}}} implies \isa{{\isaliteral{22}{\isachardoublequote}}Q\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C6F723E}{\isasymor}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{5C3C6F723E}{\isasymor}}\ Q\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{22}{\isachardoublequote}}}.  Thus \isa{{\isaliteral{22}{\isachardoublequote}}P\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{2C}{\isacharcomma}}\ P\isaliteral{5C3C5E7375623E}{}\isactrlsub m{\isaliteral{22}{\isachardoublequote}}} represent assumptions, each of which
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1010
  is true, while \isa{{\isaliteral{22}{\isachardoublequote}}Q\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{2C}{\isacharcomma}}\ Q\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{22}{\isachardoublequote}}} represent alternative goals.  A
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1011
  sequent is \textbf{basic} if its left and right sides have a common
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1012
  formula, as in \isa{{\isaliteral{22}{\isachardoublequote}}P{\isaliteral{2C}{\isacharcomma}}\ Q\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ Q{\isaliteral{2C}{\isacharcomma}}\ R{\isaliteral{22}{\isachardoublequote}}}; basic sequents are trivially
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1013
  valid.
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1014
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1015
  Sequent rules are classified as \textbf{right} or \textbf{left},
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1016
  indicating which side of the \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}{\isaliteral{22}{\isachardoublequote}}} symbol they operate on.
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1017
  Rules that operate on the right side are analogous to natural
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1018
  deduction's introduction rules, and left rules are analogous to
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1019
  elimination rules.  The sequent calculus analogue of \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}I{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1020
  is the rule
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1021
  \[
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1022
  \infer[\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}R{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}]{\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ {\isaliteral{5C3C44656C74613E}{\isasymDelta}}{\isaliteral{2C}{\isacharcomma}}\ P\ {\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}\ Q{\isaliteral{22}{\isachardoublequote}}}}{\isa{{\isaliteral{22}{\isachardoublequote}}P{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ {\isaliteral{5C3C44656C74613E}{\isasymDelta}}{\isaliteral{2C}{\isacharcomma}}\ Q{\isaliteral{22}{\isachardoublequote}}}}
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1023
  \]
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1024
  Applying the rule backwards, this breaks down some implication on
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1025
  the right side of a sequent; \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}{\isaliteral{22}{\isachardoublequote}}} and \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C44656C74613E}{\isasymDelta}}{\isaliteral{22}{\isachardoublequote}}} stand for
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1026
  the sets of formulae that are unaffected by the inference.  The
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1027
  analogue of the pair \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6F723E}{\isasymor}}I{\isadigit{1}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} and \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6F723E}{\isasymor}}I{\isadigit{2}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} is the
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1028
  single rule
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1029
  \[
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1030
  \infer[\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6F723E}{\isasymor}}R{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}]{\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ {\isaliteral{5C3C44656C74613E}{\isasymDelta}}{\isaliteral{2C}{\isacharcomma}}\ P\ {\isaliteral{5C3C6F723E}{\isasymor}}\ Q{\isaliteral{22}{\isachardoublequote}}}}{\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ {\isaliteral{5C3C44656C74613E}{\isasymDelta}}{\isaliteral{2C}{\isacharcomma}}\ P{\isaliteral{2C}{\isacharcomma}}\ Q{\isaliteral{22}{\isachardoublequote}}}}
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1031
  \]
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1032
  This breaks down some disjunction on the right side, replacing it by
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1033
  both disjuncts.  Thus, the sequent calculus is a kind of
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1034
  multiple-conclusion logic.
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1035
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1036
  To illustrate the use of multiple formulae on the right, let us
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1037
  prove the classical theorem \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}P\ {\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}\ Q{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C6F723E}{\isasymor}}\ {\isaliteral{28}{\isacharparenleft}}Q\ {\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}\ P{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}.  Working
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1038
  backwards, we reduce this formula to a basic sequent:
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1039
  \[
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1040
  \infer[\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6F723E}{\isasymor}}R{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}]{\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ {\isaliteral{28}{\isacharparenleft}}P\ {\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}\ Q{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C6F723E}{\isasymor}}\ {\isaliteral{28}{\isacharparenleft}}Q\ {\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}\ P{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}}
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1041
    {\infer[\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}R{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}]{\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ {\isaliteral{28}{\isacharparenleft}}P\ {\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}\ Q{\isaliteral{29}{\isacharparenright}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{28}{\isacharparenleft}}Q\ {\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}\ P{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}}
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1042
      {\infer[\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}R{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}]{\isa{{\isaliteral{22}{\isachardoublequote}}P\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ Q{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{28}{\isacharparenleft}}Q\ {\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}\ P{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}}
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1043
        {\isa{{\isaliteral{22}{\isachardoublequote}}P{\isaliteral{2C}{\isacharcomma}}\ Q\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ Q{\isaliteral{2C}{\isacharcomma}}\ P{\isaliteral{22}{\isachardoublequote}}}}}}
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1044
  \]
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1045
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1046
  This example is typical of the sequent calculus: start with the
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1047
  desired theorem and apply rules backwards in a fairly arbitrary
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1048
  manner.  This yields a surprisingly effective proof procedure.
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1049
  Quantifiers add only few complications, since Isabelle handles
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1050
  parameters and schematic variables.  See \cite[Chapter
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1051
  10]{paulson-ml2} for further discussion.%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1052
\end{isamarkuptext}%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1053
\isamarkuptrue%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1054
%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1055
\isamarkupsubsubsection{Simulating sequents by natural deduction%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1056
}
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1057
\isamarkuptrue%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1058
%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1059
\begin{isamarkuptext}%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1060
Isabelle can represent sequents directly, as in the
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1061
  object-logic LK.  But natural deduction is easier to work with, and
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1062
  most object-logics employ it.  Fortunately, we can simulate the
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1063
  sequent \isa{{\isaliteral{22}{\isachardoublequote}}P\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{2C}{\isacharcomma}}\ P\isaliteral{5C3C5E7375623E}{}\isactrlsub m\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ Q\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{2C}{\isacharcomma}}\ Q\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{22}{\isachardoublequote}}} by the Isabelle formula
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1064
  \isa{{\isaliteral{22}{\isachardoublequote}}P\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ P\isaliteral{5C3C5E7375623E}{}\isactrlsub m\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{5C3C6E6F743E}{\isasymnot}}\ Q\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{2}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{2E}{\isachardot}}{\isaliteral{2E}{\isachardot}}{\isaliteral{2E}{\isachardot}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{5C3C6E6F743E}{\isasymnot}}\ Q\isaliteral{5C3C5E7375623E}{}\isactrlsub n\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ Q\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{22}{\isachardoublequote}}} where the order of
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1065
  the assumptions and the choice of \isa{{\isaliteral{22}{\isachardoublequote}}Q\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{22}{\isachardoublequote}}} are arbitrary.
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1066
  Elim-resolution plays a key role in simulating sequent proofs.
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1067
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1068
  We can easily handle reasoning on the left.  Elim-resolution with
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1069
  the rules \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6F723E}{\isasymor}}E{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}, \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C626F74746F6D3E}{\isasymbottom}}E{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} and \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6578697374733E}{\isasymexists}}E{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} achieves
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1070
  a similar effect as the corresponding sequent rules.  For the other
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1071
  connectives, we use sequent-style elimination rules instead of
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1072
  destruction rules such as \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C616E643E}{\isasymand}}E{\isadigit{1}}{\isaliteral{2C}{\isacharcomma}}\ {\isadigit{2}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} and \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C666F72616C6C3E}{\isasymforall}}E{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}.
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1073
  But note that the rule \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6E6F743E}{\isasymnot}}L{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} has no effect under our
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1074
  representation of sequents!
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1075
  \[
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1076
  \infer[\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6E6F743E}{\isasymnot}}L{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}]{\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6E6F743E}{\isasymnot}}\ P{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ {\isaliteral{5C3C44656C74613E}{\isasymDelta}}{\isaliteral{22}{\isachardoublequote}}}}{\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ {\isaliteral{5C3C44656C74613E}{\isasymDelta}}{\isaliteral{2C}{\isacharcomma}}\ P{\isaliteral{22}{\isachardoublequote}}}}
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1077
  \]
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1078
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1079
  What about reasoning on the right?  Introduction rules can only
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1080
  affect the formula in the conclusion, namely \isa{{\isaliteral{22}{\isachardoublequote}}Q\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{22}{\isachardoublequote}}}.  The
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1081
  other right-side formulae are represented as negated assumptions,
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1082
  \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6E6F743E}{\isasymnot}}\ Q\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{2}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C6E6F743E}{\isasymnot}}\ Q\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{22}{\isachardoublequote}}}.  In order to operate on one of these, it
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1083
  must first be exchanged with \isa{{\isaliteral{22}{\isachardoublequote}}Q\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{22}{\isachardoublequote}}}.  Elim-resolution with the
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1084
  \isa{swap} rule has this effect: \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6E6F743E}{\isasymnot}}\ P\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6E6F743E}{\isasymnot}}\ R\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ P{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ R{\isaliteral{22}{\isachardoublequote}}}
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1085
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1086
  To ensure that swaps occur only when necessary, each introduction
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1087
  rule is converted into a swapped form: it is resolved with the
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1088
  second premise of \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}swap{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}.  The swapped form of \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C616E643E}{\isasymand}}I{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}, which might be called \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6E6F743E}{\isasymnot}}{\isaliteral{5C3C616E643E}{\isasymand}}E{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}, is
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1089
  \begin{isabelle}%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1090
{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6E6F743E}{\isasymnot}}\ {\isaliteral{28}{\isacharparenleft}}P\ {\isaliteral{5C3C616E643E}{\isasymand}}\ Q{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6E6F743E}{\isasymnot}}\ R\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ P{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6E6F743E}{\isasymnot}}\ R\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ Q{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ R{\isaliteral{22}{\isachardoublequote}}%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1091
\end{isabelle}
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1092
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1093
  Similarly, the swapped form of \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}I{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} is
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1094
  \begin{isabelle}%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1095
{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6E6F743E}{\isasymnot}}\ {\isaliteral{28}{\isacharparenleft}}P\ {\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}\ Q{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6E6F743E}{\isasymnot}}\ R\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ P\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ Q{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ R{\isaliteral{22}{\isachardoublequote}}%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1096
\end{isabelle}
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1097
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1098
  Swapped introduction rules are applied using elim-resolution, which
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1099
  deletes the negated formula.  Our representation of sequents also
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1100
  requires the use of ordinary introduction rules.  If we had no
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1101
  regard for readability of intermediate goal states, we could treat
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1102
  the right side more uniformly by representing sequents as \begin{isabelle}%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1103
{\isaliteral{22}{\isachardoublequote}}P\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ P\isaliteral{5C3C5E7375623E}{}\isactrlsub m\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{5C3C6E6F743E}{\isasymnot}}\ Q\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{5C3C6E6F743E}{\isasymnot}}\ Q\isaliteral{5C3C5E7375623E}{}\isactrlsub n\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{5C3C626F74746F6D3E}{\isasymbottom}}{\isaliteral{22}{\isachardoublequote}}%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1104
\end{isabelle}%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1105
\end{isamarkuptext}%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1106
\isamarkuptrue%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1107
%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1108
\isamarkupsubsubsection{Extra rules for the sequent calculus%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1109
}
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1110
\isamarkuptrue%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1111
%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1112
\begin{isamarkuptext}%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1113
As mentioned, destruction rules such as \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C616E643E}{\isasymand}}E{\isadigit{1}}{\isaliteral{2C}{\isacharcomma}}\ {\isadigit{2}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} and
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1114
  \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C666F72616C6C3E}{\isasymforall}}E{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} must be replaced by sequent-style elimination rules.
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1115
  In addition, we need rules to embody the classical equivalence
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1116
  between \isa{{\isaliteral{22}{\isachardoublequote}}P\ {\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}\ Q{\isaliteral{22}{\isachardoublequote}}} and \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6E6F743E}{\isasymnot}}\ P\ {\isaliteral{5C3C6F723E}{\isasymor}}\ Q{\isaliteral{22}{\isachardoublequote}}}.  The introduction
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1117
  rules \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6F723E}{\isasymor}}I{\isadigit{1}}{\isaliteral{2C}{\isacharcomma}}\ {\isadigit{2}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} are replaced by a rule that simulates
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1118
  \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6F723E}{\isasymor}}R{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}: \begin{isabelle}%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1119
{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6E6F743E}{\isasymnot}}\ Q\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ P{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ P\ {\isaliteral{5C3C6F723E}{\isasymor}}\ Q{\isaliteral{22}{\isachardoublequote}}%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1120
\end{isabelle}
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1121
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1122
  The destruction rule \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}E{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} is replaced by \begin{isabelle}%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1123
{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}P\ {\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}\ Q{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6E6F743E}{\isasymnot}}\ P\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ R{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{28}{\isacharparenleft}}Q\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ R{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ R{\isaliteral{22}{\isachardoublequote}}%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1124
\end{isabelle}
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1125
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1126
  Quantifier replication also requires special rules.  In classical
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1127
  logic, \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6578697374733E}{\isasymexists}}x{\isaliteral{2E}{\isachardot}}\ P\ x{\isaliteral{22}{\isachardoublequote}}} is equivalent to \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6E6F743E}{\isasymnot}}\ {\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C666F72616C6C3E}{\isasymforall}}x{\isaliteral{2E}{\isachardot}}\ {\isaliteral{5C3C6E6F743E}{\isasymnot}}\ P\ x{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}};
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1128
  the rules \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6578697374733E}{\isasymexists}}R{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} and \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C666F72616C6C3E}{\isasymforall}}L{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} are dual:
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1129
  \[
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1130
  \infer[\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6578697374733E}{\isasymexists}}R{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}]{\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ {\isaliteral{5C3C44656C74613E}{\isasymDelta}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C6578697374733E}{\isasymexists}}x{\isaliteral{2E}{\isachardot}}\ P\ x{\isaliteral{22}{\isachardoublequote}}}}{\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ {\isaliteral{5C3C44656C74613E}{\isasymDelta}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C6578697374733E}{\isasymexists}}x{\isaliteral{2E}{\isachardot}}\ P\ x{\isaliteral{2C}{\isacharcomma}}\ P\ t{\isaliteral{22}{\isachardoublequote}}}}
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1131
  \qquad
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1132
  \infer[\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C666F72616C6C3E}{\isasymforall}}L{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}]{\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C666F72616C6C3E}{\isasymforall}}x{\isaliteral{2E}{\isachardot}}\ P\ x{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ {\isaliteral{5C3C44656C74613E}{\isasymDelta}}{\isaliteral{22}{\isachardoublequote}}}}{\isa{{\isaliteral{22}{\isachardoublequote}}P\ t{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C666F72616C6C3E}{\isasymforall}}x{\isaliteral{2E}{\isachardot}}\ P\ x{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ {\isaliteral{5C3C44656C74613E}{\isasymDelta}}{\isaliteral{22}{\isachardoublequote}}}}
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1133
  \]
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1134
  Thus both kinds of quantifier may be replicated.  Theorems requiring
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1135
  multiple uses of a universal formula are easy to invent; consider
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1136
  \begin{isabelle}%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1137
{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C666F72616C6C3E}{\isasymforall}}x{\isaliteral{2E}{\isachardot}}\ P\ x\ {\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}\ P\ {\isaliteral{28}{\isacharparenleft}}f\ x{\isaliteral{29}{\isacharparenright}}{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C616E643E}{\isasymand}}\ P\ a\ {\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}\ P\ {\isaliteral{28}{\isacharparenleft}}f\isaliteral{5C3C5E7375703E}{}\isactrlsup n\ a{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1138
\end{isabelle} for any
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1139
  \isa{{\isaliteral{22}{\isachardoublequote}}n\ {\isaliteral{3E}{\isachargreater}}\ {\isadigit{1}}{\isaliteral{22}{\isachardoublequote}}}.  Natural examples of the multiple use of an
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1140
  existential formula are rare; a standard one is \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6578697374733E}{\isasymexists}}x{\isaliteral{2E}{\isachardot}}\ {\isaliteral{5C3C666F72616C6C3E}{\isasymforall}}y{\isaliteral{2E}{\isachardot}}\ P\ x\ {\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}\ P\ y{\isaliteral{22}{\isachardoublequote}}}.
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1141
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1142
  Forgoing quantifier replication loses completeness, but gains
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1143
  decidability, since the search space becomes finite.  Many useful
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1144
  theorems can be proved without replication, and the search generally
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1145
  delivers its verdict in a reasonable time.  To adopt this approach,
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1146
  represent the sequent rules \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6578697374733E}{\isasymexists}}R{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}, \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6578697374733E}{\isasymexists}}L{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} and
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1147
  \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C666F72616C6C3E}{\isasymforall}}R{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} by \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6578697374733E}{\isasymexists}}I{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}, \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6578697374733E}{\isasymexists}}E{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} and \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C666F72616C6C3E}{\isasymforall}}I{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}},
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1148
  respectively, and put \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C666F72616C6C3E}{\isasymforall}}E{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} into elimination form: \begin{isabelle}%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1149
{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C666F72616C6C3E}{\isasymforall}}x{\isaliteral{2E}{\isachardot}}\ P\ x\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{28}{\isacharparenleft}}P\ t\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ Q{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ Q{\isaliteral{22}{\isachardoublequote}}%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1150
\end{isabelle}
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1151
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1152
  Elim-resolution with this rule will delete the universal formula
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1153
  after a single use.  To replicate universal quantifiers, replace the
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1154
  rule by \begin{isabelle}%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1155
{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C666F72616C6C3E}{\isasymforall}}x{\isaliteral{2E}{\isachardot}}\ P\ x\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{28}{\isacharparenleft}}P\ t\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{5C3C666F72616C6C3E}{\isasymforall}}x{\isaliteral{2E}{\isachardot}}\ P\ x\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ Q{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ Q{\isaliteral{22}{\isachardoublequote}}%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1156
\end{isabelle}
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1157
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1158
  To replicate existential quantifiers, replace \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6578697374733E}{\isasymexists}}I{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} by
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1159
  \begin{isabelle}%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1160
{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6E6F743E}{\isasymnot}}\ {\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6578697374733E}{\isasymexists}}x{\isaliteral{2E}{\isachardot}}\ P\ x{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ P\ t{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{5C3C6578697374733E}{\isasymexists}}x{\isaliteral{2E}{\isachardot}}\ P\ x{\isaliteral{22}{\isachardoublequote}}%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1161
\end{isabelle}
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1162
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1163
  All introduction rules mentioned above are also useful in swapped
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1164
  form.
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1165
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1166
  Replication makes the search space infinite; we must apply the rules
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1167
  with care.  The classical reasoner distinguishes between safe and
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1168
  unsafe rules, applying the latter only when there is no alternative.
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1169
  Depth-first search may well go down a blind alley; best-first search
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1170
  is better behaved in an infinite search space.  However, quantifier
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1171
  replication is too expensive to prove any but the simplest theorems.%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1172
\end{isamarkuptext}%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1173
\isamarkuptrue%
c40adab7568e moved/updated introduction to Classical Reasoner;
wenzelm
parents: 42925
diff changeset
  1174
%
42928
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1175
\isamarkupsubsection{Rule declarations%
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1176
}
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1177
\isamarkuptrue%
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1178
%
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1179
\begin{isamarkuptext}%
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1180
The proof tools of the Classical Reasoner depend on
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1181
  collections of rules declared in the context, which are classified
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1182
  as introduction, elimination or destruction and as \emph{safe} or
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1183
  \emph{unsafe}.  In general, safe rules can be attempted blindly,
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1184
  while unsafe rules must be used with care.  A safe rule must never
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1185
  reduce a provable goal to an unprovable set of subgoals.
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1186
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1187
  The rule \isa{{\isaliteral{22}{\isachardoublequote}}P\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ P\ {\isaliteral{5C3C6F723E}{\isasymor}}\ Q{\isaliteral{22}{\isachardoublequote}}} is unsafe because it reduces \isa{{\isaliteral{22}{\isachardoublequote}}P\ {\isaliteral{5C3C6F723E}{\isasymor}}\ Q{\isaliteral{22}{\isachardoublequote}}} to \isa{{\isaliteral{22}{\isachardoublequote}}P{\isaliteral{22}{\isachardoublequote}}}, which might turn out as premature choice of an
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1188
  unprovable subgoal.  Any rule is unsafe whose premises contain new
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1189
  unknowns.  The elimination rule \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C666F72616C6C3E}{\isasymforall}}x{\isaliteral{2E}{\isachardot}}\ P\ x\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{28}{\isacharparenleft}}P\ t\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ Q{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ Q{\isaliteral{22}{\isachardoublequote}}} is
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1190
  unsafe, since it is applied via elim-resolution, which discards the
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1191
  assumption \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C666F72616C6C3E}{\isasymforall}}x{\isaliteral{2E}{\isachardot}}\ P\ x{\isaliteral{22}{\isachardoublequote}}} and replaces it by the weaker
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1192
  assumption \isa{{\isaliteral{22}{\isachardoublequote}}P\ t{\isaliteral{22}{\isachardoublequote}}}.  The rule \isa{{\isaliteral{22}{\isachardoublequote}}P\ t\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{5C3C6578697374733E}{\isasymexists}}x{\isaliteral{2E}{\isachardot}}\ P\ x{\isaliteral{22}{\isachardoublequote}}} is
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1193
  unsafe for similar reasons.  The quantifier duplication rule \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C666F72616C6C3E}{\isasymforall}}x{\isaliteral{2E}{\isachardot}}\ P\ x\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{28}{\isacharparenleft}}P\ t\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{5C3C666F72616C6C3E}{\isasymforall}}x{\isaliteral{2E}{\isachardot}}\ P\ x\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ Q{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ Q{\isaliteral{22}{\isachardoublequote}}} is unsafe in a different sense:
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1194
  since it keeps the assumption \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C666F72616C6C3E}{\isasymforall}}x{\isaliteral{2E}{\isachardot}}\ P\ x{\isaliteral{22}{\isachardoublequote}}}, it is prone to
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1195
  looping.  In classical first-order logic, all rules are safe except
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1196
  those mentioned above.
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1197
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1198
  The safe~/ unsafe distinction is vague, and may be regarded merely
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1199
  as a way of giving some rules priority over others.  One could argue
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1200
  that \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6F723E}{\isasymor}}E{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} is unsafe, because repeated application of it
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1201
  could generate exponentially many subgoals.  Induction rules are
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1202
  unsafe because inductive proofs are difficult to set up
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1203
  automatically.  Any inference is unsafe that instantiates an unknown
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1204
  in the proof state --- thus matching must be used, rather than
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1205
  unification.  Even proof by assumption is unsafe if it instantiates
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1206
  unknowns shared with other subgoals.
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1207
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1208
  \begin{matharray}{rcl}
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1209
    \indexdef{}{command}{print\_claset}\hypertarget{command.print-claset}{\hyperlink{command.print-claset}{\mbox{\isa{\isacommand{print{\isaliteral{5F}{\isacharunderscore}}claset}}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}context\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}{\isaliteral{22}{\isachardoublequote}}} \\
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1210
    \indexdef{}{attribute}{intro}\hypertarget{attribute.intro}{\hyperlink{attribute.intro}{\mbox{\isa{intro}}}} & : & \isa{attribute} \\
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1211
    \indexdef{}{attribute}{elim}\hypertarget{attribute.elim}{\hyperlink{attribute.elim}{\mbox{\isa{elim}}}} & : & \isa{attribute} \\
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1212
    \indexdef{}{attribute}{dest}\hypertarget{attribute.dest}{\hyperlink{attribute.dest}{\mbox{\isa{dest}}}} & : & \isa{attribute} \\
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1213
    \indexdef{}{attribute}{rule}\hypertarget{attribute.rule}{\hyperlink{attribute.rule}{\mbox{\isa{rule}}}} & : & \isa{attribute} \\
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1214
    \indexdef{}{attribute}{iff}\hypertarget{attribute.iff}{\hyperlink{attribute.iff}{\mbox{\isa{iff}}}} & : & \isa{attribute} \\
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1215
    \indexdef{}{attribute}{swapped}\hypertarget{attribute.swapped}{\hyperlink{attribute.swapped}{\mbox{\isa{swapped}}}} & : & \isa{attribute} \\
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1216
  \end{matharray}
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1217
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1218
  \begin{railoutput}
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1219
\rail@begin{3}{}
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1220
\rail@bar
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1221
\rail@term{\hyperlink{attribute.intro}{\mbox{\isa{intro}}}}[]
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1222
\rail@nextbar{1}
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1223
\rail@term{\hyperlink{attribute.elim}{\mbox{\isa{elim}}}}[]
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1224
\rail@nextbar{2}
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1225
\rail@term{\hyperlink{attribute.dest}{\mbox{\isa{dest}}}}[]
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1226
\rail@endbar
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1227
\rail@bar
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1228
\rail@term{\isa{{\isaliteral{21}{\isacharbang}}}}[]
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1229
\rail@nextbar{1}
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1230
\rail@nextbar{2}
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1231
\rail@term{\isa{{\isaliteral{3F}{\isacharquery}}}}[]
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1232
\rail@endbar
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1233
\rail@bar
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1234
\rail@nextbar{1}
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1235
\rail@nont{\hyperlink{syntax.nat}{\mbox{\isa{nat}}}}[]
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1236
\rail@endbar
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1237
\rail@end
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1238
\rail@begin{1}{}
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1239
\rail@term{\hyperlink{attribute.rule}{\mbox{\isa{rule}}}}[]
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1240
\rail@term{\isa{del}}[]
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1241
\rail@end
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1242
\rail@begin{3}{}
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1243
\rail@term{\hyperlink{attribute.iff}{\mbox{\isa{iff}}}}[]
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1244
\rail@bar
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1245
\rail@bar
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1246
\rail@nextbar{1}
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1247
\rail@term{\isa{add}}[]
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1248
\rail@endbar
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1249
\rail@bar
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1250
\rail@nextbar{1}
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1251
\rail@term{\isa{{\isaliteral{3F}{\isacharquery}}}}[]
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1252
\rail@endbar
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1253
\rail@nextbar{2}
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1254
\rail@term{\isa{del}}[]
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1255
\rail@endbar
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1256
\rail@end
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1257
\end{railoutput}
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1258
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1259
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1260
  \begin{description}
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1261
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1262
  \item \hyperlink{command.print-claset}{\mbox{\isa{\isacommand{print{\isaliteral{5F}{\isacharunderscore}}claset}}}} prints the collection of rules
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1263
  declared to the Classical Reasoner, i.e.\ the \verb|claset|
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1264
  within the context.
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1265
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1266
  \item \hyperlink{attribute.intro}{\mbox{\isa{intro}}}, \hyperlink{attribute.elim}{\mbox{\isa{elim}}}, and \hyperlink{attribute.dest}{\mbox{\isa{dest}}}
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1267
  declare introduction, elimination, and destruction rules,
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1268
  respectively.  By default, rules are considered as \emph{unsafe}
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1269
  (i.e.\ not applied blindly without backtracking), while ``\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{21}{\isacharbang}}{\isaliteral{22}{\isachardoublequote}}}'' classifies as \emph{safe}.  Rule declarations marked by
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1270
  ``\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3F}{\isacharquery}}{\isaliteral{22}{\isachardoublequote}}}'' coincide with those of Isabelle/Pure, cf.\
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1271
  \secref{sec:pure-meth-att} (i.e.\ are only applied in single steps
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1272
  of the \hyperlink{method.rule}{\mbox{\isa{rule}}} method).  The optional natural number
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1273
  specifies an explicit weight argument, which is ignored by the
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1274
  automated reasoning tools, but determines the search order of single
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1275
  rule steps.
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1276
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1277
  Introduction rules are those that can be applied using ordinary
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1278
  resolution.  Their swapped forms are generated internally, which
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1279
  will be applied using elim-resolution.  Elimination rules are
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1280
  applied using elim-resolution.  Rules are sorted by the number of
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1281
  new subgoals they will yield; rules that generate the fewest
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1282
  subgoals will be tried first.  Otherwise, later declarations take
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1283
  precedence over earlier ones.
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1284
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1285
  Rules already present in the context with the same classification
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1286
  are ignored.  A warning is printed if the rule has already been
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1287
  added with some other classification, but the rule is added anyway
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1288
  as requested.
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1289
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1290
  \item \hyperlink{attribute.rule}{\mbox{\isa{rule}}}~\isa{del} deletes all occurrences of a
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1291
  rule from the classical context, regardless of its classification as
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1292
  introduction~/ elimination~/ destruction and safe~/ unsafe.
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1293
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1294
  \item \hyperlink{attribute.iff}{\mbox{\isa{iff}}} declares logical equivalences to the
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1295
  Simplifier and the Classical reasoner at the same time.
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1296
  Non-conditional rules result in a safe introduction and elimination
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1297
  pair; conditional ones are considered unsafe.  Rules with negative
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1298
  conclusion are automatically inverted (using \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6E6F743E}{\isasymnot}}{\isaliteral{22}{\isachardoublequote}}}-elimination
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1299
  internally).
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1300
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1301
  The ``\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3F}{\isacharquery}}{\isaliteral{22}{\isachardoublequote}}}'' version of \hyperlink{attribute.iff}{\mbox{\isa{iff}}} declares rules to
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1302
  the Isabelle/Pure context only, and omits the Simplifier
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1303
  declaration.
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1304
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1305
  \item \hyperlink{attribute.swapped}{\mbox{\isa{swapped}}} turns an introduction rule into an
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1306
  elimination, by resolving with the classical swap principle \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6E6F743E}{\isasymnot}}\ P\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6E6F743E}{\isasymnot}}\ R\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ P{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ R{\isaliteral{22}{\isachardoublequote}}} in the second position.  This is mainly for
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1307
  illustrative purposes: the Classical Reasoner already swaps rules
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1308
  internally as explained above.
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1309
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1310
  \end{description}%
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1311
\end{isamarkuptext}%
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1312
\isamarkuptrue%
9d946de41120 updated and re-unified classical rule declarations;
wenzelm
parents: 42927
diff changeset
  1313
%
27042
8fcf19f2168b updated generated file;
wenzelm
parents: 26907
diff changeset
  1314
\isamarkupsubsection{Automated methods%
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1315
}
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1316
\isamarkuptrue%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1317
%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1318
\begin{isamarkuptext}%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1319
\begin{matharray}{rcl}
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
  1320
    \indexdef{}{method}{blast}\hypertarget{method.blast}{\hyperlink{method.blast}{\mbox{\isa{blast}}}} & : & \isa{method} \\
42930
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1321
    \indexdef{}{method}{auto}\hypertarget{method.auto}{\hyperlink{method.auto}{\mbox{\isa{auto}}}} & : & \isa{method} \\
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1322
    \indexdef{}{method}{force}\hypertarget{method.force}{\hyperlink{method.force}{\mbox{\isa{force}}}} & : & \isa{method} \\
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
  1323
    \indexdef{}{method}{fast}\hypertarget{method.fast}{\hyperlink{method.fast}{\mbox{\isa{fast}}}} & : & \isa{method} \\
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
  1324
    \indexdef{}{method}{slow}\hypertarget{method.slow}{\hyperlink{method.slow}{\mbox{\isa{slow}}}} & : & \isa{method} \\
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
  1325
    \indexdef{}{method}{best}\hypertarget{method.best}{\hyperlink{method.best}{\mbox{\isa{best}}}} & : & \isa{method} \\
42930
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1326
    \indexdef{}{method}{fastsimp}\hypertarget{method.fastsimp}{\hyperlink{method.fastsimp}{\mbox{\isa{fastsimp}}}} & : & \isa{method} \\
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1327
    \indexdef{}{method}{slowsimp}\hypertarget{method.slowsimp}{\hyperlink{method.slowsimp}{\mbox{\isa{slowsimp}}}} & : & \isa{method} \\
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1328
    \indexdef{}{method}{bestsimp}\hypertarget{method.bestsimp}{\hyperlink{method.bestsimp}{\mbox{\isa{bestsimp}}}} & : & \isa{method} \\
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1329
  \end{matharray}
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1330
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1331
  \begin{railoutput}
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
  1332
\rail@begin{2}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1333
\rail@term{\hyperlink{method.blast}{\mbox{\isa{blast}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1334
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1335
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1336
\rail@nont{\hyperlink{syntax.nat}{\mbox{\isa{nat}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1337
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1338
\rail@plus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1339
\rail@nextplus{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1340
\rail@cnont{\hyperlink{syntax.clamod}{\mbox{\isa{clamod}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1341
\rail@endplus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1342
\rail@end
42930
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1343
\rail@begin{2}{}
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1344
\rail@term{\hyperlink{method.auto}{\mbox{\isa{auto}}}}[]
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1345
\rail@bar
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1346
\rail@nextbar{1}
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1347
\rail@nont{\hyperlink{syntax.nat}{\mbox{\isa{nat}}}}[]
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1348
\rail@nont{\hyperlink{syntax.nat}{\mbox{\isa{nat}}}}[]
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1349
\rail@endbar
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1350
\rail@plus
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1351
\rail@nextplus{1}
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1352
\rail@cnont{\hyperlink{syntax.clasimpmod}{\mbox{\isa{clasimpmod}}}}[]
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1353
\rail@endplus
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1354
\rail@end
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1355
\rail@begin{2}{}
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1356
\rail@term{\hyperlink{method.force}{\mbox{\isa{force}}}}[]
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1357
\rail@plus
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1358
\rail@nextplus{1}
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1359
\rail@cnont{\hyperlink{syntax.clasimpmod}{\mbox{\isa{clasimpmod}}}}[]
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1360
\rail@endplus
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1361
\rail@end
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1362
\rail@begin{3}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1363
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1364
\rail@term{\hyperlink{method.fast}{\mbox{\isa{fast}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1365
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1366
\rail@term{\hyperlink{method.slow}{\mbox{\isa{slow}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1367
\rail@nextbar{2}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1368
\rail@term{\hyperlink{method.best}{\mbox{\isa{best}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1369
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1370
\rail@plus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1371
\rail@nextplus{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1372
\rail@cnont{\hyperlink{syntax.clamod}{\mbox{\isa{clamod}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1373
\rail@endplus
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1374
\rail@end
42930
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1375
\rail@begin{3}{}
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1376
\rail@bar
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1377
\rail@term{\hyperlink{method.fastsimp}{\mbox{\isa{fastsimp}}}}[]
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1378
\rail@nextbar{1}
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1379
\rail@term{\hyperlink{method.slowsimp}{\mbox{\isa{slowsimp}}}}[]
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1380
\rail@nextbar{2}
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1381
\rail@term{\hyperlink{method.bestsimp}{\mbox{\isa{bestsimp}}}}[]
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1382
\rail@endbar
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1383
\rail@plus
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1384
\rail@nextplus{1}
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1385
\rail@cnont{\hyperlink{syntax.clasimpmod}{\mbox{\isa{clasimpmod}}}}[]
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1386
\rail@endplus
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1387
\rail@end
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1388
\rail@begin{4}{\indexdef{}{syntax}{clamod}\hypertarget{syntax.clamod}{\hyperlink{syntax.clamod}{\mbox{\isa{clamod}}}}}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1389
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1390
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1391
\rail@term{\isa{intro}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1392
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1393
\rail@term{\isa{elim}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1394
\rail@nextbar{2}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1395
\rail@term{\isa{dest}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1396
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1397
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1398
\rail@term{\isa{{\isaliteral{21}{\isacharbang}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1399
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1400
\rail@nextbar{2}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1401
\rail@term{\isa{{\isaliteral{3F}{\isacharquery}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1402
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1403
\rail@nextbar{3}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1404
\rail@term{\isa{del}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1405
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1406
\rail@term{\isa{{\isaliteral{3A}{\isacharcolon}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1407
\rail@nont{\hyperlink{syntax.thmrefs}{\mbox{\isa{thmrefs}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1408
\rail@end
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1409
\rail@begin{14}{\indexdef{}{syntax}{clasimpmod}\hypertarget{syntax.clasimpmod}{\hyperlink{syntax.clasimpmod}{\mbox{\isa{clasimpmod}}}}}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1410
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1411
\rail@term{\isa{simp}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1412
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1413
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1414
\rail@term{\isa{add}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1415
\rail@nextbar{2}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1416
\rail@term{\isa{del}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1417
\rail@nextbar{3}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1418
\rail@term{\isa{only}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1419
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1420
\rail@nextbar{4}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1421
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1422
\rail@term{\isa{cong}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1423
\rail@nextbar{5}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1424
\rail@term{\isa{split}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1425
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1426
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1427
\rail@nextbar{5}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1428
\rail@term{\isa{add}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1429
\rail@nextbar{6}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1430
\rail@term{\isa{del}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1431
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1432
\rail@nextbar{7}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1433
\rail@term{\isa{iff}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1434
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1435
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1436
\rail@nextbar{8}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1437
\rail@term{\isa{add}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1438
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1439
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1440
\rail@nextbar{8}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1441
\rail@term{\isa{{\isaliteral{3F}{\isacharquery}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1442
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1443
\rail@nextbar{9}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1444
\rail@term{\isa{del}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1445
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1446
\rail@nextbar{10}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1447
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1448
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1449
\rail@term{\isa{intro}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1450
\rail@nextbar{11}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1451
\rail@term{\isa{elim}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1452
\rail@nextbar{12}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1453
\rail@term{\isa{dest}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1454
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1455
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1456
\rail@term{\isa{{\isaliteral{21}{\isacharbang}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1457
\rail@nextbar{11}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1458
\rail@nextbar{12}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1459
\rail@term{\isa{{\isaliteral{3F}{\isacharquery}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1460
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1461
\rail@nextbar{13}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1462
\rail@term{\isa{del}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1463
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1464
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1465
\rail@term{\isa{{\isaliteral{3A}{\isacharcolon}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1466
\rail@nont{\hyperlink{syntax.thmrefs}{\mbox{\isa{thmrefs}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1467
\rail@end
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1468
\end{railoutput}
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1469
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1470
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
  1471
  \begin{description}
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1472
42930
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1473
  \item \hyperlink{method.blast}{\mbox{\isa{blast}}} is a separate classical tableau prover that
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1474
  uses the same classical rule declarations as explained before.
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1475
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1476
  Proof search is coded directly in ML using special data structures.
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1477
  A successful proof is then reconstructed using regular Isabelle
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1478
  inferences.  It is faster and more powerful than the other classical
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1479
  reasoning tools, but has major limitations too.
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1480
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1481
  \begin{itemize}
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1482
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1483
  \item It does not use the classical wrapper tacticals, such as the
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1484
  integration with the Simplifier of \hyperlink{method.fastsimp}{\mbox{\isa{fastsimp}}}.
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1485
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1486
  \item It does not perform higher-order unification, as needed by the
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1487
  rule \isa{{\isaliteral{3F}{\isacharquery}}f\ {\isaliteral{3F}{\isacharquery}}x\ {\isaliteral{5C3C696E3E}{\isasymin}}\ range\ {\isaliteral{3F}{\isacharquery}}f} in HOL.  There are often
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1488
  alternatives to such rules, for example \isa{{\isaliteral{3F}{\isacharquery}}b\ {\isaliteral{3D}{\isacharequal}}\ {\isaliteral{3F}{\isacharquery}}f\ {\isaliteral{3F}{\isacharquery}}x\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{3F}{\isacharquery}}b\ {\isaliteral{5C3C696E3E}{\isasymin}}\ range\ {\isaliteral{3F}{\isacharquery}}f}.
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1489
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1490
  \item Function variables may only be applied to parameters of the
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1491
  subgoal.  (This restriction arises because the prover does not use
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1492
  higher-order unification.)  If other function variables are present
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1493
  then the prover will fail with the message \texttt{Function Var's
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1494
  argument not a bound variable}.
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1495
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1496
  \item Its proof strategy is more general than \hyperlink{method.fast}{\mbox{\isa{fast}}} but can
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1497
  be slower.  If \hyperlink{method.blast}{\mbox{\isa{blast}}} fails or seems to be running forever,
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1498
  try \hyperlink{method.fast}{\mbox{\isa{fast}}} and the other proof tools described below.
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1499
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1500
  \end{itemize}
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1501
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1502
  The optional integer argument specifies a bound for the number of
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1503
  unsafe steps used in a proof.  By default, \hyperlink{method.blast}{\mbox{\isa{blast}}} starts
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1504
  with a bound of 0 and increases it successively to 20.  In contrast,
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1505
  \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}blast\ lim{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} tries to prove the goal using a search bound
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1506
  of \isa{{\isaliteral{22}{\isachardoublequote}}lim{\isaliteral{22}{\isachardoublequote}}}.  Sometimes a slow proof using \hyperlink{method.blast}{\mbox{\isa{blast}}} can
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1507
  be made much faster by supplying the successful search bound to this
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1508
  proof method instead.
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1509
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1510
  \item \hyperlink{method.auto}{\mbox{\isa{auto}}} combines classical reasoning with
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1511
  simplification.  It is intended for situations where there are a lot
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1512
  of mostly trivial subgoals; it proves all the easy ones, leaving the
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1513
  ones it cannot prove.  Occasionally, attempting to prove the hard
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1514
  ones may take a long time.
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1515
43332
dca2c7c598f0 document depth arguments of method "auto";
wenzelm
parents: 42930
diff changeset
  1516
  The optional depth arguments in \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}auto\ m\ n{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} refer to its
dca2c7c598f0 document depth arguments of method "auto";
wenzelm
parents: 42930
diff changeset
  1517
  builtin classical reasoning procedures: \isa{m} (default 4) is for
dca2c7c598f0 document depth arguments of method "auto";
wenzelm
parents: 42930
diff changeset
  1518
  \hyperlink{method.blast}{\mbox{\isa{blast}}}, which is tried first, and \isa{n} (default 2) is
dca2c7c598f0 document depth arguments of method "auto";
wenzelm
parents: 42930
diff changeset
  1519
  for a slower but more general alternative that also takes wrappers
dca2c7c598f0 document depth arguments of method "auto";
wenzelm
parents: 42930
diff changeset
  1520
  into account.
42930
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1521
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1522
  \item \hyperlink{method.force}{\mbox{\isa{force}}} is intended to prove the first subgoal
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1523
  completely, using many fancy proof tools and performing a rather
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1524
  exhaustive search.  As a result, proof attempts may take rather long
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1525
  or diverge easily.
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1526
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1527
  \item \hyperlink{method.fast}{\mbox{\isa{fast}}}, \hyperlink{method.best}{\mbox{\isa{best}}}, \hyperlink{method.slow}{\mbox{\isa{slow}}} attempt to
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1528
  prove the first subgoal using sequent-style reasoning as explained
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1529
  before.  Unlike \hyperlink{method.blast}{\mbox{\isa{blast}}}, they construct proofs directly in
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1530
  Isabelle.
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1531
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1532
  There is a difference in search strategy and back-tracking: \hyperlink{method.fast}{\mbox{\isa{fast}}} uses depth-first search and \hyperlink{method.best}{\mbox{\isa{best}}} uses best-first
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1533
  search (guided by a heuristic function: normally the total size of
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1534
  the proof state).
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1535
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1536
  Method \hyperlink{method.slow}{\mbox{\isa{slow}}} is like \hyperlink{method.fast}{\mbox{\isa{fast}}}, but conducts a broader
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1537
  search: it may, when backtracking from a failed proof attempt, undo
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1538
  even the step of proving a subgoal by assumption.
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1539
42930
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1540
  \item \hyperlink{method.fastsimp}{\mbox{\isa{fastsimp}}}, \hyperlink{method.slowsimp}{\mbox{\isa{slowsimp}}}, \hyperlink{method.bestsimp}{\mbox{\isa{bestsimp}}} are
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1541
  like \hyperlink{method.fast}{\mbox{\isa{fast}}}, \hyperlink{method.slow}{\mbox{\isa{slow}}}, \hyperlink{method.best}{\mbox{\isa{best}}}, respectively,
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1542
  but use the Simplifier as additional wrapper.
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1543
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1544
  \end{description}
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1545
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1546
  Any of the above methods support additional modifiers of the context
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1547
  of classical (and simplifier) rules, but the ones related to the
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1548
  Simplifier are explicitly prefixed by \isa{simp} here.  The
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1549
  semantics of these ad-hoc rule declarations is analogous to the
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1550
  attributes given before.  Facts provided by forward chaining are
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1551
  inserted into the goal before commencing proof search.%
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1552
\end{isamarkuptext}%
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1553
\isamarkuptrue%
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1554
%
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1555
\isamarkupsubsection{Semi-automated methods%
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1556
}
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1557
\isamarkuptrue%
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1558
%
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1559
\begin{isamarkuptext}%
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1560
These proof methods may help in situations when the
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1561
  fully-automated tools fail.  The result is a simpler subgoal that
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1562
  can be tackled by other means, such as by manual instantiation of
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1563
  quantifiers.
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1564
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1565
  \begin{matharray}{rcl}
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1566
    \indexdef{}{method}{safe}\hypertarget{method.safe}{\hyperlink{method.safe}{\mbox{\isa{safe}}}} & : & \isa{method} \\
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1567
    \indexdef{}{method}{clarify}\hypertarget{method.clarify}{\hyperlink{method.clarify}{\mbox{\isa{clarify}}}} & : & \isa{method} \\
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1568
    \indexdef{}{method}{clarsimp}\hypertarget{method.clarsimp}{\hyperlink{method.clarsimp}{\mbox{\isa{clarsimp}}}} & : & \isa{method} \\
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1569
  \end{matharray}
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1570
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1571
  \begin{railoutput}
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1572
\rail@begin{2}{}
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1573
\rail@bar
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1574
\rail@term{\hyperlink{method.safe}{\mbox{\isa{safe}}}}[]
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1575
\rail@nextbar{1}
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1576
\rail@term{\hyperlink{method.clarify}{\mbox{\isa{clarify}}}}[]
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1577
\rail@endbar
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1578
\rail@plus
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1579
\rail@nextplus{1}
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1580
\rail@cnont{\hyperlink{syntax.clamod}{\mbox{\isa{clamod}}}}[]
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1581
\rail@endplus
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1582
\rail@end
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1583
\rail@begin{2}{}
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1584
\rail@term{\hyperlink{method.clarsimp}{\mbox{\isa{clarsimp}}}}[]
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1585
\rail@plus
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1586
\rail@nextplus{1}
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1587
\rail@cnont{\hyperlink{syntax.clasimpmod}{\mbox{\isa{clasimpmod}}}}[]
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1588
\rail@endplus
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1589
\rail@end
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1590
\end{railoutput}
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1591
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1592
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1593
  \begin{description}
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1594
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1595
  \item \hyperlink{method.safe}{\mbox{\isa{safe}}} repeatedly performs safe steps on all subgoals.
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1596
  It is deterministic, with at most one outcome.
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1597
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1598
  \item \hyperlink{method.clarify}{\mbox{\isa{clarify}}} performs a series of safe steps as follows.
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1599
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1600
  No splitting step is applied; for example, the subgoal \isa{{\isaliteral{22}{\isachardoublequote}}A\ {\isaliteral{5C3C616E643E}{\isasymand}}\ B{\isaliteral{22}{\isachardoublequote}}} is left as a conjunction.  Proof by assumption, Modus Ponens,
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1601
  etc., may be performed provided they do not instantiate unknowns.
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1602
  Assumptions of the form \isa{{\isaliteral{22}{\isachardoublequote}}x\ {\isaliteral{3D}{\isacharequal}}\ t{\isaliteral{22}{\isachardoublequote}}} may be eliminated.  The safe
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1603
  wrapper tactical is applied.
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1604
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1605
  \item \hyperlink{method.clarsimp}{\mbox{\isa{clarsimp}}} acts like \hyperlink{method.clarify}{\mbox{\isa{clarify}}}, but also does
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1606
  simplification.  Note that if the Simplifier context includes a
41394a61cca9 updated and re-unified classical proof methods;
wenzelm
parents: 42929
diff changeset
  1607
  splitter for the premises, the subgoal may still be split.
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1608
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
  1609
  \end{description}%
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1610
\end{isamarkuptext}%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1611
\isamarkuptrue%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1612
%
42929
wenzelm
parents: 42928
diff changeset
  1613
\isamarkupsubsection{Structured proof methods%
wenzelm
parents: 42928
diff changeset
  1614
}
wenzelm
parents: 42928
diff changeset
  1615
\isamarkuptrue%
wenzelm
parents: 42928
diff changeset
  1616
%
wenzelm
parents: 42928
diff changeset
  1617
\begin{isamarkuptext}%
wenzelm
parents: 42928
diff changeset
  1618
\begin{matharray}{rcl}
wenzelm
parents: 42928
diff changeset
  1619
    \indexdef{}{method}{rule}\hypertarget{method.rule}{\hyperlink{method.rule}{\mbox{\isa{rule}}}} & : & \isa{method} \\
wenzelm
parents: 42928
diff changeset
  1620
    \indexdef{}{method}{contradiction}\hypertarget{method.contradiction}{\hyperlink{method.contradiction}{\mbox{\isa{contradiction}}}} & : & \isa{method} \\
wenzelm
parents: 42928
diff changeset
  1621
    \indexdef{}{method}{intro}\hypertarget{method.intro}{\hyperlink{method.intro}{\mbox{\isa{intro}}}} & : & \isa{method} \\
wenzelm
parents: 42928
diff changeset
  1622
    \indexdef{}{method}{elim}\hypertarget{method.elim}{\hyperlink{method.elim}{\mbox{\isa{elim}}}} & : & \isa{method} \\
wenzelm
parents: 42928
diff changeset
  1623
  \end{matharray}
wenzelm
parents: 42928
diff changeset
  1624
wenzelm
parents: 42928
diff changeset
  1625
  \begin{railoutput}
wenzelm
parents: 42928
diff changeset
  1626
\rail@begin{3}{}
wenzelm
parents: 42928
diff changeset
  1627
\rail@bar
wenzelm
parents: 42928
diff changeset
  1628
\rail@term{\hyperlink{method.rule}{\mbox{\isa{rule}}}}[]
wenzelm
parents: 42928
diff changeset
  1629
\rail@nextbar{1}
wenzelm
parents: 42928
diff changeset
  1630
\rail@term{\hyperlink{method.intro}{\mbox{\isa{intro}}}}[]
wenzelm
parents: 42928
diff changeset
  1631
\rail@nextbar{2}
wenzelm
parents: 42928
diff changeset
  1632
\rail@term{\hyperlink{method.elim}{\mbox{\isa{elim}}}}[]
wenzelm
parents: 42928
diff changeset
  1633
\rail@endbar
wenzelm
parents: 42928
diff changeset
  1634
\rail@bar
wenzelm
parents: 42928
diff changeset
  1635
\rail@nextbar{1}
wenzelm
parents: 42928
diff changeset
  1636
\rail@nont{\hyperlink{syntax.thmrefs}{\mbox{\isa{thmrefs}}}}[]
wenzelm
parents: 42928
diff changeset
  1637
\rail@endbar
wenzelm
parents: 42928
diff changeset
  1638
\rail@end
wenzelm
parents: 42928
diff changeset
  1639
\end{railoutput}
wenzelm
parents: 42928
diff changeset
  1640
wenzelm
parents: 42928
diff changeset
  1641
wenzelm
parents: 42928
diff changeset
  1642
  \begin{description}
wenzelm
parents: 42928
diff changeset
  1643
wenzelm
parents: 42928
diff changeset
  1644
  \item \hyperlink{method.rule}{\mbox{\isa{rule}}} as offered by the Classical Reasoner is a
wenzelm
parents: 42928
diff changeset
  1645
  refinement over the Pure one (see \secref{sec:pure-meth-att}).  Both
wenzelm
parents: 42928
diff changeset
  1646
  versions work the same, but the classical version observes the
wenzelm
parents: 42928
diff changeset
  1647
  classical rule context in addition to that of Isabelle/Pure.
wenzelm
parents: 42928
diff changeset
  1648
wenzelm
parents: 42928
diff changeset
  1649
  Common object logics (HOL, ZF, etc.) declare a rich collection of
wenzelm
parents: 42928
diff changeset
  1650
  classical rules (even if these would qualify as intuitionistic
wenzelm
parents: 42928
diff changeset
  1651
  ones), but only few declarations to the rule context of
wenzelm
parents: 42928
diff changeset
  1652
  Isabelle/Pure (\secref{sec:pure-meth-att}).
wenzelm
parents: 42928
diff changeset
  1653
wenzelm
parents: 42928
diff changeset
  1654
  \item \hyperlink{method.contradiction}{\mbox{\isa{contradiction}}} solves some goal by contradiction,
wenzelm
parents: 42928
diff changeset
  1655
  deriving any result from both \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6E6F743E}{\isasymnot}}\ A{\isaliteral{22}{\isachardoublequote}}} and \isa{A}.  Chained
wenzelm
parents: 42928
diff changeset
  1656
  facts, which are guaranteed to participate, may appear in either
wenzelm
parents: 42928
diff changeset
  1657
  order.
wenzelm
parents: 42928
diff changeset
  1658
wenzelm
parents: 42928
diff changeset
  1659
  \item \hyperlink{method.intro}{\mbox{\isa{intro}}} and \hyperlink{method.elim}{\mbox{\isa{elim}}} repeatedly refine some goal
wenzelm
parents: 42928
diff changeset
  1660
  by intro- or elim-resolution, after having inserted any chained
wenzelm
parents: 42928
diff changeset
  1661
  facts.  Exactly the rules given as arguments are taken into account;
wenzelm
parents: 42928
diff changeset
  1662
  this allows fine-tuned decomposition of a proof problem, in contrast
wenzelm
parents: 42928
diff changeset
  1663
  to common automated tools.
wenzelm
parents: 42928
diff changeset
  1664
wenzelm
parents: 42928
diff changeset
  1665
  \end{description}%
wenzelm
parents: 42928
diff changeset
  1666
\end{isamarkuptext}%
wenzelm
parents: 42928
diff changeset
  1667
\isamarkuptrue%
wenzelm
parents: 42928
diff changeset
  1668
%
27047
2dcdea037385 updated generated file;
wenzelm
parents: 27042
diff changeset
  1669
\isamarkupsection{Object-logic setup \label{sec:object-logic}%
26790
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1670
}
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1671
\isamarkuptrue%
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1672
%
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1673
\begin{isamarkuptext}%
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1674
\begin{matharray}{rcl}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
  1675
    \indexdef{}{command}{judgment}\hypertarget{command.judgment}{\hyperlink{command.judgment}{\mbox{\isa{\isacommand{judgment}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
  1676
    \indexdef{}{method}{atomize}\hypertarget{method.atomize}{\hyperlink{method.atomize}{\mbox{\isa{atomize}}}} & : & \isa{method} \\
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
  1677
    \indexdef{}{attribute}{atomize}\hypertarget{attribute.atomize}{\hyperlink{attribute.atomize}{\mbox{\isa{atomize}}}} & : & \isa{attribute} \\
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
  1678
    \indexdef{}{attribute}{rule\_format}\hypertarget{attribute.rule-format}{\hyperlink{attribute.rule-format}{\mbox{\isa{rule{\isaliteral{5F}{\isacharunderscore}}format}}}} & : & \isa{attribute} \\
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
  1679
    \indexdef{}{attribute}{rulify}\hypertarget{attribute.rulify}{\hyperlink{attribute.rulify}{\mbox{\isa{rulify}}}} & : & \isa{attribute} \\
26790
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1680
  \end{matharray}
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1681
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1682
  The very starting point for any Isabelle object-logic is a ``truth
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1683
  judgment'' that links object-level statements to the meta-logic
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1684
  (with its minimal language of \isa{prop} that covers universal
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
  1685
  quantification \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C416E643E}{\isasymAnd}}{\isaliteral{22}{\isachardoublequote}}} and implication \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}{\isaliteral{22}{\isachardoublequote}}}).
26790
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1686
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1687
  Common object-logics are sufficiently expressive to internalize rule
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
  1688
  statements over \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C416E643E}{\isasymAnd}}{\isaliteral{22}{\isachardoublequote}}} and \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}{\isaliteral{22}{\isachardoublequote}}} within their own
26790
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1689
  language.  This is useful in certain situations where a rule needs
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1690
  to be viewed as an atomic statement from the meta-level perspective,
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
  1691
  e.g.\ \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C416E643E}{\isasymAnd}}x{\isaliteral{2E}{\isachardot}}\ x\ {\isaliteral{5C3C696E3E}{\isasymin}}\ A\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ P\ x{\isaliteral{22}{\isachardoublequote}}} versus \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C666F72616C6C3E}{\isasymforall}}x\ {\isaliteral{5C3C696E3E}{\isasymin}}\ A{\isaliteral{2E}{\isachardot}}\ P\ x{\isaliteral{22}{\isachardoublequote}}}.
26790
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1692
26902
8db1e960d636 updated generated file;
wenzelm
parents: 26895
diff changeset
  1693
  From the following language elements, only the \hyperlink{method.atomize}{\mbox{\isa{atomize}}}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
  1694
  method and \hyperlink{attribute.rule-format}{\mbox{\isa{rule{\isaliteral{5F}{\isacharunderscore}}format}}} attribute are occasionally
26790
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1695
  required by end-users, the rest is for those who need to setup their
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1696
  own object-logic.  In the latter case existing formulations of
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1697
  Isabelle/FOL or Isabelle/HOL may be taken as realistic examples.
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1698
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1699
  Generic tools may refer to the information provided by object-logic
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1700
  declarations internally.
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1701
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1702
  \begin{railoutput}
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
  1703
\rail@begin{1}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1704
\rail@term{\hyperlink{command.judgment}{\mbox{\isa{\isacommand{judgment}}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1705
\rail@nont{\hyperlink{syntax.constdecl}{\mbox{\isa{constdecl}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1706
\rail@end
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
  1707
\rail@begin{2}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1708
\rail@term{\hyperlink{attribute.atomize}{\mbox{\isa{atomize}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1709
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1710
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1711
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1712
\rail@term{\isa{full}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1713
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1714
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1715
\rail@end
42662
2080fe35abea updated generated files;
wenzelm
parents: 42655
diff changeset
  1716
\rail@begin{2}{}
42596
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1717
\rail@term{\hyperlink{attribute.rule-format}{\mbox{\isa{rule{\isaliteral{5F}{\isacharunderscore}}format}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1718
\rail@bar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1719
\rail@nextbar{1}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1720
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1721
\rail@term{\isa{noasm}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1722
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1723
\rail@endbar
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1724
\rail@end
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1725
\end{railoutput}
6c621a9d612a modernized rail diagrams using @{rail} antiquotation;
wenzelm
parents: 40406
diff changeset
  1726
26790
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1727
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
  1728
  \begin{description}
26790
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1729
  
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
  1730
  \item \hyperlink{command.judgment}{\mbox{\isa{\isacommand{judgment}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}c\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{5C3C7369676D613E}{\isasymsigma}}\ {\isaliteral{28}{\isacharparenleft}}mx{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} declares constant
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
  1731
  \isa{c} as the truth judgment of the current object-logic.  Its
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
  1732
  type \isa{{\isaliteral{5C3C7369676D613E}{\isasymsigma}}} should specify a coercion of the category of
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
  1733
  object-level propositions to \isa{prop} of the Pure meta-logic;
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
  1734
  the mixfix annotation \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}mx{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} would typically just link the
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
  1735
  object language (internally of syntactic category \isa{logic})
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
  1736
  with that of \isa{prop}.  Only one \hyperlink{command.judgment}{\mbox{\isa{\isacommand{judgment}}}}
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
  1737
  declaration may be given in any theory development.
26790
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1738
  
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
  1739
  \item \hyperlink{method.atomize}{\mbox{\isa{atomize}}} (as a method) rewrites any non-atomic
26790
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1740
  premises of a sub-goal, using the meta-level equations declared via
26902
8db1e960d636 updated generated file;
wenzelm
parents: 26895
diff changeset
  1741
  \hyperlink{attribute.atomize}{\mbox{\isa{atomize}}} (as an attribute) beforehand.  As a result,
26790
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1742
  heavily nested goals become amenable to fundamental operations such
42626
6ac8c55c657e eliminated some duplicate "def" positions;
wenzelm
parents: 42617
diff changeset
  1743
  as resolution (cf.\ the \hyperlink{method.Pure.rule}{\mbox{\isa{rule}}} method).  Giving the ``\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}full{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}'' option here means to turn the whole subgoal into an
26790
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1744
  object-statement (if possible), including the outermost parameters
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1745
  and assumptions as well.
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1746
26902
8db1e960d636 updated generated file;
wenzelm
parents: 26895
diff changeset
  1747
  A typical collection of \hyperlink{attribute.atomize}{\mbox{\isa{atomize}}} rules for a particular
26790
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1748
  object-logic would provide an internalization for each of the
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
  1749
  connectives of \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C416E643E}{\isasymAnd}}{\isaliteral{22}{\isachardoublequote}}}, \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}{\isaliteral{22}{\isachardoublequote}}}, and \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C65717569763E}{\isasymequiv}}{\isaliteral{22}{\isachardoublequote}}}.
26790
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1750
  Meta-level conjunction should be covered as well (this is
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1751
  particularly important for locales, see \secref{sec:locale}).
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1752
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
  1753
  \item \hyperlink{attribute.rule-format}{\mbox{\isa{rule{\isaliteral{5F}{\isacharunderscore}}format}}} rewrites a theorem by the equalities
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
  1754
  declared as \hyperlink{attribute.rulify}{\mbox{\isa{rulify}}} rules in the current object-logic.
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
  1755
  By default, the result is fully normalized, including assumptions
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
  1756
  and conclusions at any depth.  The \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}no{\isaliteral{5F}{\isacharunderscore}}asm{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} option
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
  1757
  restricts the transformation to the conclusion of a rule.
26790
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1758
40406
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
  1759
  In common object-logics (HOL, FOL, ZF), the effect of \hyperlink{attribute.rule-format}{\mbox{\isa{rule{\isaliteral{5F}{\isacharunderscore}}format}}} is to replace (bounded) universal quantification
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
  1760
  (\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C666F72616C6C3E}{\isasymforall}}{\isaliteral{22}{\isachardoublequote}}}) and implication (\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}{\isaliteral{22}{\isachardoublequote}}}) by the corresponding
313a24b66a8d updated generated files;
wenzelm
parents: 40291
diff changeset
  1761
  rule statements over \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C416E643E}{\isasymAnd}}{\isaliteral{22}{\isachardoublequote}}} and \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}{\isaliteral{22}{\isachardoublequote}}}.
26790
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1762
28788
ff9d8a8932e4 updated generated files;
wenzelm
parents: 27249
diff changeset
  1763
  \end{description}%
26790
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1764
\end{isamarkuptext}%
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1765
\isamarkuptrue%
e8cc166ba123 converted "General logic setup";
wenzelm
parents: 26788
diff changeset
  1766
%
26782
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1767
\isadelimtheory
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1768
%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1769
\endisadelimtheory
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1770
%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1771
\isatagtheory
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1772
\isacommand{end}\isamarkupfalse%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1773
%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1774
\endisatagtheory
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1775
{\isafoldtheory}%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1776
%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1777
\isadelimtheory
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1778
%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1779
\endisadelimtheory
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1780
\isanewline
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1781
\end{isabellebody}%
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1782
%%% Local Variables:
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1783
%%% mode: latex
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1784
%%% TeX-master: "root"
19363c70b5c4 converted generic.tex to Thy/Generic.thy;
wenzelm
parents:
diff changeset
  1785
%%% End: