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

simp_all? omits unfolded let hypotheses #3519

Closed
1 task done
JLimperg opened this issue Feb 27, 2024 · 3 comments · Fixed by #6385
Closed
1 task done

simp_all? omits unfolded let hypotheses #3519

JLimperg opened this issue Feb 27, 2024 · 3 comments · Fixed by #6385
Labels
bug Something isn't working P-medium We may work on this issue if we find the time

Comments

@JLimperg
Copy link
Contributor

Prerequisites

  • Put an X between the brackets on this line if you have done all of the following:
    • Check that your issue is not already filed.
    • Reduce the issue to a minimal, self-contained, reproducible test case. Avoid dependencies to mathlib4 or std4.

Description

simp_all? does not mention unfolded let hypotheses in the generated simp_all only call:

example {P : Nat → Prop} : let x := 0; P x := by
  intro x
  simp_all? [x] -- Try this: simp_all only

example {P : Nat → Prop} : let x := 0; P x := by
  intro x
  simp_all only -- simp_all made no progress

The buggy code is here.

Context

Similar to #3501.

Versions

nightly 2024-02-27

Impact

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

@JLimperg JLimperg added the bug Something isn't working label Feb 27, 2024
leodemoura added a commit that referenced this issue Feb 27, 2024
@leodemoura
Copy link
Member

Fixed by commit above. It has been squashed.

@m4lvin
Copy link

m4lvin commented Oct 11, 2024

See https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/simp_all.3F.20.E2.89.A0.20simp_all.20and.20an.20old.20bug.3F/near/476414205

This bug seems to be back since 4.12, so this should be reopened?

Note: the test case added by the above commit uses simp and not simp_all. Could that be why the bug is not caught by the CI tests?

@nomeata
Copy link
Collaborator

nomeata commented Oct 11, 2024

Note: the test case added by the above commit uses simp and not simp_all. Could that be why the bug is not caught by the CI tests?

Ah, I was just thoroughly confused by that as well. Yes, then the bug is not fully fixed, I’ll reopen.

@nomeata nomeata reopened this Oct 11, 2024
@leanprover-bot leanprover-bot added the P-medium We may work on this issue if we find the time label Nov 8, 2024
leodemoura added a commit that referenced this issue Dec 14, 2024
This PR fixes a bug in `simp_all?` that caused some local declarations to be omitted from the `Try this:` suggestions.

closes #3519
github-merge-queue bot pushed a commit that referenced this issue Dec 14, 2024
This PR fixes a bug in `simp_all?` that caused some local declarations
to be omitted from the `Try this:` suggestions.

closes #3519
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P-medium We may work on this issue if we find the time
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants