doc-src/IsarRef/Thy/document/Framework.tex
author wenzelm
Mon, 02 May 2011 20:34:34 +0200
changeset 42626 6ac8c55c657e
parent 40476 515eab39b6c2
child 42651 e3fdb7c96be5
permissions -rw-r--r--
eliminated some duplicate "def" positions;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
29717
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
     1
%
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
     2
\begin{isabellebody}%
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
     3
\def\isabellecontext{Framework}%
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
     4
%
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
     5
\isadelimtheory
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
     6
%
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
     7
\endisadelimtheory
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
     8
%
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
     9
\isatagtheory
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    10
\isacommand{theory}\isamarkupfalse%
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    11
\ Framework\isanewline
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    12
\isakeyword{imports}\ Main\isanewline
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    13
\isakeyword{begin}%
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    14
\endisatagtheory
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    15
{\isafoldtheory}%
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    16
%
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    17
\isadelimtheory
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    18
%
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    19
\endisadelimtheory
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    20
%
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    21
\isamarkupchapter{The Isabelle/Isar Framework \label{ch:isar-framework}%
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    22
}
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    23
\isamarkuptrue%
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    24
%
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    25
\begin{isamarkuptext}%
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    26
Isabelle/Isar
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    27
  \cite{Wenzel:1999:TPHOL,Wenzel-PhD,Nipkow-TYPES02,Wenzel-Paulson:2006,Wenzel:2006:Festschrift}
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    28
  is intended as a generic framework for developing formal
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    29
  mathematical documents with full proof checking.  Definitions and
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
    30
  proofs are organized as theories.  An assembly of theory sources may
29717
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    31
  be presented as a printed document; see also
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    32
  \chref{ch:document-prep}.
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    33
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    34
  The main objective of Isar is the design of a human-readable
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    35
  structured proof language, which is called the ``primary proof
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    36
  format'' in Isar terminology.  Such a primary proof language is
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    37
  somewhere in the middle between the extremes of primitive proof
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    38
  objects and actual natural language.  In this respect, Isar is a bit
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    39
  more formalistic than Mizar
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    40
  \cite{Trybulec:1993:MizarFeatures,Rudnicki:1992:MizarOverview,Wiedijk:1999:Mizar},
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    41
  using logical symbols for certain reasoning schemes where Mizar
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    42
  would prefer English words; see \cite{Wenzel-Wiedijk:2002} for
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    43
  further comparisons of these systems.
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    44
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    45
  So Isar challenges the traditional way of recording informal proofs
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    46
  in mathematical prose, as well as the common tendency to see fully
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    47
  formal proofs directly as objects of some logical calculus (e.g.\
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
    48
  \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C616D6264613E}{\isasymlambda}}{\isaliteral{22}{\isachardoublequote}}}-terms in a version of type theory).  In fact, Isar is
29717
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    49
  better understood as an interpreter of a simple block-structured
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
    50
  language for describing the data flow of local facts and goals,
29717
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    51
  interspersed with occasional invocations of proof methods.
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    52
  Everything is reduced to logical inferences internally, but these
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    53
  steps are somewhat marginal compared to the overall bookkeeping of
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    54
  the interpretation process.  Thanks to careful design of the syntax
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    55
  and semantics of Isar language elements, a formal record of Isar
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    56
  instructions may later appear as an intelligible text to the
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    57
  attentive reader.
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    58
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    59
  The Isar proof language has emerged from careful analysis of some
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    60
  inherent virtues of the existing logical framework of Isabelle/Pure
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    61
  \cite{paulson-found,paulson700}, notably composition of higher-order
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    62
  natural deduction rules, which is a generalization of Gentzen's
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    63
  original calculus \cite{Gentzen:1935}.  The approach of generic
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    64
  inference systems in Pure is continued by Isar towards actual proof
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    65
  texts.
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    66
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    67
  Concrete applications require another intermediate layer: an
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    68
  object-logic.  Isabelle/HOL \cite{isa-tutorial} (simply-typed
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    69
  set-theory) is being used most of the time; Isabelle/ZF
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
    70
  \cite{isabelle-ZF} is less extensively developed, although it would
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
    71
  probably fit better for classical mathematics.
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
    72
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
    73
  \medskip In order to illustrate natural deduction in Isar, we shall
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
    74
  refer to the background theory and library of Isabelle/HOL.  This
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
    75
  includes common notions of predicate logic, naive set-theory etc.\
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
    76
  using fairly standard mathematical notation.  From the perspective
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
    77
  of generic natural deduction there is nothing special about the
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
    78
  logical connectives of HOL (\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C616E643E}{\isasymand}}{\isaliteral{22}{\isachardoublequote}}}, \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6F723E}{\isasymor}}{\isaliteral{22}{\isachardoublequote}}}, \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C666F72616C6C3E}{\isasymforall}}{\isaliteral{22}{\isachardoublequote}}},
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
    79
  \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6578697374733E}{\isasymexists}}{\isaliteral{22}{\isachardoublequote}}}, etc.), only the resulting reasoning principles are
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
    80
  relevant to the user.  There are similar rules available for
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
    81
  set-theory operators (\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C696E7465723E}{\isasyminter}}{\isaliteral{22}{\isachardoublequote}}}, \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C756E696F6E3E}{\isasymunion}}{\isaliteral{22}{\isachardoublequote}}}, \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C496E7465723E}{\isasymInter}}{\isaliteral{22}{\isachardoublequote}}}, \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C556E696F6E3E}{\isasymUnion}}{\isaliteral{22}{\isachardoublequote}}}, etc.), or any other theory developed in the library (lattice
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
    82
  theory, topology etc.).
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
    83
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
    84
  Subsequently we briefly review fragments of Isar proof texts
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
    85
  corresponding directly to such general deduction schemes.  The
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
    86
  examples shall refer to set-theory, to minimize the danger of
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
    87
  understanding connectives of predicate logic as something special.
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
    88
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
    89
  \medskip The following deduction performs \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C696E7465723E}{\isasyminter}}{\isaliteral{22}{\isachardoublequote}}}-introduction,
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
    90
  working forwards from assumptions towards the conclusion.  We give
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
    91
  both the Isar text, and depict the primitive rule involved, as
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
    92
  determined by unification of the problem against rules that are
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
    93
  declared in the library context.%
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
    94
\end{isamarkuptext}%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
    95
\isamarkuptrue%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
    96
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
    97
\medskip\begin{minipage}{0.6\textwidth}
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
    98
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
    99
\isadelimproof
36357
641a521bfc19 use 'example_proof' (invisible);
wenzelm
parents: 29746
diff changeset
   100
\ \ \ \ %
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   101
\endisadelimproof
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   102
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   103
\isatagproof
36357
641a521bfc19 use 'example_proof' (invisible);
wenzelm
parents: 29746
diff changeset
   104
\isacommand{assume}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   105
\ {\isaliteral{22}{\isachardoublequoteopen}}x\ {\isaliteral{5C3C696E3E}{\isasymin}}\ A{\isaliteral{22}{\isachardoublequoteclose}}\ \isakeyword{and}\ {\isaliteral{22}{\isachardoublequoteopen}}x\ {\isaliteral{5C3C696E3E}{\isasymin}}\ B{\isaliteral{22}{\isachardoublequoteclose}}\isanewline
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   106
\ \ \ \ \isacommand{then}\isamarkupfalse%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   107
\ \isacommand{have}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   108
\ {\isaliteral{22}{\isachardoublequoteopen}}x\ {\isaliteral{5C3C696E3E}{\isasymin}}\ A\ {\isaliteral{5C3C696E7465723E}{\isasyminter}}\ B{\isaliteral{22}{\isachardoublequoteclose}}\ \isacommand{{\isaliteral{2E}{\isachardot}}{\isaliteral{2E}{\isachardot}}}\isamarkupfalse%
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   109
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   110
\endisatagproof
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   111
{\isafoldproof}%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   112
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   113
\isadelimproof
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   114
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   115
\endisadelimproof
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   116
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   117
\end{minipage}\begin{minipage}{0.4\textwidth}
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   118
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   119
\begin{isamarkuptext}%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   120
\infer{\isa{{\isaliteral{22}{\isachardoublequote}}x\ {\isaliteral{5C3C696E3E}{\isasymin}}\ A\ {\isaliteral{5C3C696E7465723E}{\isasyminter}}\ B{\isaliteral{22}{\isachardoublequote}}}}{\isa{{\isaliteral{22}{\isachardoublequote}}x\ {\isaliteral{5C3C696E3E}{\isasymin}}\ A{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}x\ {\isaliteral{5C3C696E3E}{\isasymin}}\ B{\isaliteral{22}{\isachardoublequote}}}}%
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   121
\end{isamarkuptext}%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   122
\isamarkuptrue%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   123
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   124
\end{minipage}
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   125
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   126
\begin{isamarkuptext}%
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   127
\medskip\noindent Note that \hyperlink{command.assume}{\mbox{\isa{\isacommand{assume}}}} augments the proof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   128
  context, \hyperlink{command.then}{\mbox{\isa{\isacommand{then}}}} indicates that the current fact shall be
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   129
  used in the next step, and \hyperlink{command.have}{\mbox{\isa{\isacommand{have}}}} states an intermediate
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   130
  goal.  The two dots ``\hyperlink{command.ddot}{\mbox{\isa{\isacommand{{\isaliteral{2E}{\isachardot}}{\isaliteral{2E}{\isachardot}}}}}}'' refer to a complete proof of
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   131
  this claim, using the indicated facts and a canonical rule from the
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   132
  context.  We could have been more explicit here by spelling out the
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   133
  final proof step via the \hyperlink{command.by}{\mbox{\isa{\isacommand{by}}}} command:%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   134
\end{isamarkuptext}%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   135
\isamarkuptrue%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   136
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   137
\isadelimproof
36357
641a521bfc19 use 'example_proof' (invisible);
wenzelm
parents: 29746
diff changeset
   138
\ \ \ \ %
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   139
\endisadelimproof
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   140
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   141
\isatagproof
36357
641a521bfc19 use 'example_proof' (invisible);
wenzelm
parents: 29746
diff changeset
   142
\isacommand{assume}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   143
\ {\isaliteral{22}{\isachardoublequoteopen}}x\ {\isaliteral{5C3C696E3E}{\isasymin}}\ A{\isaliteral{22}{\isachardoublequoteclose}}\ \isakeyword{and}\ {\isaliteral{22}{\isachardoublequoteopen}}x\ {\isaliteral{5C3C696E3E}{\isasymin}}\ B{\isaliteral{22}{\isachardoublequoteclose}}\isanewline
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   144
\ \ \ \ \isacommand{then}\isamarkupfalse%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   145
\ \isacommand{have}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   146
\ {\isaliteral{22}{\isachardoublequoteopen}}x\ {\isaliteral{5C3C696E3E}{\isasymin}}\ A\ {\isaliteral{5C3C696E7465723E}{\isasyminter}}\ B{\isaliteral{22}{\isachardoublequoteclose}}\ \isacommand{by}\isamarkupfalse%
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   147
\ {\isaliteral{28}{\isacharparenleft}}rule\ IntI{\isaliteral{29}{\isacharparenright}}%
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   148
\endisatagproof
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   149
{\isafoldproof}%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   150
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   151
\isadelimproof
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   152
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   153
\endisadelimproof
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   154
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   155
\begin{isamarkuptext}%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   156
\noindent The format of the \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C696E7465723E}{\isasyminter}}{\isaliteral{22}{\isachardoublequote}}}-introduction rule represents
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   157
  the most basic inference, which proceeds from given premises to a
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   158
  conclusion, without any nested proof context involved.
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   159
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   160
  The next example performs backwards introduction on \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C496E7465723E}{\isasymInter}}{\isaliteral{5C3C413E}{\isasymA}}{\isaliteral{22}{\isachardoublequote}}},
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   161
  the intersection of all sets within a given set.  This requires a
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   162
  nested proof of set membership within a local context, where \isa{A} is an arbitrary-but-fixed member of the collection:%
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   163
\end{isamarkuptext}%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   164
\isamarkuptrue%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   165
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   166
\medskip\begin{minipage}{0.6\textwidth}
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   167
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   168
\isadelimproof
36357
641a521bfc19 use 'example_proof' (invisible);
wenzelm
parents: 29746
diff changeset
   169
\ \ \ \ %
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   170
\endisadelimproof
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   171
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   172
\isatagproof
36357
641a521bfc19 use 'example_proof' (invisible);
wenzelm
parents: 29746
diff changeset
   173
\isacommand{have}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   174
\ {\isaliteral{22}{\isachardoublequoteopen}}x\ {\isaliteral{5C3C696E3E}{\isasymin}}\ {\isaliteral{5C3C496E7465723E}{\isasymInter}}{\isaliteral{5C3C413E}{\isasymA}}{\isaliteral{22}{\isachardoublequoteclose}}\isanewline
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   175
\ \ \ \ \isacommand{proof}\isamarkupfalse%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   176
\isanewline
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   177
\ \ \ \ \ \ \isacommand{fix}\isamarkupfalse%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   178
\ A\isanewline
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   179
\ \ \ \ \ \ \isacommand{assume}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   180
\ {\isaliteral{22}{\isachardoublequoteopen}}A\ {\isaliteral{5C3C696E3E}{\isasymin}}\ {\isaliteral{5C3C413E}{\isasymA}}{\isaliteral{22}{\isachardoublequoteclose}}\isanewline
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   181
\ \ \ \ \ \ \isacommand{show}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   182
\ {\isaliteral{22}{\isachardoublequoteopen}}x\ {\isaliteral{5C3C696E3E}{\isasymin}}\ A{\isaliteral{22}{\isachardoublequoteclose}}%
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   183
\endisatagproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   184
{\isafoldproof}%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   185
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   186
\isadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   187
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   188
\endisadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   189
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   190
\isadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   191
\ %
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   192
\endisadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   193
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   194
\isatagnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   195
\isacommand{sorry}\isamarkupfalse%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   196
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   197
\endisatagnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   198
{\isafoldnoproof}%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   199
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   200
\isadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   201
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   202
\endisadelimnoproof
36357
641a521bfc19 use 'example_proof' (invisible);
wenzelm
parents: 29746
diff changeset
   203
