chore: fix implicit-reducible diamond in Lie subalgebras#38260
chore: fix implicit-reducible diamond in Lie subalgebras#38260sgouezel wants to merge 3 commits intoleanprover-community:masterfrom
Conversation
PR summary 4b13551071Import changes for modified filesNo significant changes to the import graph Import changes for all files
Declarations diff
You can run this locally as follows## summary with just the declaration names:
./scripts/pr_summary/declarations_diff.sh <optional_commit>
## more verbose report:
./scripts/pr_summary/declarations_diff.sh long <optional_commit>The doc-module for No changes to technical debt.You can run this locally as
|
|
Can you explain why we now need |
|
inferInstanceAs is hiding things behind opaque definitions, but that's not what we want here: the |
|
More details: with (For |
|
I had a look, and I propose a different solution: mark |
|
That's a discussion we had on Zulip, and I'm not sure there was a conclusion: should we mark definitions constructing algebraic objects (subrings and so on) as implicit_reducible, just like we do for instances? If we do, this will indeed solve many diamonds, but maybe at the price of a performance hit. So I'm not sure. |
|
In this case I think it is the principled solution. The reason why |
|
Ok, I have now found another solution that you may be happier with. Add the following instance: And it will be picked up by the |
|
I've done that. |
|
If you move the new instance up a bit, then Though I don't know if this is desirable. |
|
Good idea. I've moved it up (but still declared a shortcut instance as this will be the most common case). |
|
Why do you need a separate shortcut instance? Doesn't it already find the new Bracket instance as the first thing? And if not, then can't you just give it a high priority? |
|
It does find the new bracket instance, but for that it needs to do another search for |
|
That's a good reason, thanks. I think the increased priority is not needed though, since more specific patterns are tried first in type class search. |
The following example fails on master, is fine on the branch: