22 local_theory -> local_theory |
22 local_theory -> local_theory |
23 val abbrev: (string * bool -> binding * mixfix -> term * term -> |
23 val abbrev: (string * bool -> binding * mixfix -> term * term -> |
24 term list -> local_theory -> local_theory) -> |
24 term list -> local_theory -> local_theory) -> |
25 string * bool -> (binding * mixfix) * term -> local_theory -> (term * term) * local_theory |
25 string * bool -> (binding * mixfix) * term -> local_theory -> (term * term) * local_theory |
26 val background_declaration: declaration -> local_theory -> local_theory |
26 val background_declaration: declaration -> local_theory -> local_theory |
|
27 val locale_declaration: string -> bool -> declaration -> local_theory -> local_theory |
27 val standard_declaration: declaration -> local_theory -> local_theory |
28 val standard_declaration: declaration -> local_theory -> local_theory |
28 val locale_declaration: string -> bool -> declaration -> local_theory -> local_theory |
|
29 val theory_foundation: ((binding * typ) * mixfix) * (binding * term) -> |
29 val theory_foundation: ((binding * typ) * mixfix) * (binding * term) -> |
30 term list * term list -> local_theory -> (term * thm) * local_theory |
30 term list * term list -> local_theory -> (term * thm) * local_theory |
31 val theory_notes: string -> |
31 val theory_notes: string -> |
32 (Attrib.binding * (thm list * Args.src list) list) list -> |
32 (Attrib.binding * (thm list * Args.src list) list) list -> |
33 (Attrib.binding * (thm list * Args.src list) list) list -> |
33 (Attrib.binding * (thm list * Args.src list) list) list -> |
208 val theory_decl = |
208 val theory_decl = |
209 Local_Theory.standard_form lthy |
209 Local_Theory.standard_form lthy |
210 (Proof_Context.init_global (Proof_Context.theory_of lthy)) decl; |
210 (Proof_Context.init_global (Proof_Context.theory_of lthy)) decl; |
211 in Local_Theory.background_theory (Context.theory_map theory_decl) lthy end; |
211 in Local_Theory.background_theory (Context.theory_map theory_decl) lthy end; |
212 |
212 |
213 fun standard_declaration decl lthy = |
|
214 Local_Theory.map_contexts (fn _ => fn ctxt => |
|
215 Context.proof_map (Local_Theory.standard_form lthy ctxt decl) ctxt) lthy; |
|
216 |
|
217 fun locale_declaration locale syntax decl lthy = lthy |
213 fun locale_declaration locale syntax decl lthy = lthy |
218 |> Local_Theory.target (fn ctxt => ctxt |> |
214 |> Local_Theory.target (fn ctxt => ctxt |> |
219 Locale.add_declaration locale syntax |
215 Locale.add_declaration locale syntax |
220 (Morphism.transform (Local_Theory.standard_morphism lthy ctxt) decl)); |
216 (Morphism.transform (Local_Theory.standard_morphism lthy ctxt) decl)); |
|
217 |
|
218 fun standard_declaration decl lthy = |
|
219 Local_Theory.map_contexts (fn _ => fn ctxt => |
|
220 Context.proof_map (Local_Theory.standard_form lthy ctxt decl) ctxt) lthy; |
221 |
221 |
222 |
222 |
223 |
223 |
224 (** primitive theory operations **) |
224 (** primitive theory operations **) |
225 |
225 |