From 7053379844b900e8d79a25e666c808d5299d0caf Mon Sep 17 00:00:00 2001 From: herbelin Date: Sun, 20 Mar 2005 11:24:39 +0000 Subject: Correction bug de dependent_hyps qui ne met pas à jour le type des hyps dépendantes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@6868 85f007b7-540e-0410-9357-904b9bb8a0f7 --- tactics/inv.ml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'tactics/inv.ml') 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 *) -- cgit v1.2.3