src/Pure/drule.ML
changeset 60782 ba81f7c40e2a
parent 60780 7e2c8a63a8f8
child 60783 495bede1c4d9
equal deleted inserted replaced
60781:2da59cdf531c 60782:ba81f7c40e2a
   786           Vartab.fold (fn (xi, (S, T)) =>
   786           Vartab.fold (fn (xi, (S, T)) =>
   787             cons ((xi, S), Thm.ctyp_of ctxt (Envir.norm_type tyenv T))) tyenv [];
   787             cons ((xi, S), Thm.ctyp_of ctxt (Envir.norm_type tyenv T))) tyenv [];
   788         val inst = args' |> map (fn ((xi, T), cu) =>
   788         val inst = args' |> map (fn ((xi, T), cu) =>
   789           ((xi, Envir.norm_type tyenv T),
   789           ((xi, Envir.norm_type tyenv T),
   790             Thm.instantiate_cterm (instT, []) (Thm.transfer_cterm thy cu)));
   790             Thm.instantiate_cterm (instT, []) (Thm.transfer_cterm thy cu)));
   791       in instantiate_normalize (instT, inst) th end;
   791       in instantiate_normalize (instT, inst) th end
       
   792       handle CTERM (msg, _) => raise THM (msg, 0, [th])
       
   793         | TERM (msg, _) => raise THM (msg, 0, [th])
       
   794         | TYPE (msg, _, _) => raise THM (msg, 0, [th]);
   792 
   795 
   793 (*Left-to-right replacements: tpairs = [..., (vi, ti), ...].
   796 (*Left-to-right replacements: tpairs = [..., (vi, ti), ...].
   794   Instantiates distinct Vars by terms, inferring type instantiations.*)
   797   Instantiates distinct Vars by terms, inferring type instantiations.*)
   795 local
   798 local
   796   fun add_types (ct, cu) (thy, tye, maxidx) =
   799   fun add_types (ct, cu) (thy, tye, maxidx) =