diff options
| author | Gaëtan Gilbert | 2020-08-24 12:26:55 +0200 |
|---|---|---|
| committer | Gaëtan Gilbert | 2020-08-25 16:10:30 +0200 |
| commit | 9b2979bc798dd6123bc4d599af3de894bff19c5b (patch) | |
| tree | 8c56089474846053e0bbea15d8a73b21c95421b4 | |
| parent | af5e7d44a2a685fe72a65df3daae577938eaa989 (diff) | |
Make decide equality compatible with mangled names.
Fix #12676
| -rw-r--r-- | tactics/eqdecide.ml | 8 | ||||
| -rw-r--r-- | test-suite/bugs/closed/bug_12676.v | 13 |
2 files changed, 17 insertions, 4 deletions
diff --git a/tactics/eqdecide.ml b/tactics/eqdecide.ml index 57d793b2a5..d4cc193eb3 100644 --- a/tactics/eqdecide.ml +++ b/tactics/eqdecide.ml @@ -150,12 +150,12 @@ let injHyp id = let diseqCase hyps eqonleft = let diseq = Id.of_string "diseq" in let absurd = Id.of_string "absurd" in - (tclTHEN (intro_using diseq) - (tclTHEN (choose_noteq eqonleft) + (intro_using_then diseq (fun diseq -> + tclTHEN (choose_noteq eqonleft) (tclTHEN (rewrite_and_clear (List.rev hyps)) (tclTHEN (red_in_concl) - (tclTHEN (intro_using absurd) - (tclTHEN (Simple.apply (mkVar diseq)) + (intro_using_then absurd (fun absurd -> + tclTHEN (Simple.apply (mkVar diseq)) (tclTHEN (injHyp absurd) (full_trivial [])))))))) diff --git a/test-suite/bugs/closed/bug_12676.v b/test-suite/bugs/closed/bug_12676.v new file mode 100644 index 0000000000..5118ddb472 --- /dev/null +++ b/test-suite/bugs/closed/bug_12676.v @@ -0,0 +1,13 @@ + + +Definition nat_eq_dec(i j:nat) : {i=j}+{i<>j}. +Proof. + pose (diseq := false). + decide equality. +Defined. + +Set Mangle Names. +Definition nat_eq_dec_mangle (i j:nat) : {i=j}+{i<>j}. +Proof. + decide equality. (*Error: Anomaly "variable diseq unbound." ...*) +Defined. |
