equal
deleted
inserted
replaced
384 in (cterm_fun inst ct, cterm_fun inst cu) end |
384 in (cterm_fun inst ct, cterm_fun inst cu) end |
385 fun ctyp2 (ix,T) = (ix, ctyp_of sign T) |
385 fun ctyp2 (ix,T) = (ix, ctyp_of sign T) |
386 in instantiate (map ctyp2 tye, map instT ctpairs0) th end |
386 in instantiate (map ctyp2 tye, map instT ctpairs0) th end |
387 handle TERM _ => |
387 handle TERM _ => |
388 raise THM("cterm_instantiate: incompatible signatures",0,[th]) |
388 raise THM("cterm_instantiate: incompatible signatures",0,[th]) |
389 | TYPE (msg, _, _) => raise THM("cterm_instantiate: " ^ msg, 0, [th]) |
389 | TYPE (msg, _, _) => raise THM(msg, 0, [th]) |
390 end; |
390 end; |
391 |
391 |
392 |
392 |
393 (** theorem equality **) |
393 (** theorem equality **) |
394 |
394 |
678 let |
678 let |
679 val sign = Thm.sign_of_thm thm; |
679 val sign = Thm.sign_of_thm thm; |
680 |
680 |
681 fun inc_tvar ((x, i), S) = Some (Thm.ctyp_of sign (TVar ((x, i + inc), S))); |
681 fun inc_tvar ((x, i), S) = Some (Thm.ctyp_of sign (TVar ((x, i + inc), S))); |
682 fun inc_var ((x, i), T) = Some (Thm.cterm_of sign (Var ((x, i + inc), T))); |
682 fun inc_var ((x, i), T) = Some (Thm.cterm_of sign (Var ((x, i + inc), T))); |
683 in instantiate' (map inc_tvar (tvars_of thm)) (map inc_var (vars_of thm)) thm end; |
683 val thm' = instantiate' (map inc_tvar (tvars_of thm)) [] thm; |
|
684 val thm'' = instantiate' [] (map inc_var (vars_of thm')) thm'; |
|
685 in thm'' end; |
684 |
686 |
685 fun incr_indexes_wrt is cTs cts thms = |
687 fun incr_indexes_wrt is cTs cts thms = |
686 let |
688 let |
687 val maxidx = |
689 val maxidx = |
688 foldl Int.max (~1, is @ |
690 foldl Int.max (~1, is @ |