src/Pure/Isar/element.ML
changeset 20548 8ef25fe585a8
parent 20304 500a3373c93c
child 20886 f26672c248ee
equal deleted inserted replaced
20547:796ae7fa1049 20548:8ef25fe585a8
   379   if Symtab.is_empty env then I
   379   if Symtab.is_empty env then I
   380   else Term.map_type_tfree (fn (x, S) => the_default (TFree (x, S)) (Symtab.lookup env x));
   380   else Term.map_type_tfree (fn (x, S) => the_default (TFree (x, S)) (Symtab.lookup env x));
   381 
   381 
   382 fun instT_term env =
   382 fun instT_term env =
   383   if Symtab.is_empty env then I
   383   if Symtab.is_empty env then I
   384   else Term.map_term_types (instT_type env);
   384   else Term.map_types (instT_type env);
   385 
   385 
   386 fun instT_subst env th = (Drule.fold_terms o Term.fold_types o Term.fold_atyps)
   386 fun instT_subst env th = (Drule.fold_terms o Term.fold_types o Term.fold_atyps)
   387   (fn T as TFree (a, _) =>
   387   (fn T as TFree (a, _) =>
   388     let val T' = the_default T (Symtab.lookup env a)
   388     let val T' = the_default T (Symtab.lookup env a)
   389     in if T = T' then I else insert (op =) (a, T') end
   389     in if T = T' then I else insert (op =) (a, T') end