equal
deleted
inserted
replaced
1232 let |
1232 let |
1233 val cert = cterm_of (Thm.theory_of_thm st); |
1233 val cert = cterm_of (Thm.theory_of_thm st); |
1234 val g = nth (prems_of st) (i - 1); |
1234 val g = nth (prems_of st) (i - 1); |
1235 val params = Logic.strip_params g; |
1235 val params = Logic.strip_params g; |
1236 val concl = HOLogic.dest_Trueprop (Logic.strip_assums_concl g); |
1236 val concl = HOLogic.dest_Trueprop (Logic.strip_assums_concl g); |
1237 val rule' = Thm.lift_rule (Thm.cgoal_of st i) rule; |
1237 val rule' = Thm.lift_rule (Thm.cprem_of st i) rule; |
1238 val (P, ys) = strip_comb (HOLogic.dest_Trueprop |
1238 val (P, ys) = strip_comb (HOLogic.dest_Trueprop |
1239 (Logic.strip_assums_concl (prop_of rule'))); |
1239 (Logic.strip_assums_concl (prop_of rule'))); |
1240 (* ca indicates if rule is a case analysis or induction rule *) |
1240 (* ca indicates if rule is a case analysis or induction rule *) |
1241 val (x, ca) = (case rev (Library.drop (length params, ys)) of |
1241 val (x, ca) = (case rev (Library.drop (length params, ys)) of |
1242 [] => (head_of (fst (HOLogic.dest_eq (HOLogic.dest_Trueprop |
1242 [] => (head_of (fst (HOLogic.dest_eq (HOLogic.dest_Trueprop |
1258 fun ex_inst_tac i st = |
1258 fun ex_inst_tac i st = |
1259 let |
1259 let |
1260 val sg = sign_of_thm st; |
1260 val sg = sign_of_thm st; |
1261 val g = nth (prems_of st) (i - 1); |
1261 val g = nth (prems_of st) (i - 1); |
1262 val params = Logic.strip_params g; |
1262 val params = Logic.strip_params g; |
1263 val exI' = Thm.lift_rule (Thm.cgoal_of st i) exI; |
1263 val exI' = Thm.lift_rule (Thm.cprem_of st i) exI; |
1264 val (_$(_$x)) = Logic.strip_assums_concl (hd (prems_of exI')); |
1264 val (_$(_$x)) = Logic.strip_assums_concl (hd (prems_of exI')); |
1265 val cx = cterm_of sg (fst (strip_comb x)); |
1265 val cx = cterm_of sg (fst (strip_comb x)); |
1266 |
1266 |
1267 in Seq.single (Library.foldl (fn (st,v) => |
1267 in Seq.single (Library.foldl (fn (st,v) => |
1268 Seq.hd |
1268 Seq.hd |