equal
deleted
inserted
replaced
40 local_theory -> (term * (string * thm)) * local_theory |
40 local_theory -> (term * (string * thm)) * local_theory |
41 val abbreviation: Syntax.mode -> (binding * typ option * mixfix) option * term -> |
41 val abbreviation: Syntax.mode -> (binding * typ option * mixfix) option * term -> |
42 local_theory -> local_theory |
42 local_theory -> local_theory |
43 val abbreviation_cmd: Syntax.mode -> (binding * string option * mixfix) option * string -> |
43 val abbreviation_cmd: Syntax.mode -> (binding * string option * mixfix) option * string -> |
44 local_theory -> local_theory |
44 local_theory -> local_theory |
|
45 val type_notation: bool -> Syntax.mode -> (typ * mixfix) list -> local_theory -> local_theory |
|
46 val type_notation_cmd: bool -> Syntax.mode -> (string * mixfix) list -> local_theory -> local_theory |
45 val notation: bool -> Syntax.mode -> (term * mixfix) list -> local_theory -> local_theory |
47 val notation: bool -> Syntax.mode -> (term * mixfix) list -> local_theory -> local_theory |
46 val notation_cmd: bool -> Syntax.mode -> (string * mixfix) list -> local_theory -> local_theory |
48 val notation_cmd: bool -> Syntax.mode -> (string * mixfix) list -> local_theory -> local_theory |
47 val theorems: string -> |
49 val theorems: string -> |
48 (Attrib.binding * (thm list * Attrib.src list) list) list -> |
50 (Attrib.binding * (thm list * Attrib.src list) list) list -> |
49 local_theory -> (string * thm list) list * local_theory |
51 local_theory -> (string * thm list) list * local_theory |
253 val abbreviation_cmd = gen_abbrev true read_free_spec; |
255 val abbreviation_cmd = gen_abbrev true read_free_spec; |
254 |
256 |
255 |
257 |
256 (* notation *) |
258 (* notation *) |
257 |
259 |
|
260 local |
|
261 |
|
262 fun gen_type_notation prep_type add mode args lthy = |
|
263 lthy |> Local_Theory.type_notation add mode (map (apfst (prep_type lthy)) args); |
|
264 |
258 fun gen_notation prep_const add mode args lthy = |
265 fun gen_notation prep_const add mode args lthy = |
259 lthy |> Local_Theory.notation add mode (map (apfst (prep_const lthy)) args); |
266 lthy |> Local_Theory.notation add mode (map (apfst (prep_const lthy)) args); |
260 |
267 |
|
268 in |
|
269 |
|
270 val type_notation = gen_type_notation (K I); |
|
271 val type_notation_cmd = gen_type_notation (fn ctxt => ProofContext.read_type_name ctxt false); |
|
272 |
261 val notation = gen_notation (K I); |
273 val notation = gen_notation (K I); |
262 val notation_cmd = gen_notation (fn ctxt => ProofContext.read_const ctxt false); |
274 val notation_cmd = gen_notation (fn ctxt => ProofContext.read_const ctxt false); |
|
275 |
|
276 end; |
263 |
277 |
264 |
278 |
265 (* fact statements *) |
279 (* fact statements *) |
266 |
280 |
267 fun gen_theorems prep_fact prep_att kind raw_facts lthy = |
281 fun gen_theorems prep_fact prep_att kind raw_facts lthy = |