-
Notifications
You must be signed in to change notification settings - Fork 234
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
[Merged by Bors] - feat: port CategoryTheory.Elementwise #2872
Conversation
Mathbin -> Mathlib fix certain import statements move "by" to end of line add import to Mathlib.lean
open CategoryTheory | ||
|
||
-- This list is incomplete, and it would probably be useful to add more. | ||
attribute [elementwise] iso.hom_inv_id iso.inv_hom_id is_iso.hom_inv_id is_iso.inv_hom_id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm expecting that this line will be
set_option linter.existingAttributeWarning false in
attribute [elementwise] Iso.hom_inv_id Iso.inv_hom_id IsIso.hom_inv_id IsIso.inv_hom_id
There's a problem with the linter here though where the set_option
line seems not to be turning it off, but that should all be sorted out by the time that the @[elementwise]
attribute is merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, I did a workaround by first removing simp
and then re-add it using elementwise (attr := simp)
, which then adds all the correct simp lemmas.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, fixed the linter option instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fpvandoorn I know we talked about how you might fix the linter option or re-implement the attribute handling for elementwise
/reassoc
, so here's a ping since @javra modified ToAdditive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
applyAttributes
should probably be moved out of Mathlib.Tactic.ToAdditive
, if it's used elsewhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Floris was explaining to me that elementwise
/reassoc
shouldn't be using applyAttributes
, since it does some very ToAdditive-specific things (including sometimes applying to_additive
!).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, makes sense, my changes to applyAttributes
are probably still reasonable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this change is still sensible. Note there will be a small conflict with #2908
This PR/issue depends on:
|
bors r+ |
Pull request successfully merged into master. Build succeeded: |
@[elementwise]
attribute #2882