equal
deleted
inserted
replaced
401 HOLogic.mk_Trueprop (valOf (pred_of u) $ t))) |
401 HOLogic.mk_Trueprop (valOf (pred_of u) $ t))) |
402 end; |
402 end; |
403 |
403 |
404 val ind_prems = map mk_ind_prem intr_ts; |
404 val ind_prems = map mk_ind_prem intr_ts; |
405 |
405 |
406 val factors = Library.fold (mg_prod_factors preds) ind_prems []; |
406 val factors = fold (mg_prod_factors preds) ind_prems []; |
407 |
407 |
408 (* make conclusions for induction rules *) |
408 (* make conclusions for induction rules *) |
409 |
409 |
410 fun mk_ind_concl ((c, P), (ts, x)) = |
410 fun mk_ind_concl ((c, P), (ts, x)) = |
411 let val T = HOLogic.dest_setT (fastype_of c); |
411 let val T = HOLogic.dest_setT (fastype_of c); |
812 |
812 |
813 |
813 |
814 (* external interfaces *) |
814 (* external interfaces *) |
815 |
815 |
816 fun try_term f msg thy t = |
816 fun try_term f msg thy t = |
817 (case Library.try f t of |
817 (case try f t of |
818 SOME x => x |
818 SOME x => x |
819 | NONE => error (msg ^ Sign.string_of_term thy t)); |
819 | NONE => error (msg ^ Sign.string_of_term thy t)); |
820 |
820 |
821 fun add_inductive_i verbose declare_consts alt_name coind no_elim no_ind cs pre_intros monos thy = |
821 fun add_inductive_i verbose declare_consts alt_name coind no_elim no_ind cs pre_intros monos thy = |
822 let |
822 let |