equal
deleted
inserted
replaced
582 val thm' = Thm.instantiate insts (Thm.rename_boundvars lhs eta_t rthm); |
582 val thm' = Thm.instantiate insts (Thm.rename_boundvars lhs eta_t rthm); |
583 val prop' = #prop (rep_thm thm'); |
583 val prop' = #prop (rep_thm thm'); |
584 val unconditional = (Logic.count_prems (prop',0) = 0); |
584 val unconditional = (Logic.count_prems (prop',0) = 0); |
585 val (lhs', rhs') = Logic.dest_equals (Logic.strip_imp_concl prop') |
585 val (lhs', rhs') = Logic.dest_equals (Logic.strip_imp_concl prop') |
586 in |
586 in |
587 if perm andalso not (termless (rhs', lhs')) then None |
587 if perm andalso not (termless (rhs', lhs')) |
|
588 then (trace_thm false "Cannot apply permutative rewrite rule:" thm; |
|
589 trace_thm false "Term does not become smaller:" thm'; None) |
588 else |
590 else |
589 (trace_thm false "Applying instance of rewrite rule:" thm; |
591 (trace_thm false "Applying instance of rewrite rule:" thm; |
590 if unconditional |
592 if unconditional |
591 then |
593 then |
592 (trace_thm false "Rewriting:" thm'; |
594 (trace_thm false "Rewriting:" thm'; |