equal
deleted
inserted
replaced
441 |> forall_elim_list (map #1 insts) |
441 |> forall_elim_list (map #1 insts) |
442 in (Thm.instantiate ([],insts) fth, thaw) end |
442 in (Thm.instantiate ([],insts) fth, thaw) end |
443 end; |
443 end; |
444 |
444 |
445 (*Rotates a rule's premises to the left by k*) |
445 (*Rotates a rule's premises to the left by k*) |
446 val rotate_prems = permute_prems 0; |
446 fun rotate_prems 0 = I |
|
447 | rotate_prems k = permute_prems 0 k; |
|
448 |
447 fun with_subgoal i f = rotate_prems (i - 1) #> f #> rotate_prems (1 - i); |
449 fun with_subgoal i f = rotate_prems (i - 1) #> f #> rotate_prems (1 - i); |
448 |
450 |
449 (* permute prems, where the i-th position in the argument list (counting from 0) |
451 (* permute prems, where the i-th position in the argument list (counting from 0) |
450 gives the position within the original thm to be transferred to position i. |
452 gives the position within the original thm to be transferred to position i. |
451 Any remaining trailing positions are left unchanged. *) |
453 Any remaining trailing positions are left unchanged. *) |
583 (implies_elim (implies_elim (assume BAC) (assume B)) (assume A)))))) |
585 (implies_elim (implies_elim (assume BAC) (assume B)) (assume A)))))) |
584 end; |
586 end; |
585 |
587 |
586 val imp_cong_rule = Thm.combination o Thm.combination (Thm.reflexive implies); |
588 val imp_cong_rule = Thm.combination o Thm.combination (Thm.reflexive implies); |
587 |
589 |
588 fun arg_cong_rule ct th = Thm.combination (Thm.reflexive ct) th; (*AP_TERM*) |
590 fun arg_cong_rule ct th = Thm.combination (Thm.reflexive ct) th; (*AP_TERM in LCF/HOL*) |
589 fun fun_cong_rule th ct = Thm.combination th (Thm.reflexive ct); (*AP_THM*) |
591 fun fun_cong_rule th ct = Thm.combination th (Thm.reflexive ct); (*AP_THM in LCF/HOL*) |
590 |
592 |
591 local |
593 local |
592 val dest_eq = Thm.dest_equals o cprop_of |
594 val dest_eq = Thm.dest_equals o cprop_of |
593 val rhs_of = snd o dest_eq |
595 val rhs_of = snd o dest_eq |
594 in |
596 in |