\isanewline
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   204
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   205
\isadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   206
\ \ \ \ %
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   207
\endisadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   208
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   209
\isatagproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   210
\isacommand{qed}\isamarkupfalse%
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   211
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   212
\endisatagproof
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   213
{\isafoldproof}%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   214
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   215
\isadelimproof
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   216
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   217
\endisadelimproof
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   218
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   219
\end{minipage}\begin{minipage}{0.4\textwidth}
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   220
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   221
\begin{isamarkuptext}%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   222
\infer{\isa{{\isaliteral{22}{\isachardoublequote}}x\ {\isaliteral{5C3C696E3E}{\isasymin}}\ {\isaliteral{5C3C496E7465723E}{\isasymInter}}{\isaliteral{5C3C413E}{\isasymA}}{\isaliteral{22}{\isachardoublequote}}}}{\infer*{\isa{{\isaliteral{22}{\isachardoublequote}}x\ {\isaliteral{5C3C696E3E}{\isasymin}}\ A{\isaliteral{22}{\isachardoublequote}}}}{\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5B}{\isacharbrackleft}}A{\isaliteral{5D}{\isacharbrackright}}{\isaliteral{5B}{\isacharbrackleft}}A\ {\isaliteral{5C3C696E3E}{\isasymin}}\ {\isaliteral{5C3C413E}{\isasymA}}{\isaliteral{5D}{\isacharbrackright}}{\isaliteral{22}{\isachardoublequote}}}}}%
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   223
\end{isamarkuptext}%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   224
\isamarkuptrue%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   225
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   226
\end{minipage}
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   227
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   228
\begin{isamarkuptext}%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   229
\medskip\noindent This Isar reasoning pattern again refers to the
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   230
  primitive rule depicted above.  The system determines it in the
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   231
  ``\hyperlink{command.proof}{\mbox{\isa{\isacommand{proof}}}}'' step, which could have been spelt out more
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   232
  explicitly as ``\hyperlink{command.proof}{\mbox{\isa{\isacommand{proof}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}rule\ InterI{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}''.  Note
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   233
  that the rule involves both a local parameter \isa{{\isaliteral{22}{\isachardoublequote}}A{\isaliteral{22}{\isachardoublequote}}} and an
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   234
  assumption \isa{{\isaliteral{22}{\isachardoublequote}}A\ {\isaliteral{5C3C696E3E}{\isasymin}}\ {\isaliteral{5C3C413E}{\isasymA}}{\isaliteral{22}{\isachardoublequote}}} in the nested reasoning.  This kind of
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   235
  compound rule typically demands a genuine sub-proof in Isar, working
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   236
  backwards rather than forwards as seen before.  In the proof body we
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   237
  encounter the \hyperlink{command.fix}{\mbox{\isa{\isacommand{fix}}}}-\hyperlink{command.assume}{\mbox{\isa{\isacommand{assume}}}}-\hyperlink{command.show}{\mbox{\isa{\isacommand{show}}}}
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   238
  outline of nested sub-proofs that is typical for Isar.  The final
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   239
  \hyperlink{command.show}{\mbox{\isa{\isacommand{show}}}} is like \hyperlink{command.have}{\mbox{\isa{\isacommand{have}}}} followed by an additional
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   240
  refinement of the enclosing claim, using the rule derived from the
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   241
  proof body.
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   242
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   243
  \medskip The next example involves \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C556E696F6E3E}{\isasymUnion}}{\isaliteral{5C3C413E}{\isasymA}}{\isaliteral{22}{\isachardoublequote}}}, which can be
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   244
  characterized as the set of all \isa{{\isaliteral{22}{\isachardoublequote}}x{\isaliteral{22}{\isachardoublequote}}} such that \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6578697374733E}{\isasymexists}}A{\isaliteral{2E}{\isachardot}}\ x\ {\isaliteral{5C3C696E3E}{\isasymin}}\ A\ {\isaliteral{5C3C616E643E}{\isasymand}}\ A\ {\isaliteral{5C3C696E3E}{\isasymin}}\ {\isaliteral{5C3C413E}{\isasymA}}{\isaliteral{22}{\isachardoublequote}}}.  The elimination rule for \isa{{\isaliteral{22}{\isachardoublequote}}x\ {\isaliteral{5C3C696E3E}{\isasymin}}\ {\isaliteral{5C3C556E696F6E3E}{\isasymUnion}}{\isaliteral{5C3C413E}{\isasymA}}{\isaliteral{22}{\isachardoublequote}}} does
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   245
  not mention \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6578697374733E}{\isasymexists}}{\isaliteral{22}{\isachardoublequote}}} and \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C616E643E}{\isasymand}}{\isaliteral{22}{\isachardoublequote}}} at all, but admits to obtain
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   246
  directly a local \isa{{\isaliteral{22}{\isachardoublequote}}A{\isaliteral{22}{\isachardoublequote}}} such that \isa{{\isaliteral{22}{\isachardoublequote}}x\ {\isaliteral{5C3C696E3E}{\isasymin}}\ A{\isaliteral{22}{\isachardoublequote}}} and \isa{{\isaliteral{22}{\isachardoublequote}}A\ {\isaliteral{5C3C696E3E}{\isasymin}}\ {\isaliteral{5C3C413E}{\isasymA}}{\isaliteral{22}{\isachardoublequote}}} hold.  This corresponds to the following Isar proof and
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   247
  inference rule, respectively:%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   248
\end{isamarkuptext}%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   249
\isamarkuptrue%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   250
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   251
\medskip\begin{minipage}{0.6\textwidth}
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   252
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   253
\isadelimproof
36357
641a521bfc19 use 'example_proof' (invisible);
wenzelm
parents: 29746
diff changeset
   254
\ \ \ \ %
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   255
\endisadelimproof
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   256
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   257
\isatagproof
36357
641a521bfc19 use 'example_proof' (invisible);
wenzelm
parents: 29746
diff changeset
   258
\isacommand{assume}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   259
\ {\isaliteral{22}{\isachardoublequoteopen}}x\ {\isaliteral{5C3C696E3E}{\isasymin}}\ {\isaliteral{5C3C556E696F6E3E}{\isasymUnion}}{\isaliteral{5C3C413E}{\isasymA}}{\isaliteral{22}{\isachardoublequoteclose}}\isanewline
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   260
\ \ \ \ \isacommand{then}\isamarkupfalse%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   261
\ \isacommand{have}\isamarkupfalse%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   262
\ C\isanewline
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   263
\ \ \ \ \isacommand{proof}\isamarkupfalse%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   264
\isanewline
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   265
\ \ \ \ \ \ \isacommand{fix}\isamarkupfalse%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   266
\ A\isanewline
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   267
\ \ \ \ \ \ \isacommand{assume}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   268
\ {\isaliteral{22}{\isachardoublequoteopen}}x\ {\isaliteral{5C3C696E3E}{\isasymin}}\ A{\isaliteral{22}{\isachardoublequoteclose}}\ \isakeyword{and}\ {\isaliteral{22}{\isachardoublequoteopen}}A\ {\isaliteral{5C3C696E3E}{\isasymin}}\ {\isaliteral{5C3C413E}{\isasymA}}{\isaliteral{22}{\isachardoublequoteclose}}\isanewline
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   269
\ \ \ \ \ \ \isacommand{show}\isamarkupfalse%
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   270
\ C%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   271
\endisatagproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   272
{\isafoldproof}%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   273
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   274
\isadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   275
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   276
\endisadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   277
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   278
\isadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   279
\ %
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   280
\endisadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   281
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   282
\isatagnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   283
\isacommand{sorry}\isamarkupfalse%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   284
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   285
\endisatagnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   286
{\isafoldnoproof}%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   287
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   288
\isadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   289
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   290
\endisadelimnoproof
36357
641a521bfc19 use 'example_proof' (invisible);
wenzelm
parents: 29746
diff changeset
   291
\isanewline
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   292
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   293
\isadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   294
\ \ \ \ %
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   295
\endisadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   296
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   297
\isatagproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   298
\isacommand{qed}\isamarkupfalse%
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   299
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   300
\endisatagproof
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   301
{\isafoldproof}%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   302
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   303
\isadelimproof
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   304
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   305
\endisadelimproof
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   306
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   307
\end{minipage}\begin{minipage}{0.4\textwidth}
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   308
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   309
\begin{isamarkuptext}%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   310
\infer{\isa{{\isaliteral{22}{\isachardoublequote}}C{\isaliteral{22}{\isachardoublequote}}}}{\isa{{\isaliteral{22}{\isachardoublequote}}x\ {\isaliteral{5C3C696E3E}{\isasymin}}\ {\isaliteral{5C3C556E696F6E3E}{\isasymUnion}}{\isaliteral{5C3C413E}{\isasymA}}{\isaliteral{22}{\isachardoublequote}}} & \infer*{\isa{{\isaliteral{22}{\isachardoublequote}}C{\isaliteral{22}{\isachardoublequote}}}~}{\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5B}{\isacharbrackleft}}A{\isaliteral{5D}{\isacharbrackright}}{\isaliteral{5B}{\isacharbrackleft}}x\ {\isaliteral{5C3C696E3E}{\isasymin}}\ A{\isaliteral{2C}{\isacharcomma}}\ A\ {\isaliteral{5C3C696E3E}{\isasymin}}\ {\isaliteral{5C3C413E}{\isasymA}}{\isaliteral{5D}{\isacharbrackright}}{\isaliteral{22}{\isachardoublequote}}}}}%
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   311
\end{isamarkuptext}%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   312
\isamarkuptrue%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   313
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   314
\end{minipage}
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   315
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   316
\begin{isamarkuptext}%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   317
\medskip\noindent Although the Isar proof follows the natural
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   318
  deduction rule closely, the text reads not as natural as
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   319
  anticipated.  There is a double occurrence of an arbitrary
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   320
  conclusion \isa{{\isaliteral{22}{\isachardoublequote}}C{\isaliteral{22}{\isachardoublequote}}}, which represents the final result, but is
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   321
  irrelevant for now.  This issue arises for any elimination rule
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   322
  involving local parameters.  Isar provides the derived language
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   323
  element \hyperlink{command.obtain}{\mbox{\isa{\isacommand{obtain}}}}, which is able to perform the same
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   324
  elimination proof more conveniently:%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   325
\end{isamarkuptext}%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   326
\isamarkuptrue%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   327
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   328
\isadelimproof
36357
641a521bfc19 use 'example_proof' (invisible);
wenzelm
parents: 29746
diff changeset
   329
\ \ \ \ %
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   330
\endisadelimproof
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   331
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   332
\isatagproof
36357
641a521bfc19 use 'example_proof' (invisible);
wenzelm
parents: 29746
diff changeset
   333
\isacommand{assume}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   334
\ {\isaliteral{22}{\isachardoublequoteopen}}x\ {\isaliteral{5C3C696E3E}{\isasymin}}\ {\isaliteral{5C3C556E696F6E3E}{\isasymUnion}}{\isaliteral{5C3C413E}{\isasymA}}{\isaliteral{22}{\isachardoublequoteclose}}\isanewline
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   335
\ \ \ \ \isacommand{then}\isamarkupfalse%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   336
\ \isacommand{obtain}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   337
\ A\ \isakeyword{where}\ {\isaliteral{22}{\isachardoublequoteopen}}x\ {\isaliteral{5C3C696E3E}{\isasymin}}\ A{\isaliteral{22}{\isachardoublequoteclose}}\ \isakeyword{and}\ {\isaliteral{22}{\isachardoublequoteopen}}A\ {\isaliteral{5C3C696E3E}{\isasymin}}\ {\isaliteral{5C3C413E}{\isasymA}}{\isaliteral{22}{\isachardoublequoteclose}}\ \isacommand{{\isaliteral{2E}{\isachardot}}{\isaliteral{2E}{\isachardot}}}\isamarkupfalse%
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   338
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   339
\endisatagproof
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   340
{\isafoldproof}%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   341
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   342
\isadelimproof
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   343
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   344
\endisadelimproof
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   345
%
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   346
\begin{isamarkuptext}%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   347
\noindent Here we avoid to mention the final conclusion \isa{{\isaliteral{22}{\isachardoublequote}}C{\isaliteral{22}{\isachardoublequote}}}
29722
a06894e9b6e3 updated generated files;
wenzelm
parents: 29717
diff changeset
   348
  and return to plain forward reasoning.  The rule involved in the
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   349
  ``\hyperlink{command.ddot}{\mbox{\isa{\isacommand{{\isaliteral{2E}{\isachardot}}{\isaliteral{2E}{\isachardot}}}}}}'' proof is the same as before.%
29717
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
   350
\end{isamarkuptext}%
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
   351
\isamarkuptrue%
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
   352
%
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   353
\isamarkupsection{The Pure framework \label{sec:framework-pure}%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   354
}
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   355
\isamarkuptrue%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   356
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   357
\begin{isamarkuptext}%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   358
The Pure logic \cite{paulson-found,paulson700} is an intuitionistic
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   359
  fragment of higher-order logic \cite{church40}.  In type-theoretic
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   360
  parlance, there are three levels of \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C616D6264613E}{\isasymlambda}}{\isaliteral{22}{\isachardoublequote}}}-calculus with
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   361
  corresponding arrows \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}{\isaliteral{22}{\isachardoublequote}}}/\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C416E643E}{\isasymAnd}}{\isaliteral{22}{\isachardoublequote}}}/\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}{\isaliteral{22}{\isachardoublequote}}}:
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   362
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   363
  \medskip
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   364
  \begin{tabular}{ll}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   365
  \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C616C7068613E}{\isasymalpha}}\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ {\isaliteral{5C3C626574613E}{\isasymbeta}}{\isaliteral{22}{\isachardoublequote}}} & syntactic function space (terms depending on terms) \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   366
  \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C416E643E}{\isasymAnd}}x{\isaliteral{2E}{\isachardot}}\ B{\isaliteral{28}{\isacharparenleft}}x{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} & universal quantification (proofs depending on terms) \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   367
  \isa{{\isaliteral{22}{\isachardoublequote}}A\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ B{\isaliteral{22}{\isachardoublequote}}} & implication (proofs depending on proofs) \\
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   368
  \end{tabular}
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   369
  \medskip
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   370
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   371
  \noindent Here only the types of syntactic terms, and the
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   372
  propositions of proof terms have been shown.  The \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C616D6264613E}{\isasymlambda}}{\isaliteral{22}{\isachardoublequote}}}-structure of proofs can be recorded as an optional feature of
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   373
  the Pure inference kernel \cite{Berghofer-Nipkow:2000:TPHOL}, but
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   374
  the formal system can never depend on them due to \emph{proof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   375
  irrelevance}.
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   376
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   377
  On top of this most primitive layer of proofs, Pure implements a
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   378
  generic calculus for nested natural deduction rules, similar to
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   379
  \cite{Schroeder-Heister:1984}.  Here object-logic inferences are
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   380
  internalized as formulae over \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C416E643E}{\isasymAnd}}{\isaliteral{22}{\isachardoublequote}}} and \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}{\isaliteral{22}{\isachardoublequote}}}.
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   381
  Combining such rule statements may involve higher-order unification
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   382
  \cite{paulson-natural}.%
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   383
\end{isamarkuptext}%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   384
\isamarkuptrue%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   385
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   386
\isamarkupsubsection{Primitive inferences%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   387
}
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   388
\isamarkuptrue%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   389
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   390
\begin{isamarkuptext}%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   391
Term syntax provides explicit notation for abstraction \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C616D6264613E}{\isasymlambda}}x\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{5C3C616C7068613E}{\isasymalpha}}{\isaliteral{2E}{\isachardot}}\ b{\isaliteral{28}{\isacharparenleft}}x{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} and application \isa{{\isaliteral{22}{\isachardoublequote}}b\ a{\isaliteral{22}{\isachardoublequote}}}, while types are usually
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   392
  implicit thanks to type-inference; terms of type \isa{{\isaliteral{22}{\isachardoublequote}}prop{\isaliteral{22}{\isachardoublequote}}} are
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   393
  called propositions.  Logical statements are composed via \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C416E643E}{\isasymAnd}}x\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{5C3C616C7068613E}{\isasymalpha}}{\isaliteral{2E}{\isachardot}}\ B{\isaliteral{28}{\isacharparenleft}}x{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} and \isa{{\isaliteral{22}{\isachardoublequote}}A\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ B{\isaliteral{22}{\isachardoublequote}}}.  Primitive reasoning operates on
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   394
  judgments of the form \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ {\isaliteral{5C3C7068693E}{\isasymphi}}{\isaliteral{22}{\isachardoublequote}}}, with standard introduction
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   395
  and elimination rules for \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C416E643E}{\isasymAnd}}{\isaliteral{22}{\isachardoublequote}}} and \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}{\isaliteral{22}{\isachardoublequote}}} that refer to
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   396
  fixed parameters \isa{{\isaliteral{22}{\isachardoublequote}}x\isaliteral{5C3C5E697375623E}{}\isactrlisub {\isadigit{1}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{2C}{\isacharcomma}}\ x\isaliteral{5C3C5E697375623E}{}\isactrlisub m{\isaliteral{22}{\isachardoublequote}}} and hypotheses
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   397
  \isa{{\isaliteral{22}{\isachardoublequote}}A\isaliteral{5C3C5E697375623E}{}\isactrlisub {\isadigit{1}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{2C}{\isacharcomma}}\ A\isaliteral{5C3C5E697375623E}{}\isactrlisub n{\isaliteral{22}{\isachardoublequote}}} from the context \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}{\isaliteral{22}{\isachardoublequote}}};
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   398
  the corresponding proof terms are left implicit.  The subsequent
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   399
  inference rules define \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ {\isaliteral{5C3C7068693E}{\isasymphi}}{\isaliteral{22}{\isachardoublequote}}} inductively, relative to a
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   400
  collection of axioms:
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   401
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   402
  \[
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   403
  \infer{\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ A{\isaliteral{22}{\isachardoublequote}}}}{(\isa{{\isaliteral{22}{\isachardoublequote}}A{\isaliteral{22}{\isachardoublequote}}} \text{~axiom})}
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   404
  \qquad
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   405
  \infer{\isa{{\isaliteral{22}{\isachardoublequote}}A\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ A{\isaliteral{22}{\isachardoublequote}}}}{}
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   406
  \]
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   407
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   408
  \[
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   409
  \infer{\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ {\isaliteral{5C3C416E643E}{\isasymAnd}}x{\isaliteral{2E}{\isachardot}}\ B{\isaliteral{28}{\isacharparenleft}}x{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}}{\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ B{\isaliteral{28}{\isacharparenleft}}x{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}x\ {\isaliteral{5C3C6E6F74696E3E}{\isasymnotin}}\ {\isaliteral{5C3C47616D6D613E}{\isasymGamma}}{\isaliteral{22}{\isachardoublequote}}}}
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   410
  \qquad
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   411
  \infer{\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ B{\isaliteral{28}{\isacharparenleft}}a{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}}{\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ {\isaliteral{5C3C416E643E}{\isasymAnd}}x{\isaliteral{2E}{\isachardot}}\ B{\isaliteral{28}{\isacharparenleft}}x{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}}
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   412
  \]
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   413
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   414
  \[
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   415
  \infer{\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\ {\isaliteral{2D}{\isacharminus}}\ A\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ A\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ B{\isaliteral{22}{\isachardoublequote}}}}{\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ B{\isaliteral{22}{\isachardoublequote}}}}
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   416
  \qquad
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   417
  \infer{\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C756E696F6E3E}{\isasymunion}}\ {\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{2}}\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ B{\isaliteral{22}{\isachardoublequote}}}}{\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ A\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ B{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{2}}\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ A{\isaliteral{22}{\isachardoublequote}}}}
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   418
  \]
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   419
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   420
  Furthermore, Pure provides a built-in equality \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C65717569763E}{\isasymequiv}}\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{5C3C616C7068613E}{\isasymalpha}}\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ {\isaliteral{5C3C616C7068613E}{\isasymalpha}}\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ prop{\isaliteral{22}{\isachardoublequote}}} with axioms for reflexivity, substitution, extensionality,
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   421
  and \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C616C7068613E}{\isasymalpha}}{\isaliteral{5C3C626574613E}{\isasymbeta}}{\isaliteral{5C3C6574613E}{\isasymeta}}{\isaliteral{22}{\isachardoublequote}}}-conversion on \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C616D6264613E}{\isasymlambda}}{\isaliteral{22}{\isachardoublequote}}}-terms.
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   422
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   423
  \medskip An object-logic introduces another layer on top of Pure,
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   424
  e.g.\ with types \isa{{\isaliteral{22}{\isachardoublequote}}i{\isaliteral{22}{\isachardoublequote}}} for individuals and \isa{{\isaliteral{22}{\isachardoublequote}}o{\isaliteral{22}{\isachardoublequote}}} for
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   425
  propositions, term constants \isa{{\isaliteral{22}{\isachardoublequote}}Trueprop\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ o\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ prop{\isaliteral{22}{\isachardoublequote}}} as
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   426
  (implicit) derivability judgment and connectives like \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C616E643E}{\isasymand}}\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ o\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ o\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ o{\isaliteral{22}{\isachardoublequote}}} or \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C666F72616C6C3E}{\isasymforall}}\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{28}{\isacharparenleft}}i\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ o{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ o{\isaliteral{22}{\isachardoublequote}}}, and axioms for object-level
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   427
  rules such as \isa{{\isaliteral{22}{\isachardoublequote}}conjI{\isaliteral{3A}{\isacharcolon}}\ A\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ B\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ A\ {\isaliteral{5C3C616E643E}{\isasymand}}\ B{\isaliteral{22}{\isachardoublequote}}} or \isa{{\isaliteral{22}{\isachardoublequote}}allI{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C416E643E}{\isasymAnd}}x{\isaliteral{2E}{\isachardot}}\ B\ x{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{5C3C666F72616C6C3E}{\isasymforall}}x{\isaliteral{2E}{\isachardot}}\ B\ x{\isaliteral{22}{\isachardoublequote}}}.  Derived object rules are represented as theorems of
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   428
  Pure.  After the initial object-logic setup, further axiomatizations
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   429
  are usually avoided; plain definitions and derived principles are
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   430
  used exclusively.%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   431
