equal
deleted
inserted
replaced
793 AList.lookup (op =) vars xi |> Option.map (fn T => ((xi, T), cu))); |
793 AList.lookup (op =) vars xi |> Option.map (fn T => ((xi, T), cu))); |
794 in infer_instantiate_types ctxt args' th end; |
794 in infer_instantiate_types ctxt args' th end; |
795 |
795 |
796 fun infer_instantiate' ctxt args th = |
796 fun infer_instantiate' ctxt args th = |
797 let |
797 let |
798 val vars = rev (Term.add_vars (Thm.full_prop_of th) []); |
798 val vars = build_rev (Term.add_vars (Thm.full_prop_of th)); |
799 val args' = zip_options vars args |
799 val args' = zip_options vars args |
800 handle ListPair.UnequalLengths => |
800 handle ListPair.UnequalLengths => |
801 raise THM ("infer_instantiate': more instantiations than variables in thm", 0, [th]); |
801 raise THM ("infer_instantiate': more instantiations than variables in thm", 0, [th]); |
802 in infer_instantiate_types ctxt args' th end; |
802 in infer_instantiate_types ctxt args' th end; |
803 |
803 |