src/HOL/Tools/BNF/bnf_gfp_rec_sugar.ML
changeset 62582 969480bdef55
parent 62497 5b5b704f4811
child 62583 8c7301325f9f
equal deleted inserted replaced
62581:fc5198b44314 62582:969480bdef55
   357   let
   357   let
   358     fun check_no_call t = if has_call t then unexpected_corec_call ctxt [t0] t else ();
   358     fun check_no_call t = if has_call t then unexpected_corec_call ctxt [t0] t else ();
   359 
   359 
   360     fun massage_mutual_call bound_Ts (Type (@{type_name fun}, [_, U2]))
   360     fun massage_mutual_call bound_Ts (Type (@{type_name fun}, [_, U2]))
   361         (Type (@{type_name fun}, [T1, T2])) t =
   361         (Type (@{type_name fun}, [T1, T2])) t =
   362         Abs (Name.uu, T1, massage_mutual_call bound_Ts U2 T2 (incr_boundvars 1 t $ Bound 0))
   362         Abs (Name.uu, T1, massage_mutual_call (T1 :: bound_Ts) U2 T2 (incr_boundvars 1 t $ Bound 0))
   363       | massage_mutual_call bound_Ts U T t =
   363       | massage_mutual_call bound_Ts U T t =
   364         (if has_call t then massage_call else massage_noncall) bound_Ts U T t;
   364         (if has_call t then massage_call else massage_noncall) bound_Ts U T t;
   365 
   365 
   366     fun massage_map bound_Ts (Type (_, Us)) (Type (s, Ts)) t =
   366     fun massage_map bound_Ts (Type (_, Us)) (Type (s, Ts)) t =
   367         (case try (dest_map ctxt s) t of
   367         (case try (dest_map ctxt s) t of