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? suggests generated equations lemma names #3547

Closed
nomeata opened this issue Feb 29, 2024 · 0 comments · Fixed by #3573
Closed

simp? suggests generated equations lemma names #3547

nomeata opened this issue Feb 29, 2024 · 0 comments · Fixed by #3573
Labels
bug Something isn't working

Comments

@nomeata
Copy link
Collaborator

nomeata commented Feb 29, 2024

Consider this:

import Std

def foo : Nat → Nat 
  | 0 => 0
  | n+1 => foo n
decreasing_by decreasing_tactic

def foo2 : foo 2 = 0 := by
  simp? [foo]
  -- suggests: simp only [foo._eq_2, foo._eq_1]
  -- but that yields: unknown constant 'foo._eq_2'

These foo._eq_6 lemmas are created on demand when you use simp [foo] or rw [foo]; from then on they are available. But if you just mention them manually like this, they may not exist yet.

Therefore, simp? should not suggest them. Instead it should suggest simp only [foo].

Versions

4.6.0 on live.lean-lang.org

Impact

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

@nomeata nomeata added the bug Something isn't working label Feb 29, 2024
@nomeata nomeata changed the title simp? suggests generate equations lemma names simp? suggests generated equations lemma names Feb 29, 2024
github-merge-queue bot pushed a commit that referenced this issue Mar 3, 2024
closes #3547

---------

Co-authored-by: Joachim Breitner <[email protected]>
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
Development

Successfully merging a pull request may close this issue.

1 participant