378 infer_instantiate_types ctxt (map (apfst (dest_Var o Thm.term_of)) eq_terms) subst' |
378 infer_instantiate_types ctxt (map (apfst (dest_Var o Thm.term_of)) eq_terms) subst' |
379 end |
379 end |
380 |
380 |
381 val factor = Seq.hd o distinct_subgoals_tac |
381 val factor = Seq.hd o distinct_subgoals_tac |
382 |
382 |
383 fun one_step ctxt type_enc concealed sym_tab th_pairs p = |
383 fun one_step ctxt type_enc concealed sym_tab th_pairs (fol_th, inference) = |
384 (case p of |
384 (case inference of |
385 (fol_th, Metis_Proof.Axiom _) => axiom_inference th_pairs fol_th |> factor |
385 Metis_Proof.Axiom _ => |
386 | (_, Metis_Proof.Assume f_atom) => assume_inference ctxt type_enc concealed sym_tab f_atom |
386 axiom_inference th_pairs fol_th |> factor |
387 | (_, Metis_Proof.Metis_Subst (f_subst, f_th1)) => |
387 | Metis_Proof.Assume atom => |
388 inst_inference ctxt type_enc concealed sym_tab th_pairs f_subst f_th1 |> factor |
388 assume_inference ctxt type_enc concealed sym_tab atom |
389 | (_, Metis_Proof.Resolve(f_atom, f_th1, f_th2)) => |
389 | Metis_Proof.Metis_Subst (subst, th1) => |
390 resolve_inference ctxt type_enc concealed sym_tab th_pairs f_atom f_th1 f_th2 |> factor |
390 inst_inference ctxt type_enc concealed sym_tab th_pairs subst th1 |> factor |
391 | (_, Metis_Proof.Refl f_tm) => refl_inference ctxt type_enc concealed sym_tab f_tm |
391 | Metis_Proof.Resolve (atom, th1, th2) => |
392 | (_, Metis_Proof.Equality (f_lit, f_p, f_r)) => |
392 resolve_inference ctxt type_enc concealed sym_tab th_pairs atom th1 th2 |> factor |
393 equality_inference ctxt type_enc concealed sym_tab f_lit f_p f_r) |
393 | Metis_Proof.Refl tm => |
|
394 refl_inference ctxt type_enc concealed sym_tab tm |
|
395 | Metis_Proof.Equality (lit, p, r) => |
|
396 equality_inference ctxt type_enc concealed sym_tab lit p r) |
394 |
397 |
395 fun flexflex_first_order ctxt th = |
398 fun flexflex_first_order ctxt th = |
396 (case Thm.tpairs_of th of |
399 (case Thm.tpairs_of th of |
397 [] => th |
400 [] => th |
398 | pairs => |
401 | pairs => |