\end{isamarkuptext}%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   432
\isamarkuptrue%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   433
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   434
\isamarkupsubsection{Reasoning with rules \label{sec:framework-resolution}%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   435
}
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   436
\isamarkuptrue%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   437
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   438
\begin{isamarkuptext}%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   439
Primitive inferences mostly serve foundational purposes.  The main
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   440
  reasoning mechanisms of Pure operate on nested natural deduction
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   441
  rules expressed as formulae, using \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C416E643E}{\isasymAnd}}{\isaliteral{22}{\isachardoublequote}}} to bind local
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   442
  parameters and \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}{\isaliteral{22}{\isachardoublequote}}} to express entailment.  Multiple
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   443
  parameters and premises are represented by repeating these
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   444
  connectives in a right-associative manner.
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   445
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   446
  Since \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C416E643E}{\isasymAnd}}{\isaliteral{22}{\isachardoublequote}}} and \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}{\isaliteral{22}{\isachardoublequote}}} commute thanks to the theorem
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   447
  \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}A\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C416E643E}{\isasymAnd}}x{\isaliteral{2E}{\isachardot}}\ B\ x{\isaliteral{29}{\isacharparenright}}{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C65717569763E}{\isasymequiv}}\ {\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C416E643E}{\isasymAnd}}x{\isaliteral{2E}{\isachardot}}\ A\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ B\ x{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}, we may assume w.l.o.g.\
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   448
  that rule statements always observe the normal form where
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   449
  quantifiers are pulled in front of implications at each level of
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   450
  nesting.  This means that any Pure proposition may be presented as a
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   451
  \emph{Hereditary Harrop Formula} \cite{Miller:1991} which is of the
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   452
  form \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C416E643E}{\isasymAnd}}x\isaliteral{5C3C5E697375623E}{}\isactrlisub {\isadigit{1}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ x\isaliteral{5C3C5E697375623E}{}\isactrlisub m{\isaliteral{2E}{\isachardot}}\ H\isaliteral{5C3C5E697375623E}{}\isactrlisub {\isadigit{1}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ H\isaliteral{5C3C5E697375623E}{}\isactrlisub n\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ A{\isaliteral{22}{\isachardoublequote}}} for \isa{{\isaliteral{22}{\isachardoublequote}}m{\isaliteral{2C}{\isacharcomma}}\ n\ {\isaliteral{5C3C67653E}{\isasymge}}\ {\isadigit{0}}{\isaliteral{22}{\isachardoublequote}}}, and \isa{{\isaliteral{22}{\isachardoublequote}}A{\isaliteral{22}{\isachardoublequote}}} atomic, and \isa{{\isaliteral{22}{\isachardoublequote}}H\isaliteral{5C3C5E697375623E}{}\isactrlisub {\isadigit{1}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{2C}{\isacharcomma}}\ H\isaliteral{5C3C5E697375623E}{}\isactrlisub n{\isaliteral{22}{\isachardoublequote}}} being recursively of the same format.
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   453
  Following the convention that outermost quantifiers are implicit,
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   454
  Horn clauses \isa{{\isaliteral{22}{\isachardoublequote}}A\isaliteral{5C3C5E697375623E}{}\isactrlisub {\isadigit{1}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ A\isaliteral{5C3C5E697375623E}{}\isactrlisub n\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ A{\isaliteral{22}{\isachardoublequote}}} are a special
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   455
  case of this.
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   456
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   457
  For example, \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C696E7465723E}{\isasyminter}}{\isaliteral{22}{\isachardoublequote}}}-introduction rule encountered before is
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   458
  represented as a Pure theorem as follows:
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   459
  \[
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   460
  \isa{{\isaliteral{22}{\isachardoublequote}}IntI{\isaliteral{3A}{\isacharcolon}}{\isaliteral{22}{\isachardoublequote}}}~\isa{{\isaliteral{22}{\isachardoublequote}}x\ {\isaliteral{5C3C696E3E}{\isasymin}}\ A\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ x\ {\isaliteral{5C3C696E3E}{\isasymin}}\ B\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ x\ {\isaliteral{5C3C696E3E}{\isasymin}}\ A\ {\isaliteral{5C3C696E7465723E}{\isasyminter}}\ B{\isaliteral{22}{\isachardoublequote}}}
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   461
  \]
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   462
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   463
  \noindent This is a plain Horn clause, since no further nesting on
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   464
  the left is involved.  The general \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C496E7465723E}{\isasymInter}}{\isaliteral{22}{\isachardoublequote}}}-introduction
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   465
  corresponds to a Hereditary Harrop Formula with one additional level
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   466
  of nesting:
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   467
  \[
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   468
  \isa{{\isaliteral{22}{\isachardoublequote}}InterI{\isaliteral{3A}{\isacharcolon}}{\isaliteral{22}{\isachardoublequote}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C416E643E}{\isasymAnd}}A{\isaliteral{2E}{\isachardot}}\ A\ {\isaliteral{5C3C696E3E}{\isasymin}}\ {\isaliteral{5C3C413E}{\isasymA}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ x\ {\isaliteral{5C3C696E3E}{\isasymin}}\ A{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ x\ {\isaliteral{5C3C696E3E}{\isasymin}}\ {\isaliteral{5C3C496E7465723E}{\isasymInter}}{\isaliteral{5C3C413E}{\isasymA}}{\isaliteral{22}{\isachardoublequote}}}
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   469
  \]
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   470
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   471
  \medskip Goals are also represented as rules: \isa{{\isaliteral{22}{\isachardoublequote}}A\isaliteral{5C3C5E697375623E}{}\isactrlisub {\isadigit{1}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ A\isaliteral{5C3C5E697375623E}{}\isactrlisub n\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ C{\isaliteral{22}{\isachardoublequote}}} states that the sub-goals \isa{{\isaliteral{22}{\isachardoublequote}}A\isaliteral{5C3C5E697375623E}{}\isactrlisub {\isadigit{1}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{2C}{\isacharcomma}}\ A\isaliteral{5C3C5E697375623E}{}\isactrlisub n{\isaliteral{22}{\isachardoublequote}}} entail the result \isa{{\isaliteral{22}{\isachardoublequote}}C{\isaliteral{22}{\isachardoublequote}}}; for \isa{{\isaliteral{22}{\isachardoublequote}}n\ {\isaliteral{3D}{\isacharequal}}\ {\isadigit{0}}{\isaliteral{22}{\isachardoublequote}}} the
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   472
  goal is finished.  To allow \isa{{\isaliteral{22}{\isachardoublequote}}C{\isaliteral{22}{\isachardoublequote}}} being a rule statement
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   473
  itself, we introduce the protective marker \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{23}{\isacharhash}}\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ prop\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ prop{\isaliteral{22}{\isachardoublequote}}}, which is defined as identity and hidden from the user.  We
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   474
  initialize and finish goal states as follows:
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   475
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   476
  \[
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   477
  \begin{array}{c@ {\qquad}c}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   478
  \infer[(\indexdef{}{inference}{init}\hypertarget{inference.init}{\hyperlink{inference.init}{\mbox{\isa{init}}}})]{\isa{{\isaliteral{22}{\isachardoublequote}}C\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{23}{\isacharhash}}C{\isaliteral{22}{\isachardoublequote}}}}{} &
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   479
  \infer[(\indexdef{}{inference}{finish}\hypertarget{inference.finish}{\hyperlink{inference.finish}{\mbox{\isa{finish}}}})]{\isa{C}}{\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{23}{\isacharhash}}C{\isaliteral{22}{\isachardoublequote}}}}
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   480
  \end{array}
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   481
  \]
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   482
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   483
  \noindent Goal states are refined in intermediate proof steps until
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   484
  a finished form is achieved.  Here the two main reasoning principles
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   485
  are \hyperlink{inference.resolution}{\mbox{\isa{resolution}}}, for back-chaining a rule against a
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   486
  sub-goal (replacing it by zero or more sub-goals), and \hyperlink{inference.assumption}{\mbox{\isa{assumption}}}, for solving a sub-goal (finding a short-circuit with
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   487
  local assumptions).  Below \isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7665633E}{}\isactrlvec x{\isaliteral{22}{\isachardoublequote}}} stands for \isa{{\isaliteral{22}{\isachardoublequote}}x\isaliteral{5C3C5E697375623E}{}\isactrlisub {\isadigit{1}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{2C}{\isacharcomma}}\ x\isaliteral{5C3C5E697375623E}{}\isactrlisub n{\isaliteral{22}{\isachardoublequote}}} (\isa{{\isaliteral{22}{\isachardoublequote}}n\ {\isaliteral{5C3C67653E}{\isasymge}}\ {\isadigit{0}}{\isaliteral{22}{\isachardoublequote}}}).
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   488
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   489
  \[
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   490
  \infer[(\indexdef{}{inference}{resolution}\hypertarget{inference.resolution}{\hyperlink{inference.resolution}{\mbox{\isa{resolution}}}})]
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   491
  {\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C416E643E}{\isasymAnd}}\isaliteral{5C3C5E7665633E}{}\isactrlvec x{\isaliteral{2E}{\isachardot}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec H\ \isaliteral{5C3C5E7665633E}{}\isactrlvec x\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec A\ {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7665633E}{}\isactrlvec a\ \isaliteral{5C3C5E7665633E}{}\isactrlvec x{\isaliteral{29}{\isacharparenright}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{5C3C76617274686574613E}{\isasymvartheta}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ C{\isaliteral{5C3C76617274686574613E}{\isasymvartheta}}{\isaliteral{22}{\isachardoublequote}}}}
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   492
  {\begin{tabular}{rl}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   493
    \isa{{\isaliteral{22}{\isachardoublequote}}rule{\isaliteral{3A}{\isacharcolon}}{\isaliteral{22}{\isachardoublequote}}} &
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   494
    \isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7665633E}{}\isactrlvec A\ \isaliteral{5C3C5E7665633E}{}\isactrlvec a\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ B\ \isaliteral{5C3C5E7665633E}{}\isactrlvec a{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   495
    \isa{{\isaliteral{22}{\isachardoublequote}}goal{\isaliteral{3A}{\isacharcolon}}{\isaliteral{22}{\isachardoublequote}}} &
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   496
    \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C416E643E}{\isasymAnd}}\isaliteral{5C3C5E7665633E}{}\isactrlvec x{\isaliteral{2E}{\isachardot}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec H\ \isaliteral{5C3C5E7665633E}{}\isactrlvec x\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ B{\isaliteral{27}{\isacharprime}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec x{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ C{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   497
    \isa{{\isaliteral{22}{\isachardoublequote}}goal\ unifier{\isaliteral{3A}{\isacharcolon}}{\isaliteral{22}{\isachardoublequote}}} &
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   498
    \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6C616D6264613E}{\isasymlambda}}\isaliteral{5C3C5E7665633E}{}\isactrlvec x{\isaliteral{2E}{\isachardot}}\ B\ {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7665633E}{}\isactrlvec a\ \isaliteral{5C3C5E7665633E}{}\isactrlvec x{\isaliteral{29}{\isacharparenright}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{5C3C76617274686574613E}{\isasymvartheta}}\ {\isaliteral{3D}{\isacharequal}}\ B{\isaliteral{27}{\isacharprime}}{\isaliteral{5C3C76617274686574613E}{\isasymvartheta}}{\isaliteral{22}{\isachardoublequote}}} \\
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   499
   \end{tabular}}
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   500
  \]
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   501
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   502
  \medskip
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   503
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   504
  \[
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   505
  \infer[(\indexdef{}{inference}{assumption}\hypertarget{inference.assumption}{\hyperlink{inference.assumption}{\mbox{\isa{assumption}}}})]{\isa{{\isaliteral{22}{\isachardoublequote}}C{\isaliteral{5C3C76617274686574613E}{\isasymvartheta}}{\isaliteral{22}{\isachardoublequote}}}}
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   506
  {\begin{tabular}{rl}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   507
    \isa{{\isaliteral{22}{\isachardoublequote}}goal{\isaliteral{3A}{\isacharcolon}}{\isaliteral{22}{\isachardoublequote}}} &
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   508
    \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C416E643E}{\isasymAnd}}\isaliteral{5C3C5E7665633E}{}\isactrlvec x{\isaliteral{2E}{\isachardot}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec H\ \isaliteral{5C3C5E7665633E}{}\isactrlvec x\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ A\ \isaliteral{5C3C5E7665633E}{}\isactrlvec x{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ C{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   509
    \isa{{\isaliteral{22}{\isachardoublequote}}assm\ unifier{\isaliteral{3A}{\isacharcolon}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}A{\isaliteral{5C3C76617274686574613E}{\isasymvartheta}}\ {\isaliteral{3D}{\isacharequal}}\ H\isaliteral{5C3C5E7375623E}{}\isactrlsub i{\isaliteral{5C3C76617274686574613E}{\isasymvartheta}}{\isaliteral{22}{\isachardoublequote}}}~~\text{(for some~\isa{{\isaliteral{22}{\isachardoublequote}}H\isaliteral{5C3C5E7375623E}{}\isactrlsub i{\isaliteral{22}{\isachardoublequote}}})} \\
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   510
   \end{tabular}}
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   511
  \]
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   512
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   513
  The following trace illustrates goal-oriented reasoning in
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   514
  Isabelle/Pure:
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   515
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   516
  {\footnotesize
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   517
  \medskip
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   518
  \begin{tabular}{r@ {\quad}l}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   519
  \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}A\ {\isaliteral{5C3C616E643E}{\isasymand}}\ B\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ B\ {\isaliteral{5C3C616E643E}{\isasymand}}\ A{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{23}{\isacharhash}}{\isaliteral{28}{\isacharparenleft}}A\ {\isaliteral{5C3C616E643E}{\isasymand}}\ B\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ B\ {\isaliteral{5C3C616E643E}{\isasymand}}\ A{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}init{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   520
  \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}A\ {\isaliteral{5C3C616E643E}{\isasymand}}\ B\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ B{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{28}{\isacharparenleft}}A\ {\isaliteral{5C3C616E643E}{\isasymand}}\ B\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ A{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{23}{\isacharhash}}{\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}resolution\ B\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ A\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ B\ {\isaliteral{5C3C616E643E}{\isasymand}}\ A{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   521
  \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}A\ {\isaliteral{5C3C616E643E}{\isasymand}}\ B\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ A\ {\isaliteral{5C3C616E643E}{\isasymand}}\ B{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{28}{\isacharparenleft}}A\ {\isaliteral{5C3C616E643E}{\isasymand}}\ B\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ A{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{23}{\isacharhash}}{\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}resolution\ A\ {\isaliteral{5C3C616E643E}{\isasymand}}\ B\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ B{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   522
  \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}A\ {\isaliteral{5C3C616E643E}{\isasymand}}\ B\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ A{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{23}{\isacharhash}}{\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}assumption{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   523
  \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}A\ {\isaliteral{5C3C616E643E}{\isasymand}}\ B\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ B\ {\isaliteral{5C3C616E643E}{\isasymand}}\ A{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{23}{\isacharhash}}{\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}resolution\ A\ {\isaliteral{5C3C616E643E}{\isasymand}}\ B\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ A{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   524
  \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{23}{\isacharhash}}{\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}assumption{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   525
  \isa{{\isaliteral{22}{\isachardoublequote}}A\ {\isaliteral{5C3C616E643E}{\isasymand}}\ B\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ B\ {\isaliteral{5C3C616E643E}{\isasymand}}\ A{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}finish{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   526
  \end{tabular}
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   527
  \medskip
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   528
  }
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   529
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   530
  Compositions of \hyperlink{inference.assumption}{\mbox{\isa{assumption}}} after \hyperlink{inference.resolution}{\mbox{\isa{resolution}}} occurs quite often, typically in elimination steps.
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   531
  Traditional Isabelle tactics accommodate this by a combined
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   532
  \indexdef{}{inference}{elim\_resolution}\hypertarget{inference.elim-resolution}{\hyperlink{inference.elim-resolution}{\mbox{\isa{elim{\isaliteral{5F}{\isacharunderscore}}resolution}}}} principle.  In contrast, Isar uses
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   533
  a slightly more refined combination, where the assumptions to be
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   534
  closed are marked explicitly, using again the protective marker
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   535
  \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{23}{\isacharhash}}{\isaliteral{22}{\isachardoublequote}}}:
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   536
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   537
  \[
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   538
  \infer[(\hyperlink{inference.refinement}{\mbox{\isa{refinement}}})]
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   539
  {\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C416E643E}{\isasymAnd}}\isaliteral{5C3C5E7665633E}{}\isactrlvec x{\isaliteral{2E}{\isachardot}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec H\ \isaliteral{5C3C5E7665633E}{}\isactrlvec x\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec G{\isaliteral{27}{\isacharprime}}\ {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7665633E}{}\isactrlvec a\ \isaliteral{5C3C5E7665633E}{}\isactrlvec x{\isaliteral{29}{\isacharparenright}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{5C3C76617274686574613E}{\isasymvartheta}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ C{\isaliteral{5C3C76617274686574613E}{\isasymvartheta}}{\isaliteral{22}{\isachardoublequote}}}}
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   540
  {\begin{tabular}{rl}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   541
    \isa{{\isaliteral{22}{\isachardoublequote}}sub{\isaliteral{5C3C646173683E}{\isasymdash}}proof{\isaliteral{3A}{\isacharcolon}}{\isaliteral{22}{\isachardoublequote}}} &
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   542
    \isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7665633E}{}\isactrlvec G\ \isaliteral{5C3C5E7665633E}{}\isactrlvec a\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ B\ \isaliteral{5C3C5E7665633E}{}\isactrlvec a{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   543
    \isa{{\isaliteral{22}{\isachardoublequote}}goal{\isaliteral{3A}{\isacharcolon}}{\isaliteral{22}{\isachardoublequote}}} &
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   544
    \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C416E643E}{\isasymAnd}}\isaliteral{5C3C5E7665633E}{}\isactrlvec x{\isaliteral{2E}{\isachardot}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec H\ \isaliteral{5C3C5E7665633E}{}\isactrlvec x\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ B{\isaliteral{27}{\isacharprime}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec x{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ C{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   545
    \isa{{\isaliteral{22}{\isachardoublequote}}goal\ unifier{\isaliteral{3A}{\isacharcolon}}{\isaliteral{22}{\isachardoublequote}}} &
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   546
    \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6C616D6264613E}{\isasymlambda}}\isaliteral{5C3C5E7665633E}{}\isactrlvec x{\isaliteral{2E}{\isachardot}}\ B\ {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7665633E}{}\isactrlvec a\ \isaliteral{5C3C5E7665633E}{}\isactrlvec x{\isaliteral{29}{\isacharparenright}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{5C3C76617274686574613E}{\isasymvartheta}}\ {\isaliteral{3D}{\isacharequal}}\ B{\isaliteral{27}{\isacharprime}}{\isaliteral{5C3C76617274686574613E}{\isasymvartheta}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   547
    \isa{{\isaliteral{22}{\isachardoublequote}}assm\ unifiers{\isaliteral{3A}{\isacharcolon}}{\isaliteral{22}{\isachardoublequote}}} &
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   548
    \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C6C616D6264613E}{\isasymlambda}}\isaliteral{5C3C5E7665633E}{}\isactrlvec x{\isaliteral{2E}{\isachardot}}\ G\isaliteral{5C3C5E7375623E}{}\isactrlsub j\ {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7665633E}{}\isactrlvec a\ \isaliteral{5C3C5E7665633E}{}\isactrlvec x{\isaliteral{29}{\isacharparenright}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{5C3C76617274686574613E}{\isasymvartheta}}\ {\isaliteral{3D}{\isacharequal}}\ {\isaliteral{23}{\isacharhash}}H\isaliteral{5C3C5E7375623E}{}\isactrlsub i{\isaliteral{5C3C76617274686574613E}{\isasymvartheta}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   549
    & \quad (for each marked \isa{{\isaliteral{22}{\isachardoublequote}}G\isaliteral{5C3C5E7375623E}{}\isactrlsub j{\isaliteral{22}{\isachardoublequote}}} some \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{23}{\isacharhash}}H\isaliteral{5C3C5E7375623E}{}\isactrlsub i{\isaliteral{22}{\isachardoublequote}}}) \\
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   550
   \end{tabular}}
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   551
  \]
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   552
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   553
  \noindent Here the \isa{{\isaliteral{22}{\isachardoublequote}}sub{\isaliteral{5C3C646173683E}{\isasymdash}}proof{\isaliteral{22}{\isachardoublequote}}} rule stems from the
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   554
  main \hyperlink{command.fix}{\mbox{\isa{\isacommand{fix}}}}-\hyperlink{command.assume}{\mbox{\isa{\isacommand{assume}}}}-\hyperlink{command.show}{\mbox{\isa{\isacommand{show}}}} outline of
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   555
  Isar (cf.\ \secref{sec:framework-subproof}): each assumption
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   556
  indicated in the text results in a marked premise \isa{{\isaliteral{22}{\isachardoublequote}}G{\isaliteral{22}{\isachardoublequote}}} above.
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   557
  The marking enforces resolution against one of the sub-goal's
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   558
  premises.  Consequently, \hyperlink{command.fix}{\mbox{\isa{\isacommand{fix}}}}-\hyperlink{command.assume}{\mbox{\isa{\isacommand{assume}}}}-\hyperlink{command.show}{\mbox{\isa{\isacommand{show}}}} enables to fit the result of a sub-proof quite robustly into a
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   559
  pending sub-goal, while maintaining a good measure of flexibility.%
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   560
\end{isamarkuptext}%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   561
\isamarkuptrue%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   562
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   563
\isamarkupsection{The Isar proof language \label{sec:framework-isar}%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   564
}
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   565
\isamarkuptrue%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   566
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   567
\begin{isamarkuptext}%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   568
Structured proofs are presented as high-level expressions for
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   569
  composing entities of Pure (propositions, facts, and goals).  The
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   570
  Isar proof language allows to organize reasoning within the
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   571
  underlying rule calculus of Pure, but Isar is not another logical
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   572
  calculus!
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   573
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   574
  Isar is an exercise in sound minimalism.  Approximately half of the
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   575
  language is introduced as primitive, the rest defined as derived
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   576
  concepts.  The following grammar describes the core language
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   577
  (category \isa{{\isaliteral{22}{\isachardoublequote}}proof{\isaliteral{22}{\isachardoublequote}}}), which is embedded into theory
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   578
  specification elements such as \hyperlink{command.theorem}{\mbox{\isa{\isacommand{theorem}}}}; see also
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   579
  \secref{sec:framework-stmt} for the separate category \isa{{\isaliteral{22}{\isachardoublequote}}statement{\isaliteral{22}{\isachardoublequote}}}.
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   580
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   581
  \medskip
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   582
  \begin{tabular}{rcl}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   583
    \isa{{\isaliteral{22}{\isachardoublequote}}theory{\isaliteral{5C3C646173683E}{\isasymdash}}stmt{\isaliteral{22}{\isachardoublequote}}} & = & \hyperlink{command.theorem}{\mbox{\isa{\isacommand{theorem}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}statement\ proof\ \ {\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}}~~\hyperlink{command.definition}{\mbox{\isa{\isacommand{definition}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C646F74733E}{\isasymdots}}\ \ {\isaliteral{7C}{\isacharbar}}\ \ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{22}{\isachardoublequote}}} \\[1ex]
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   584
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   585
    \isa{{\isaliteral{22}{\isachardoublequote}}proof{\isaliteral{22}{\isachardoublequote}}} & = & \isa{{\isaliteral{22}{\isachardoublequote}}prfx\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}}~\hyperlink{command.proof}{\mbox{\isa{\isacommand{proof}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}method\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{3F}{\isacharquery}}\ stmt\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}}~\hyperlink{command.qed}{\mbox{\isa{\isacommand{qed}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}method\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{3F}{\isacharquery}}{\isaliteral{22}{\isachardoublequote}}} \\[1ex]
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   586
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   587
    \isa{prfx} & = & \hyperlink{command.using}{\mbox{\isa{\isacommand{using}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}facts{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   588
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \hyperlink{command.unfolding}{\mbox{\isa{\isacommand{unfolding}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}facts{\isaliteral{22}{\isachardoublequote}}} \\
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   589
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   590
    \isa{stmt} & = & \hyperlink{command.braceleft}{\mbox{\isa{\isacommand{{\isaliteral{7B}{\isacharbraceleft}}}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}stmt\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}}~\hyperlink{command.braceright}{\mbox{\isa{\isacommand{{\isaliteral{7D}{\isacharbraceright}}}}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   591
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \hyperlink{command.next}{\mbox{\isa{\isacommand{next}}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   592
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \hyperlink{command.note}{\mbox{\isa{\isacommand{note}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}name\ {\isaliteral{3D}{\isacharequal}}\ facts{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   593
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \hyperlink{command.let}{\mbox{\isa{\isacommand{let}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}term\ {\isaliteral{3D}{\isacharequal}}\ term{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   594
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \hyperlink{command.fix}{\mbox{\isa{\isacommand{fix}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}var\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2B}{\isacharplus}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   595
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \hyperlink{command.assume}{\mbox{\isa{\isacommand{assume}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6775696C6C656D6F746C6566743E}{\isasymguillemotleft}}inference{\isaliteral{5C3C6775696C6C656D6F7472696768743E}{\isasymguillemotright}}\ name{\isaliteral{3A}{\isacharcolon}}\ props{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   596
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \hyperlink{command.then}{\mbox{\isa{\isacommand{then}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{3F}{\isacharquery}}{\isaliteral{22}{\isachardoublequote}}}~\isa{goal} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   597
    \isa{goal} & = & \hyperlink{command.have}{\mbox{\isa{\isacommand{have}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}name{\isaliteral{3A}{\isacharcolon}}\ props\ proof{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   598
    & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \hyperlink{command.show}{\mbox{\isa{\isacommand{show}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}name{\isaliteral{3A}{\isacharcolon}}\ props\ proof{\isaliteral{22}{\isachardoublequote}}} \\
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   599
  \end{tabular}
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   600
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   601
  \medskip Simultaneous propositions or facts may be separated by the
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   602
  \hyperlink{keyword.and}{\mbox{\isa{\isakeyword{and}}}} keyword.
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   603
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   604
  \medskip The syntax for terms and propositions is inherited from
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   605
  Pure (and the object-logic).  A \isa{{\isaliteral{22}{\isachardoublequote}}pattern{\isaliteral{22}{\isachardoublequote}}} is a \isa{{\isaliteral{22}{\isachardoublequote}}term{\isaliteral{22}{\isachardoublequote}}} with schematic variables, to be bound by higher-order
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   606
  matching.
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   607
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   608
  \medskip Facts may be referenced by name or proposition.  For
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   609
  example, the result of ``\hyperlink{command.have}{\mbox{\isa{\isacommand{have}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}a{\isaliteral{3A}{\isacharcolon}}\ A\ {\isaliteral{5C3C6C616E676C653E}{\isasymlangle}}proof{\isaliteral{5C3C72616E676C653E}{\isasymrangle}}{\isaliteral{22}{\isachardoublequote}}}''
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   610
  becomes available both as \isa{{\isaliteral{22}{\isachardoublequote}}a{\isaliteral{22}{\isachardoublequote}}} and
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   611
  \isacharbackquoteopen\isa{{\isaliteral{22}{\isachardoublequote}}A{\isaliteral{22}{\isachardoublequote}}}\isacharbackquoteclose.  Moreover,
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   612
  fact expressions may involve attributes that modify either the
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   613
  theorem or the background context.  For example, the expression
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   614
  ``\isa{{\isaliteral{22}{\isachardoublequote}}a\ {\isaliteral{5B}{\isacharbrackleft}}OF\ b{\isaliteral{5D}{\isacharbrackright}}{\isaliteral{22}{\isachardoublequote}}}'' refers to the composition of two facts
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   615
  according to the \hyperlink{inference.resolution}{\mbox{\isa{resolution}}} inference of
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   616
  \secref{sec:framework-resolution}, while ``\isa{{\isaliteral{22}{\isachardoublequote}}a\ {\isaliteral{5B}{\isacharbrackleft}}intro{\isaliteral{5D}{\isacharbrackright}}{\isaliteral{22}{\isachardoublequote}}}''
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   617
  declares a fact as introduction rule in the context.
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   618
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   619
  The special fact called ``\hyperlink{fact.this}{\mbox{\isa{this}}}'' always refers to the last
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   620
  result, as produced by \hyperlink{command.note}{\mbox{\isa{\isacommand{note}}}}, \hyperlink{command.assume}{\mbox{\isa{\isacommand{assume}}}}, \hyperlink{command.have}{\mbox{\isa{\isacommand{have}}}}, or \hyperlink{command.show}{\mbox{\isa{\isacommand{show}}}}.  Since \hyperlink{command.note}{\mbox{\isa{\isacommand{note}}}} occurs
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   621
  frequently together with \hyperlink{command.then}{\mbox{\isa{\isacommand{then}}}} we provide some
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   622
  abbreviations:
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   623
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   624
  \medskip
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   625
  \begin{tabular}{rcl}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   626
    \hyperlink{command.from}{\mbox{\isa{\isacommand{from}}}}~\isa{a} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C65717569763E}{\isasymequiv}}{\isaliteral{22}{\isachardoublequote}}} & \hyperlink{command.note}{\mbox{\isa{\isacommand{note}}}}~\isa{a}~\hyperlink{command.then}{\mbox{\isa{\isacommand{then}}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   627
    \hyperlink{command.with}{\mbox{\isa{\isacommand{with}}}}~\isa{a} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C65717569763E}{\isasymequiv}}{\isaliteral{22}{\isachardoublequote}}} & \hyperlink{command.from}{\mbox{\isa{\isacommand{from}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}a\ {\isaliteral{5C3C414E443E}{\isasymAND}}\ this{\isaliteral{22}{\isachardoublequote}}} \\
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   628
  \end{tabular}
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   629
  \medskip
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   630
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   631
  The \isa{{\isaliteral{22}{\isachardoublequote}}method{\isaliteral{22}{\isachardoublequote}}} category is essentially a parameter and may be
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   632
  populated later.  Methods use the facts indicated by \hyperlink{command.then}{\mbox{\isa{\isacommand{then}}}} or \hyperlink{command.using}{\mbox{\isa{\isacommand{using}}}}, and then operate on the goal state.
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   633
  Some basic methods are predefined: ``\hyperlink{method.-}{\mbox{\isa{{\isaliteral{2D}{\isacharminus}}}}}'' leaves the goal
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   634
  unchanged, ``\hyperlink{method.this}{\mbox{\isa{this}}}'' applies the facts as rules to the
42626
6ac8c55c657e eliminated some duplicate "def" positions;
wenzelm
parents: 40476
diff changeset
   635
  goal, ``\hyperlink{method.Pure.rule}{\mbox{\isa{rule}}}'' applies the facts to another rule and the
6ac8c55c657e eliminated some duplicate "def" positions;
wenzelm
parents: 40476
diff changeset
   636
  result to the goal (both ``\hyperlink{method.this}{\mbox{\isa{this}}}'' and ``\hyperlink{method.Pure.rule}{\mbox{\isa{rule}}}''
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   637
  refer to \hyperlink{inference.resolution}{\mbox{\isa{resolution}}} of
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   638
  \secref{sec:framework-resolution}).  The secondary arguments to
42626
6ac8c55c657e eliminated some duplicate "def" positions;
wenzelm
parents: 40476
diff changeset
   639
  ``\hyperlink{method.Pure.rule}{\mbox{\isa{rule}}}'' may be specified explicitly as in ``\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}rule\ a{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}'', or picked from the context.  In the latter case, the system
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   640
  first tries rules declared as \hyperlink{attribute.Pure.elim}{\mbox{\isa{elim}}} or
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   641
  \hyperlink{attribute.Pure.dest}{\mbox{\isa{dest}}}, followed by those declared as \hyperlink{attribute.Pure.intro}{\mbox{\isa{intro}}}.
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   642
42626
6ac8c55c657e eliminated some duplicate "def" positions;
wenzelm
parents: 40476
diff changeset
   643
  The default method for \hyperlink{command.proof}{\mbox{\isa{\isacommand{proof}}}} is ``\hyperlink{method.Pure.rule}{\mbox{\isa{rule}}}''
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   644
  (arguments picked from the context), for \hyperlink{command.qed}{\mbox{\isa{\isacommand{qed}}}} it is
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   645
  ``\hyperlink{method.-}{\mbox{\isa{{\isaliteral{2D}{\isacharminus}}}}}''.  Further abbreviations for terminal proof steps
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   646
  are ``\hyperlink{command.by}{\mbox{\isa{\isacommand{by}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}method\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ method\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{2}}{\isaliteral{22}{\isachardoublequote}}}'' for
42626
6ac8c55c657e eliminated some duplicate "def" positions;
wenzelm
parents: 40476
diff changeset
   647
  ``\hyperlink{command.proof}{\mbox{\isa{\isacommand{proof}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}method\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{22}{\isachardoublequote}}}~\hyperlink{command.qed}{\mbox{\isa{\isacommand{qed}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}method\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{2}}{\isaliteral{22}{\isachardoublequote}}}'', and ``\hyperlink{command.ddot}{\mbox{\isa{\isacommand{{\isaliteral{2E}{\isachardot}}{\isaliteral{2E}{\isachardot}}}}}}'' for ``\hyperlink{command.by}{\mbox{\isa{\isacommand{by}}}}~\hyperlink{method.Pure.rule}{\mbox{\isa{rule}}}, and ``\hyperlink{command.dot}{\mbox{\isa{\isacommand{{\isaliteral{2E}{\isachardot}}}}}}'' for ``\hyperlink{command.by}{\mbox{\isa{\isacommand{by}}}}~\hyperlink{method.this}{\mbox{\isa{this}}}''.  The \hyperlink{command.unfolding}{\mbox{\isa{\isacommand{unfolding}}}} element operates
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   648
  directly on the current facts and goal by applying equalities.
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   649
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   650
  \medskip Block structure can be indicated explicitly by ``\hyperlink{command.braceleft}{\mbox{\isa{\isacommand{{\isaliteral{7B}{\isacharbraceleft}}}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{22}{\isachardoublequote}}}~\hyperlink{command.braceright}{\mbox{\isa{\isacommand{{\isaliteral{7D}{\isacharbraceright}}}}}}'', although the body of a sub-proof
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   651
  already involves implicit nesting.  In any case, \hyperlink{command.next}{\mbox{\isa{\isacommand{next}}}}
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   652
  jumps into the next section of a block, i.e.\ it acts like closing
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   653
  an implicit block scope and opening another one; there is no direct
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   654
  correspondence to subgoals here.
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   655
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   656
  The remaining elements \hyperlink{command.fix}{\mbox{\isa{\isacommand{fix}}}} and \hyperlink{command.assume}{\mbox{\isa{\isacommand{assume}}}} build up
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   657
  a local context (see \secref{sec:framework-context}), while
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   658
  \hyperlink{command.show}{\mbox{\isa{\isacommand{show}}}} refines a pending sub-goal by the rule resulting
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   659
  from a nested sub-proof (see \secref{sec:framework-subproof}).
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   660
  Further derived concepts will support calculational reasoning (see
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   661
  \secref{sec:framework-calc}).%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   662
\end{isamarkuptext}%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   663
\isamarkuptrue%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   664
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   665
\isamarkupsubsection{Context elements \label{sec:framework-context}%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   666
}
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   667
\isamarkuptrue%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   668
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   669
\begin{isamarkuptext}%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   670
In judgments \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ {\isaliteral{5C3C7068693E}{\isasymphi}}{\isaliteral{22}{\isachardoublequote}}} of the primitive framework, \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}{\isaliteral{22}{\isachardoublequote}}}
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   671
  essentially acts like a proof context.  Isar elaborates this idea
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   672
  towards a higher-level notion, with additional information for
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   673
  type-inference, term abbreviations, local facts, hypotheses etc.
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   674
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   675
  The element \hyperlink{command.fix}{\mbox{\isa{\isacommand{fix}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}x\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{5C3C616C7068613E}{\isasymalpha}}{\isaliteral{22}{\isachardoublequote}}} declares a local
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   676
  parameter, i.e.\ an arbitrary-but-fixed entity of a given type; in
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   677
  results exported from the context, \isa{{\isaliteral{22}{\isachardoublequote}}x{\isaliteral{22}{\isachardoublequote}}} may become anything.
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   678
  The \hyperlink{command.assume}{\mbox{\isa{\isacommand{assume}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6775696C6C656D6F746C6566743E}{\isasymguillemotleft}}inference{\isaliteral{5C3C6775696C6C656D6F7472696768743E}{\isasymguillemotright}}{\isaliteral{22}{\isachardoublequote}}} element provides a
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   679
  general interface to hypotheses: ``\hyperlink{command.assume}{\mbox{\isa{\isacommand{assume}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6775696C6C656D6F746C6566743E}{\isasymguillemotleft}}inference{\isaliteral{5C3C6775696C6C656D6F7472696768743E}{\isasymguillemotright}}\ A{\isaliteral{22}{\isachardoublequote}}}'' produces \isa{{\isaliteral{22}{\isachardoublequote}}A\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ A{\isaliteral{22}{\isachardoublequote}}} locally, while the
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   680
  included inference tells how to discharge \isa{A} from results
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   681
  \isa{{\isaliteral{22}{\isachardoublequote}}A\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ B{\isaliteral{22}{\isachardoublequote}}} later on.  There is no user-syntax for \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6775696C6C656D6F746C6566743E}{\isasymguillemotleft}}inference{\isaliteral{5C3C6775696C6C656D6F7472696768743E}{\isasymguillemotright}}{\isaliteral{22}{\isachardoublequote}}}, i.e.\ it may only occur internally when derived
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   682
  commands are defined in ML.
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   683
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   684
  At the user-level, the default inference for \hyperlink{command.assume}{\mbox{\isa{\isacommand{assume}}}} is
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   685
  \hyperlink{inference.discharge}{\mbox{\isa{discharge}}} as given below.  The additional variants
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   686
  \hyperlink{command.presume}{\mbox{\isa{\isacommand{presume}}}} and \hyperlink{command.def}{\mbox{\isa{\isacommand{def}}}} are defined as follows:
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   687
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   688
  \medskip
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   689
  \begin{tabular}{rcl}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   690
    \hyperlink{command.presume}{\mbox{\isa{\isacommand{presume}}}}~\isa{A} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C65717569763E}{\isasymequiv}}{\isaliteral{22}{\isachardoublequote}}} & \hyperlink{command.assume}{\mbox{\isa{\isacommand{assume}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6775696C6C656D6F746C6566743E}{\isasymguillemotleft}}weak{\isaliteral{5C3C646173683E}{\isasymdash}}discharge{\isaliteral{5C3C6775696C6C656D6F7472696768743E}{\isasymguillemotright}}\ A{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   691
    \hyperlink{command.def}{\mbox{\isa{\isacommand{def}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}x\ {\isaliteral{5C3C65717569763E}{\isasymequiv}}\ a{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C65717569763E}{\isasymequiv}}{\isaliteral{22}{\isachardoublequote}}} & \hyperlink{command.fix}{\mbox{\isa{\isacommand{fix}}}}~\isa{x}~\hyperlink{command.assume}{\mbox{\isa{\isacommand{assume}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6775696C6C656D6F746C6566743E}{\isasymguillemotleft}}expansion{\isaliteral{5C3C6775696C6C656D6F7472696768743E}{\isasymguillemotright}}\ x\ {\isaliteral{5C3C65717569763E}{\isasymequiv}}\ a{\isaliteral{22}{\isachardoublequote}}} \\
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   692
  \end{tabular}
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   693
  \medskip
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   694
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   695
  \[
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   696
  \infer[(\indexdef{}{inference}{discharge}\hypertarget{inference.discharge}{\hyperlink{inference.discharge}{\mbox{\isa{discharge}}}})]{\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C73747275743E}{\isasymstrut}}{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\ {\isaliteral{2D}{\isacharminus}}\ A\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ {\isaliteral{23}{\isacharhash}}A\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ B{\isaliteral{22}{\isachardoublequote}}}}{\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C73747275743E}{\isasymstrut}}{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ B{\isaliteral{22}{\isachardoublequote}}}}
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   697
  \]
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   698
  \[
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   699
  \infer[(\indexdef{}{inference}{weak-discharge}\hypertarget{inference.weak-discharge}{\hyperlink{inference.weak-discharge}{\mbox{\isa{weak{\isaliteral{5C3C646173683E}{\isasymdash}}discharge}}}})]{\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C73747275743E}{\isasymstrut}}{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\ {\isaliteral{2D}{\isacharminus}}\ A\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ A\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ B{\isaliteral{22}{\isachardoublequote}}}}{\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C73747275743E}{\isasymstrut}}{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ B{\isaliteral{22}{\isachardoublequote}}}}
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   700
  \]
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   701
  \[
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   702
  \infer[(\indexdef{}{inference}{expansion}\hypertarget{inference.expansion}{\hyperlink{inference.expansion}{\mbox{\isa{expansion}}}})]{\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C73747275743E}{\isasymstrut}}{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\ {\isaliteral{2D}{\isacharminus}}\ {\isaliteral{28}{\isacharparenleft}}x\ {\isaliteral{5C3C65717569763E}{\isasymequiv}}\ a{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ B\ a{\isaliteral{22}{\isachardoublequote}}}}{\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C73747275743E}{\isasymstrut}}{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ B\ x{\isaliteral{22}{\isachardoublequote}}}}
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   703
  \]
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   704
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   705
  \medskip Note that \hyperlink{inference.discharge}{\mbox{\isa{discharge}}} and \hyperlink{inference.weak-discharge}{\mbox{\isa{weak{\isaliteral{5C3C646173683E}{\isasymdash}}discharge}}} differ in the marker for \isa{A}, which is
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   706
  relevant when the result of a \hyperlink{command.fix}{\mbox{\isa{\isacommand{fix}}}}-\hyperlink{command.assume}{\mbox{\isa{\isacommand{assume}}}}-\hyperlink{command.show}{\mbox{\isa{\isacommand{show}}}} outline is composed with a pending goal,
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   707
  cf.\ \secref{sec:framework-subproof}.
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   708
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   709
  The most interesting derived context element in Isar is \hyperlink{command.obtain}{\mbox{\isa{\isacommand{obtain}}}} \cite[\S5.3]{Wenzel-PhD}, which supports generalized
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   710
  elimination steps in a purely forward manner.  The \hyperlink{command.obtain}{\mbox{\isa{\isacommand{obtain}}}}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   711
  command takes a specification of parameters \isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7665633E}{}\isactrlvec x{\isaliteral{22}{\isachardoublequote}}} and
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   712
  assumptions \isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7665633E}{}\isactrlvec A{\isaliteral{22}{\isachardoublequote}}} to be added to the context, together
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   713
  with a proof of a case rule stating that this extension is
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   714
  conservative (i.e.\ may be removed from closed results later on):
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   715
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   716
  \medskip
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   717
  \begin{tabular}{l}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   718
  \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C616E676C653E}{\isasymlangle}}facts{\isaliteral{5C3C72616E676C653E}{\isasymrangle}}{\isaliteral{22}{\isachardoublequote}}}~~\hyperlink{command.obtain}{\mbox{\isa{\isacommand{obtain}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7665633E}{}\isactrlvec x\ {\isaliteral{5C3C57484552453E}{\isasymWHERE}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec A\ \isaliteral{5C3C5E7665633E}{}\isactrlvec x\ \ {\isaliteral{5C3C6C616E676C653E}{\isasymlangle}}proof{\isaliteral{5C3C72616E676C653E}{\isasymrangle}}\ {\isaliteral{5C3C65717569763E}{\isasymequiv}}{\isaliteral{22}{\isachardoublequote}}} \\[0.5ex]
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   719
  \quad \hyperlink{command.have}{\mbox{\isa{\isacommand{have}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}case{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{5C3C416E643E}{\isasymAnd}}thesis{\isaliteral{2E}{\isachardot}}\ {\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C416E643E}{\isasymAnd}}\isaliteral{5C3C5E7665633E}{}\isactrlvec x{\isaliteral{2E}{\isachardot}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec A\ \isaliteral{5C3C5E7665633E}{}\isactrlvec x\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ thesis{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ thesis{\isaliteral{5C3C72616E676C653E}{\isasymrangle}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   720
  \quad \hyperlink{command.proof}{\mbox{\isa{\isacommand{proof}}}}~\hyperlink{method.-}{\mbox{\isa{{\isaliteral{2D}{\isacharminus}}}}} \\
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   721
  \qquad \hyperlink{command.fix}{\mbox{\isa{\isacommand{fix}}}}~\isa{thesis} \\
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   722
  \qquad \hyperlink{command.assume}{\mbox{\isa{\isacommand{assume}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5B}{\isacharbrackleft}}intro{\isaliteral{5D}{\isacharbrackright}}{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{5C3C416E643E}{\isasymAnd}}\isaliteral{5C3C5E7665633E}{}\isactrlvec x{\isaliteral{2E}{\isachardot}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec A\ \isaliteral{5C3C5E7665633E}{}\isactrlvec x\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ thesis{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   723
  \qquad \hyperlink{command.show}{\mbox{\isa{\isacommand{show}}}}~\isa{thesis}~\hyperlink{command.using}{\mbox{\isa{\isacommand{using}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C616E676C653E}{\isasymlangle}}facts{\isaliteral{5C3C72616E676C653E}{\isasymrangle}}\ {\isaliteral{5C3C6C616E676C653E}{\isasymlangle}}proof{\isaliteral{5C3C72616E676C653E}{\isasymrangle}}{\isaliteral{22}{\isachardoublequote}}} \\
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   724
  \quad \hyperlink{command.qed}{\mbox{\isa{\isacommand{qed}}}} \\
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   725
  \quad \hyperlink{command.fix}{\mbox{\isa{\isacommand{fix}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7665633E}{}\isactrlvec x{\isaliteral{22}{\isachardoublequote}}}~\hyperlink{command.assume}{\mbox{\isa{\isacommand{assume}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6775696C6C656D6F746C6566743E}{\isasymguillemotleft}}elimination\ case{\isaliteral{5C3C6775696C6C656D6F7472696768743E}{\isasymguillemotright}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec A\ \isaliteral{5C3C5E7665633E}{}\isactrlvec x{\isaliteral{22}{\isachardoublequote}}} \\
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   726
  \end{tabular}
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   727
  \medskip
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   728
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   729
  \[
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   730
  \infer[(\hyperlink{inference.elimination}{\mbox{\isa{elimination}}})]{\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ B{\isaliteral{22}{\isachardoublequote}}}}{
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   731
    \begin{tabular}{rl}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   732
    \isa{{\isaliteral{22}{\isachardoublequote}}case{\isaliteral{3A}{\isacharcolon}}{\isaliteral{22}{\isachardoublequote}}} &
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   733
    \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ {\isaliteral{5C3C416E643E}{\isasymAnd}}thesis{\isaliteral{2E}{\isachardot}}\ {\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C416E643E}{\isasymAnd}}\isaliteral{5C3C5E7665633E}{}\isactrlvec x{\isaliteral{2E}{\isachardot}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec A\ \isaliteral{5C3C5E7665633E}{}\isactrlvec x\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ thesis{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ thesis{\isaliteral{22}{\isachardoublequote}}} \\[0.2ex]
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   734
    \isa{{\isaliteral{22}{\isachardoublequote}}result{\isaliteral{3A}{\isacharcolon}}{\isaliteral{22}{\isachardoublequote}}} &
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   735
    \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C47616D6D613E}{\isasymGamma}}\ {\isaliteral{5C3C756E696F6E3E}{\isasymunion}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec A\ \isaliteral{5C3C5E7665633E}{}\isactrlvec y\ {\isaliteral{5C3C7475726E7374696C653E}{\isasymturnstile}}\ B{\isaliteral{22}{\isachardoublequote}}} \\[0.2ex]
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   736
    \end{tabular}}
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   737
  \]
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   738
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   739
  \noindent Here the name ``\isa{thesis}'' is a specific convention
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   740
  for an arbitrary-but-fixed proposition; in the primitive natural
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   741
  deduction rules shown before we have occasionally used \isa{C}.
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   742
  The whole statement of ``\hyperlink{command.obtain}{\mbox{\isa{\isacommand{obtain}}}}~\isa{x}~\hyperlink{keyword.where}{\mbox{\isa{\isakeyword{where}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}A\ x{\isaliteral{22}{\isachardoublequote}}}'' may be read as a claim that \isa{{\isaliteral{22}{\isachardoublequote}}A\ x{\isaliteral{22}{\isachardoublequote}}}
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   743
  may be assumed for some arbitrary-but-fixed \isa{{\isaliteral{22}{\isachardoublequote}}x{\isaliteral{22}{\isachardoublequote}}}.  Also note
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   744
  that ``\hyperlink{command.obtain}{\mbox{\isa{\isacommand{obtain}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}A\ {\isaliteral{5C3C414E443E}{\isasymAND}}\ B{\isaliteral{22}{\isachardoublequote}}}'' without parameters
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   745
  is similar to ``\hyperlink{command.have}{\mbox{\isa{\isacommand{have}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}A\ {\isaliteral{5C3C414E443E}{\isasymAND}}\ B{\isaliteral{22}{\isachardoublequote}}}'', but the
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   746
  latter involves multiple sub-goals.
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   747
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   748
  \medskip The subsequent Isar proof texts explain all context
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   749
  elements introduced above using the formal proof language itself.
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   750
  After finishing a local proof within a block, we indicate the
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   751
  exported result via \hyperlink{command.note}{\mbox{\isa{\isacommand{note}}}}.%
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   752
\end{isamarkuptext}%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   753
\isamarkuptrue%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   754
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   755
\isadelimproof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   756
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   757
\endisadelimproof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   758
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   759
\isatagproof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   760
%
40476
515eab39b6c2 reduced danger of line breaks within minipage;
wenzelm
parents: 40406
diff changeset
   761
\begin{minipage}[t]{0.45\textwidth}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   762
\ \ \isacommand{{\isaliteral{7B}{\isacharbraceleft}}}\isamarkupfalse%
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   763
\isanewline
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   764
\ \ \ \ \isacommand{fix}\isamarkupfalse%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   765
\ x\isanewline
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   766
\ \ \ \ \isacommand{have}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   767
\ {\isaliteral{22}{\isachardoublequoteopen}}B\ x{\isaliteral{22}{\isachardoublequoteclose}}%
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   768
\endisatagproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   769
{\isafoldproof}%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   770
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   771
\isadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   772
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   773
\endisadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   774
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   775
\isadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   776
\ %
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   777
\endisadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   778
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   779
\isatagnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   780
\isacommand{sorry}\isamarkupfalse%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   781
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   782
\endisatagnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   783
{\isafoldnoproof}%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   784
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   785
\isadelimnoproof
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   786
\isanewline
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   787
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   788
\endisadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   789
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   790
\isadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   791
\ \ %
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   792
\endisadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   793
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   794
\isatagproof
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   795
\isacommand{{\isaliteral{7D}{\isacharbraceright}}}\isamarkupfalse%
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   796
\isanewline
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   797
\ \ \isacommand{note}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   798
\ {\isaliteral{60}{\isacharbackquoteopen}}{\isaliteral{5C3C416E643E}{\isasymAnd}}x{\isaliteral{2E}{\isachardot}}\ B\ x{\isaliteral{60}{\isacharbackquoteclose}}%
40476
515eab39b6c2 reduced danger of line breaks within minipage;
wenzelm
parents: 40406
diff changeset
   799
\end{minipage}\quad\begin{minipage}[t]{0.45\textwidth}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   800
\ \ \isacommand{{\isaliteral{7B}{\isacharbraceleft}}}\isamarkupfalse%
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   801
\isanewline
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   802
\ \ \ \ \isacommand{assume}\isamarkupfalse%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   803
\ A\isanewline
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   804
\ \ \ \ \isacommand{have}\isamarkupfalse%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   805
\ B%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   806
\endisatagproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   807
{\isafoldproof}%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   808
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   809
\isadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   810
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   811
\endisadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   812
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   813
\isadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   814
\ %
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   815
\endisadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   816
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   817
\isatagnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   818
\isacommand{sorry}\isamarkupfalse%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   819
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   820
\endisatagnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   821
{\isafoldnoproof}%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   822
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   823
\isadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   824
\isanewline
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   825
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   826
\endisadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   827
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   828
\isadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   829
\ \ %
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   830
\endisadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   831
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   832
\isatagproof
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   833
\isacommand{{\isaliteral{7D}{\isacharbraceright}}}\isamarkupfalse%
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   834
\isanewline
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   835
\ \ \isacommand{note}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   836
\ {\isaliteral{60}{\isacharbackquoteopen}}A\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ B{\isaliteral{60}{\isacharbackquoteclose}}%
40476
515eab39b6c2 reduced danger of line breaks within minipage;
wenzelm
parents: 40406
diff changeset
   837
\end{minipage}\\[3ex]\begin{minipage}[t]{0.45\textwidth}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   838
\ \ \isacommand{{\isaliteral{7B}{\isacharbraceleft}}}\isamarkupfalse%
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   839
\isanewline
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   840
\ \ \ \ \isacommand{def}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   841
\ x\ {\isaliteral{5C3C65717569763E}{\isasymequiv}}\ a\isanewline
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   842
\ \ \ \ \isacommand{have}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   843
\ {\isaliteral{22}{\isachardoublequoteopen}}B\ x{\isaliteral{22}{\isachardoublequoteclose}}%
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   844
\endisatagproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   845
{\isafoldproof}%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   846
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   847
\isadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   848
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   849
\endisadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   850
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   851
\isadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   852
\ %
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   853
\endisadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   854
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   855
\isatagnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   856
\isacommand{sorry}\isamarkupfalse%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   857
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   858
\endisatagnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   859
{\isafoldnoproof}%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   860
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   861
\isadelimnoproof
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   862
\isanewline
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   863
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   864
\endisadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   865
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   866
\isadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   867
\ \ %
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   868
\endisadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   869
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   870
\isatagproof
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   871
\isacommand{{\isaliteral{7D}{\isacharbraceright}}}\isamarkupfalse%
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   872
\isanewline
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   873
\ \ \isacommand{note}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   874
\ {\isaliteral{60}{\isacharbackquoteopen}}B\ a{\isaliteral{60}{\isacharbackquoteclose}}%
40476
515eab39b6c2 reduced danger of line breaks within minipage;
wenzelm
parents: 40406
diff changeset
   875
\end{minipage}\quad\begin{minipage}[t]{0.45\textwidth}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   876
\ \ \isacommand{{\isaliteral{7B}{\isacharbraceleft}}}\isamarkupfalse%
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   877
\isanewline
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   878
\ \ \ \ \isacommand{obtain}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   879
\ x\ \isakeyword{where}\ {\isaliteral{22}{\isachardoublequoteopen}}A\ x{\isaliteral{22}{\isachardoublequoteclose}}%
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   880
\endisatagproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   881
{\isafoldproof}%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   882
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   883
\isadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   884
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   885
\endisadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   886
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   887
\isadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   888
\ %
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   889
\endisadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   890
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   891
\isatagnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   892
\isacommand{sorry}\isamarkupfalse%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   893
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   894
\endisatagnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   895
{\isafoldnoproof}%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   896
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   897
\isadelimnoproof
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   898
\isanewline
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   899
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   900
\endisadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   901
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   902
\isadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   903
\ \ \ \ %
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   904
\endisadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   905
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   906
\isatagproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   907
\isacommand{have}\isamarkupfalse%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   908
\ B%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   909
\endisatagproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   910
{\isafoldproof}%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   911
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   912
\isadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   913
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   914
\endisadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   915
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   916
\isadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   917
\ %
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   918
\endisadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   919
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   920
\isatagnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   921
\isacommand{sorry}\isamarkupfalse%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   922
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   923
\endisatagnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   924
{\isafoldnoproof}%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   925
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   926
\isadelimnoproof
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   927
\isanewline
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   928
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   929
\endisadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   930
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   931
\isadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   932
\ \ %
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   933
\endisadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   934
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   935
\isatagproof
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   936
\isacommand{{\isaliteral{7D}{\isacharbraceright}}}\isamarkupfalse%
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   937
\isanewline
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   938
\ \ \isacommand{note}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   939
\ {\isaliteral{60}{\isacharbackquoteopen}}B{\isaliteral{60}{\isacharbackquoteclose}}%
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   940
\end{minipage}
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   941
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   942
\endisatagproof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   943
{\isafoldproof}%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   944
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   945
\isadelimproof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   946
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   947
\endisadelimproof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   948
%
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   949
\begin{isamarkuptext}%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   950
\bigskip\noindent This illustrates the meaning of Isar context
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   951
  elements without goals getting in between.%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   952
\end{isamarkuptext}%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   953
\isamarkuptrue%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
   954
%
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   955
\isamarkupsubsection{Structured statements \label{sec:framework-stmt}%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   956
}
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   957
\isamarkuptrue%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   958
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   959
\begin{isamarkuptext}%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   960
The category \isa{{\isaliteral{22}{\isachardoublequote}}statement{\isaliteral{22}{\isachardoublequote}}} of top-level theorem specifications
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   961
  is defined as follows:
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   962
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   963
  \medskip
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   964
  \begin{tabular}{rcl}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   965
  \isa{{\isaliteral{22}{\isachardoublequote}}statement{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C65717569763E}{\isasymequiv}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}name{\isaliteral{3A}{\isacharcolon}}\ props\ {\isaliteral{5C3C414E443E}{\isasymAND}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   966
  & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}context\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}\ conclusion{\isaliteral{22}{\isachardoublequote}}} \\[0.5ex]
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   967
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   968
  \isa{{\isaliteral{22}{\isachardoublequote}}context{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C65717569763E}{\isasymequiv}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C46495845533E}{\isasymFIXES}}\ vars\ {\isaliteral{5C3C414E443E}{\isasymAND}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   969
  & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C415353554D45533E}{\isasymASSUMES}}\ name{\isaliteral{3A}{\isacharcolon}}\ props\ {\isaliteral{5C3C414E443E}{\isasymAND}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{22}{\isachardoublequote}}} \\
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   970
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   971
  \isa{{\isaliteral{22}{\isachardoublequote}}conclusion{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C65717569763E}{\isasymequiv}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C53484F57533E}{\isasymSHOWS}}\ name{\isaliteral{3A}{\isacharcolon}}\ props\ {\isaliteral{5C3C414E443E}{\isasymAND}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   972
  & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{7C}{\isacharbar}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C4F425441494E533E}{\isasymOBTAINS}}\ vars\ {\isaliteral{5C3C414E443E}{\isasymAND}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{5C3C57484552453E}{\isasymWHERE}}\ name{\isaliteral{3A}{\isacharcolon}}\ props\ {\isaliteral{5C3C414E443E}{\isasymAND}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   973
  & & \quad \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C424241523E}{\isasymBBAR}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{22}{\isachardoublequote}}} \\
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   974
  \end{tabular}
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   975
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   976
  \medskip\noindent A simple \isa{{\isaliteral{22}{\isachardoublequote}}statement{\isaliteral{22}{\isachardoublequote}}} consists of named
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   977
  propositions.  The full form admits local context elements followed
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   978
  by the actual conclusions, such as ``\hyperlink{keyword.fixes}{\mbox{\isa{\isakeyword{fixes}}}}~\isa{x}~\hyperlink{keyword.assumes}{\mbox{\isa{\isakeyword{assumes}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}A\ x{\isaliteral{22}{\isachardoublequote}}}~\hyperlink{keyword.shows}{\mbox{\isa{\isakeyword{shows}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}B\ x{\isaliteral{22}{\isachardoublequote}}}''.  The final result emerges as a Pure rule after discharging
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   979
  the context: \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C416E643E}{\isasymAnd}}x{\isaliteral{2E}{\isachardot}}\ A\ x\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ B\ x{\isaliteral{22}{\isachardoublequote}}}.
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   980
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   981
  The \hyperlink{keyword.obtains}{\mbox{\isa{\isakeyword{obtains}}}} variant is another abbreviation defined
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   982
  below; unlike \hyperlink{command.obtain}{\mbox{\isa{\isacommand{obtain}}}} (cf.\
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   983
  \secref{sec:framework-context}) there may be several ``cases''
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   984
  separated by ``\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C424241523E}{\isasymBBAR}}{\isaliteral{22}{\isachardoublequote}}}'', each consisting of several
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   985
  parameters (\isa{{\isaliteral{22}{\isachardoublequote}}vars{\isaliteral{22}{\isachardoublequote}}}) and several premises (\isa{{\isaliteral{22}{\isachardoublequote}}props{\isaliteral{22}{\isachardoublequote}}}).
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   986
  This specifies multi-branch elimination rules.
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   987
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   988
  \medskip
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   989
  \begin{tabular}{l}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   990
  \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C4F425441494E533E}{\isasymOBTAINS}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec x\ {\isaliteral{5C3C57484552453E}{\isasymWHERE}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec A\ \isaliteral{5C3C5E7665633E}{}\isactrlvec x\ \ \ {\isaliteral{5C3C424241523E}{\isasymBBAR}}\ \ \ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ \ \ {\isaliteral{5C3C65717569763E}{\isasymequiv}}{\isaliteral{22}{\isachardoublequote}}} \\[0.5ex]
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   991
  \quad \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C46495845533E}{\isasymFIXES}}\ thesis{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   992
  \quad \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C415353554D45533E}{\isasymASSUMES}}\ {\isaliteral{5B}{\isacharbrackleft}}intro{\isaliteral{5D}{\isacharbrackright}}{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{5C3C416E643E}{\isasymAnd}}\isaliteral{5C3C5E7665633E}{}\isactrlvec x{\isaliteral{2E}{\isachardot}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec A\ \isaliteral{5C3C5E7665633E}{}\isactrlvec x\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ thesis\ \ {\isaliteral{5C3C414E443E}{\isasymAND}}\ \ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
   993
  \quad \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C53484F57533E}{\isasymSHOWS}}\ thesis{\isaliteral{22}{\isachardoublequote}}} \\
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   994
  \end{tabular}
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   995
  \medskip
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   996
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   997
  Presenting structured statements in such an ``open'' format usually
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   998
  simplifies the subsequent proof, because the outer structure of the
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
   999
  problem is already laid out directly.  E.g.\ consider the following
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1000
  canonical patterns for \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C53484F57533E}{\isasymSHOWS}}{\isaliteral{22}{\isachardoublequote}}} and \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C4F425441494E533E}{\isasymOBTAINS}}{\isaliteral{22}{\isachardoublequote}}},
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1001
  respectively:%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1002
