Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rw duplicates goals for metavariables appearing in the rewritten expression #4381

Closed
3 tasks done
JovanGerb opened this issue Jun 6, 2024 · 2 comments · Fixed by #4385
Closed
3 tasks done

rw duplicates goals for metavariables appearing in the rewritten expression #4381

JovanGerb opened this issue Jun 6, 2024 · 2 comments · Fixed by #4385
Labels
bug Something isn't working

Comments

@JovanGerb
Copy link
Contributor

Prerequisites

Please put an X between the brackets as you perform the following steps:

Description

When rewriting a term that contains metavariables, this metavariable is added as a new goal in the tactic state, even if it already is a goal. This clutters the tactic state and is confusing.

Context

Question on Zulip

Steps to Reproduce

The example provided on Zulip is:

example : ∀ d g, d = g → exists x : Nat, x = d := by
  intros d g H1
  constructor
  rewrite [H1,←H1,H1,←H1,H1]
  -- rotate_left; exact g; rfl

Expected behavior: [Clear and concise description of what you expect to happen]

The goal

dg: Nat
H1: d = g
⊢ Nat

should still appear only once after the rewrites

Actual behavior: [Clear and concise description of what actually happens]

The goal appears 6 times after the 5 rewrites.

Versions

4.7.0 (works on any version)

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

@JovanGerb JovanGerb added the bug Something isn't working label Jun 6, 2024
@JovanGerb
Copy link
Contributor Author

I've made a fix for it here: #4383

@eric-wieser
Copy link
Contributor

Either this has regressed, or the fix wasn't exhaustive: see #6407

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants