doc-src/IsarImplementation/Thy/Isar.thy
author wenzelm
Tue, 12 Oct 2010 21:18:05 +0100
changeset 39843 21d189bfdfd1
parent 39842 7205191afde4
child 39844 57c7498f11a8
permissions -rw-r--r--
more examples; more on "Proof methods";
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
29755
d66b34e46bdf observe usual theory naming conventions;
wenzelm
parents: 20520
diff changeset
     1
theory Isar
d66b34e46bdf observe usual theory naming conventions;
wenzelm
parents: 20520
diff changeset
     2
imports Base
d66b34e46bdf observe usual theory naming conventions;
wenzelm
parents: 20520
diff changeset
     3
begin
20472
wenzelm
parents:
diff changeset
     4
29759
bcb79ddf57da removed rudiments of glossary;
wenzelm
parents: 29755
diff changeset
     5
chapter {* Isar language elements *}
bcb79ddf57da removed rudiments of glossary;
wenzelm
parents: 29755
diff changeset
     6
39842
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
     7
text {* The Isar proof language (see also
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
     8
  \cite[\S2]{isabelle-isar-ref}) consists of three main categories of
29759
bcb79ddf57da removed rudiments of glossary;
wenzelm
parents: 29755
diff changeset
     9
  language elements:
bcb79ddf57da removed rudiments of glossary;
wenzelm
parents: 29755
diff changeset
    10
bcb79ddf57da removed rudiments of glossary;
wenzelm
parents: 29755
diff changeset
    11
  \begin{enumerate}
bcb79ddf57da removed rudiments of glossary;
wenzelm
parents: 29755
diff changeset
    12
39842
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    13
  \item Proof \emph{commands} define the primary language of
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    14
  transactions of the underlying Isar/VM interpreter.  Typical
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    15
  examples are @{command "fix"}, @{command "assume"}, @{command
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    16
  "show"}, and @{command "by"}.
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    17
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    18
  Composing proof commands according to the rules of the Isar/VM
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    19
  essentially leads to expressions of structured proof text, such that
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    20
  both the machine and the human reader can give it a meaning as
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    21
  formal reasoning.
20472
wenzelm
parents:
diff changeset
    22
39842
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    23
  \item Proof \emph{methods} define a secondary language of mixed
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    24
  forward-backward refinement steps involving facts and goals.
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    25
  Typical example methods are @{method rule}, @{method unfold}, or
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    26
  @{text simp}.  %FIXME proper formal markup!?
29759
bcb79ddf57da removed rudiments of glossary;
wenzelm
parents: 29755
diff changeset
    27
39842
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    28
  Methods can occur in certain well-defined parts of the Isar proof
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    29
  language, say as arguments to @{command "proof"}, @{command "qed"},
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    30
  or @{command "by"}.
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    31
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    32
  \item \emph{Attributes} define a tertiary language of small
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    33
  annotations to facts: facts being defined or referenced may always
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    34
  be decorated with attribute expressions.  Attributes can modify both
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    35
  the fact and the context.
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    36
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    37
  Typical example attributes are @{attribute intro} (which affects the
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    38
  context), or @{attribute symmetric} (which affects the fact).
29759
bcb79ddf57da removed rudiments of glossary;
wenzelm
parents: 29755
diff changeset
    39
bcb79ddf57da removed rudiments of glossary;
wenzelm
parents: 29755
diff changeset
    40
  \end{enumerate}
bcb79ddf57da removed rudiments of glossary;
wenzelm
parents: 29755
diff changeset
    41
*}
bcb79ddf57da removed rudiments of glossary;
wenzelm
parents: 29755
diff changeset
    42
bcb79ddf57da removed rudiments of glossary;
wenzelm
parents: 29755
diff changeset
    43
bcb79ddf57da removed rudiments of glossary;
wenzelm
parents: 29755
diff changeset
    44
section {* Proof commands *}
20520
wenzelm
parents: 20472
diff changeset
    45
