src/ZF/Tools/induct_tacs.ML
changeset 8438 b8389b4fca9c
parent 6970 ac37a8fcaad1
child 12109 bd6eb9194a5d
equal deleted inserted replaced
8437:258281c43dea 8438:b8389b4fca9c
   173     (*associate with each constructor the datatype name and rewrites*)
   173     (*associate with each constructor the datatype name and rewrites*)
   174     val con_pairs = map (fn c => (#1 (dest_Const c), con_info)) constructors
   174     val con_pairs = map (fn c => (#1 (dest_Const c), con_info)) constructors
   175 
   175 
   176   in
   176   in
   177       thy |> Theory.add_path (Sign.base_name big_rec_name)
   177       thy |> Theory.add_path (Sign.base_name big_rec_name)
   178 	  |> PureThy.add_thmss [(("simps", simps), [Simplifier.simp_add_global])]
   178 	  |> (#1 o PureThy.add_thmss [(("simps", simps), [Simplifier.simp_add_global])])
   179 	  |> DatatypesData.put 
   179 	  |> DatatypesData.put 
   180 	      (Symtab.update
   180 	      (Symtab.update
   181 	       ((big_rec_name, dt_info), DatatypesData.get thy)) 
   181 	       ((big_rec_name, dt_info), DatatypesData.get thy)) 
   182 	  |> ConstructorsData.put
   182 	  |> ConstructorsData.put
   183 	       (foldr Symtab.update (con_pairs, ConstructorsData.get thy))
   183 	       (foldr Symtab.update (con_pairs, ConstructorsData.get thy))