src/HOL/Tools/inductive_package.ML
changeset 24915 fc90277c0dd7
parent 24867 e5b55d7be9bb
child 24920 2a45e400fdad
equal deleted inserted replaced
24914:95cda5dd58d5 24915:fc90277c0dd7
   587 (** specification of (co)inductive predicates **)
   587 (** specification of (co)inductive predicates **)
   588 
   588 
   589 fun mk_ind_def alt_name coind cs intr_ts monos
   589 fun mk_ind_def alt_name coind cs intr_ts monos
   590       params cnames_syn ctxt =
   590       params cnames_syn ctxt =
   591   let
   591   let
   592     val fp_name = if coind then @{const_name FixedPoint.gfp} else @{const_name FixedPoint.lfp};
   592     val fp_name = if coind then @{const_name Inductive.gfp} else @{const_name Inductive.lfp};
   593 
   593 
   594     val argTs = fold (fn c => fn Ts => Ts @
   594     val argTs = fold (fn c => fn Ts => Ts @
   595       (List.drop (binder_types (fastype_of c), length params) \\ Ts)) cs [];
   595       (List.drop (binder_types (fastype_of c), length params) \\ Ts)) cs [];
   596     val k = log 2 1 (length cs);
   596     val k = log 2 1 (length cs);
   597     val predT = replicate k HOLogic.boolT ---> argTs ---> HOLogic.boolT;
   597     val predT = replicate k HOLogic.boolT ---> argTs ---> HOLogic.boolT;