equal
deleted
inserted
replaced
723 |
723 |
724 fun err t = error ("Ill-formed predicate in induction rule: " ^ |
724 fun err t = error ("Ill-formed predicate in induction rule: " ^ |
725 Sign.string_of_term thy1 t); |
725 Sign.string_of_term thy1 t); |
726 |
726 |
727 fun get_typ (t as _ $ Var (_, Type (tname, Ts))) = |
727 fun get_typ (t as _ $ Var (_, Type (tname, Ts))) = |
728 ((tname, map dest_TFree Ts) handle TERM _ => err t) |
728 ((tname, map (fst o dest_TFree) Ts) handle TERM _ => err t) |
729 | get_typ t = err t; |
729 | get_typ t = err t; |
730 |
730 |
731 val dtnames = map get_typ (HOLogic.dest_conj (HOLogic.dest_Trueprop (Thm.concl_of induction'))); |
731 val dtnames = map get_typ (HOLogic.dest_conj (HOLogic.dest_Trueprop (Thm.concl_of induction'))); |
732 val new_type_names = getOpt (alt_names, map fst dtnames); |
732 val new_type_names = getOpt (alt_names, map fst dtnames); |
733 |
733 |