equal
deleted
inserted
replaced
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); |