equal
deleted
inserted
replaced
240 val ((lhs', global_def), lthy2) = lthy |
240 val ((lhs', global_def), lthy2) = lthy |
241 |> foundation (((b, U), mx'), (b_def, rhs')) (type_params, term_params); |
241 |> foundation (((b, U), mx'), (b_def, rhs')) (type_params, term_params); |
242 |
242 |
243 (*local definition*) |
243 (*local definition*) |
244 val ([(lhs, (_, local_def))], lthy3) = lthy2 |
244 val ([(lhs, (_, local_def))], lthy3) = lthy2 |
245 |> Local_Defs.define [((b, NoSyn), (Thm.empty_binding, lhs'))]; |
245 |> Context_Position.set_visible false |
|
246 |> Local_Defs.define [((b, NoSyn), (Thm.empty_binding, lhs'))] |
|
247 ||> Context_Position.restore_visible lthy2; |
246 |
248 |
247 (*result*) |
249 (*result*) |
248 val def = |
250 val def = |
249 Thm.transitive local_def global_def |
251 Thm.transitive local_def global_def |
250 |> Local_Defs.contract lthy3 defs (Thm.cterm_of lthy3 (Logic.mk_equals (lhs, rhs))); |
252 |> Local_Defs.contract lthy3 defs (Thm.cterm_of lthy3 (Logic.mk_equals (lhs, rhs))); |
327 val (global_rhs, (extra_tfrees, (type_params, term_params))) = export_abbrev lthy I rhs; |
329 val (global_rhs, (extra_tfrees, (type_params, term_params))) = export_abbrev lthy I rhs; |
328 val mx' = check_mixfix lthy (b, extra_tfrees) mx; |
330 val mx' = check_mixfix lthy (b, extra_tfrees) mx; |
329 in |
331 in |
330 lthy |
332 lthy |
331 |> target_abbrev prmode (b, mx') global_rhs (type_params, term_params) |
333 |> target_abbrev prmode (b, mx') global_rhs (type_params, term_params) |
|
334 |> Context_Position.set_visible false |
332 |> Proof_Context.add_abbrev Print_Mode.internal (b, rhs) |> snd |
335 |> Proof_Context.add_abbrev Print_Mode.internal (b, rhs) |> snd |
333 |> Context_Position.set_visible false |
|
334 |> Local_Defs.fixed_abbrev ((b, NoSyn), rhs) |
336 |> Local_Defs.fixed_abbrev ((b, NoSyn), rhs) |
335 ||> Context_Position.restore_visible lthy |
337 ||> Context_Position.restore_visible lthy |
336 end; |
338 end; |
337 |
339 |
338 |
340 |