39842
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    46
text {* In principle, Isar proof commands could be defined in
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    47
  user-space as well.  The system is built like that in the first
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    48
  place: part of the commands are primitive, the other part is defined
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    49
  as derived elements.  Adding to the genuine structured proof
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    50
  language requires profound understanding of the Isar/VM machinery,
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    51
  though, so this is far beyond the scope of this manual.
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    52
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    53
  What can be done realistically is to define some diagnostic commands
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    54
  that merely inspect the general state of the Isar/VM, and report
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    55
  some feedback to the user.  Typically this involves checking of the
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    56
  linguistic \emph{mode} of a proof state, or peeking at the pending
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    57
  goals (if available).
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    58
*}
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    59
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    60
text %mlref {*
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    61
  \begin{mldecls}
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    62
  @{index_ML_type Proof.state} \\
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    63
  @{index_ML Proof.assert_forward: "Proof.state -> Proof.state"} \\
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    64
  @{index_ML Proof.assert_chain: "Proof.state -> Proof.state"} \\
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    65
  @{index_ML Proof.assert_backward: "Proof.state -> Proof.state"} \\
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    66
  @{index_ML Proof.simple_goal: "Proof.state -> {context: Proof.context, goal: thm}"} \\
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    67
  @{index_ML Proof.goal: "Proof.state ->
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    68
  {context: Proof.context, facts: thm list, goal: thm}"} \\
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    69
  @{index_ML Proof.raw_goal: "Proof.state ->
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    70
  {context: Proof.context, facts: thm list, goal: thm}"} \\
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    71
  \end{mldecls}
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    72
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    73
  \begin{description}
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    74
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    75
  \item @{ML_type Proof.state} represents Isar proof states.  This is
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    76
  a block-structured configuration with proof context, linguistic
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    77
  mode, and optional goal state.  An Isar goal consists of goal
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    78
  context, goal facts (``@{text "using"}''), and tactical goal state
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    79
  (see \secref{sec:tactical-goals}).
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    80
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    81
  The general idea is that the facts shall contribute to the
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    82
  refinement of the goal state --- how exactly is defined by the proof
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    83
  method that is applied in that situation.
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    84
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    85
  \item @{ML Proof.assert_forward}, @{ML Proof.assert_chain}, @{ML
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    86
  Proof.assert_backward} are partial identity functions that fail
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    87
  unless a certain linguistic mode is active, namely ``@{text
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    88
  "proof(state)"}'', ``@{text "proof(chain)"}'', ``@{text
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    89
  "proof(prove)"}'', respectively (using the terminology of
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    90
  \cite{isabelle-isar-ref}).
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    91
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    92
  It is advisable study the implementations of existing proof commands
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    93
  for suitable modes to be asserted.
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    94
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    95
  \item @{ML Proof.simple_goal}~@{text "state"} returns the structured
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    96
  Isar goal (if available) in the form seen by ``simple'' methods
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    97
  (like @{text simp} or @{text blast}).  The Isar goal facts are
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    98
  already inserted as premises into the subgoals, which are presented
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
    99
  separately as in @{ML Proof.goal}.
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
   100
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
   101
  \item @{ML Proof.goal}~@{text "state"} returns the structured Isar
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
   102
  goal (if available) in the form seen by regular methods (like
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
   103
  @{method rule}).  The auxiliary internal encoding of Pure
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
   104
  conjunctions is split into individual subgoals as usual.
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
   105
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
   106
  \item @{ML Proof.raw_goal}~@{text "state"} returns the structured
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
   107
  Isar goal (if available) in the raw internal form seen by ``raw''
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
   108
  methods (like @{text induct}).  This form is very rarely appropriate
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
   109
  for dignostic tools; @{ML Proof.simple_goal} or @{ML Proof.goal}
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
   110
  should be used in most situations.
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
   111
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
   112
  \end{description}
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
   113
*}
7205191afde4 more on "Isar language elements";
wenzelm
parents: 30272
diff changeset
   114
20520
wenzelm
parents: 20472
diff changeset
   115
39843
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   116
text %mlantiq {*
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   117
  \begin{matharray}{rcl}
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   118
  @{ML_antiquotation_def "Isar.goal"} & : & @{text ML_antiquotation} \\
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   119
  \end{matharray}
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   120
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   121
  \begin{description}
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   122
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   123
  \item @{text "@{Isar.goal}"} refers to the regular goal state (if
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   124
  available) of the current proof state managed by the Isar toplevel
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   125
  --- as abstract value.
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   126
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   127
  This only works for diagnostic ML commands, such as @{command
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   128
  ML_val} or @{command ML_command}.
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   129
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   130
  \end{description}
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   131
*}
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   132
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   133
text %mlex {* The following example peeks at a certain goal configuration. *}
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   134
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   135
example_proof
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   136
  have "PROP A" and "PROP B" and "PROP C"
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   137
    ML_val {* Thm.nprems_of (#goal @{Isar.goal}) *}
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   138
    oops
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   139
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   140
text {* \noindent Here we see 3 individual subgoals in the same way as
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   141
  regular proof methods would do.
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   142
*}
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   143
20520
wenzelm
parents: 20472
diff changeset
   144
20472
wenzelm
parents:
diff changeset
   145
section {* Proof methods *}
wenzelm
parents:
diff changeset
   146
39843
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   147
text {* Proof methods are syntactically embedded into the Isar proof
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   148
  language as arguments to certain commands, e.g.\ @{command "by"} or
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   149
  @{command apply}.  User-space additions are relatively easy by
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   150
  plugging a suitable method-valued parser function into the
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   151
  framework.
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   152
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   153
  Operationally, a proof method is like a structurally enhanced
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   154
  tactic: it operates on the full Isar goal configuration with
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   155
  context, goal facts, and primitive goal state.  Like a tactic, it
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   156
  enumerates possible follow-up goal states, with the potential
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   157
  addition of named extensions of the proof context (called
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   158
  \emph{cases}).
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   159
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   160
  To get a better idea about the range of possibilities, consider
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   161
  first the following structured proof scheme:
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   162
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   163
  \medskip
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   164
  \begin{tabular}{l}
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   165
  @{command from}~@{text "facts\<^sub>1"}~@{command have}~@{text "props"}~@{command using}~@{text "facts\<^sub>2"} \\
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   166
  @{command proof}~@{text "(initial_method)"} \\
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   167
  \quad@{text "body"} \\
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   168
  @{command qed}~@{text "(terminal_method)"} \\
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   169
  \end{tabular}
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   170
  \medskip
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   171
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   172
  \noindent The goal configuration consists of @{text "facts\<^sub>1"} and
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   173
  @{text "facts\<^sub>2"} appended in that order, and various @{text "props"}
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   174
  that are claimed here.  The @{text "initial_method"} is invoked with
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   175
  that information and refines the problem to something that is
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   176
  accommodated recursively in the proof @{text "body"}.  The @{text
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   177
  "terminal_method"} has another chance to finish-off any remaining
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   178
  subgoals, but it does not see the facts of the initial step.
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   179
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   180
  \medskip Here is another pattern for unstructured proof scripts:
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   181
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   182
  \begin{tabular}{l}
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   183
  @{command have}~@{text "props"} \\
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   184
  \quad@{command using}~@{text "facts\<^sub>1"} \\
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   185
  \quad@{command apply}~@{text "method\<^sub>1"} \\
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   186
  \quad@{command apply}~@{text "method\<^sub>2"} \\
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   187
  \quad@{command using}~@{text "facts\<^sub>3"} \\
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   188
  \quad@{command apply}~@{text "method\<^sub>3"} \\
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   189
  \quad@{command done} \\
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   190
  \end{tabular}
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   191
  \medskip
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   192
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   193
  \noindent The @{text "method\<^sub>1"} operates on the original claim
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   194
  together while using @{text "facts\<^bsub>1\<^esub>"}.  Since the @{command apply}
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   195
  command structurally resets the facts, the @{text "method\<^sub>2"} will
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   196
  operate on the remaining goal state without facts.  The @{text
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   197
  "method\<^sub>3"} will see a collection of @{text "facts\<^sub>3"} that has been
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   198
  inserted into the script explicitly.
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   199
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   200
  \medskip Empirically, Isar proof methods can be categorized as follows:
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   201
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   202
  \begin{enumerate}
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   203
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   204
  \item structured method with cases, e.g.\ @{text "induct"}
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   205
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   206
  \item regular method: strong emphasis on facts, e.g.\ @{text "rule"}
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   207
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   208
  \item simple method: weak emphasis on facts, merely inserted into subgoals, e.g.\ @{text "simp"}
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   209
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   210
  \item old-style tactic emulation, e.g. @{text "rule_tac"}
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   211
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   212
  \begin{itemize}
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   213
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   214
  \item naming convention @{text "foo_tac"}
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   215
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   216
  \item numeric goal addressing
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   217
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   218
  \item explicit references to internal goal state (invisible from text!)
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   219
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   220
  \end{itemize}
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   221
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   222
  \end{enumerate}
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   223
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   224
  FIXME
21d189bfdfd1 more examples;
wenzelm
parents: 39842
diff changeset
   225
*}
20472
wenzelm
parents:
diff changeset
   226
29759
bcb79ddf57da removed rudiments of glossary;
wenzelm
parents: 29755
diff changeset
   227
20472
wenzelm
parents:
diff changeset
   228
section {* Attributes *}
wenzelm
parents:
diff changeset
   229
29759
bcb79ddf57da removed rudiments of glossary;
wenzelm
parents: 29755
diff changeset
   230
text FIXME
30272
2d612824e642 regenerated document;
wenzelm
parents: 30270
diff changeset
   231
20472
wenzelm
parents:
diff changeset
   232
end