equal
deleted
inserted
replaced
251 Logic.incr_indexes(paramTs,inc) t) |
251 Logic.incr_indexes(paramTs,inc) t) |
252 (*Lifts instantiation pair over params*) |
252 (*Lifts instantiation pair over params*) |
253 fun liftpair (cv,ct) = (cterm_fun liftvar cv, cterm_fun liftterm ct) |
253 fun liftpair (cv,ct) = (cterm_fun liftvar cv, cterm_fun liftterm ct) |
254 val lifttvar = pairself (ctyp_fun (Logic.incr_tvar inc)) |
254 val lifttvar = pairself (ctyp_fun (Logic.incr_tvar inc)) |
255 in Drule.instantiate (map lifttvar Tinsts, map liftpair insts) |
255 in Drule.instantiate (map lifttvar Tinsts, map liftpair insts) |
256 (lift_rule (st,i) rule) |
256 (Thm.lift_rule (Thm.cgoal_of st i) rule) |
257 end; |
257 end; |
258 |
258 |
259 fun lift_inst_rule (st, i, sinsts, rule) = lift_inst_rule' |
259 fun lift_inst_rule (st, i, sinsts, rule) = lift_inst_rule' |
260 (st, i, map (apfst Syntax.indexname) sinsts, rule); |
260 (st, i, map (apfst Syntax.indexname) sinsts, rule); |
261 |
261 |
283 fun liftpair (v,t) = (cterm_of thy (liftvar v), cterm_of thy t) |
283 fun liftpair (v,t) = (cterm_of thy (liftvar v), cterm_of thy t) |
284 fun liftTpair (((a, i), S), T) = |
284 fun liftTpair (((a, i), S), T) = |
285 (ctyp_of thy (TVar ((a, i + inc), S)), |
285 (ctyp_of thy (TVar ((a, i + inc), S)), |
286 ctyp_of thy (Logic.incr_tvar inc T)) |
286 ctyp_of thy (Logic.incr_tvar inc T)) |
287 in Drule.instantiate (map liftTpair Tinsts, map liftpair insts) |
287 in Drule.instantiate (map liftTpair Tinsts, map liftpair insts) |
288 (lift_rule (st,i) rule) |
288 (Thm.lift_rule (Thm.cgoal_of st i) rule) |
289 end; |
289 end; |
290 |
290 |
291 (*** Resolve after lifting and instantation; may refer to parameters of the |
291 (*** Resolve after lifting and instantation; may refer to parameters of the |
292 subgoal. Fails if "i" is out of range. ***) |
292 subgoal. Fails if "i" is out of range. ***) |
293 |
293 |
634 |
634 |
635 (*meta-level conjunction*) |
635 (*meta-level conjunction*) |
636 val conj_tac = SUBGOAL (fn (Const ("all", _) $ Abs (_, _, Const ("==>", _) $ |
636 val conj_tac = SUBGOAL (fn (Const ("all", _) $ Abs (_, _, Const ("==>", _) $ |
637 (Const ("==>", _) $ _ $ (Const ("==>", _) $ _ $ Bound 0)) $ Bound 0), i) => |
637 (Const ("==>", _) $ _ $ (Const ("==>", _) $ _ $ Bound 0)) $ Bound 0), i) => |
638 (fn st => |
638 (fn st => |
639 compose_tac (false, Drule.incr_indexes_wrt [] [] [] [st] Drule.conj_intr_thm, 2) i st) |
639 compose_tac (false, Drule.incr_indexes st Drule.conj_intr_thm, 2) i st) |
640 | _ => no_tac); |
640 | _ => no_tac); |
641 |
641 |
642 val conjunction_tac = ALLGOALS (REPEAT_ALL_NEW conj_tac); |
642 val conjunction_tac = ALLGOALS (REPEAT_ALL_NEW conj_tac); |
643 |
643 |
644 fun smart_conjunction_tac 0 = assume_tac 1 |
644 fun smart_conjunction_tac 0 = assume_tac 1 |