\end{isamarkuptext}%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1003
\isamarkuptrue%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1004
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1005
\begin{minipage}{0.5\textwidth}
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1006
\isacommand{theorem}\isamarkupfalse%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1007
\isanewline
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1008
\ \ \isakeyword{fixes}\ x\ \isakeyword{and}\ y\isanewline
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1009
\ \ \isakeyword{assumes}\ {\isaliteral{22}{\isachardoublequoteopen}}A\ x{\isaliteral{22}{\isachardoublequoteclose}}\ \isakeyword{and}\ {\isaliteral{22}{\isachardoublequoteopen}}B\ y{\isaliteral{22}{\isachardoublequoteclose}}\isanewline
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1010
\ \ \isakeyword{shows}\ {\isaliteral{22}{\isachardoublequoteopen}}C\ x\ y{\isaliteral{22}{\isachardoublequoteclose}}\isanewline
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1011
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1012
\isadelimproof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1013
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1014
\endisadelimproof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1015
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1016
\isatagproof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1017
\isacommand{proof}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1018
\ {\isaliteral{2D}{\isacharminus}}\isanewline
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1019
\ \ \isacommand{from}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1020
\ {\isaliteral{60}{\isacharbackquoteopen}}A\ x{\isaliteral{60}{\isacharbackquoteclose}}\ \isakeyword{and}\ {\isaliteral{60}{\isacharbackquoteopen}}B\ y{\isaliteral{60}{\isacharbackquoteclose}}\isanewline
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1021
\ \ \isacommand{show}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1022
\ {\isaliteral{22}{\isachardoublequoteopen}}C\ x\ y{\isaliteral{22}{\isachardoublequoteclose}}%
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1023
\endisatagproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1024
{\isafoldproof}%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1025
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1026
\isadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1027
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1028
\endisadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1029
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1030
\isadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1031
\ %
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1032
\endisadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1033
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1034
\isatagnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1035
\isacommand{sorry}\isamarkupfalse%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1036
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1037
\endisatagnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1038
{\isafoldnoproof}%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1039
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1040
\isadelimnoproof
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1041
\isanewline
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1042
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1043
\endisadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1044
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1045
\isadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1046
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1047
\endisadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1048
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1049
\isatagproof
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1050
\isacommand{qed}\isamarkupfalse%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1051
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1052
\endisatagproof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1053
{\isafoldproof}%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1054
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1055
\isadelimproof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1056
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1057
\endisadelimproof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1058
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1059
\end{minipage}\begin{minipage}{0.5\textwidth}
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1060
\isacommand{theorem}\isamarkupfalse%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1061
\isanewline
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1062
\ \ \isakeyword{obtains}\ x\ \isakeyword{and}\ y\isanewline
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1063
\ \ \isakeyword{where}\ {\isaliteral{22}{\isachardoublequoteopen}}A\ x{\isaliteral{22}{\isachardoublequoteclose}}\ \isakeyword{and}\ {\isaliteral{22}{\isachardoublequoteopen}}B\ y{\isaliteral{22}{\isachardoublequoteclose}}\isanewline
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1064
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1065
\isadelimproof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1066
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1067
\endisadelimproof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1068
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1069
\isatagproof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1070
\isacommand{proof}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1071
\ {\isaliteral{2D}{\isacharminus}}\isanewline
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1072
\ \ \isacommand{have}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1073
\ {\isaliteral{22}{\isachardoublequoteopen}}A\ a{\isaliteral{22}{\isachardoublequoteclose}}\ \isakeyword{and}\ {\isaliteral{22}{\isachardoublequoteopen}}B\ b{\isaliteral{22}{\isachardoublequoteclose}}%
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1074
\endisatagproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1075
{\isafoldproof}%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1076
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1077
\isadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1078
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1079
\endisadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1080
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1081
\isadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1082
\ %
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1083
\endisadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1084
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1085
\isatagnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1086
\isacommand{sorry}\isamarkupfalse%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1087
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1088
\endisatagnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1089
{\isafoldnoproof}%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1090
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1091
\isadelimnoproof
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1092
\isanewline
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1093
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1094
\endisadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1095
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1096
\isadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1097
\ \ %
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1098
\endisadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1099
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1100
\isatagproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1101
\isacommand{then}\isamarkupfalse%
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1102
\ \isacommand{show}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1103
\ thesis\ \isacommand{{\isaliteral{2E}{\isachardot}}{\isaliteral{2E}{\isachardot}}}\isamarkupfalse%
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1104
\isanewline
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1105
\isacommand{qed}\isamarkupfalse%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1106
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1107
\endisatagproof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1108
{\isafoldproof}%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1109
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1110
\isadelimproof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1111
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1112
\endisadelimproof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1113
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1114
\end{minipage}
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1115
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1116
\begin{isamarkuptext}%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1117
\medskip\noindent Here local facts \isacharbackquoteopen\isa{{\isaliteral{22}{\isachardoublequote}}A\ x{\isaliteral{22}{\isachardoublequote}}}\isacharbackquoteclose\ and \isacharbackquoteopen\isa{{\isaliteral{22}{\isachardoublequote}}B\ y{\isaliteral{22}{\isachardoublequote}}}\isacharbackquoteclose\ are referenced immediately; there is no
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1118
  need to decompose the logical rule structure again.  In the second
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1119
  proof the final ``\hyperlink{command.then}{\mbox{\isa{\isacommand{then}}}}~\hyperlink{command.show}{\mbox{\isa{\isacommand{show}}}}~\isa{thesis}~\hyperlink{command.ddot}{\mbox{\isa{\isacommand{{\isaliteral{2E}{\isachardot}}{\isaliteral{2E}{\isachardot}}}}}}''  involves the local rule case \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C416E643E}{\isasymAnd}}x\ y{\isaliteral{2E}{\isachardot}}\ A\ x\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ B\ y\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ thesis{\isaliteral{22}{\isachardoublequote}}} for the particular instance of terms \isa{{\isaliteral{22}{\isachardoublequote}}a{\isaliteral{22}{\isachardoublequote}}} and \isa{{\isaliteral{22}{\isachardoublequote}}b{\isaliteral{22}{\isachardoublequote}}} produced in the body.%
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1120
\end{isamarkuptext}%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1121
\isamarkuptrue%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1122
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1123
\isamarkupsubsection{Structured proof refinement \label{sec:framework-subproof}%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1124
}
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1125
\isamarkuptrue%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1126
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1127
\begin{isamarkuptext}%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1128
By breaking up the grammar for the Isar proof language, we may
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1129
  understand a proof text as a linear sequence of individual proof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1130
  commands.  These are interpreted as transitions of the Isar virtual
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1131
  machine (Isar/VM), which operates on a block-structured
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1132
  configuration in single steps.  This allows users to write proof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1133
  texts in an incremental manner, and inspect intermediate
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1134
  configurations for debugging.
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1135
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1136
  The basic idea is analogous to evaluating algebraic expressions on a
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1137
  stack machine: \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}a\ {\isaliteral{2B}{\isacharplus}}\ b{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C63646F743E}{\isasymcdot}}\ c{\isaliteral{22}{\isachardoublequote}}} then corresponds to a sequence
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1138
  of single transitions for each symbol \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{2C}{\isacharcomma}}\ a{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{2B}{\isacharplus}}{\isaliteral{2C}{\isacharcomma}}\ b{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{29}{\isacharparenright}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C63646F743E}{\isasymcdot}}{\isaliteral{2C}{\isacharcomma}}\ c{\isaliteral{22}{\isachardoublequote}}}.
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1139
  In Isar the algebraic values are facts or goals, and the operations
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1140
  are inferences.
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1141
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1142
  \medskip The Isar/VM state maintains a stack of nodes, each node
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1143
  contains the local proof context, the linguistic mode, and a pending
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1144
  goal (optional).  The mode determines the type of transition that
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1145
  may be performed next, it essentially alternates between forward and
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1146
  backward reasoning, with an intermediate stage for chained facts
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1147
  (see \figref{fig:isar-vm}).
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1148
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1149
  \begin{figure}[htb]
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1150
  \begin{center}
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1151
  \includegraphics[width=0.8\textwidth]{Thy/document/isar-vm}
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1152
  \end{center}
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1153
  \caption{Isar/VM modes}\label{fig:isar-vm}
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1154
  \end{figure}
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1155
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1156
  For example, in \isa{{\isaliteral{22}{\isachardoublequote}}state{\isaliteral{22}{\isachardoublequote}}} mode Isar acts like a mathematical
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1157
  scratch-pad, accepting declarations like \hyperlink{command.fix}{\mbox{\isa{\isacommand{fix}}}}, \hyperlink{command.assume}{\mbox{\isa{\isacommand{assume}}}}, and claims like \hyperlink{command.have}{\mbox{\isa{\isacommand{have}}}}, \hyperlink{command.show}{\mbox{\isa{\isacommand{show}}}}.  A goal
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1158
  statement changes the mode to \isa{{\isaliteral{22}{\isachardoublequote}}prove{\isaliteral{22}{\isachardoublequote}}}, which means that we
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1159
  may now refine the problem via \hyperlink{command.unfolding}{\mbox{\isa{\isacommand{unfolding}}}} or \hyperlink{command.proof}{\mbox{\isa{\isacommand{proof}}}}.  Then we are again in \isa{{\isaliteral{22}{\isachardoublequote}}state{\isaliteral{22}{\isachardoublequote}}} mode of a proof body,
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1160
  which may issue \hyperlink{command.show}{\mbox{\isa{\isacommand{show}}}} statements to solve pending
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1161
  sub-goals.  A concluding \hyperlink{command.qed}{\mbox{\isa{\isacommand{qed}}}} will return to the original
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1162
  \isa{{\isaliteral{22}{\isachardoublequote}}state{\isaliteral{22}{\isachardoublequote}}} mode one level upwards.  The subsequent Isar/VM
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1163
  trace indicates block structure, linguistic mode, goal state, and
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1164
  inferences:%
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1165
\end{isamarkuptext}%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1166
\isamarkuptrue%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1167
%
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1168
\begingroup\footnotesize
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1169
%
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1170
\isadelimproof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1171
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1172
\endisadelimproof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1173
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1174
\isatagproof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1175
%
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1176
\begin{minipage}[t]{0.18\textwidth}
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1177
\ \ \isacommand{have}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1178
\ {\isaliteral{22}{\isachardoublequoteopen}}A\ {\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}\ B{\isaliteral{22}{\isachardoublequoteclose}}\isanewline
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1179
\ \ \isacommand{proof}\isamarkupfalse%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1180
\isanewline
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1181
\ \ \ \ \isacommand{assume}\isamarkupfalse%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1182
\ A\isanewline
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1183
\ \ \ \ \isacommand{show}\isamarkupfalse%
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1184
\ B%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1185
\endisatagproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1186
{\isafoldproof}%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1187
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1188
\isadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1189
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1190
\endisadelimproof
36357
641a521bfc19 use 'example_proof' (invisible);
wenzelm
parents: 29746
diff changeset
  1191
