src/HOL/Tools/inductive_set.ML
changeset 35646 b32d6c1bdb4d
parent 35364 b8c62d60195c
child 35757 c2884bec5463
equal deleted inserted replaced
35645:74e4542d0a4a 35646:b32d6c1bdb4d
   518         Binding.name (space_implode "_" (map (Binding.name_of o fst) cnames_syn))
   518         Binding.name (space_implode "_" (map (Binding.name_of o fst) cnames_syn))
   519       else alt_name;
   519       else alt_name;
   520     val cnames = map (Local_Theory.full_name lthy3 o #1) cnames_syn;  (* FIXME *)
   520     val cnames = map (Local_Theory.full_name lthy3 o #1) cnames_syn;  (* FIXME *)
   521     val (intr_names, intr_atts) = split_list (map fst intros);
   521     val (intr_names, intr_atts) = split_list (map fst intros);
   522     val raw_induct' = to_set [] (Context.Proof lthy3) raw_induct;
   522     val raw_induct' = to_set [] (Context.Proof lthy3) raw_induct;
   523     val (intrs', elims', induct, lthy4) =
   523     val (intrs', elims', induct, inducts, lthy4) =
   524       Inductive.declare_rules rec_name coind no_ind cnames
   524       Inductive.declare_rules rec_name coind no_ind cnames
   525         (map (to_set [] (Context.Proof lthy3)) intrs) intr_names intr_atts
   525         (map (to_set [] (Context.Proof lthy3)) intrs) intr_names intr_atts
   526         (map (fn th => (to_set [] (Context.Proof lthy3) th,
   526         (map (fn th => (to_set [] (Context.Proof lthy3) th,
   527            map fst (fst (Rule_Cases.get th)),
   527            map fst (fst (Rule_Cases.get th)),
   528            Rule_Cases.get_constraints th)) elims)
   528            Rule_Cases.get_constraints th)) elims)
   529         raw_induct' lthy3;
   529         raw_induct' lthy3;
   530   in
   530   in
   531     ({intrs = intrs', elims = elims', induct = induct,
   531     ({intrs = intrs', elims = elims', induct = induct, inducts = inducts,
   532       raw_induct = raw_induct', preds = map fst defs},
   532       raw_induct = raw_induct', preds = map fst defs},
   533      lthy4)
   533      lthy4)
   534   end;
   534   end;
   535 
   535 
   536 val add_inductive_i = Inductive.gen_add_inductive_i add_ind_set_def;
   536 val add_inductive_i = Inductive.gen_add_inductive_i add_ind_set_def;