(*all theorems used in the graph of nested proofs*)
val all_thms =
Proofterm.fold_body_thms
(fn {thm_name, ...} => insert (op =) thm_name) [body] []; \<close>
text\<open>
The result refers to various basic facts of Isabelle/HOL: @{thm [source]
HOL.impI}, @{thm [source] HOL.conjE}, @{thm [source] HOL.conjI} etc. The
combinator \<^ML>\<open>Proofterm.fold_body_thms\<close> recursively explores the graph of
the proofs of all theorems being used here.
\<^medskip>
Alternatively, we may produce a proofterm manually, and turn it into a theorem as follows: \<close>
ML_val \<open>
val thy = \<^theory>;
val prf =
Proof_Syntax.read_proof thy true false "impI \ _ \ _ \ \ \ (\<^bold>\<lambda>H: _. \ \ conjE \<cdot> _ \<cdot> _ \<cdot> _ \<bullet> H \<bullet> \ \ (\<^bold>\<lambda>(H: _) Ha: _. conjI \<cdot> _ \<cdot> _ \<bullet> Ha \<bullet> H))";
val thm =
Proofterm.reconstruct_proof thy \<^prop>\<open>A \<and> B \<longrightarrow> B \<and> A\<close> prf
|> Proof_Checker.thm_of_proof thy
|> Drule.export_without_context; \<close>
end
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.0Bemerkung:
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.