doc-src/IsarRef/pure.tex
changeset 8946 40e06237934c
parent 8896 c80aba8c1d5e
child 8947 971aedd340e4
equal deleted inserted replaced
8945:17365afd9502 8946:40e06237934c
   949 While these are anathema for writing proper Isar proof documents, they might
   949 While these are anathema for writing proper Isar proof documents, they might
   950 come in handy for interactive exploration and debugging, or even actual
   950 come in handy for interactive exploration and debugging, or even actual
   951 tactical proof within new-style theories (to benefit from document
   951 tactical proof within new-style theories (to benefit from document
   952 preparation, for example).
   952 preparation, for example).
   953 
   953 
   954 \indexisarcmd{apply}\indexisarcmd{apply-end}
   954 \indexisarcmd{apply}\indexisarcmd{done}\indexisarcmd{apply-end}
   955 \indexisarcmd{defer}\indexisarcmd{prefer}\indexisarcmd{back}
   955 \indexisarcmd{defer}\indexisarcmd{prefer}\indexisarcmd{back}
   956 \indexisarmeth{tactic}\indexisarmeth{insert}
   956 \indexisarmeth{tactic}\indexisarmeth{insert}
   957 \indexisarmeth{res-inst-tac}\indexisarmeth{eres-inst-tac}
   957 \indexisarmeth{res-inst-tac}\indexisarmeth{eres-inst-tac}
   958 \indexisarmeth{dres-inst-tac}\indexisarmeth{forw-inst-tac}
   958 \indexisarmeth{dres-inst-tac}\indexisarmeth{forw-inst-tac}
   959 \indexisarmeth{subgoal-tac}
   959 \indexisarmeth{subgoal-tac}
   960 \begin{matharray}{rcl}
   960 \begin{matharray}{rcl}
   961   \isarcmd{apply}^* & : & \isartrans{proof(prove)}{proof(prove)} \\
   961   \isarcmd{apply}^* & : & \isartrans{proof(prove)}{proof(prove)} \\
       
   962   \isarcmd{done}^* & : & \isartrans{proof(prove)}{proof(state)} \\
   962   \isarcmd{apply_end}^* & : & \isartrans{proof(state)}{proof(state)} \\
   963   \isarcmd{apply_end}^* & : & \isartrans{proof(state)}{proof(state)} \\
   963   \isarcmd{defer}^* & : & \isartrans{proof}{proof} \\
   964   \isarcmd{defer}^* & : & \isartrans{proof}{proof} \\
   964   \isarcmd{prefer}^* & : & \isartrans{proof}{proof} \\
   965   \isarcmd{prefer}^* & : & \isartrans{proof}{proof} \\
   965   \isarcmd{back}^* & : & \isartrans{proof}{proof} \\
   966   \isarcmd{back}^* & : & \isartrans{proof}{proof} \\
   966   tactic^* & : & \isarmeth \\
   967   tactic^* & : & \isarmeth \\
   991 \railterm{subgoaltac}
   992 \railterm{subgoaltac}
   992 
   993 
   993 \begin{rail}
   994 \begin{rail}
   994   'apply' method comment?
   995   'apply' method comment?
   995   ;
   996   ;
       
   997   'done' comment?
       
   998   ;
   996   applyend method comment?
   999   applyend method comment?
   997   ;
  1000   ;
   998   'defer' nat? comment?
  1001   'defer' nat? comment?
   999   ;
  1002   ;
  1000   'prefer' nat comment?
  1003   'prefer' nat comment?
  1010 \end{rail}
  1013 \end{rail}
  1011 
  1014 
  1012 \begin{descr}
  1015 \begin{descr}
  1013 \item [$\isarkeyword{apply}~(m)$] applies proof method $m$ in initial
  1016 \item [$\isarkeyword{apply}~(m)$] applies proof method $m$ in initial
  1014   position, but unlike $\PROOFNAME$ it retains ``$proof(prove)$'' mode.  Thus
  1017   position, but unlike $\PROOFNAME$ it retains ``$proof(prove)$'' mode.  Thus
  1015   consecutive method applications may be given just as in tactic scripts.  In
  1018   consecutive method applications may be given just as in tactic scripts.
  1016   order to complete the proof properly, any of the actual structured proof
       
  1017   commands (e.g.\ ``$\DOT$'') has to be given eventually.
       
  1018   
  1019   
  1019   Facts are passed to $m$ as indicated by the goal's forward-chain mode, and
  1020   Facts are passed to $m$ as indicated by the goal's forward-chain mode, and
  1020   are \emph{consumed} afterwards.  Thus any further $\isarkeyword{apply}$
  1021   are \emph{consumed} afterwards.  Thus any further $\isarkeyword{apply}$
  1021   command would always work in a purely backward manner.
  1022   command would always work in a purely backward manner.
       
  1023   
       
  1024 \item [$\isarkeyword{done}$] completes a proof script, provided that the
       
  1025   current goal state is solved completely.
       
  1026     
       
  1027   Note that actual structured proof commands (e.g.\ ``$\DOT$'', $\SORRY$) may
       
  1028   be used to conclude proof scripts as well.
  1022 
  1029 
  1023 \item [$\isarkeyword{apply_end}~(m)$] applies proof method $m$ as if in
  1030 \item [$\isarkeyword{apply_end}~(m)$] applies proof method $m$ as if in
  1024   terminal position.  Basically, this simulates a multi-step tactic script for
  1031   terminal position.  Basically, this simulates a multi-step tactic script for
  1025   $\QEDNAME$, but may be given anywhere within the proof body.
  1032   $\QEDNAME$, but may be given anywhere within the proof body.
  1026   
  1033