aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Herbelin2016-08-17 10:30:00 +0200
committerHugo Herbelin2016-08-17 10:49:43 +0200
commitbc7ffd368789cb82bb8fc8b642b3de870b92c897 (patch)
treeff1bbb6b16662e4471d3f42bf7251c30dd5823ec
parent979b7cbba63f6c033bab40ad5c552572ab5d7d71 (diff)
Fixing #3070 ("subst" taking properly into account chains of dependencies).
-rw-r--r--tactics/equality.ml2
-rw-r--r--test-suite/bugs/closed/3070.v6
2 files changed, 7 insertions, 1 deletions
diff --git a/tactics/equality.ml b/tactics/equality.ml
index 4aa7ffa7bd..2c97cf4425 100644
--- a/tactics/equality.ml
+++ b/tactics/equality.ml
@@ -1691,7 +1691,7 @@ let subst_one dep_proof_ok x (hyp,rhs,dir) =
&& List.exists (fun y -> occur_var_in_decl env y dcl) deps
then
let id_dest = if !regular_subst_tactic then dest else MoveLast in
- (dest,(if is_local_assum dcl then deps else id::deps), (id_dest,id)::allhyps)
+ (dest,id::deps,(id_dest,id)::allhyps)
else
(MoveBefore id,deps,allhyps))
hyps
diff --git a/test-suite/bugs/closed/3070.v b/test-suite/bugs/closed/3070.v
new file mode 100644
index 0000000000..7a8feca587
--- /dev/null
+++ b/test-suite/bugs/closed/3070.v
@@ -0,0 +1,6 @@
+(* Testing subst wrt chains of dependencies *)
+
+Lemma foo (a1 a2 : Set) (b1 : a1 -> Prop)
+ (Ha : a1 = a2) (c : a1) (d : b1 c) : True.
+Proof.
+ subst.