aboutsummaryrefslogtreecommitdiffhomepage
path: root/tactics/inv.ml
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2005-03-20 11:24:39 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2005-03-20 11:24:39 +0000
commit7053379844b900e8d79a25e666c808d5299d0caf (patch)
tree3df7c8ac622b467ffa9a7d1bd19e963ea9b99f54 /tactics/inv.ml
parent2b31c2a5dfcf091e74e2df41c1504c932e0f044e (diff)
Correction bug de dependent_hyps qui ne met pas à jour le type des hyps dépendantes
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@6868 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'tactics/inv.ml')
-rw-r--r--tactics/inv.ml12
1 files changed, 7 insertions, 5 deletions
diff --git a/tactics/inv.ml b/tactics/inv.ml
index 94ec50e9d..4609c360e 100644
--- a/tactics/inv.ml
+++ b/tactics/inv.ml
@@ -190,12 +190,14 @@ let make_inv_predicate env sigma indf realargs id status concl =
and introduces generalized hypotheis.
Precondition: t=(mkVar id) *)
-let rec dependent_hyps id idlist sign =
+let rec dependent_hyps id idlist gl =
let rec dep_rec =function
| [] -> []
- | (id1,_,id1ty as d1)::l ->
- if occur_var (Global.env()) id id1ty
- then d1 :: dep_rec l
+ | (id1,_,_)::l ->
+ (* Update the type of id1: it may have been subject to rewriting *)
+ let d = pf_get_hyp gl id1 in
+ if occur_var_in_decl (Global.env()) id d
+ then d :: dep_rec l
else dep_rec l
in
dep_rec idlist
@@ -280,7 +282,7 @@ Nota: with Inversion_clear, only four useless hypotheses
*)
let generalizeRewriteIntros tac depids id gls =
- let dids = dependent_hyps id depids (pf_env gls) in
+ let dids = dependent_hyps id depids gls in
(tclTHENSEQ
[bring_hyps dids; tac;
(* may actually fail to replace if dependent in a previous eq *)