aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcoqbot-app[bot]2020-11-28 21:41:25 +0000
committerGitHub2020-11-28 21:41:25 +0000
commit9992bb15d4f90fc0cf3aa2854beb209bc5effac6 (patch)
tree6664a13c0bde2b0d00a22f815532fc4b1646ea9b
parent7514bc25c6e8dffeb58ae9af0916dac83953d337 (diff)
parenta1daae8800194166662c87e11a974a6ae3d24a4d (diff)
Merge PR #13502: A small fix for freshness in the `change` tactic
Reviewed-by: herbelin
-rw-r--r--tactics/eqdecide.ml4
-rw-r--r--test-suite/bugs/closed/bug_13493.v7
2 files changed, 9 insertions, 2 deletions
diff --git a/tactics/eqdecide.ml b/tactics/eqdecide.ml
index d4cc193eb3..9b3f9053cd 100644
--- a/tactics/eqdecide.ml
+++ b/tactics/eqdecide.ml
@@ -123,8 +123,8 @@ let idy = Id.of_string "y"
let mkGenDecideEqGoal rectype ops g =
let hypnames = pf_ids_set_of_hyps g in
- let xname = next_ident_away idx hypnames
- and yname = next_ident_away idy hypnames in
+ let xname = next_ident_away idx hypnames in
+ let yname = next_ident_away idy (Id.Set.add xname hypnames) in
(mkNamedProd (make_annot xname Sorts.Relevant) rectype
(mkNamedProd (make_annot yname Sorts.Relevant) rectype
(mkDecideEqGoal true ops
diff --git a/test-suite/bugs/closed/bug_13493.v b/test-suite/bugs/closed/bug_13493.v
new file mode 100644
index 0000000000..779df8e7f2
--- /dev/null
+++ b/test-suite/bugs/closed/bug_13493.v
@@ -0,0 +1,7 @@
+Set Mangle Names.
+
+Goal forall (m n:nat), True.
+ intros m n. compare m n.
+ - constructor.
+ - constructor.
+Qed.