doc-src/IsarRef/generic.tex
changeset 23920 4288dc7dc248
parent 23654 a2ad1c166ac8
child 24015 253720dddcde
equal deleted inserted replaced
23919:af871d13e320 23920:4288dc7dc248
   339 
   339 
   340 \railalias{printinterps}{print\_interps}
   340 \railalias{printinterps}{print\_interps}
   341 \railterm{printinterps}
   341 \railterm{printinterps}
   342 
   342 
   343 \begin{rail}
   343 \begin{rail}
   344   'interpretation' (interp | name ('<' | subseteq) contextexp)
   344   'interpretation' (interp | name ('<' | subseteq) contextexpr)
   345   ;
   345   ;
   346   'interpret' interp
   346   'interpret' interp
   347   ;
   347   ;
   348   printinterps '!'? name
   348   printinterps '!'? name
   349   ;
   349   ;
   350   interp: thmdecl? contextexpr ('[' (inst+) ']')?
   350   interp: thmdecl? \\ (contextexpr ('[' (inst+) ']')? |
   351   ;
   351     name ('[' (inst+) ']')? 'where' (prop + 'and'))
   352 \end{rail}
   352   ;
   353 
   353 \end{rail}
   354 
   354 
   355 \begin{descr}
   355 
   356 
   356 \begin{descr}
   357 \item [$\isarcmd{interpretation}~expr~insts$]
   357 
   358 
   358 \item [$\isarcmd{interpretation}~expr~insts~\isarkeyword{where}~eqns$]
   359   The first form of $\isarcmd{interpretation}$ interprets $expr$
   359 
   360   in the theory.  The instantiation is given as a list of
   360   The first form of $\isarcmd{interpretation}$ interprets $expr$ in
   361   terms $insts$ and is positional.
   361   the theory.  The instantiation is given as a list of terms $insts$
   362   All parameters must receive an instantiation term --- with the
   362   and is positional.  All parameters must receive an instantiation
   363   exception of defined parameters.  These are, if omitted, derived
   363   term --- with the exception of defined parameters.  These are, if
   364   from the defining equation and other instantiations.  Use ``\_'' to
   364   omitted, derived from the defining equation and other
   365   omit an instantiation term.  Free variables are automatically
   365   instantiations.  Use ``\_'' to omit an instantiation term.  Free
   366   generalized.
   366   variables are automatically generalized.
   367 
   367 
   368   The command generates proof obligations for the instantiated
   368   The command generates proof obligations for the instantiated
   369   specifications (assumes and defines elements).  Once these are
   369   specifications (assumes and defines elements).  Once these are
   370   discharged by the user, instantiated facts are added to the theory in
   370   discharged by the user, instantiated facts are added to the theory in
   371   a post-processing phase.
   371   a post-processing phase.
       
   372 
       
   373   Additional equations, which are unfolded in facts during
       
   374   post-processing, may be given after the keyword
       
   375   $\isarkeyword{where}$.  This is useful for interpreting concepts
       
   376   introduced through definition specification elements.  The equations
       
   377   must be proved.  Note that if equations are present, the context
       
   378   expression is restricted to a locale name.
   372 
   379 
   373   The command is aware of interpretations already active in the
   380   The command is aware of interpretations already active in the
   374   theory.  No proof obligations are generated for those, neither is
   381   theory.  No proof obligations are generated for those, neither is
   375   post-processing applied to their facts.  This avoids duplication of
   382   post-processing applied to their facts.  This avoids duplication of
   376   interpreted facts, in particular.  Note that, in the case of a
   383   interpreted facts, in particular.  Note that, in the case of a
   377   locale with import, parts of the interpretation may already be
   384   locale with import, parts of the interpretation may already be
   378   active.  The command will only generate proof obligations and add
   385   active.  The command will only generate proof obligations and process
   379   facts for new parts.
   386   facts for new parts.
   380 
   387 
   381   The context expression may be preceded by a name and/or attributes.
   388   The context expression may be preceded by a name and/or attributes.
   382   These take effect in the post-processing of facts.  The name is used
   389   These take effect in the post-processing of facts.  The name is used
   383   to prefix fact names, for example to avoid accidental hiding of
   390   to prefix fact names, for example to avoid accidental hiding of
   418   If interpretations of $name$ exist in the current theory, the
   425   If interpretations of $name$ exist in the current theory, the
   419   command adds interpretations for $expr$ as well, with the same
   426   command adds interpretations for $expr$ as well, with the same
   420   prefix and attributes, although only for fragments of $expr$ that
   427   prefix and attributes, although only for fragments of $expr$ that
   421   are not interpreted in the theory already.
   428   are not interpreted in the theory already.
   422 
   429 
   423 \item [$\isarcmd{interpret}~expr~insts$]
   430 \item [$\isarcmd{interpret}~expr~insts~\isarkeyword{where}~eqns$]
   424   interprets $expr$ in the proof context and is otherwise similar to
   431   interprets $expr$ in the proof context and is otherwise similar to
   425   interpretation in theories.  Free variables in instantiations are not
   432   interpretation in theories.  Free variables in instantiations are not
   426   generalized, however.
   433   generalized, however.
   427 
   434 
   428 \item [$\isarcmd{print_interps}~loc$]
   435 \item [$\isarcmd{print_interps}~loc$]