\isanewline
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1192
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1193
\isadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1194
\ \ \ \ \ \ %
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1195
\endisadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1196
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1197
\isatagnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1198
\isacommand{sorry}\isamarkupfalse%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1199
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1200
\endisatagnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1201
{\isafoldnoproof}%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1202
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1203
\isadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1204
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1205
\endisadelimnoproof
36357
641a521bfc19 use 'example_proof' (invisible);
wenzelm
parents: 29746
diff changeset
  1206
\isanewline
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1207
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1208
\isadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1209
\ \ %
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1210
\endisadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1211
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1212
\isatagproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1213
\isacommand{qed}\isamarkupfalse%
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1214
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1215
\end{minipage}\quad
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1216
\begin{minipage}[t]{0.06\textwidth}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1217
\isa{{\isaliteral{22}{\isachardoublequote}}begin{\isaliteral{22}{\isachardoublequote}}} \\
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1218
\\
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1219
\\
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1220
\isa{{\isaliteral{22}{\isachardoublequote}}begin{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1221
\isa{{\isaliteral{22}{\isachardoublequote}}end{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1222
\isa{{\isaliteral{22}{\isachardoublequote}}end{\isaliteral{22}{\isachardoublequote}}} \\
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1223
\end{minipage}
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1224
\begin{minipage}[t]{0.08\textwidth}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1225
\isa{{\isaliteral{22}{\isachardoublequote}}prove{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1226
\isa{{\isaliteral{22}{\isachardoublequote}}state{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1227
\isa{{\isaliteral{22}{\isachardoublequote}}state{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1228
\isa{{\isaliteral{22}{\isachardoublequote}}prove{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1229
\isa{{\isaliteral{22}{\isachardoublequote}}state{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1230
\isa{{\isaliteral{22}{\isachardoublequote}}state{\isaliteral{22}{\isachardoublequote}}} \\
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1231
\end{minipage}\begin{minipage}[t]{0.35\textwidth}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1232
\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}A\ {\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}\ B{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{23}{\isacharhash}}{\isaliteral{28}{\isacharparenleft}}A\ {\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}\ B{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1233
\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}A\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ B{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{23}{\isacharhash}}{\isaliteral{28}{\isacharparenleft}}A\ {\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}\ B{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1234
\\
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1235
\\
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1236
\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{23}{\isacharhash}}{\isaliteral{28}{\isacharparenleft}}A\ {\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}\ B{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1237
\isa{{\isaliteral{22}{\isachardoublequote}}A\ {\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}\ B{\isaliteral{22}{\isachardoublequote}}} \\
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1238
\end{minipage}\begin{minipage}[t]{0.4\textwidth}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1239
\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}init{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1240
\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}resolution\ impI{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1241
\\
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1242
\\
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1243
\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}refinement\ {\isaliteral{23}{\isacharhash}}A\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ B{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1244
\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}finish{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1245
\end{minipage}
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1246
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1247
\endisatagproof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1248
{\isafoldproof}%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1249
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1250
\isadelimproof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1251
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1252
\endisadelimproof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1253
%
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1254
\endgroup
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1255
%
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1256
\begin{isamarkuptext}%
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1257
\noindent Here the \hyperlink{inference.refinement}{\mbox{\isa{refinement}}} inference from
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1258
  \secref{sec:framework-resolution} mediates composition of Isar
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1259
  sub-proofs nicely.  Observe that this principle incorporates some
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1260
  degree of freedom in proof composition.  In particular, the proof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1261
  body allows parameters and assumptions to be re-ordered, or commuted
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1262
  according to Hereditary Harrop Form.  Moreover, context elements
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1263
  that are not used in a sub-proof may be omitted altogether.  For
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1264
  example:%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1265
\end{isamarkuptext}%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1266
\isamarkuptrue%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1267
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1268
\begin{minipage}{0.5\textwidth}
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1269
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1270
\isadelimproof
36357
641a521bfc19 use 'example_proof' (invisible);
wenzelm
parents: 29746
diff changeset
  1271
\ \ %
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1272
\endisadelimproof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1273
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1274
\isatagproof
36357
641a521bfc19 use 'example_proof' (invisible);
wenzelm
parents: 29746
diff changeset
  1275
\isacommand{have}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1276
\ {\isaliteral{22}{\isachardoublequoteopen}}{\isaliteral{5C3C416E643E}{\isasymAnd}}x\ y{\isaliteral{2E}{\isachardot}}\ A\ x\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ B\ y\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ C\ x\ y{\isaliteral{22}{\isachardoublequoteclose}}\isanewline
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1277
\ \ \isacommand{proof}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1278
\ {\isaliteral{2D}{\isacharminus}}\isanewline
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1279
\ \ \ \ \isacommand{fix}\isamarkupfalse%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1280
\ x\ \isakeyword{and}\ y\isanewline
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1281
\ \ \ \ \isacommand{assume}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1282
\ {\isaliteral{22}{\isachardoublequoteopen}}A\ x{\isaliteral{22}{\isachardoublequoteclose}}\ \isakeyword{and}\ {\isaliteral{22}{\isachardoublequoteopen}}B\ y{\isaliteral{22}{\isachardoublequoteclose}}\isanewline
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1283
\ \ \ \ \isacommand{show}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1284
\ {\isaliteral{22}{\isachardoublequoteopen}}C\ x\ y{\isaliteral{22}{\isachardoublequoteclose}}%
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1285
\endisatagproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1286
{\isafoldproof}%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1287
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1288
\isadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1289
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1290
\endisadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1291
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1292
\isadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1293
\ %
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1294
\endisadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1295
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1296
\isatagnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1297
\isacommand{sorry}\isamarkupfalse%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1298
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1299
\endisatagnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1300
{\isafoldnoproof}%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1301
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1302
\isadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1303
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1304
\endisadelimnoproof
36357
641a521bfc19 use 'example_proof' (invisible);
wenzelm
parents: 29746
diff changeset
  1305
\isanewline
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1306
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1307
\isadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1308
\ \ %
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1309
\endisadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1310
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1311
\isatagproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1312
\isacommand{qed}\isamarkupfalse%
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1313
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1314
\end{minipage}\begin{minipage}{0.5\textwidth}
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1315
\ \ \isacommand{have}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1316
\ {\isaliteral{22}{\isachardoublequoteopen}}{\isaliteral{5C3C416E643E}{\isasymAnd}}x\ y{\isaliteral{2E}{\isachardot}}\ A\ x\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ B\ y\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ C\ x\ y{\isaliteral{22}{\isachardoublequoteclose}}\isanewline
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1317
\ \ \isacommand{proof}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1318
\ {\isaliteral{2D}{\isacharminus}}\isanewline
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1319
\ \ \ \ \isacommand{fix}\isamarkupfalse%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1320
\ x\ \isacommand{assume}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1321
\ {\isaliteral{22}{\isachardoublequoteopen}}A\ x{\isaliteral{22}{\isachardoublequoteclose}}\isanewline
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1322
\ \ \ \ \isacommand{fix}\isamarkupfalse%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1323
\ y\ \isacommand{assume}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1324
\ {\isaliteral{22}{\isachardoublequoteopen}}B\ y{\isaliteral{22}{\isachardoublequoteclose}}\isanewline
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1325
\ \ \ \ \isacommand{show}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1326
\ {\isaliteral{22}{\isachardoublequoteopen}}C\ x\ y{\isaliteral{22}{\isachardoublequoteclose}}%
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1327
\endisatagproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1328
{\isafoldproof}%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1329
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1330
\isadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1331
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1332
\endisadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1333
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1334
\isadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1335
\ %
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1336
\endisadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1337
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1338
\isatagnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1339
\isacommand{sorry}\isamarkupfalse%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1340
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1341
\endisatagnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1342
{\isafoldnoproof}%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1343
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1344
\isadelimnoproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1345
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1346
\endisadelimnoproof
36357
641a521bfc19 use 'example_proof' (invisible);
wenzelm
parents: 29746
diff changeset
  1347
\isanewline
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1348
%
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1349
\isadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1350
\ \ %
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1351
\endisadelimproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1352
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1353
\isatagproof
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1354
\isacommand{qed}\isamarkupfalse%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1355
%
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1356
\end{minipage}\\[3ex]\begin{minipage}{0.5\textwidth}
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1357
\ \ \isacommand{have}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1358
\ {\isaliteral{22}{\isachardoublequoteopen}}{\isaliteral{5C3C416E643E}{\isasymAnd}}x\ y{\isaliteral{2E}{\isachardot}}\ A\ x\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ B\ y\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ C\ x\ y{\isaliteral{22}{\isachardoublequoteclose}}\isanewline
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1359
\ \ \isacommand{proof}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1360
\ {\isaliteral{2D}{\isacharminus}}\isanewline
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1361
\ \ \ \ \isacommand{fix}\isamarkupfalse%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1362
\ y\ \isacommand{assume}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1363
\ {\isaliteral{22}{\isachardoublequoteopen}}B\ y{\isaliteral{22}{\isachardoublequoteclose}}\isanewline
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1364
\ \ \ \ \isacommand{fix}\isamarkupfalse%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1365
\ x\ \isacommand{assume}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1366
\ {\isaliteral{22}{\isachardoublequoteopen}}A\ x{\isaliteral{22}{\isachardoublequoteclose}}\isanewline
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1367
\ \ \ \ \isacommand{show}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1368
\ {\isaliteral{22}{\isachardoublequoteopen}}C\ x\ y{\isaliteral{22}{\isachardoublequoteclose}}\ \isacommand{sorry}\isamarkupfalse%
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1369
\isanewline
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1370
\ \ \isacommand{qed}\isamarkupfalse%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1371
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1372
\end{minipage}\begin{minipage}{0.5\textwidth}
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1373
\ \ \isacommand{have}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1374
\ {\isaliteral{22}{\isachardoublequoteopen}}{\isaliteral{5C3C416E643E}{\isasymAnd}}x\ y{\isaliteral{2E}{\isachardot}}\ A\ x\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ B\ y\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ C\ x\ y{\isaliteral{22}{\isachardoublequoteclose}}\isanewline
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1375
\ \ \isacommand{proof}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1376
\ {\isaliteral{2D}{\isacharminus}}\isanewline
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1377
\ \ \ \ \isacommand{fix}\isamarkupfalse%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1378
\ y\ \isacommand{assume}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1379
\ {\isaliteral{22}{\isachardoublequoteopen}}B\ y{\isaliteral{22}{\isachardoublequoteclose}}\isanewline
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1380
\ \ \ \ \isacommand{fix}\isamarkupfalse%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1381
\ x\isanewline
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1382
\ \ \ \ \isacommand{show}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1383
\ {\isaliteral{22}{\isachardoublequoteopen}}C\ x\ y{\isaliteral{22}{\isachardoublequoteclose}}\ \isacommand{sorry}\isamarkupfalse%
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1384
\isanewline
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1385
\ \ \isacommand{qed}\isamarkupfalse%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1386
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1387
\endisatagproof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1388
{\isafoldproof}%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1389
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1390
\isadelimproof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1391
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1392
\endisadelimproof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1393
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1394
\end{minipage}
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1395
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1396
\begin{isamarkuptext}%
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1397
\medskip\noindent Such ``peephole optimizations'' of Isar texts are
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1398
  practically important to improve readability, by rearranging
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1399
  contexts elements according to the natural flow of reasoning in the
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1400
  body, while still observing the overall scoping rules.
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1401
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1402
  \medskip This illustrates the basic idea of structured proof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1403
  processing in Isar.  The main mechanisms are based on natural
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1404
  deduction rule composition within the Pure framework.  In
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1405
  particular, there are no direct operations on goal states within the
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1406
  proof body.  Moreover, there is no hidden automated reasoning
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1407
  involved, just plain unification.%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1408
\end{isamarkuptext}%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1409
\isamarkuptrue%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1410
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1411
\isamarkupsubsection{Calculational reasoning \label{sec:framework-calc}%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1412
}
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1413
\isamarkuptrue%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1414
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1415
\begin{isamarkuptext}%
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1416
The existing Isar infrastructure is sufficiently flexible to support
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1417
  calculational reasoning (chains of transitivity steps) as derived
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1418
  concept.  The generic proof elements introduced below depend on
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1419
  rules declared as \hyperlink{attribute.trans}{\mbox{\isa{trans}}} in the context.  It is left to
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1420
  the object-logic to provide a suitable rule collection for mixed
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1421
  relations of \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3D}{\isacharequal}}{\isaliteral{22}{\isachardoublequote}}}, \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3C}{\isacharless}}{\isaliteral{22}{\isachardoublequote}}}, \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C653E}{\isasymle}}{\isaliteral{22}{\isachardoublequote}}}, \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C7375627365743E}{\isasymsubset}}{\isaliteral{22}{\isachardoublequote}}},
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1422
  \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C73756273657465713E}{\isasymsubseteq}}{\isaliteral{22}{\isachardoublequote}}} etc.  Due to the flexibility of rule composition
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1423
  (\secref{sec:framework-resolution}), substitution of equals by
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1424
  equals is covered as well, even substitution of inequalities
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1425
  involving monotonicity conditions; see also \cite[\S6]{Wenzel-PhD}
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1426
  and \cite{Bauer-Wenzel:2001}.
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1427
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1428
  The generic calculational mechanism is based on the observation that
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1429
  rules such as \isa{{\isaliteral{22}{\isachardoublequote}}trans{\isaliteral{3A}{\isacharcolon}}{\isaliteral{22}{\isachardoublequote}}}~\isa{{\isaliteral{22}{\isachardoublequote}}x\ {\isaliteral{3D}{\isacharequal}}\ y\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ y\ {\isaliteral{3D}{\isacharequal}}\ z\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ x\ {\isaliteral{3D}{\isacharequal}}\ z{\isaliteral{22}{\isachardoublequote}}}
