src/HOL/Tools/Datatype/datatype.ML
changeset 32172 c4e55f30d527
parent 32124 954321008785
child 32374 62617ef2c0d0
equal deleted inserted replaced
32171:220abde9962b 32172:c4e55f30d527
   189 
   189 
   190 (* add_cases_induct *)
   190 (* add_cases_induct *)
   191 
   191 
   192 fun add_cases_induct infos induction thy =
   192 fun add_cases_induct infos induction thy =
   193   let
   193   let
   194     val inducts = ProjectRule.projections (ProofContext.init thy) induction;
   194     val inducts = Project_Rule.projections (ProofContext.init thy) induction;
   195 
   195 
   196     fun named_rules (name, {index, exhaustion, ...}: info) =
   196     fun named_rules (name, {index, exhaustion, ...}: info) =
   197       [((Binding.empty, nth inducts index), [Induct.induct_type name]),
   197       [((Binding.empty, nth inducts index), [Induct.induct_type name]),
   198        ((Binding.empty, exhaustion), [Induct.cases_type name])];
   198        ((Binding.empty, exhaustion), [Induct.cases_type name])];
   199     fun unnamed_rule i =
   199     fun unnamed_rule i =