equal
deleted
inserted
replaced
13 val valuetypesN : string |
13 val valuetypesN : string |
14 |
14 |
15 val namespace_definition : |
15 val namespace_definition : |
16 bstring -> |
16 bstring -> |
17 typ -> |
17 typ -> |
18 Expression.expression -> |
18 (xstring, string) Expression.expr * (binding * string option * mixfix) list -> |
19 string list -> string list -> theory -> theory |
19 string list -> string list -> theory -> theory |
20 |
20 |
21 val define_statespace : |
21 val define_statespace : |
22 string list -> |
22 string list -> |
23 string -> |
23 string -> |
137 (make_namespace_data declinfo distinctthm silent) ctxt |
137 (make_namespace_data declinfo distinctthm silent) ctxt |
138 end; |
138 end; |
139 |
139 |
140 val get_silent = #silent o NameSpaceData.get; |
140 val get_silent = #silent o NameSpaceData.get; |
141 |
141 |
|
142 fun expression_no_pos (expr, fixes) : Expression.expression = |
|
143 (map (fn (name, inst) => ((name, Position.none), inst)) expr, fixes); |
|
144 |
142 fun prove_interpretation_in ctxt_tac (name, expr) thy = |
145 fun prove_interpretation_in ctxt_tac (name, expr) thy = |
143 thy |
146 thy |
144 |> Expression.sublocale_cmd I name expr [] |
147 |> Expression.sublocale_cmd I (name, Position.none) (expression_no_pos expr) [] |
145 |> Proof.global_terminal_proof |
148 |> Proof.global_terminal_proof |
146 (Method.Basic (fn ctxt => SIMPLE_METHOD (ctxt_tac ctxt)), NONE) |
149 (Method.Basic (fn ctxt => SIMPLE_METHOD (ctxt_tac ctxt)), NONE) |
147 |> Proof_Context.theory_of |
150 |> Proof_Context.theory_of |
148 |
151 |
149 fun add_locale name expr elems thy = |
152 fun add_locale name expr elems thy = |
152 |> snd |
155 |> snd |
153 |> Local_Theory.exit; |
156 |> Local_Theory.exit; |
154 |
157 |
155 fun add_locale_cmd name expr elems thy = |
158 fun add_locale_cmd name expr elems thy = |
156 thy |
159 thy |
157 |> Expression.add_locale_cmd I (Binding.name name) Binding.empty expr elems |
160 |> Expression.add_locale_cmd I (Binding.name name) Binding.empty (expression_no_pos expr) elems |
158 |> snd |
161 |> snd |
159 |> Local_Theory.exit; |
162 |> Local_Theory.exit; |
160 |
163 |
161 type statespace_info = |
164 type statespace_info = |
162 {args: (string * sort) list, (* type arguments *) |
165 {args: (string * sort) list, (* type arguments *) |