doc-src/IsarRef/Thy/Spec.thy
changeset 41435 12585dfb86fe
parent 41434 710cdb9e0d17
child 42596 6c621a9d612a
equal deleted inserted replaced
41434:710cdb9e0d17 41435:12585dfb86fe
   495 
   495 
   496   \begin{matharray}{rcl}
   496   \begin{matharray}{rcl}
   497     @{command_def "interpretation"} & : & @{text "theory \<rightarrow> proof(prove)"} \\
   497     @{command_def "interpretation"} & : & @{text "theory \<rightarrow> proof(prove)"} \\
   498     @{command_def "interpret"} & : & @{text "proof(state) | proof(chain) \<rightarrow> proof(prove)"} \\
   498     @{command_def "interpret"} & : & @{text "proof(state) | proof(chain) \<rightarrow> proof(prove)"} \\
   499     @{command_def "sublocale"} & : & @{text "theory \<rightarrow> proof(prove)"} \\
   499     @{command_def "sublocale"} & : & @{text "theory \<rightarrow> proof(prove)"} \\
       
   500     @{command_def "print_dependencies"}@{text "\<^sup>*"} & : & @{text "context \<rightarrow>"} \\
   500     @{command_def "print_interps"}@{text "\<^sup>*"} & : & @{text "context \<rightarrow>"} \\
   501     @{command_def "print_interps"}@{text "\<^sup>*"} & : & @{text "context \<rightarrow>"} \\
   501   \end{matharray}
   502   \end{matharray}
   502 
   503 
   503   \indexouternonterm{interp}
   504   \indexouternonterm{interp}
   504   \begin{rail}
   505   \begin{rail}
   506     ;
   507     ;
   507     'interpret' localeexpr equations?
   508     'interpret' localeexpr equations?
   508     ;
   509     ;
   509     'sublocale' nameref ('<' | subseteq) localeexpr equations?
   510     'sublocale' nameref ('<' | subseteq) localeexpr equations?
   510     ;
   511     ;
       
   512     'print_dependencies' '!'? localeexpr
       
   513     ;
       
   514     'print_interps' nameref
       
   515     ;
   511     equations: 'where' (thmdecl? prop + 'and')
   516     equations: 'where' (thmdecl? prop + 'and')
   512     ;
       
   513     'print_interps' nameref
       
   514     ;
   517     ;
   515   \end{rail}
   518   \end{rail}
   516 
   519 
   517   \begin{description}
   520   \begin{description}
   518 
   521 
   578   Equations given after @{keyword "where"} amend the morphism through
   581   Equations given after @{keyword "where"} amend the morphism through
   579   which @{text expr} is interpreted.  This enables to map definitions
   582   which @{text expr} is interpreted.  This enables to map definitions
   580   from the interpreted locales to entities of @{text name}.  This
   583   from the interpreted locales to entities of @{text name}.  This
   581   feature is experimental.
   584   feature is experimental.
   582 
   585 
       
   586   \item @{command "print_dependencies"}~@{text "expr"} is useful for
       
   587   understanding the effect of an interpretation of @{text "expr"}.  It
       
   588   lists all locale instances for which interpretations would be added
       
   589   to the current context.  Variant @{command
       
   590   "print_dependencies"}@{text "!"} prints all locale instances that
       
   591   would be considered for interpretation, and would be interpreted in
       
   592   an empty context (that is, without interpretations).
       
   593 
   583   \item @{command "print_interps"}~@{text "locale"} lists all
   594   \item @{command "print_interps"}~@{text "locale"} lists all
   584   interpretations of @{text "locale"} in the current theory or proof
   595   interpretations of @{text "locale"} in the current theory or proof
   585   context, including those due to a combination of a @{command
   596   context, including those due to a combination of a @{command
   586   "interpretation"} or @{command "interpret"} and one or several
   597   "interpretation"} or @{command "interpret"} and one or several
   587   @{command "sublocale"} declarations.
   598   @{command "sublocale"} declarations.