src/Pure/Isar/method.ML
changeset 16876 f57b38cced32
parent 16500 09d43301b195
child 17110 4c5622d7bdbe
equal deleted inserted replaced
16875:c62bdfbf6a2a 16876:f57b38cced32
   394         (* Lift and instantiate rule *)
   394         (* Lift and instantiate rule *)
   395         val {maxidx, ...} = rep_thm st;
   395         val {maxidx, ...} = rep_thm st;
   396         val paramTs = map #2 params
   396         val paramTs = map #2 params
   397         and inc = maxidx+1
   397         and inc = maxidx+1
   398         fun liftvar (Var ((a,j), T)) =
   398         fun liftvar (Var ((a,j), T)) =
   399               Var((a, j+inc), paramTs ---> incr_tvar inc T)
   399               Var((a, j+inc), paramTs ---> Logic.incr_tvar inc T)
   400           | liftvar t = raise TERM("Variable expected", [t]);
   400           | liftvar t = raise TERM("Variable expected", [t]);
   401         fun liftterm t = list_abs_free
   401         fun liftterm t = list_abs_free
   402               (params, Logic.incr_indexes(paramTs,inc) t)
   402               (params, Logic.incr_indexes(paramTs,inc) t)
   403         fun liftpair (cv,ct) =
   403         fun liftpair (cv,ct) =
   404               (cterm_fun liftvar cv, cterm_fun liftterm ct)
   404               (cterm_fun liftvar cv, cterm_fun liftterm ct)
   405         val lifttvar = pairself (ctyp_of sign o incr_tvar inc);
   405         val lifttvar = pairself (ctyp_of sign o Logic.incr_tvar inc);
   406         val rule = Drule.instantiate
   406         val rule = Drule.instantiate
   407               (map lifttvar envT', map liftpair cenv)
   407               (map lifttvar envT', map liftpair cenv)
   408               (lift_rule (st, i) thm)
   408               (lift_rule (st, i) thm)
   409       in
   409       in
   410         if i > nprems_of st then no_tac st
   410         if i > nprems_of st then no_tac st