161 Bound j => subst_bounds (map Bound |
161 Bound j => subst_bounds (map Bound |
162 ((1 upto j) @ 0 :: (j + 2 upto length ps)), Q) |
162 ((1 upto j) @ 0 :: (j + 2 upto length ps)), Q) |
163 | t => Term.abstract_over (t, Term.incr_boundvars 1 Q)); |
163 | t => Term.abstract_over (t, Term.incr_boundvars 1 Q)); |
164 val thy = Thm.theory_of_thm rl'; |
164 val thy = Thm.theory_of_thm rl'; |
165 val (instT, _) = Thm.match (pairself (cterm_of thy o Logic.mk_type) (V, U)); |
165 val (instT, _) = Thm.match (pairself (cterm_of thy o Logic.mk_type) (V, U)); |
166 in compose_tac (true, Drule.instantiate (instT, |
166 in compose_tac (true, Drule.instantiate_normalize (instT, |
167 map (pairself (cterm_of thy)) |
167 map (pairself (cterm_of thy)) |
168 [(Var (ixn, Ts ---> U --> body_type T), u), |
168 [(Var (ixn, Ts ---> U --> body_type T), u), |
169 (Var (fst (dest_Var (head_of v1)), Ts ---> U), list_abs (ps, t)), |
169 (Var (fst (dest_Var (head_of v1)), Ts ---> U), list_abs (ps, t)), |
170 (Var (fst (dest_Var (head_of v2)), Ts ---> U), list_abs (ps, t'))]) rl', |
170 (Var (fst (dest_Var (head_of v2)), Ts ---> U), list_abs (ps, t'))]) rl', |
171 nprems_of rl) i |
171 nprems_of rl) i |