doc-src/IsarRef/generic.tex
changeset 17139 165c97f9bb63
parent 17043 d3e52c3bfb07
child 17228 19b460b39dad
equal deleted inserted replaced
17138:ad4c98fd367b 17139:165c97f9bb63
   258 \begin{rail}
   258 \begin{rail}
   259   'interpretation' (interp | name ('<' | subseteq) contextexp)
   259   'interpretation' (interp | name ('<' | subseteq) contextexp)
   260   ;
   260   ;
   261   'interpret' interp
   261   'interpret' interp
   262   ;
   262   ;
   263   printinterps name
   263   printinterps '!'? name
   264   ;
   264   ;
   265   interp: thmdecl? contextexpr ('[' (inst+) ']')?
   265   interp: thmdecl? contextexpr ('[' (inst+) ']')?
   266   ;
   266   ;
   267 \end{rail}
   267 \end{rail}
   268 
   268 
   312   command, the proof is in the context of $name$.  After the proof
   312   command, the proof is in the context of $name$.  After the proof
   313   obligation has been dischared, the facts of $expr$
   313   obligation has been dischared, the facts of $expr$
   314   become part of locale $name$ as \emph{derived} context elements and
   314   become part of locale $name$ as \emph{derived} context elements and
   315   are available when the context $name$ is subsequently entered.
   315   are available when the context $name$ is subsequently entered.
   316   Note that, like import, this is dynamic: facts added to a locale
   316   Note that, like import, this is dynamic: facts added to a locale
   317   part of $expr$ after the interpretation become also available in
   317   part of $expr$ after interpretation become also available in
   318   $name$.  Like facts
   318   $name$.  Like facts
   319   of renamed context elements, facts obtained by interpretation may be
   319   of renamed context elements, facts obtained by interpretation may be
   320   accessed by prefixing with the parameter renaming (where the parameters
   320   accessed by prefixing with the parameter renaming (where the parameters
   321   are separated by `\_').
   321   are separated by `\_').
   322 
   322 
   328   Only specification fragments of $expr$ that are not already part of
   328   Only specification fragments of $expr$ that are not already part of
   329   $name$ (be it imported, derived or a derived fragment of the import)
   329   $name$ (be it imported, derived or a derived fragment of the import)
   330   are considered by interpretation.  This enables circular
   330   are considered by interpretation.  This enables circular
   331   interpretations.
   331   interpretations.
   332 
   332 
       
   333   If interpretations of $name$ exist in the current theory, the
       
   334   command adds interpretations for $expr$ as well, with the same
       
   335   prefix and attributes, although only for fragments of $expr$ that
       
   336   are not interpreted in the theory already.
       
   337 
   333 \item [$\isarcmd{interpret}~expr~insts$]
   338 \item [$\isarcmd{interpret}~expr~insts$]
   334   interprets $expr$ in the proof context and is otherwise similar to
   339   interprets $expr$ in the proof context and is otherwise similar to
   335   interpretation in theories.  Free variables in instantiations are not
   340   interpretation in theories.  Free variables in instantiations are not
   336   generalized, however.
   341   generalized, however.
   337 
   342 
   338 \item [$\isarcmd{print_interps}~loc$]
   343 \item [$\isarcmd{print_interps}~loc$]
   339   prints the interpretations of a particular locale $loc$ that are
   344   prints the interpretations of a particular locale $loc$ that are
   340   active in the current context, either theory or proof context.
   345   active in the current context, either theory or proof context.  The
       
   346   exclamation point argument causes triggers printing of
       
   347   \emph{witness} theorems justifying interpretations.  These are
       
   348   normally omitted from the output.
       
   349 
   341   
   350   
   342 \end{descr}
   351 \end{descr}
   343 
   352 
   344 \begin{warn}
   353 \begin{warn}
   345   Since attributes are applied to interpreted theorems, interpretation
   354   Since attributes are applied to interpreted theorems, interpretation
   354   than the interpretation of the first.  A warning
   363   than the interpretation of the first.  A warning
   355   is issued, since it is likely that these could have been generalized
   364   is issued, since it is likely that these could have been generalized
   356   in the first place.  The locale package does not attempt to remove
   365   in the first place.  The locale package does not attempt to remove
   357   subsumed interpretations.  This situation is normally harmless, but
   366   subsumed interpretations.  This situation is normally harmless, but
   358   note that $blast$ gets confused by the presence of multiple axclass
   367   note that $blast$ gets confused by the presence of multiple axclass
   359   instances a rule.
   368   instances of a rule.
   360 \end{warn}
   369 \end{warn}
   361 
   370 
   362 
   371 
   363 \section{Derived proof schemes}
   372 \section{Derived proof schemes}
   364 
   373