src/HOL/BNF/Tools/bnf_fp_util.ML
changeset 52899 3ff23987f316
parent 52839 2c0e1a84dcc7
child 52913 2d2d9d1de1a9
equal deleted inserted replaced
52898:2af1caada147 52899:3ff23987f316
   122   val mk_ctor_setN: int -> string
   122   val mk_ctor_setN: int -> string
   123   val mk_dtor_setN: int -> string
   123   val mk_dtor_setN: int -> string
   124   val mk_dtor_set_inductN: int -> string
   124   val mk_dtor_set_inductN: int -> string
   125   val mk_set_inductN: int -> string
   125   val mk_set_inductN: int -> string
   126 
   126 
   127   val datatype_word: fp_kind -> string
   127   val co_prefix: fp_kind -> string
   128 
   128 
   129   val base_name_of_typ: typ -> string
   129   val base_name_of_typ: typ -> string
   130   val mk_common_name: string list -> string
   130   val mk_common_name: string list -> string
   131 
   131 
   132   val variant_types: string list -> sort list -> Proof.context ->
   132   val variant_types: string list -> sort list -> Proof.context ->
   336 val rel_inductN = relN ^ "_" ^ inductN
   336 val rel_inductN = relN ^ "_" ^ inductN
   337 val selN = "sel"
   337 val selN = "sel"
   338 val sel_unfoldN = selN ^ "_" ^ unfoldN
   338 val sel_unfoldN = selN ^ "_" ^ unfoldN
   339 val sel_corecN = selN ^ "_" ^ corecN
   339 val sel_corecN = selN ^ "_" ^ corecN
   340 
   340 
   341 fun datatype_word fp = (if fp = Greatest_FP then "co" else "") ^ "datatype";
   341 fun co_prefix fp = (if fp = Greatest_FP then "co" else "");
   342 
   342 
   343 fun add_components_of_typ (Type (s, Ts)) =
   343 fun add_components_of_typ (Type (s, Ts)) =
   344     fold add_components_of_typ Ts #> cons (Long_Name.base_name s)
   344     fold add_components_of_typ Ts #> cons (Long_Name.base_name s)
   345   | add_components_of_typ _ = I;
   345   | add_components_of_typ _ = I;
   346 
   346