diff options
| author | herbelin | 2003-10-10 18:47:23 +0000 |
|---|---|---|
| committer | herbelin | 2003-10-10 18:47:23 +0000 |
| commit | edf1a291e69d3cc886fbb5e6d300a9e8e7614b21 (patch) | |
| tree | 0d251cd3c0c583c0547a53b71bc9a8ca24fa443b | |
| parent | 55dcae414b7e0f905d527845b4c3617b4be857b8 (diff) | |
Unification lemInv et lemInv_in
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@4568 85f007b7-540e-0410-9357-904b9bb8a0f7
| -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 0e337a0c8f..28c46907be 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 17e1b05526..6617edf2c5 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 |
