src/Pure/Isar/proof.ML
changeset 60401 16cf5090d3a6
parent 60388 0c9d2a4f589d
child 60402 2cfd1ead74c3
equal deleted inserted replaced
60393:b640770117fd 60401:16cf5090d3a6
   767     val assumptions =
   767     val assumptions =
   768       asms |> map (fn (b, ts) => ((Binding.set_pos pos b, atts), map (rpair []) ts));
   768       asms |> map (fn (b, ts) => ((Binding.set_pos pos b, atts), map (rpair []) ts));
   769   in
   769   in
   770     state'
   770     state'
   771     |> assume assumptions
   771     |> assume assumptions
   772     |> map_context (Proof_Context.maybe_bind_terms Auto_Bind.no_facts)
   772     |> map_context (fold Variable.unbind_term Auto_Bind.no_facts)
   773     |> `the_facts |-> (fn thms => note_thmss [((Binding.make (name, pos), []), [(thms, [])])])
   773     |> `the_facts |-> (fn thms => note_thmss [((Binding.make (name, pos), []), [(thms, [])])])
   774   end;
   774   end;
   775 
   775 
   776 in
   776 in
   777 
   777 
   933     val goal =
   933     val goal =
   934       Logic.mk_conjunction_balanced (map Logic.mk_conjunction_balanced goal_propss)
   934       Logic.mk_conjunction_balanced (map Logic.mk_conjunction_balanced goal_propss)
   935       |> Thm.cterm_of ctxt
   935       |> Thm.cterm_of ctxt
   936       |> Thm.weaken_sorts (Variable.sorts_of goal_ctxt);
   936       |> Thm.weaken_sorts (Variable.sorts_of goal_ctxt);
   937     val statement = ((kind, pos), propss', Thm.term_of goal);
   937     val statement = ((kind, pos), propss', Thm.term_of goal);
       
   938     val binds' = map #1 binds ~~ Variable.export_terms goal_ctxt ctxt (map #2 binds);
   938     val after_qed' = after_qed |>> (fn after_local => fn results =>
   939     val after_qed' = after_qed |>> (fn after_local => fn results =>
   939       map_context (Proof_Context.export_bind_terms binds goal_ctxt) #> after_local results);
   940       map_context (fold Variable.bind_term binds') #> after_local results);
   940   in
   941   in
   941     goal_state
   942     goal_state
   942     |> map_context (init_context #> Variable.set_body true)
   943     |> map_context (init_context #> Variable.set_body true)
   943     |> set_goal (make_goal (statement, [], Goal.init goal, before_qed, after_qed'))
   944     |> set_goal (make_goal (statement, [], Goal.init goal, before_qed, after_qed'))
   944     |> map_context (Proof_Context.auto_bind_goal props)
   945     |> map_context (Proof_Context.auto_bind_goal props)