equal
deleted
inserted
replaced
145 fun first_order_matchs pats objs = Thm.first_order_match |
145 fun first_order_matchs pats objs = Thm.first_order_match |
146 (eta_contract_cterm (Conjunction.mk_conjunction_balanced pats), |
146 (eta_contract_cterm (Conjunction.mk_conjunction_balanced pats), |
147 eta_contract_cterm (Conjunction.mk_conjunction_balanced objs)); |
147 eta_contract_cterm (Conjunction.mk_conjunction_balanced objs)); |
148 |
148 |
149 fun first_order_mrs ths th = ths MRS |
149 fun first_order_mrs ths th = ths MRS |
150 Thm.instantiate (first_order_matchs (cprems_of th) (map Thm.cprop_of ths)) th; |
150 Thm.instantiate (first_order_matchs (Thm.cprems_of th) (map Thm.cprop_of ths)) th; |
151 |
151 |
152 fun prove_strong_ind s avoids lthy = |
152 fun prove_strong_ind s avoids lthy = |
153 let |
153 let |
154 val thy = Proof_Context.theory_of lthy; |
154 val thy = Proof_Context.theory_of lthy; |
155 val ({names, ...}, {raw_induct, intrs, elims, ...}) = |
155 val ({names, ...}, {raw_induct, intrs, elims, ...}) = |
529 else (case AList.lookup op = tab x of |
529 else (case AList.lookup op = tab x of |
530 SOME y => y |
530 SOME y => y |
531 | NONE => fold_rev (NominalDatatype.mk_perm []) pis x) |
531 | NONE => fold_rev (NominalDatatype.mk_perm []) pis x) |
532 | x => x) o HOLogic.dest_Trueprop o Thm.prop_of) case_hyps)); |
532 | x => x) o HOLogic.dest_Trueprop o Thm.prop_of) case_hyps)); |
533 val inst = Thm.first_order_match (Thm.dest_arg |
533 val inst = Thm.first_order_match (Thm.dest_arg |
534 (Drule.strip_imp_concl (hd (cprems_of case_hyp))), obj); |
534 (Drule.strip_imp_concl (hd (Thm.cprems_of case_hyp))), obj); |
535 val th = Goal.prove ctxt3 [] [] (Thm.term_of concl) |
535 val th = Goal.prove ctxt3 [] [] (Thm.term_of concl) |
536 (fn {context = ctxt4, ...} => |
536 (fn {context = ctxt4, ...} => |
537 resolve_tac ctxt4 [Thm.instantiate inst case_hyp] 1 THEN |
537 resolve_tac ctxt4 [Thm.instantiate inst case_hyp] 1 THEN |
538 SUBPROOF (fn {context = ctxt5, prems = fresh_hyps, ...} => |
538 SUBPROOF (fn {context = ctxt5, prems = fresh_hyps, ...} => |
539 let |
539 let |