doc-src/IsarImplementation/Thy/Local_Theory.thy
changeset 38354 fed4e71a8c0f
parent 34927 c4c02ac736a6
child 38466 fef3c24bb8d3
equal deleted inserted replaced
38353:d98baa2cf589 38354:fed4e71a8c0f
    95 *}
    95 *}
    96 
    96 
    97 text %mlref {*
    97 text %mlref {*
    98   \begin{mldecls}
    98   \begin{mldecls}
    99   @{index_ML_type local_theory: Proof.context} \\
    99   @{index_ML_type local_theory: Proof.context} \\
   100   @{index_ML Theory_Target.init: "string option -> theory -> local_theory"} \\[1ex]
   100   @{index_ML Named_Target.init: "string option -> theory -> local_theory"} \\[1ex]
   101   @{index_ML Local_Theory.define: "(binding * mixfix) * (Attrib.binding * term) ->
   101   @{index_ML Local_Theory.define: "(binding * mixfix) * (Attrib.binding * term) ->
   102     local_theory -> (term * (string * thm)) * local_theory"} \\
   102     local_theory -> (term * (string * thm)) * local_theory"} \\
   103   @{index_ML Local_Theory.note: "Attrib.binding * thm list ->
   103   @{index_ML Local_Theory.note: "Attrib.binding * thm list ->
   104     local_theory -> (string * thm list) * local_theory"} \\
   104     local_theory -> (string * thm list) * local_theory"} \\
   105   \end{mldecls}
   105   \end{mldecls}
   112   target information as special context data.  Subtyping means that
   112   target information as special context data.  Subtyping means that
   113   any value @{text "lthy:"}~@{ML_type local_theory} can be also used
   113   any value @{text "lthy:"}~@{ML_type local_theory} can be also used
   114   with operations on expecting a regular @{text "ctxt:"}~@{ML_type
   114   with operations on expecting a regular @{text "ctxt:"}~@{ML_type
   115   Proof.context}.
   115   Proof.context}.
   116 
   116 
   117   \item @{ML Theory_Target.init}~@{text "NONE thy"} initializes a
   117   \item @{ML Named_Target.init}~@{text "NONE thy"} initializes a
   118   trivial local theory from the given background theory.
   118   trivial local theory from the given background theory.
   119   Alternatively, @{text "SOME name"} may be given to initialize a
   119   Alternatively, @{text "SOME name"} may be given to initialize a
   120   @{command locale} or @{command class} context (a fully-qualified
   120   @{command locale} or @{command class} context (a fully-qualified
   121   internal name is expected here).  This is useful for experimentation
   121   internal name is expected here).  This is useful for experimentation
   122   --- normally the Isar toplevel already takes care to initialize the
   122   --- normally the Isar toplevel already takes care to initialize the