doc-src/IsarRef/Thy/Proof.thy
changeset 47484 e94cc23d434a
parent 46281 f21c8ecbf8d5
child 47498 e3fc50c7da13
equal deleted inserted replaced
47483:3f704717a67f 47484:e94cc23d434a
   292   (three dots).  The canonical application of this convenience are
   292   (three dots).  The canonical application of this convenience are
   293   calculational proofs (see \secref{sec:calculation}).
   293   calculational proofs (see \secref{sec:calculation}).
   294 *}
   294 *}
   295 
   295 
   296 
   296 
   297 subsection {* Facts and forward chaining *}
   297 subsection {* Facts and forward chaining \label{sec:proof-facts} *}
   298 
   298 
   299 text {*
   299 text {*
   300   \begin{matharray}{rcl}
   300   \begin{matharray}{rcl}
   301     @{command_def "note"} & : & @{text "proof(state) \<rightarrow> proof(state)"} \\
   301     @{command_def "note"} & : & @{text "proof(state) \<rightarrow> proof(state)"} \\
   302     @{command_def "then"} & : & @{text "proof(state) \<rightarrow> proof(chain)"} \\
   302     @{command_def "then"} & : & @{text "proof(state) \<rightarrow> proof(chain)"} \\
   438     @@{command print_statement} @{syntax modes}? @{syntax thmrefs}
   438     @@{command print_statement} @{syntax modes}? @{syntax thmrefs}
   439     ;
   439     ;
   440   
   440   
   441     goal: (@{syntax props} + @'and')
   441     goal: (@{syntax props} + @'and')
   442     ;
   442     ;
   443     longgoal: @{syntax thmdecl}? (@{syntax context_elem} * ) conclusion
   443     longgoal: @{syntax thmdecl}? (@{syntax_ref \"includes\"}?) (@{syntax context_elem} * ) conclusion
   444     ;
   444     ;
   445     conclusion: @'shows' goal | @'obtains' (@{syntax parname}? case + '|')
   445     conclusion: @'shows' goal | @'obtains' (@{syntax parname}? case + '|')
   446     ;
   446     ;
   447     case: (@{syntax vars} + @'and') @'where' (@{syntax props} + @'and')
   447     case: (@{syntax vars} + @'and') @'where' (@{syntax props} + @'and')
   448   "}
   448   "}
   452   \item @{command "lemma"}~@{text "a: \<phi>"} enters proof mode with
   452   \item @{command "lemma"}~@{text "a: \<phi>"} enters proof mode with
   453   @{text \<phi>} as main goal, eventually resulting in some fact @{text "\<turnstile>
   453   @{text \<phi>} as main goal, eventually resulting in some fact @{text "\<turnstile>
   454   \<phi>"} to be put back into the target context.  An additional @{syntax
   454   \<phi>"} to be put back into the target context.  An additional @{syntax
   455   context} specification may build up an initial proof context for the
   455   context} specification may build up an initial proof context for the
   456   subsequent claim; this includes local definitions and syntax as
   456   subsequent claim; this includes local definitions and syntax as
   457   well, see the definition of @{syntax context_elem} in
   457   well, see also @{syntax "includes"} in \secref{sec:bundle} and
   458   \secref{sec:locale}.
   458   @{syntax context_elem} in \secref{sec:locale}.
   459   
   459   
   460   \item @{command "theorem"}~@{text "a: \<phi>"} and @{command
   460   \item @{command "theorem"}~@{text "a: \<phi>"} and @{command
   461   "corollary"}~@{text "a: \<phi>"} are essentially the same as @{command
   461   "corollary"}~@{text "a: \<phi>"} are essentially the same as @{command
   462   "lemma"}~@{text "a: \<phi>"}, but the facts are internally marked as
   462   "lemma"}~@{text "a: \<phi>"}, but the facts are internally marked as
   463   being of a different kind.  This discrimination acts like a formal
   463   being of a different kind.  This discrimination acts like a formal