equal
deleted
inserted
replaced
585 val ((xs, ys), _) = ctxt |
585 val ((xs, ys), _) = ctxt |
586 |> mk_Frees "x" xy_Ts |
586 |> mk_Frees "x" xy_Ts |
587 ||>> mk_Frees "y" xy_Ts; |
587 ||>> mk_Frees "y" xy_Ts; |
588 |
588 |
589 fun mk_prem xy_T x y = |
589 fun mk_prem xy_T x y = |
590 build_rel [] ctxt [fpT] (fn (T, _) => if T = fpT then Rcong else HOLogic.eq_const T) |
590 build_rel [] ctxt [fpT] [] (fn (T, _) => if T = fpT then Rcong else HOLogic.eq_const T) |
591 (xy_T, xy_T) $ x $ y; |
591 (xy_T, xy_T) $ x $ y; |
592 |
592 |
593 val prems = @{map 3} mk_prem xy_Ts xs ys; |
593 val prems = @{map 3} mk_prem xy_Ts xs ys; |
594 val concl = Rcong $ list_comb (alg, xs) $ list_comb (alg, ys); |
594 val concl = Rcong $ list_comb (alg, xs) $ list_comb (alg, ys); |
595 in |
595 in |
711 else |
711 else |
712 Bound 0 |
712 Bound 0 |
713 |> explore {bound_Us = T :: bound_Us, bound_Ts = T :: bound_Ts, U = U, T = T} |
713 |> explore {bound_Us = T :: bound_Us, bound_Ts = T :: bound_Ts, U = U, T = T} |
714 |> (fn t => Abs (Name.uu, T, t)); |
714 |> (fn t => Abs (Name.uu, T, t)); |
715 in |
715 in |
716 betapply (build_map lthy [] build_simple (T, U), t) |
716 betapply (build_map lthy [] [] build_simple (T, U), t) |
717 end; |
717 end; |
718 |
718 |
719 fun add_boundvar t = betapply (incr_boundvars 1 t, Bound 0); |
719 fun add_boundvar t = betapply (incr_boundvars 1 t, Bound 0); |
720 |
720 |
721 fun explore_fun (arg_U :: arg_Us) explore {bound_Us, bound_Ts, U, T} t = |
721 fun explore_fun (arg_U :: arg_Us) explore {bound_Us, bound_Ts, U, T} t = |
1045 val m = num_binder_types general_T; |
1045 val m = num_binder_types general_T; |
1046 val param1_T = Type_Infer.paramify_vars general_T; |
1046 val param1_T = Type_Infer.paramify_vars general_T; |
1047 val param2_T = Type_Infer.paramify_vars param1_T; |
1047 val param2_T = Type_Infer.paramify_vars param1_T; |
1048 |
1048 |
1049 val deadfixed_T = |
1049 val deadfixed_T = |
1050 build_map lthy [] (mk_undefined o op -->) (apply2 tupleT_of_funT (param1_T, param2_T)) |
1050 build_map lthy [] [] (mk_undefined o op -->) (apply2 tupleT_of_funT (param1_T, param2_T)) |
1051 |> singleton (Type_Infer_Context.infer_types lthy) |
1051 |> singleton (Type_Infer_Context.infer_types lthy) |
1052 |> singleton (Type_Infer.fixate lthy false) |
1052 |> singleton (Type_Infer.fixate lthy false) |
1053 |> type_of |
1053 |> type_of |
1054 |> dest_funT |
1054 |> dest_funT |
1055 |-> generalize_types 1 |
1055 |-> generalize_types 1 |