src/HOL/Codatatype/Tools/bnf_def.ML
changeset 49425 f27f83f71e94
parent 49395 323414474c1f
child 49430 6df729c6a1a6
equal deleted inserted replaced
49404:a93d920707bb 49425:f27f83f71e94
   459 
   459 
   460 
   460 
   461 
   461 
   462 (* Names *)
   462 (* Names *)
   463 
   463 
   464 fun nonzero_string_of_int 0 = ""
       
   465   | nonzero_string_of_int n = string_of_int n;
       
   466 
       
   467 val mapN = "map";
   464 val mapN = "map";
   468 val setN = "set";
   465 val setN = "set";
   469 fun mk_setN i = setN ^ nonzero_string_of_int i;
   466 fun mk_setN i = setN ^ nonzero_string_of_int i;
   470 val bdN = "bd";
   467 val bdN = "bd";
   471 val witN = "wit";
   468 val witN = "wit";
   533   let
   530   let
   534     val fact_policy = mk_fact_policy no_defs_lthy;
   531     val fact_policy = mk_fact_policy no_defs_lthy;
   535     val b = qualify raw_b;
   532     val b = qualify raw_b;
   536     val live = length raw_sets;
   533     val live = length raw_sets;
   537     val nwits = length raw_wits;
   534     val nwits = length raw_wits;
       
   535 
       
   536     val _ = tracing (Binding.name_of b)
   538 
   537 
   539     val map_rhs = prep_term no_defs_lthy raw_map;
   538     val map_rhs = prep_term no_defs_lthy raw_map;
   540     val set_rhss = map (prep_term no_defs_lthy) raw_sets;
   539     val set_rhss = map (prep_term no_defs_lthy) raw_sets;
   541     val (bd_rhsT, bd_rhs) = (case prep_term no_defs_lthy raw_bd_Abs of
   540     val (bd_rhsT, bd_rhs) = (case prep_term no_defs_lthy raw_bd_Abs of
   542       Abs (_, T, t) => (T, t)
   541       Abs (_, T, t) => (T, t)