diff options
-rw-r--r-- | tactics/leminv.ml | 17 | ||||
-rw-r--r-- | tactics/leminv.mli | 7 |
2 files changed, 11 insertions, 13 deletions
diff --git a/tactics/leminv.ml b/tactics/leminv.ml index 0e337a0c8..28c46907b 100644 --- a/tactics/leminv.ml +++ b/tactics/leminv.ml @@ -29,7 +29,6 @@ open Pfedit open Evar_refiner open Clenv open Declare -open Wcclausenv open Tacticals open Tactics open Inv @@ -293,10 +292,6 @@ let lemInv id c gls = let clause = clenv_constrain_with_bindings [(-1,mkVar id)] clause in elim_res_pf kONT clause true gls with -(* Ce n'est pas l'endroit pour cela - | Not_found -> - errorlabstrm "LemInv" (not_found_message [id]) - *) | UserError (a,b) -> errorlabstrm "LemInv" (str "Cannot refine current goal with the lemma " ++ @@ -313,11 +308,11 @@ let lemInvIn id c ids gls = else (tclTHEN (tclDO nb_of_new_hyp intro) (intros_replacing ids)) gls in -(* try *) - ((tclTHEN (tclTHEN (bring_hyps hyps) (lemInv id c)) - (intros_replace_ids)) gls) -(* with Not_found -> errorlabstrm "LemInvIn" (not_found_message ids) - | UserError(a,b) -> errorlabstrm "LemInvIn" b -*) + ((tclTHEN (tclTHEN (bring_hyps hyps) (lemInv id c)) + (intros_replace_ids)) gls) let lemInvIn_gen id c l = try_intros_until (fun id -> lemInvIn id c l) id + +let lemInv_clause id c = function + | [] -> lemInv_gen id c + | l -> lemInvIn_gen id c l diff --git a/tactics/leminv.mli b/tactics/leminv.mli index 17e1b0552..6617edf2c 100644 --- a/tactics/leminv.mli +++ b/tactics/leminv.mli @@ -8,9 +8,12 @@ open Topconstr val lemInv_gen : quantified_hypothesis -> constr -> tactic val lemInvIn_gen : quantified_hypothesis -> constr -> identifier list -> tactic +val lemInv_clause : + quantified_hypothesis -> constr -> identifier list -> tactic + val inversion_lemma_from_goal : int -> identifier -> identifier -> sorts -> bool -> (identifier -> tactic) -> unit val add_inversion_lemma_exn : - identifier -> constr_expr -> rawsort -> bool -> (identifier -> tactic) -> unit - + identifier -> constr_expr -> rawsort -> bool -> (identifier -> tactic) -> + unit |