equal
deleted
inserted
replaced
274 |
274 |
275 (* monotonicity rules *) |
275 (* monotonicity rules *) |
276 |
276 |
277 fun get_monos ctxt = |
277 fun get_monos ctxt = |
278 #monos (rep_data ctxt) |
278 #monos (rep_data ctxt) |
279 |> map (Thm.transfer (Proof_Context.theory_of ctxt)); |
279 |> map (Thm.transfer' ctxt); |
280 |
280 |
281 fun mk_mono ctxt thm = |
281 fun mk_mono ctxt thm = |
282 let |
282 let |
283 fun eq_to_mono thm' = thm' RS (thm' RS @{thm eq_to_mono}); |
283 fun eq_to_mono thm' = thm' RS (thm' RS @{thm eq_to_mono}); |
284 fun dest_less_concl thm = dest_less_concl (thm RS @{thm le_funD}) |
284 fun dest_less_concl thm = dest_less_concl (thm RS @{thm le_funD}) |
312 |
312 |
313 (* equations *) |
313 (* equations *) |
314 |
314 |
315 fun retrieve_equations ctxt = |
315 fun retrieve_equations ctxt = |
316 Item_Net.retrieve (#equations (rep_data ctxt)) |
316 Item_Net.retrieve (#equations (rep_data ctxt)) |
317 #> map (Thm.transfer (Proof_Context.theory_of ctxt)); |
317 #> map (Thm.transfer' ctxt); |
318 |
318 |
319 val equation_add_permissive = |
319 val equation_add_permissive = |
320 Thm.declaration_attribute (fn thm => |
320 Thm.declaration_attribute (fn thm => |
321 map_data (fn (infos, monos, equations) => |
321 map_data (fn (infos, monos, equations) => |
322 (infos, monos, perhaps (try (Item_Net.update (Thm.trim_context thm))) equations))); |
322 (infos, monos, perhaps (try (Item_Net.update (Thm.trim_context thm))) equations))); |