equal
deleted
inserted
replaced
152 val certify: Proof.context -> term -> cterm |
152 val certify: Proof.context -> term -> cterm |
153 |
153 |
154 val parse_binding_colon: Token.T list -> binding * Token.T list |
154 val parse_binding_colon: Token.T list -> binding * Token.T list |
155 val parse_opt_binding_colon: Token.T list -> binding * Token.T list |
155 val parse_opt_binding_colon: Token.T list -> binding * Token.T list |
156 |
156 |
157 val typedef: binding option -> binding * (string * sort) list * mixfix -> term -> |
157 val typedef: binding * (string * sort) list * mixfix -> term -> |
158 (binding * binding) option -> tactic -> local_theory -> (string * Typedef.info) * local_theory |
158 (binding * binding) option -> tactic -> local_theory -> (string * Typedef.info) * local_theory |
159 |
159 |
160 val WRAP: ('a -> tactic) -> ('a -> tactic) -> 'a list -> tactic -> tactic |
160 val WRAP: ('a -> tactic) -> ('a -> tactic) -> 'a list -> tactic -> tactic |
161 val WRAP': ('a -> int -> tactic) -> ('a -> int -> tactic) -> 'a list -> (int -> tactic) -> int -> |
161 val WRAP': ('a -> int -> tactic) -> ('a -> int -> tactic) -> 'a list -> (int -> tactic) -> int -> |
162 tactic |
162 tactic |
278 |
278 |
279 val parse_binding_colon = Parse.binding --| @{keyword ":"}; |
279 val parse_binding_colon = Parse.binding --| @{keyword ":"}; |
280 val parse_opt_binding_colon = Scan.optional parse_binding_colon Binding.empty; |
280 val parse_opt_binding_colon = Scan.optional parse_binding_colon Binding.empty; |
281 |
281 |
282 (*TODO: is this really different from Typedef.add_typedef_global?*) |
282 (*TODO: is this really different from Typedef.add_typedef_global?*) |
283 fun typedef opt_name typ set opt_morphs tac lthy = |
283 fun typedef typ set opt_morphs tac lthy = |
284 let |
284 let |
285 val ((name, info), (lthy, lthy_old)) = |
285 val ((name, info), (lthy, lthy_old)) = |
286 lthy |
286 lthy |
287 |> Typedef.add_typedef opt_name typ set opt_morphs tac |
287 |> Typedef.add_typedef typ set opt_morphs tac |
288 ||> `Local_Theory.restore; |
288 ||> `Local_Theory.restore; |
289 val phi = Proof_Context.export_morphism lthy_old lthy; |
289 val phi = Proof_Context.export_morphism lthy_old lthy; |
290 in |
290 in |
291 ((name, Typedef.transform_info phi info), lthy) |
291 ((name, Typedef.transform_info phi info), lthy) |
292 end; |
292 end; |