461 | NONE => u)) |> |
461 | NONE => u)) |> |
462 Pattern.rewrite_term thy [] [to_pred_proc thy eqns'] |> |
462 Pattern.rewrite_term thy [] [to_pred_proc thy eqns'] |> |
463 eta_contract (member op = cs' orf is_pred pred_arities))) intros; |
463 eta_contract (member op = cs' orf is_pred pred_arities))) intros; |
464 val cnames_syn' = map (fn (b, _) => (Binding.suffix_name "p" b, NoSyn)) cnames_syn; |
464 val cnames_syn' = map (fn (b, _) => (Binding.suffix_name "p" b, NoSyn)) cnames_syn; |
465 val monos' = map (to_pred [] (Context.Proof lthy)) monos; |
465 val monos' = map (to_pred [] (Context.Proof lthy)) monos; |
466 val ({preds, intrs, elims, raw_induct, eqs, ...}, lthy1) = |
466 val ({preds, intrs, elims, raw_induct, eqs, def, mono, ...}, lthy1) = |
467 Inductive.add_ind_def |
467 Inductive.add_ind_def |
468 {quiet_mode = quiet_mode, verbose = verbose, alt_name = Binding.empty, |
468 {quiet_mode = quiet_mode, verbose = verbose, alt_name = Binding.empty, |
469 coind = coind, no_elim = no_elim, no_ind = no_ind, skip_mono = skip_mono} |
469 coind = coind, no_elim = no_elim, no_ind = no_ind, skip_mono = skip_mono} |
470 cs' intros' monos' params1 cnames_syn' lthy; |
470 cs' intros' monos' params1 cnames_syn' lthy; |
471 |
471 |
511 map (fst o fst) (fst (Rule_Cases.get th)), |
511 map (fst o fst) (fst (Rule_Cases.get th)), |
512 Rule_Cases.get_constraints th)) elims) |
512 Rule_Cases.get_constraints th)) elims) |
513 (map (to_set [] (Context.Proof lthy3)) eqs) raw_induct' lthy3; |
513 (map (to_set [] (Context.Proof lthy3)) eqs) raw_induct' lthy3; |
514 in |
514 in |
515 ({intrs = intrs', elims = elims', induct = induct, inducts = inducts, |
515 ({intrs = intrs', elims = elims', induct = induct, inducts = inducts, |
516 raw_induct = raw_induct', preds = map fst defs, eqs = eqs'}, |
516 raw_induct = raw_induct', preds = map fst defs, eqs = eqs', def = def, mono = mono}, |
517 lthy4) |
517 lthy4) |
518 end; |
518 end; |
519 |
519 |
520 val add_inductive = Inductive.gen_add_inductive add_ind_set_def; |
520 val add_inductive = Inductive.gen_add_inductive add_ind_set_def; |
521 val add_inductive_cmd = Inductive.gen_add_inductive_cmd add_ind_set_def; |
521 val add_inductive_cmd = Inductive.gen_add_inductive_cmd add_ind_set_def; |