src/Pure/Isar/proof.ML
changeset 35624 c4e29a0bb8c1
parent 34916 f625d8d6fcf3
child 36322 81cba3921ba5
equal deleted inserted replaced
35623:b0de8551fadf 35624:c4e29a0bb8c1
   597     state
   597     state
   598     |> map_context_result (prep_vars (map (fn (x, mx) => (x, NONE, mx)) raw_vars))
   598     |> map_context_result (prep_vars (map (fn (x, mx) => (x, NONE, mx)) raw_vars))
   599     |>> map (fn (x, _, mx) => (x, mx))
   599     |>> map (fn (x, _, mx) => (x, mx))
   600     |-> (fn vars =>
   600     |-> (fn vars =>
   601       map_context_result (prep_binds false (map swap raw_rhss))
   601       map_context_result (prep_binds false (map swap raw_rhss))
   602       #-> (fn rhss => map_context_result (LocalDefs.add_defs (vars ~~ (name_atts ~~ rhss)))))
   602       #-> (fn rhss => map_context_result (Local_Defs.add_defs (vars ~~ (name_atts ~~ rhss)))))
   603     |-> (put_facts o SOME o map (#2 o #2))
   603     |-> (put_facts o SOME o map (#2 o #2))
   604   end;
   604   end;
   605 
   605 
   606 in
   606 in
   607 
   607 
   679         val ctxt = context_of state';
   679         val ctxt = context_of state';
   680         val ths = maps snd named_facts;
   680         val ths = maps snd named_facts;
   681       in (statement, [], f ctxt ths using, g ctxt ths goal, before_qed, after_qed) end));
   681       in (statement, [], f ctxt ths using, g ctxt ths goal, before_qed, after_qed) end));
   682 
   682 
   683 fun append_using _ ths using = using @ filter_out Thm.is_dummy ths;
   683 fun append_using _ ths using = using @ filter_out Thm.is_dummy ths;
   684 fun unfold_using ctxt ths = map (LocalDefs.unfold ctxt ths);
   684 fun unfold_using ctxt ths = map (Local_Defs.unfold ctxt ths);
   685 val unfold_goals = LocalDefs.unfold_goals;
   685 val unfold_goals = Local_Defs.unfold_goals;
   686 
   686 
   687 in
   687 in
   688 
   688 
   689 val using = gen_using append_using (K (K I)) Attrib.attribute ProofContext.get_fact;
   689 val using = gen_using append_using (K (K I)) Attrib.attribute ProofContext.get_fact;
   690 val using_i = gen_using append_using (K (K I)) (K I) (K I);
   690 val using_i = gen_using append_using (K (K I)) (K I) (K I);