src/HOL/Tools/Datatype/datatype.ML
changeset 33955 fff6f11b1f09
parent 33522 737589bb9bb8
child 33957 e9afca2118d4
equal deleted inserted replaced
33954:1bc3b688548c 33955:fff6f11b1f09
   326     val named_rules = flat (map_index (fn (index, tname) =>
   326     val named_rules = flat (map_index (fn (index, tname) =>
   327       [((Binding.empty, [nth inducts index]), [Induct.induct_type tname]),
   327       [((Binding.empty, [nth inducts index]), [Induct.induct_type tname]),
   328        ((Binding.empty, [nth exhaust index]), [Induct.cases_type tname])]) dt_names);
   328        ((Binding.empty, [nth exhaust index]), [Induct.cases_type tname])]) dt_names);
   329     val unnamed_rules = map (fn induct =>
   329     val unnamed_rules = map (fn induct =>
   330       ((Binding.empty, [induct]), [Rule_Cases.inner_rule, Induct.induct_type ""]))
   330       ((Binding.empty, [induct]), [Rule_Cases.inner_rule, Induct.induct_type ""]))
   331         (Library.drop (length dt_names, inducts));
   331         ((uncurry drop) (length dt_names, inducts));
   332   in
   332   in
   333     thy9
   333     thy9
   334     |> PureThy.add_thmss ([((prfx (Binding.name "simps"), simps), []),
   334     |> PureThy.add_thmss ([((prfx (Binding.name "simps"), simps), []),
   335         ((prfx (Binding.name "inducts"), inducts), []),
   335         ((prfx (Binding.name "inducts"), inducts), []),
   336         ((prfx (Binding.name "splits"), maps (fn (x, y) => [x, y]) splits), []),
   336         ((prfx (Binding.name "splits"), maps (fn (x, y) => [x, y]) splits), []),