doc-src/IsarRef/Thy/document/Proof.tex
changeset 30130 e23770bc97c8
parent 29746 533c27b43ee1
child 30172 afdf7808cfd0
equal deleted inserted replaced
30129:419116f1157a 30130:e23770bc97c8
     1 %
     1 %
     2 \begin{isabellebody}%
     2 \begin{isabellebody}%
     3 \def\isabellecontext{Proof}%
     3 \def\isabellecontext{Proof}%
     4 %
     4 %
     5 \isadelimtheory
     5 \isadelimtheory
     6 \isanewline
       
     7 \isanewline
       
     8 %
     6 %
     9 \endisadelimtheory
     7 \endisadelimtheory
    10 %
     8 %
    11 \isatagtheory
     9 \isatagtheory
    12 \isacommand{theory}\isamarkupfalse%
    10 \isacommand{theory}\isamarkupfalse%
    18 %
    16 %
    19 \isadelimtheory
    17 \isadelimtheory
    20 %
    18 %
    21 \endisadelimtheory
    19 \endisadelimtheory
    22 %
    20 %
    23 \isamarkupchapter{Proofs%
    21 \isamarkupchapter{Proofs \label{ch:proofs}%
    24 }
    22 }
    25 \isamarkuptrue%
    23 \isamarkuptrue%
    26 %
    24 %
    27 \begin{isamarkuptext}%
    25 \begin{isamarkuptext}%
    28 Proof commands perform transitions of Isar/VM machine
    26 Proof commands perform transitions of Isar/VM machine
    29   configurations, which are block-structured, consisting of a stack of
    27   configurations, which are block-structured, consisting of a stack of
    30   nodes with three main components: logical proof context, current
    28   nodes with three main components: logical proof context, current
    31   facts, and open goals.  Isar/VM transitions are \emph{typed}
    29   facts, and open goals.  Isar/VM transitions are typed according to
    32   according to the following three different modes of operation:
    30   the following three different modes of operation:
    33 
    31 
    34   \begin{description}
    32   \begin{description}
    35 
    33 
    36   \item \isa{{\isachardoublequote}proof{\isacharparenleft}prove{\isacharparenright}{\isachardoublequote}} means that a new goal has just been
    34   \item \isa{{\isachardoublequote}proof{\isacharparenleft}prove{\isacharparenright}{\isachardoublequote}} means that a new goal has just been
    37   stated that is now to be \emph{proven}; the next command may refine
    35   stated that is now to be \emph{proven}; the next command may refine
    47   just picked up in order to be used when refining the goal claimed
    45   just picked up in order to be used when refining the goal claimed
    48   next.
    46   next.
    49 
    47 
    50   \end{description}
    48   \end{description}
    51 
    49 
    52   The proof mode indicator may be read as a verb telling the writer
    50   The proof mode indicator may be understood as an instruction to the
    53   what kind of operation may be performed next.  The corresponding
    51   writer, telling what kind of operation may be performed next.  The
    54   typings of proof commands restricts the shape of well-formed proof
    52   corresponding typings of proof commands restricts the shape of
    55   texts to particular command sequences.  So dynamic arrangements of
    53   well-formed proof texts to particular command sequences.  So dynamic
    56   commands eventually turn out as static texts of a certain structure.
    54   arrangements of commands eventually turn out as static texts of a
    57   \Appref{ap:refcard} gives a simplified grammar of the overall
    55   certain structure.
    58   (extensible) language emerging that way.%
    56 
       
    57   \Appref{ap:refcard} gives a simplified grammar of the (extensible)
       
    58   language emerging that way from the different types of proof
       
    59   commands.  The main ideas of the overall Isar framework are
       
    60   explained in \chref{ch:isar-framework}.%
    59 \end{isamarkuptext}%
    61 \end{isamarkuptext}%
    60 \isamarkuptrue%
    62 \isamarkuptrue%
    61 %
    63 %
    62 \isamarkupsection{Proof structure%
    64 \isamarkupsection{Proof structure%
    63 }
    65 }
   964   (where \isa{{\isachardoublequote}b\isactrlsub {\isadigit{1}}{\isacharcomma}\ {\isasymdots}{\isacharcomma}\ b\isactrlsub k{\isachardoublequote}} shall refer to (optional)
   966   (where \isa{{\isachardoublequote}b\isactrlsub {\isadigit{1}}{\isacharcomma}\ {\isasymdots}{\isacharcomma}\ b\isactrlsub k{\isachardoublequote}} shall refer to (optional)
   965   facts indicated for forward chaining).
   967   facts indicated for forward chaining).
   966   \begin{matharray}{l}
   968   \begin{matharray}{l}
   967     \isa{{\isachardoublequote}{\isasymlangle}using\ b\isactrlsub {\isadigit{1}}\ {\isasymdots}\ b\isactrlsub k{\isasymrangle}{\isachardoublequote}}~~\hyperlink{command.obtain}{\mbox{\isa{\isacommand{obtain}}}}~\isa{{\isachardoublequote}x\isactrlsub {\isadigit{1}}\ {\isasymdots}\ x\isactrlsub m\ {\isasymWHERE}\ a{\isacharcolon}\ {\isasymphi}\isactrlsub {\isadigit{1}}\ {\isasymdots}\ {\isasymphi}\isactrlsub n\ \ {\isasymlangle}proof{\isasymrangle}\ {\isasymequiv}{\isachardoublequote}} \\[1ex]
   969     \isa{{\isachardoublequote}{\isasymlangle}using\ b\isactrlsub {\isadigit{1}}\ {\isasymdots}\ b\isactrlsub k{\isasymrangle}{\isachardoublequote}}~~\hyperlink{command.obtain}{\mbox{\isa{\isacommand{obtain}}}}~\isa{{\isachardoublequote}x\isactrlsub {\isadigit{1}}\ {\isasymdots}\ x\isactrlsub m\ {\isasymWHERE}\ a{\isacharcolon}\ {\isasymphi}\isactrlsub {\isadigit{1}}\ {\isasymdots}\ {\isasymphi}\isactrlsub n\ \ {\isasymlangle}proof{\isasymrangle}\ {\isasymequiv}{\isachardoublequote}} \\[1ex]
   968     \quad \hyperlink{command.have}{\mbox{\isa{\isacommand{have}}}}~\isa{{\isachardoublequote}{\isasymAnd}thesis{\isachardot}\ {\isacharparenleft}{\isasymAnd}x\isactrlsub {\isadigit{1}}\ {\isasymdots}\ x\isactrlsub m{\isachardot}\ {\isasymphi}\isactrlsub {\isadigit{1}}\ {\isasymLongrightarrow}\ {\isasymdots}\ {\isasymphi}\isactrlsub n\ {\isasymLongrightarrow}\ thesis{\isacharparenright}\ {\isasymLongrightarrow}\ thesis{\isachardoublequote}} \\
   970     \quad \hyperlink{command.have}{\mbox{\isa{\isacommand{have}}}}~\isa{{\isachardoublequote}{\isasymAnd}thesis{\isachardot}\ {\isacharparenleft}{\isasymAnd}x\isactrlsub {\isadigit{1}}\ {\isasymdots}\ x\isactrlsub m{\isachardot}\ {\isasymphi}\isactrlsub {\isadigit{1}}\ {\isasymLongrightarrow}\ {\isasymdots}\ {\isasymphi}\isactrlsub n\ {\isasymLongrightarrow}\ thesis{\isacharparenright}\ {\isasymLongrightarrow}\ thesis{\isachardoublequote}} \\
   969     \quad \hyperlink{command.proof}{\mbox{\isa{\isacommand{proof}}}}~\isa{succeed} \\
   971     \quad \hyperlink{command.proof}{\mbox{\isa{\isacommand{proof}}}}~\hyperlink{method.succeed}{\mbox{\isa{succeed}}} \\
   970     \qquad \hyperlink{command.fix}{\mbox{\isa{\isacommand{fix}}}}~\isa{thesis} \\
   972     \qquad \hyperlink{command.fix}{\mbox{\isa{\isacommand{fix}}}}~\isa{thesis} \\
   971     \qquad \hyperlink{command.assume}{\mbox{\isa{\isacommand{assume}}}}~\isa{{\isachardoublequote}that\ {\isacharbrackleft}Pure{\isachardot}intro{\isacharquery}{\isacharbrackright}{\isacharcolon}\ {\isasymAnd}x\isactrlsub {\isadigit{1}}\ {\isasymdots}\ x\isactrlsub m{\isachardot}\ {\isasymphi}\isactrlsub {\isadigit{1}}\ {\isasymLongrightarrow}\ {\isasymdots}\ {\isasymphi}\isactrlsub n\ {\isasymLongrightarrow}\ thesis{\isachardoublequote}} \\
   973     \qquad \hyperlink{command.assume}{\mbox{\isa{\isacommand{assume}}}}~\isa{{\isachardoublequote}that\ {\isacharbrackleft}Pure{\isachardot}intro{\isacharquery}{\isacharbrackright}{\isacharcolon}\ {\isasymAnd}x\isactrlsub {\isadigit{1}}\ {\isasymdots}\ x\isactrlsub m{\isachardot}\ {\isasymphi}\isactrlsub {\isadigit{1}}\ {\isasymLongrightarrow}\ {\isasymdots}\ {\isasymphi}\isactrlsub n\ {\isasymLongrightarrow}\ thesis{\isachardoublequote}} \\
   972     \qquad \hyperlink{command.then}{\mbox{\isa{\isacommand{then}}}}~\hyperlink{command.show}{\mbox{\isa{\isacommand{show}}}}~\isa{thesis} \\
   974     \qquad \hyperlink{command.then}{\mbox{\isa{\isacommand{then}}}}~\hyperlink{command.show}{\mbox{\isa{\isacommand{show}}}}~\isa{thesis} \\
   973     \quad\qquad \hyperlink{command.apply}{\mbox{\isa{\isacommand{apply}}}}~\isa{{\isacharminus}} \\
   975     \quad\qquad \hyperlink{command.apply}{\mbox{\isa{\isacommand{apply}}}}~\isa{{\isacharminus}} \\
   974     \quad\qquad \hyperlink{command.using}{\mbox{\isa{\isacommand{using}}}}~\isa{{\isachardoublequote}b\isactrlsub {\isadigit{1}}\ {\isasymdots}\ b\isactrlsub k\ \ {\isasymlangle}proof{\isasymrangle}{\isachardoublequote}} \\
   976     \quad\qquad \hyperlink{command.using}{\mbox{\isa{\isacommand{using}}}}~\isa{{\isachardoublequote}b\isactrlsub {\isadigit{1}}\ {\isasymdots}\ b\isactrlsub k\ \ {\isasymlangle}proof{\isasymrangle}{\isachardoublequote}} \\