equal
deleted
inserted
replaced
83 val csubst = map (pairself (cterm_of thy)) subst; |
83 val csubst = map (pairself (cterm_of thy)) subst; |
84 val inst_thm = Drule.cterm_instantiate csubst thm; |
84 val inst_thm = Drule.cterm_instantiate csubst thm; |
85 in |
85 in |
86 Conv.fconv_rule |
86 Conv.fconv_rule |
87 ((Conv.concl_conv (nprems_of inst_thm) o HOLogic.Trueprop_conv o Conv.fun2_conv o Conv.arg1_conv) |
87 ((Conv.concl_conv (nprems_of inst_thm) o HOLogic.Trueprop_conv o Conv.fun2_conv o Conv.arg1_conv) |
88 (Raw_Simplifier.rewrite false (Transfer.get_sym_relator_eq ctxt))) inst_thm |
88 (Raw_Simplifier.rewrite ctxt false (Transfer.get_sym_relator_eq ctxt))) inst_thm |
89 end |
89 end |
90 |
90 |
91 fun inst_relcomppI thy ant1 ant2 = |
91 fun inst_relcomppI thy ant1 ant2 = |
92 let |
92 let |
93 val t1 = (HOLogic.dest_Trueprop o concl_of) ant1 |
93 val t1 = (HOLogic.dest_Trueprop o concl_of) ant1 |
480 val univq_prenex_conv = Conv.top_conv (K (Conv.try_conv univq_conv)) lthy |
480 val univq_prenex_conv = Conv.top_conv (K (Conv.try_conv univq_conv)) lthy |
481 val beta_conv = Thm.beta_conversion true |
481 val beta_conv = Thm.beta_conversion true |
482 val eq_thm = |
482 val eq_thm = |
483 (simp_conv then_conv univq_prenex_conv then_conv beta_conv then_conv unfold_ret_val_invs) ctm |
483 (simp_conv then_conv univq_prenex_conv then_conv beta_conv then_conv unfold_ret_val_invs) ctm |
484 in |
484 in |
485 Object_Logic.rulify(eq_thm RS Drule.equal_elim_rule2) |
485 Object_Logic.rulify lthy (eq_thm RS Drule.equal_elim_rule2) |
486 end |
486 end |
487 |
487 |
488 fun rename_to_tnames ctxt term = |
488 fun rename_to_tnames ctxt term = |
489 let |
489 let |
490 fun all_typs (Const ("all", _) $ Abs (_, T, t)) = T :: all_typs t |
490 fun all_typs (Const ("all", _) $ Abs (_, T, t)) = T :: all_typs t |
531 val readable_rsp_tm_tnames = rename_to_tnames lthy readable_rsp_tm |
531 val readable_rsp_tm_tnames = rename_to_tnames lthy readable_rsp_tm |
532 |
532 |
533 fun after_qed' thm_list lthy = |
533 fun after_qed' thm_list lthy = |
534 let |
534 let |
535 val internal_rsp_thm = Goal.prove lthy [] [] internal_rsp_tm |
535 val internal_rsp_thm = Goal.prove lthy [] [] internal_rsp_tm |
536 (fn _ => rtac readable_rsp_thm_eq 1 THEN Proof_Context.fact_tac (hd thm_list) 1) |
536 (fn {context = ctxt, ...} => |
|
537 rtac readable_rsp_thm_eq 1 THEN Proof_Context.fact_tac ctxt (hd thm_list) 1) |
537 in |
538 in |
538 after_qed internal_rsp_thm lthy |
539 after_qed internal_rsp_thm lthy |
539 end |
540 end |
540 in |
541 in |
541 Proof.theorem NONE after_qed' [[(readable_rsp_tm_tnames,[])]] lthy |
542 Proof.theorem NONE after_qed' [[(readable_rsp_tm_tnames,[])]] lthy |