aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasper Hugunin2020-11-27 09:26:20 -0800
committerJasper Hugunin2020-11-27 09:26:51 -0800
commita1daae8800194166662c87e11a974a6ae3d24a4d (patch)
tree2c8cacdd9f38e089bcd32c2995e4107b6583a34d
parent7f3c46acc937eb9257c29b5881e5a8b17b28cd48 (diff)
A small fix for freshness in the `change` tactic
-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.