29740
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1430
  proceed from the premises towards the conclusion in a deterministic
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1431
  fashion.  Thus we may reason in forward mode, feeding intermediate
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1432
  results into rules selected from the context.  The course of
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1433
  reasoning is organized by maintaining a secondary fact called
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1434
  ``\hyperlink{fact.calculation}{\mbox{\isa{calculation}}}'', apart from the primary ``\hyperlink{fact.this}{\mbox{\isa{this}}}''
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1435
  already provided by the Isar primitives.  In the definitions below,
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1436
  \hyperlink{attribute.OF}{\mbox{\isa{OF}}} refers to \hyperlink{inference.resolution}{\mbox{\isa{resolution}}}
6f8f94ccaaaf updated generated files;
wenzelm
parents: 29731
diff changeset
  1437
  (\secref{sec:framework-resolution}) with multiple rule arguments,
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1438
  and \isa{{\isaliteral{22}{\isachardoublequote}}trans{\isaliteral{22}{\isachardoublequote}}} represents to a suitable rule from the context:
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1439
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1440
  \begin{matharray}{rcl}
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1441
    \hyperlink{command.also}{\mbox{\isa{\isacommand{also}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{0}}{\isaliteral{22}{\isachardoublequote}}} & \equiv & \hyperlink{command.note}{\mbox{\isa{\isacommand{note}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}calculation\ {\isaliteral{3D}{\isacharequal}}\ this{\isaliteral{22}{\isachardoublequote}}} \\
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1442
    \hyperlink{command.also}{\mbox{\isa{\isacommand{also}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375623E}{}\isactrlsub n\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isaliteral{2B}{\isacharplus}}\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{22}{\isachardoublequote}}} & \equiv & \hyperlink{command.note}{\mbox{\isa{\isacommand{note}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}calculation\ {\isaliteral{3D}{\isacharequal}}\ trans\ {\isaliteral{5B}{\isacharbrackleft}}OF\ calculation\ this{\isaliteral{5D}{\isacharbrackright}}{\isaliteral{22}{\isachardoublequote}}} \\[0.5ex]
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1443
    \hyperlink{command.finally}{\mbox{\isa{\isacommand{finally}}}} & \equiv & \hyperlink{command.also}{\mbox{\isa{\isacommand{also}}}}~\hyperlink{command.from}{\mbox{\isa{\isacommand{from}}}}~\isa{calculation} \\
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1444
  \end{matharray}
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1445
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1446
  \noindent The start of a calculation is determined implicitly in the
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1447
  text: here \hyperlink{command.also}{\mbox{\isa{\isacommand{also}}}} sets \hyperlink{fact.calculation}{\mbox{\isa{calculation}}} to the current
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1448
  result; any subsequent occurrence will update \hyperlink{fact.calculation}{\mbox{\isa{calculation}}} by
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1449
  combination with the next result and a transitivity rule.  The
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1450
  calculational sequence is concluded via \hyperlink{command.finally}{\mbox{\isa{\isacommand{finally}}}}, where
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1451
  the final result is exposed for use in a concluding claim.
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1452
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1453
  Here is a canonical proof pattern, using \hyperlink{command.have}{\mbox{\isa{\isacommand{have}}}} to
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1454
  establish the intermediate results:%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1455
\end{isamarkuptext}%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1456
\isamarkuptrue%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1457
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1458
\isadelimproof
36357
641a521bfc19 use 'example_proof' (invisible);
wenzelm
parents: 29746
diff changeset
  1459
\ \ %
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1460
\endisadelimproof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1461
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1462
\isatagproof
36357
641a521bfc19 use 'example_proof' (invisible);
wenzelm
parents: 29746
diff changeset
  1463
\isacommand{have}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1464
\ {\isaliteral{22}{\isachardoublequoteopen}}a\ {\isaliteral{3D}{\isacharequal}}\ b{\isaliteral{22}{\isachardoublequoteclose}}\ \isacommand{sorry}\isamarkupfalse%
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1465
\isanewline
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1466
\ \ \isacommand{also}\isamarkupfalse%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1467
\ \isacommand{have}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1468
\ {\isaliteral{22}{\isachardoublequoteopen}}{\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{3D}{\isacharequal}}\ c{\isaliteral{22}{\isachardoublequoteclose}}\ \isacommand{sorry}\isamarkupfalse%
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1469
\isanewline
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1470
\ \ \isacommand{also}\isamarkupfalse%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1471
\ \isacommand{have}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1472
\ {\isaliteral{22}{\isachardoublequoteopen}}{\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{3D}{\isacharequal}}\ d{\isaliteral{22}{\isachardoublequoteclose}}\ \isacommand{sorry}\isamarkupfalse%
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1473
\isanewline
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1474
\ \ \isacommand{finally}\isamarkupfalse%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1475
\ \isacommand{have}\isamarkupfalse%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1476
\ {\isaliteral{22}{\isachardoublequoteopen}}a\ {\isaliteral{3D}{\isacharequal}}\ d{\isaliteral{22}{\isachardoublequoteclose}}\ \isacommand{{\isaliteral{2E}{\isachardot}}}\isamarkupfalse%
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1477
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1478
\endisatagproof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1479
{\isafoldproof}%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1480
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1481
\isadelimproof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1482
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1483
\endisadelimproof
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1484
%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1485
\begin{isamarkuptext}%
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1486
\noindent The term ``\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{22}{\isachardoublequote}}}'' above is a special abbreviation
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1487
  provided by the Isabelle/Isar syntax layer: it statically refers to
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1488
  the right-hand side argument of the previous statement given in the
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1489
  text.  Thus it happens to coincide with relevant sub-expressions in
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1490
  the calculational chain, but the exact correspondence is dependent
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1491
  on the transitivity rules being involved.
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1492
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1493
  \medskip Symmetry rules such as \isa{{\isaliteral{22}{\isachardoublequote}}x\ {\isaliteral{3D}{\isacharequal}}\ y\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ y\ {\isaliteral{3D}{\isacharequal}}\ x{\isaliteral{22}{\isachardoublequote}}} are like
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1494
  transitivities with only one premise.  Isar maintains a separate
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1495
  rule collection declared via the \hyperlink{attribute.sym}{\mbox{\isa{sym}}} attribute, to be
