-
Notifications
You must be signed in to change notification settings - Fork 444
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 regressions probably related to transparency #2670
Comments
Yes, it is due to discriminations trees. We can disable the discrimination tree indexing for a subterm example {α β : Type} {f : α × β → β → β} (h : ∀ p : α × β, f p (no_index p.2) = p.2)
(a : α) (b : β) : f (a, b) b = b := by
simp [h]
example {α β : Type} {f : α × β → β → β}
(a : α) (b : β) (h : f (a,b) (no_index (a,b).2) = (a,b).2) : f (a, b) b = b := by
simp [h] A possible workaround: global |
Unfortunately, these do exist in the category theory library, usually deep inside some implicit type arguments in dependencies of the main arguments (which makes manually adding |
@digama0 Could you please provide evidence for your claim? It is not clear to me why someone will write |
They don't write it themselves, it is generated by elaboration up in the implicit type dependencies that users don't see. This is a half-remembered example from when I had to debug such an issue, the text EDIT: I don't think it is an exact match but https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/simp.20not.20using.20a.20simp.20lemma/near/353943416 is a similar issue. |
@leodemoura Here's the issue I was recalling. As you can see from the debugging discussion, the term |
@digama0 Could you please show me the actual Mathlib theorem statement that contains |
I'm sorry about the confusion brought by my second example. The first failure was the one I actually encountered when porting the sphere eversion project. The second one was brought up during the Zulip discussion. I just checked that |
…heorems have been annotated with `no_index` closes #2670
Prerequisites
Description
Many
simp
proofs from Lean 3 no longer work, probably because the discrimination tree that is necessary for improved performance does not allow seeing through definitional equality. I think this is worth reporting anyway.Context
The specific examples come from this Zulip discussion
Steps to Reproduce
Expected behavior:
The
simp
call closes the goal as they did in Lean 3.Actual behavior:
simp
is not working butrw
works.Versions
Lean (version 4.2.0-rc1, commit a62d2fd, Release)
Ubuntu 22.04
Impact
In isolation this is not a problem, but when porting project it can make a complicated simp call involving a lot of lemmas very painful to debug. And the ported output then requires alternating calls to
simp only
andrw
.Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
The text was updated successfully, but these errors were encountered: