src/Doc/Implementation/Proof.thy
changeset 59564 fdc03c8daacc
parent 58801 f420225a22d6
child 59567 3ff1dd7ac7f0
equal deleted inserted replaced
59563:c422ef7b9fae 59564:fdc03c8daacc
   400   \end{mldecls}
   400   \end{mldecls}
   401 
   401 
   402   \begin{mldecls}
   402   \begin{mldecls}
   403   @{index_ML Goal.prove: "Proof.context -> string list -> term list -> term ->
   403   @{index_ML Goal.prove: "Proof.context -> string list -> term list -> term ->
   404   ({prems: thm list, context: Proof.context} -> tactic) -> thm"} \\
   404   ({prems: thm list, context: Proof.context} -> tactic) -> thm"} \\
   405   @{index_ML Goal.prove_multi: "Proof.context -> string list -> term list -> term list ->
   405   @{index_ML Goal.prove_common: "Proof.context -> int option ->
       
   406   string list -> term list -> term list ->
   406   ({prems: thm list, context: Proof.context} -> tactic) -> thm list"} \\
   407   ({prems: thm list, context: Proof.context} -> tactic) -> thm list"} \\
   407   \end{mldecls}
   408   \end{mldecls}
   408   \begin{mldecls}
   409   \begin{mldecls}
   409   @{index_ML Obtain.result: "(Proof.context -> tactic) -> thm list ->
   410   @{index_ML Obtain.result: "(Proof.context -> tactic) -> thm list ->
   410   Proof.context -> ((string * cterm) list * thm list) * Proof.context"} \\
   411   Proof.context -> ((string * cterm) list * thm list) * Proof.context"} \\
   434   "C"} in the context augmented by fixed variables @{text "xs"} and
   435   "C"} in the context augmented by fixed variables @{text "xs"} and
   435   assumptions @{text "As"}, and applies tactic @{text "tac"} to solve
   436   assumptions @{text "As"}, and applies tactic @{text "tac"} to solve
   436   it.  The latter may depend on the local assumptions being presented
   437   it.  The latter may depend on the local assumptions being presented
   437   as facts.  The result is in HHF normal form.
   438   as facts.  The result is in HHF normal form.
   438 
   439 
   439   \item @{ML Goal.prove_multi} is similar to @{ML Goal.prove}, but
   440   \item @{ML Goal.prove_common}~@{text "ctxt fork_pri"} is the general form
   440   states several conclusions simultaneously.  The goal is encoded by
   441   to state and prove a simultaneous goal statement, where @{ML Goal.prove}
   441   means of Pure conjunction; @{ML Goal.conjunction_tac} will turn this
   442   is a convenient shorthand for the most common application.
   442   into a collection of individual subgoals.
   443 
       
   444   The given list of simultaneous conclusions is encoded in the goal state by
       
   445   means of Pure conjunction: @{ML Goal.conjunction_tac} will turn this into
       
   446   a collection of individual subgoals, but note that the original multi-goal
       
   447   state is usually required for advanced induction.
       
   448 
       
   449   It is possible to provide an optional priority for a forked proof,
       
   450   typically @{ML "SOME ~1"}, while @{ML NONE} means the proof is immediate
       
   451   (sequential) as for @{ML Goal.prove}. Note that a forked proof does not
       
   452   exhibit any failures in the usual way via exceptions in ML, but
       
   453   accumulates error situations under the execution id of the running
       
   454   transaction. Thus the system is able to expose error messages ultimately
       
   455   to the end-user, even though the subsequent ML code misses them.
   443 
   456 
   444   \item @{ML Obtain.result}~@{text "tac thms ctxt"} eliminates the
   457   \item @{ML Obtain.result}~@{text "tac thms ctxt"} eliminates the
   445   given facts using a tactic, which results in additional fixed
   458   given facts using a tactic, which results in additional fixed
   446   variables and assumptions in the context.  Final results need to be
   459   variables and assumptions in the context.  Final results need to be
   447   exported explicitly.
   460   exported explicitly.