src/Doc/Isar_Ref/Spec.thy
changeset 59320 a375de4dc07a
parent 59028 df7476e79558
child 59422 db6ecef63d5b
equal deleted inserted replaced
59319:677615cba30d 59320:a375de4dc07a
   803   of @{command "interpretation"} and @{command "sublocale"}.  It is
   803   of @{command "interpretation"} and @{command "sublocale"}.  It is
   804   available by importing theory @{file "~~/src/Tools/Permanent_Interpretation.thy"}
   804   available by importing theory @{file "~~/src/Tools/Permanent_Interpretation.thy"}
   805   and provides
   805   and provides
   806   \begin{enumerate}
   806   \begin{enumerate}
   807     \item a unified view on arbitrary suitable local theories as interpretation target; 
   807     \item a unified view on arbitrary suitable local theories as interpretation target; 
   808     \item rewrite morphisms by means of \emph{mixin definitions}. 
   808     \item rewrite morphisms by means of \emph{rewrite definitions}. 
   809   \end{enumerate}
   809   \end{enumerate}
   810   
   810   
   811   \begin{matharray}{rcl}
   811   \begin{matharray}{rcl}
   812     @{command_def "permanent_interpretation"} & : & @{text "local_theory \<rightarrow> proof(prove)"}
   812     @{command_def "permanent_interpretation"} & : & @{text "local_theory \<rightarrow> proof(prove)"}
   813   \end{matharray}
   813   \end{matharray}
   839   permanent interpretations.  Prominent examples are global theories
   839   permanent interpretations.  Prominent examples are global theories
   840   (where @{command "permanent_interpretation"} is technically
   840   (where @{command "permanent_interpretation"} is technically
   841   corresponding to @{command "interpretation"}) and locales
   841   corresponding to @{command "interpretation"}) and locales
   842   (where @{command "permanent_interpretation"} is technically
   842   (where @{command "permanent_interpretation"} is technically
   843   corresponding to @{command "sublocale"}).  Unnamed contexts
   843   corresponding to @{command "sublocale"}).  Unnamed contexts
   844   \secref{sec:target} are not admissible since they are
   844   (see \secref{sec:target}) are not admissible since they are
   845   non-permanent due to their very nature.  
   845   non-permanent due to their very nature.  
   846 
   846 
   847   In additions to \emph{rewrite morphisms} specified by @{text eqns},
   847   In additions to \emph{rewrite morphisms} specified by @{text eqns},
   848   also \emph{mixin definitions} may be specified.  Semantically, a
   848   also \emph{rewrite definitions} may be specified.  Semantically, a
   849   mixin definition results in a corresponding definition in
   849   rewrite definition
   850   the local theory's underlying target \emph{and} a mixin equation
   850   
   851   in the resulting rewrite morphisms which is symmetric to the
   851   \begin{itemize}
   852   original definition equation.
   852   
   853   
   853     \item produces a corresponding definition in
   854   The technical difference to a conventional definition plus
   854       the local theory's underlying target \emph{and}
   855   an explicit mixin equation is that
   855     
   856   
   856     \item augments the rewrite morphism with the equation
   857   \begin{enumerate}
   857       stemming from the symmetric of the corresponding definition.
   858   
   858   
   859     \item definitions are parsed in the syntactic interpretation
   859   \end{itemize}
   860       context, just like equations;
   860   
   861   
   861   This is technically different to to a naive combination
   862     \item the proof needs not consider the equations stemming from
   862   of a conventional definition and an explicit rewrite equation:
       
   863   
       
   864   \begin{itemize}
       
   865   
       
   866     \item Definitions are parsed in the syntactic interpretation
       
   867       context, just like equations.
       
   868   
       
   869     \item The proof needs not consider the equations stemming from
   863       definitions -- they are proved implicitly by construction.
   870       definitions -- they are proved implicitly by construction.
   864       
   871       
   865   \end{enumerate}
   872   \end{itemize}
   866   
   873   
   867   Mixin definitions yield a pattern for introducing new explicit
   874   Rewrite definitions yield a pattern for introducing new explicit
   868   operations for existing terms after interpretation.
   875   operations for existing terms after interpretation.
   869   
   876   
   870   \end{description}
   877   \end{description}
   871 \<close>
   878 \<close>
   872 
   879