src/Pure/Isar/obtain.ML
changeset 42495 1af81b70cf09
parent 42494 eef1a23c9077
child 42496 65ec88b369fd
equal deleted inserted replaced
42494:eef1a23c9077 42495:1af81b70cf09
   194       | SOME th => check_result ctxt thesis (Raw_Simplifier.norm_hhf (Goal.conclude th)));
   194       | SOME th => check_result ctxt thesis (Raw_Simplifier.norm_hhf (Goal.conclude th)));
   195 
   195 
   196     val closed_rule = Thm.forall_intr (cert (Free thesis_var)) rule;
   196     val closed_rule = Thm.forall_intr (cert (Free thesis_var)) rule;
   197     val ((_, [rule']), ctxt') = Variable.import false [closed_rule] ctxt;
   197     val ((_, [rule']), ctxt') = Variable.import false [closed_rule] ctxt;
   198     val obtain_rule = Thm.forall_elim (cert (Logic.varify_global (Free thesis_var))) rule';
   198     val obtain_rule = Thm.forall_elim (cert (Logic.varify_global (Free thesis_var))) rule';
   199     val ((params, stmt), fix_ctxt) = Variable.focus (Thm.cprem_of obtain_rule 1) ctxt';
   199     val ((params, stmt), fix_ctxt) = Variable.focus_cterm (Thm.cprem_of obtain_rule 1) ctxt';
   200     val (prems, ctxt'') =
   200     val (prems, ctxt'') =
   201       Assumption.add_assms (obtain_export fix_ctxt obtain_rule (map #2 params))
   201       Assumption.add_assms (obtain_export fix_ctxt obtain_rule (map #2 params))
   202         (Drule.strip_imp_prems stmt) fix_ctxt;
   202         (Drule.strip_imp_prems stmt) fix_ctxt;
   203   in ((params, prems), ctxt'') end;
   203   in ((params, prems), ctxt'') end;
   204 
   204