src/Pure/more_thm.ML
changeset 70922 539dfd4c166b
parent 70915 bd4d37edfee4
child 71006 41685289b8eb
equal deleted inserted replaced
70921:05810acd4858 70922:539dfd4c166b
   514 (* rules *)
   514 (* rules *)
   515 
   515 
   516 fun stripped_sorts thy t =
   516 fun stripped_sorts thy t =
   517   let
   517   let
   518     val tfrees = rev (Term.add_tfrees t []);
   518     val tfrees = rev (Term.add_tfrees t []);
   519     val tfrees' = map (fn a => (a, [])) (Name.invent Name.context Name.aT (length tfrees));
   519     val tfrees' = map (fn a => (a, [])) (Name.variant_list [] (map #1 tfrees));
   520     val recover =
   520     val recover =
   521       map2 (fn (a', S') => fn (a, S) => (((a', 0), S'), Thm.global_ctyp_of thy (TVar ((a, 0), S))))
   521       map2 (fn (a', S') => fn (a, S) => (((a', 0), S'), Thm.global_ctyp_of thy (TVar ((a, 0), S))))
   522         tfrees' tfrees;
   522         tfrees' tfrees;
   523     val strip = map (apply2 TFree) (tfrees ~~ tfrees');
   523     val strip = map (apply2 TFree) (tfrees ~~ tfrees');
   524     val t' = Term.map_types (Term.map_atyps (perhaps (AList.lookup (op =) strip))) t;
   524     val t' = Term.map_types (Term.map_atyps (perhaps (AList.lookup (op =) strip))) t;