src/HOL/Tools/inductive.ML
changeset 71214 5727bcc3c47c
parent 71179 592e2afdd50c
child 74561 8e6c973003c8
equal deleted inserted replaced
71213:39ccdbbed539 71214:5727bcc3c47c
    69   type add_ind_def =
    69   type add_ind_def =
    70     flags ->
    70     flags ->
    71     term list -> (Attrib.binding * term) list -> thm list ->
    71     term list -> (Attrib.binding * term) list -> thm list ->
    72     term list -> (binding * mixfix) list ->
    72     term list -> (binding * mixfix) list ->
    73     local_theory -> result * local_theory
    73     local_theory -> result * local_theory
    74   val declare_rules: binding -> bool -> bool -> string -> string list -> term list ->
    74   val declare_rules: binding -> bool -> bool -> binding -> string list -> term list ->
    75     thm list -> binding list -> Token.src list list -> (thm * string list * int) list ->
    75     thm list -> binding list -> Token.src list list -> (thm * string list * int) list ->
    76     thm list -> thm -> local_theory -> thm list * thm list * thm list * thm * thm list * local_theory
    76     thm list -> thm -> local_theory -> thm list * thm list * thm list * thm * thm list * local_theory
    77   val add_ind_def: add_ind_def
    77   val add_ind_def: add_ind_def
    78   val gen_add_inductive: add_ind_def -> flags ->
    78   val gen_add_inductive: add_ind_def -> flags ->
    79     ((binding * typ) * mixfix) list -> (string * typ) list -> (Attrib.binding * term) list ->
    79     ((binding * typ) * mixfix) list -> (string * typ) list -> (Attrib.binding * term) list ->
  1097     val _ = null cnames_syn andalso error "No inductive predicates given";
  1097     val _ = null cnames_syn andalso error "No inductive predicates given";
  1098     val names = map (Binding.name_of o fst) cnames_syn;
  1098     val names = map (Binding.name_of o fst) cnames_syn;
  1099     val _ = message (quiet_mode andalso not verbose)
  1099     val _ = message (quiet_mode andalso not verbose)
  1100       ("Proofs for " ^ coind_prefix coind ^ "inductive predicate(s) " ^ commas_quote names);
  1100       ("Proofs for " ^ coind_prefix coind ^ "inductive predicate(s) " ^ commas_quote names);
  1101 
  1101 
  1102     val spec_name = Local_Theory.full_name lthy (Binding.conglomerate (map #1 cnames_syn));
  1102     val spec_name = Binding.conglomerate (map #1 cnames_syn);
  1103     val cnames = map (Local_Theory.full_name lthy o #1) cnames_syn;  (* FIXME *)
  1103     val cnames = map (Local_Theory.full_name lthy o #1) cnames_syn;  (* FIXME *)
  1104     val ((intr_names, intr_atts), intr_ts) =
  1104     val ((intr_names, intr_atts), intr_ts) =
  1105       apfst split_list (split_list (map (check_rule lthy cs params) intros));
  1105       apfst split_list (split_list (map (check_rule lthy cs params) intros));
  1106 
  1106 
  1107     val (lthy1, lthy2, rec_binding, mono, fp_def, rec_preds_defs, rec_const, preds,
  1107     val (lthy1, lthy2, rec_binding, mono, fp_def, rec_preds_defs, rec_const, preds,