[Merged by Bors] - feat(Algebra/Order): LinearEquiv version of toLex/ofLex#27711
[Merged by Bors] - feat(Algebra/Order): LinearEquiv version of toLex/ofLex#27711wwylele wants to merge 13 commits intoleanprover-community:masterfrom
LinearEquiv version of toLex/ofLex#27711Conversation
wwylele
commented
Jul 31, 2025
PR summary cdda99e28cImport changes for modified filesNo significant changes to the import graph Import changes for all files
|
fd6e0f0 to
2c98ade
Compare
5d0c49b to
29b924b
Compare
29b924b to
494d834
Compare
|
I think the existing lemmas about coercion from MulEquiv to Equiv should also be moved to the new file. |
|
I moved |
|
Specifically for the lemmas that coerce to Equiv, you shouldn't have the outer coercion lemma. Because if you do, that statement becomes about coercions to functions. |
|
Oh yeah that's also what confused me, because the original code had |
|
Yeah the original code, written by me, was wrong! |
| variable (α : Type*) | ||
|
|
||
| /-- `toLex` as a `MulEquiv`. -/ | ||
| @[to_additive "`toLex` as a `AddEquiv`."] |
There was a problem hiding this comment.
| @[to_additive "`toLex` as a `AddEquiv`."] | |
| @[to_additive (attr := simps toEquiv) "`toLex` as a `AddEquiv`."] |
There was a problem hiding this comment.
This produces toLexMulEquiv_toEquiv, which is basically renaming toEquiv_toLexMulEquiv. (toEquiv_toLexMulEquiv was introduced in #22420). This is where I don't know what our naming convention is and I found both examples in the library. toEquiv can be seen as a function application so the function name should appear first; but there are also example where a dot member is written the other way.
There was a problem hiding this comment.
For things which ""are clearly projections"", the name tends to come last. At any rate, simps producing that name is good authority to follow
There was a problem hiding this comment.
Got it. I have applied the change and removed toEquiv_toLexMulEquiv
There was a problem hiding this comment.
Welp, the simp normal form checker rejected this
-- Mathlib.Algebra.Order.Group.Equiv
Error: /home/lean/actions-runner/_work/mathlib4/mathlib4/pr-branch/Mathlib/Algebra/Order/Group/Equiv.lean:16:24: error: toLexMulEquiv_toEquiv Left-hand side simplifies from
(toLexMulEquiv α).toEquiv
to
↑(toLexMulEquiv α)
using
dsimp only [*, @MulEquiv.toEquiv_eq_coe]
Try to change the left-hand side to the simplified term!
There was a problem hiding this comment.
Ugh, I'm so sorry my suggestion depends on #21031
This reverts commit aef0962.
LinearEquiv version of toLex/ofLex
YaelDillies
left a comment
There was a problem hiding this comment.
Thanks!
maintainer delegate
|
🚀 Pull request has been placed on the maintainer queue by YaelDillies. |
|
Thanks! |
|
Pull request successfully merged into master. Build succeeded: |
LinearEquiv version of toLex/ofLexLinearEquiv version of toLex/ofLex