equal
deleted
inserted
replaced
218 |
218 |
219 (*Reset Var indexes to zero, renaming to preserve distinctness*) |
219 (*Reset Var indexes to zero, renaming to preserve distinctness*) |
220 fun zero_var_indexes_list [] = [] |
220 fun zero_var_indexes_list [] = [] |
221 | zero_var_indexes_list ths = |
221 | zero_var_indexes_list ths = |
222 let |
222 let |
223 val (instT, inst) = Term_Subst.zero_var_indexes_inst (map Thm.full_prop_of ths); |
223 val (instT, inst) = |
|
224 Term_Subst.zero_var_indexes_inst Name.context (map Thm.full_prop_of ths); |
224 |
225 |
225 val tvars = fold Thm.add_tvars ths []; |
226 val tvars = fold Thm.add_tvars ths []; |
226 fun the_tvar v = the (find_first (fn cT => v = dest_TVar (Thm.typ_of cT)) tvars); |
227 fun the_tvar v = the (find_first (fn cT => v = dest_TVar (Thm.typ_of cT)) tvars); |
227 val instT' = map (fn (v, TVar (b, _)) => (v, Thm.rename_tvar b (the_tvar v))) instT; |
228 val instT' = map (fn (v, TVar (b, _)) => (v, Thm.rename_tvar b (the_tvar v))) instT; |
228 |
229 |