equal
deleted
inserted
replaced
2638 | Abs p => term_bools acc (snd (Syntax_Trans.variant_abs p)) (* FIXME !? *) |
2638 | Abs p => term_bools acc (snd (Syntax_Trans.variant_abs p)) (* FIXME !? *) |
2639 | _ => if is_ty t orelse is_op t then acc else insert (op aconv) t acc) |
2639 | _ => if is_ty t orelse is_op t then acc else insert (op aconv) t acc) |
2640 end; |
2640 end; |
2641 |
2641 |
2642 in |
2642 in |
2643 fn ct => |
2643 fn (ctxt, t) => |
2644 let |
2644 let |
2645 val thy = Thm.theory_of_cterm ct; |
|
2646 val t = Thm.term_of ct; |
|
2647 val fs = Misc_Legacy.term_frees t; |
2645 val fs = Misc_Legacy.term_frees t; |
2648 val bs = term_bools [] t; |
2646 val bs = term_bools [] t; |
2649 val vs = map_index swap fs; |
2647 val vs = map_index swap fs; |
2650 val ps = map_index swap bs; |
2648 val ps = map_index swap bs; |
2651 val t' = (term_of_fm ps vs o @{code pa} o fm_of_term ps vs) t; |
2649 val t' = term_of_fm ps vs (@{code pa} (fm_of_term ps vs t)); |
2652 in Thm.global_cterm_of thy (HOLogic.mk_Trueprop (HOLogic.mk_eq (t, t'))) end |
2650 in Thm.cterm_of ctxt (HOLogic.mk_Trueprop (HOLogic.mk_eq (t, t'))) end |
2653 end; |
2651 end; |
2654 *} |
2652 *} |
2655 |
2653 |
2656 ML_file "cooper_tac.ML" |
2654 ML_file "cooper_tac.ML" |
2657 |
2655 |