aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--contrib/first-order/rules.ml7
1 files changed, 3 insertions, 4 deletions
diff --git a/contrib/first-order/rules.ml b/contrib/first-order/rules.ml
index 4c8c8f9b3..dafef4efe 100644
--- a/contrib/first-order/rules.ml
+++ b/contrib/first-order/rules.ml
@@ -35,10 +35,9 @@ let wrap n b tacrec seq gls=
match nc with
[]->anomaly "Not the expected number of hyps"
| ((id,_,typ) as nd)::q->
- if occur_var env id (pf_concl gls) then
- seq
- else if List.exists (occur_var_in_decl env id) ctx then
- seq
+ if occur_var env id (pf_concl gls) ||
+ List.exists (occur_var_in_decl env id) ctx then
+ (aux (i-1) q (nd::ctx))
else
add_left (VarRef id,typ) (aux (i-1) q (nd::ctx)) true gls in
let seq1=aux n nc [] in