src/HOL/Tools/datatype_abs_proofs.ML
changeset 19233 77ca20b0ed77
parent 18728 6790126ab5f6
child 20046 9c8909fc5865
equal deleted inserted replaced
19232:1f5b5dc3f48a 19233:77ca20b0ed77
   402       map (Sign.full_name (Theory.sign_of thy1)) (DatatypeProp.indexify_names
   402       map (Sign.full_name (Theory.sign_of thy1)) (DatatypeProp.indexify_names
   403         (map (fn T => name_of_typ T ^ "_size") (Library.drop (length (hd descr), recTs))));
   403         (map (fn T => name_of_typ T ^ "_size") (Library.drop (length (hd descr), recTs))));
   404     val def_names = map (fn s => s ^ "_def") (DatatypeProp.indexify_names
   404     val def_names = map (fn s => s ^ "_def") (DatatypeProp.indexify_names
   405       (map (fn T => name_of_typ T ^ "_size") recTs));
   405       (map (fn T => name_of_typ T ^ "_size") recTs));
   406 
   406 
   407     fun plus (t1, t2) = Const ("op +", [HOLogic.natT, HOLogic.natT] ---> HOLogic.natT) $ t1 $ t2;
   407     fun plus (t1, t2) = Const ("HOL.plus", [HOLogic.natT, HOLogic.natT] ---> HOLogic.natT) $ t1 $ t2;
   408 
   408 
   409     fun make_sizefun (_, cargs) =
   409     fun make_sizefun (_, cargs) =
   410       let
   410       let
   411         val Ts = map (typ_of_dtyp descr' sorts) cargs;
   411         val Ts = map (typ_of_dtyp descr' sorts) cargs;
   412         val k = length (List.filter is_rec_type cargs);
   412         val k = length (List.filter is_rec_type cargs);