# HG changeset patch # User wenzelm # Date 1642852803 -3600 # Node ID 26794ec7c78e34d873c1bd17114108f02c7f2888 # Parent e9a514c70b9add9e27c251b261aa00a302afc5a8 some updates and clarification on Assumption.export_term; diff -r e9a514c70b9a -r 26794ec7c78e src/Doc/Implementation/Proof.thy --- a/src/Doc/Implementation/Proof.thy Fri Jan 21 23:49:10 2022 +0000 +++ b/src/Doc/Implementation/Proof.thy Sat Jan 22 13:00:03 2022 +0100 @@ -271,11 +271,12 @@ @{define_ML Assumption.add_assumes: " cterm list -> Proof.context -> thm list * Proof.context"} \\ @{define_ML Assumption.export: "bool -> Proof.context -> Proof.context -> thm -> thm"} \\ + @{define_ML Assumption.export_term: "Proof.context -> Proof.context -> term -> term"} \\ \end{mldecls} - \<^descr> Type \<^ML_type>\Assumption.export\ represents arbitrary export rules, which - is any function of type \<^ML_type>\bool -> cterm list -> thm -> thm\, where - the \<^ML_type>\bool\ indicates goal mode, and the \<^ML_type>\cterm list\ + \<^descr> Type \<^ML_type>\Assumption.export\ represents export rules, as a pair of + functions \<^ML_type>\bool -> cterm list -> (thm -> thm) * (term -> term)\. + The \<^ML_type>\bool\ argument indicates goal mode, and the \<^ML_type>\cterm list\ the collection of assumptions to be discharged simultaneously. \<^descr> \<^ML>\Assumption.assume\~\ctxt A\ turns proposition \A\ into a primitive @@ -285,13 +286,21 @@ with export rule \r\. The resulting facts are hypothetical theorems as produced by the raw \<^ML>\Assumption.assume\. - \<^descr> \<^ML>\Assumption.add_assumes\~\As\ is a special case of \<^ML>\Assumption.add_assms\ where the export rule performs \\\intro\ or + \<^descr> \<^ML>\Assumption.add_assumes\~\As\ is a special case of + \<^ML>\Assumption.add_assms\ where the export rule performs \\\intro\ or \#\\intro\, depending on goal mode. \<^descr> \<^ML>\Assumption.export\~\is_goal inner outer thm\ exports result \thm\ - from the the \inner\ context back into the \outer\ one; \is_goal = true\ - means this is a goal context. The result is in HHF normal form. Note that - \<^ML>\Proof_Context.export\ combines \<^ML>\Variable.export\ and \<^ML>\Assumption.export\ in the canonical way. + from the \inner\ context back into the \outer\ one; \is_goal = true\ means + this is a goal context. The result is in HHF normal form. Note that + \<^ML>\Proof_Context.export\ combines \<^ML>\Variable.export\ and + \<^ML>\Assumption.export\ in the canonical way. + + \<^descr> \<^ML>\Assumption.export_term\~\inner outer t\ exports term \t\ from the + \inner\ context back into the \outer\ one. This is analogous to + \<^ML>\Assumption.export\, but only takes syntactical aspects of the + context into account (such as locally specified variables as seen in + @{command define} or @{command obtain}). \ text %mlex \