equal
deleted
inserted
replaced
804 *} |
804 *} |
805 |
805 |
806 ML {* |
806 ML {* |
807 fun instantiate_skols ctxt consts_candidates i = fn st => |
807 fun instantiate_skols ctxt consts_candidates i = fn st => |
808 let |
808 let |
809 val thy = Proof_Context.theory_of ctxt |
|
810 |
|
811 val gls = |
809 val gls = |
812 Thm.prop_of st |
810 Thm.prop_of st |
813 |> Logic.strip_horn |
811 |> Logic.strip_horn |
814 |> fst |
812 |> fst |
815 |
813 |
915 |
913 |
916 (*prefix a skolem term with bindings for the parameters*) |
914 (*prefix a skolem term with bindings for the parameters*) |
917 (* val contextualise = fold absdummy (map snd params) *) |
915 (* val contextualise = fold absdummy (map snd params) *) |
918 val contextualise = fold absfree params |
916 val contextualise = fold absfree params |
919 |
917 |
920 val skolem_cts = map (contextualise #> Thm.global_cterm_of thy) skolem_terms |
918 val skolem_cts = map (contextualise #> Thm.cterm_of ctxt) skolem_terms |
921 |
919 |
922 |
920 |
923 (*now the instantiation code*) |
921 (*now the instantiation code*) |
924 |
922 |
925 (*there should only be one Var -- that is from the previous application of drule leo2_skolemise. We look for it at the head position in some equation at a conclusion of a subgoal.*) |
923 (*there should only be one Var -- that is from the previous application of drule leo2_skolemise. We look for it at the head position in some equation at a conclusion of a subgoal.*) |
935 |> maps (switch Term.add_vars []) |
933 |> maps (switch Term.add_vars []) |
936 |
934 |
937 fun make_var pre_var = |
935 fun make_var pre_var = |
938 the_single pre_var |
936 the_single pre_var |
939 |> Var |
937 |> Var |
940 |> Thm.global_cterm_of thy |
938 |> Thm.cterm_of ctxt |
941 |> SOME |
939 |> SOME |
942 in |
940 in |
943 if null pre_var then NONE |
941 if null pre_var then NONE |
944 else make_var pre_var |
942 else make_var pre_var |
945 end |
943 end |
2001 in |
1999 in |
2002 TPTP_Reconstruct.inference_at_node |
2000 TPTP_Reconstruct.inference_at_node |
2003 thy |
2001 thy |
2004 prob_name (#meta pannot) n |
2002 prob_name (#meta pannot) n |
2005 |> the |
2003 |> the |
2006 |> (fn {inference_fmla, ...} => Thm.global_cterm_of thy inference_fmla) |
2004 |> (fn {inference_fmla, ...} => Thm.cterm_of ctxt inference_fmla) |
2007 |> oracle_iinterp |
2005 |> oracle_iinterp |
2008 end |
2006 end |
2009 *} |
2007 *} |
2010 |
2008 |
2011 |
2009 |