src/Pure/Tools/invoke.ML
changeset 21483 e4be91feca50
parent 21440 807a39221a58
child 21584 22c9392de970
equal deleted inserted replaced
21482:7bb5de80917f 21483:e4be91feca50
    65           val ([res_types, res_params, res_prems], ctxt'') =
    65           val ([res_types, res_params, res_prems], ctxt'') =
    66             fold_burrow (apfst snd oo Variable.import false) results ctxt';
    66             fold_burrow (apfst snd oo Variable.import false) results ctxt';
    67 
    67 
    68           val types'' = map (Logic.dest_type o Thm.term_of o Drule.dest_term) res_types;
    68           val types'' = map (Logic.dest_type o Thm.term_of o Drule.dest_term) res_types;
    69           val params'' = map (Thm.term_of o Drule.dest_term) res_params;
    69           val params'' = map (Thm.term_of o Drule.dest_term) res_params;
    70           val elems' = elems |> map (Element.inst_ctxt thy
    70           val inst = Element.morph_ctxt (Element.inst_morphism thy
    71             (Symtab.make (map #1 types ~~ types''), Symtab.make (map #1 params ~~ params'')));
    71             (Symtab.make (map #1 types ~~ types''), Symtab.make (map #1 params ~~ params'')));
       
    72           val elems' = map inst elems;
    72           val prems'' = map2 Element.make_witness (maps Element.prems_of elems') res_prems;
    73           val prems'' = map2 Element.make_witness (maps Element.prems_of elems') res_prems;
    73           val notes =
    74           val notes =
    74             maps (Element.facts_of thy) elems'
    75             maps (Element.facts_of thy) elems'
    75             |> Element.satisfy_facts prems''
    76             |> Element.satisfy_facts prems''
    76             |> Element.export_facts ctxt'' ctxt
    77             |> Element.export_facts ctxt'' ctxt