40406
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1496
  used in fact expressions ``\isa{{\isaliteral{22}{\isachardoublequote}}a\ {\isaliteral{5B}{\isacharbrackleft}}symmetric{\isaliteral{5D}{\isacharbrackright}}{\isaliteral{22}{\isachardoublequote}}}'', or single-step
313a24b66a8d updated generated files;
wenzelm
parents: 36357
diff changeset
  1497
  proofs ``\hyperlink{command.assume}{\mbox{\isa{\isacommand{assume}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}x\ {\isaliteral{3D}{\isacharequal}}\ y{\isaliteral{22}{\isachardoublequote}}}~\hyperlink{command.then}{\mbox{\isa{\isacommand{then}}}}~\hyperlink{command.have}{\mbox{\isa{\isacommand{have}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}y\ {\isaliteral{3D}{\isacharequal}}\ x{\isaliteral{22}{\isachardoublequote}}}~\hyperlink{command.ddot}{\mbox{\isa{\isacommand{{\isaliteral{2E}{\isachardot}}{\isaliteral{2E}{\isachardot}}}}}}''.%
29731
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1498
\end{isamarkuptext}%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1499
\isamarkuptrue%
efcbbd7baa02 updated generated files;
wenzelm
parents: 29722
diff changeset
  1500
%
29717
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
  1501
\isadelimtheory
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
  1502
%
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
  1503
\endisadelimtheory
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
  1504
%
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
  1505
\isatagtheory
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
  1506
\isacommand{end}\isamarkupfalse%
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
  1507
%
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
  1508
\endisatagtheory
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
  1509
{\isafoldtheory}%
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
  1510
%
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
  1511
\isadelimtheory
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
  1512
%
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
  1513
\endisadelimtheory
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
  1514
\end{isabellebody}%
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
  1515
%%% Local Variables:
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
  1516
%%% mode: latex
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
  1517
%%% TeX-master: "root"
51ed69c9422b updated generated files;
wenzelm
parents:
diff changeset
  1518
%%% End: