equal
deleted
inserted
replaced
227 |
227 |
228 fun generalize_tac ctxt f = CSUBGOAL (fn (p, _) => PRIMITIVE (fn st => |
228 fun generalize_tac ctxt f = CSUBGOAL (fn (p, _) => PRIMITIVE (fn st => |
229 let |
229 let |
230 fun all x t = |
230 fun all x t = |
231 Thm.apply (Thm.cterm_of ctxt (Logic.all_const (Thm.typ_of_cterm x))) (Thm.lambda x t) |
231 Thm.apply (Thm.cterm_of ctxt (Logic.all_const (Thm.typ_of_cterm x))) (Thm.lambda x t) |
232 val ts = sort (fn (a, b) => Term_Ord.fast_term_ord (Thm.term_of a, Thm.term_of b)) (f p) |
232 val ts = sort Thm.fast_term_ord (f p) |
233 val p' = fold_rev all ts p |
233 val p' = fold_rev all ts p |
234 in Thm.implies_intr p' (Thm.implies_elim st (fold Thm.forall_elim ts (Thm.assume p'))) end)); |
234 in Thm.implies_intr p' (Thm.implies_elim st (fold Thm.forall_elim ts (Thm.assume p'))) end)); |
235 |
235 |
236 fun cfrees ats ct = |
236 fun cfrees ats ct = |
237 let |
237 let |