equal
deleted
inserted
replaced
602 (case (T, U) of |
602 (case (T, U) of |
603 (Type (s, _), Type (s', _)) => |
603 (Type (s, _), Type (s', _)) => |
604 if s = s' then build_map (build_ctor_rec_arg mk_proj) T U else mk_proj T |
604 if s = s' then build_map (build_ctor_rec_arg mk_proj) T U else mk_proj T |
605 | _ => mk_proj T); |
605 | _ => mk_proj T); |
606 |
606 |
607 fun mk_U proj (T as Type (@{type_name prod}, [T', U])) = |
607 fun mk_U proj (Type (s as @{type_name prod}, Ts as [T', U])) = |
608 if member (op =) fpTs T' then proj (T', U) else T |
608 if member (op =) fpTs T' then proj (T', U) else Type (s, map (mk_U proj) Ts) |
609 | mk_U proj (Type (s, Ts)) = Type (s, map (mk_U proj) Ts) |
609 | mk_U proj (Type (s, Ts)) = Type (s, map (mk_U proj) Ts) |
610 | mk_U _ T = T; |
610 | mk_U _ T = T; |
611 |
611 |
612 fun unzip_rec (x as Free (_, T)) = |
612 fun unzip_rec (x as Free (_, T)) = |
613 if exists_fp_subtype T then |
613 if exists_fp_subtype T then |