chore(Data/Finsupp/Order): add Finsupp.support_add_eq' for canonically ordered Finsupps#40210
chore(Data/Finsupp/Order): add Finsupp.support_add_eq' for canonically ordered Finsupps#40210Yu-Misaka wants to merge 6 commits into
Finsupp.support_add_eq' for canonically ordered Finsupps#40210Conversation
Welcome new contributor!Thank you for contributing to Mathlib! If you haven't done so already, please review our contribution guidelines, as well as the style guide and naming conventions. In particular, we kindly remind contributors that we have guidelines regarding the use of AI when making pull requests. We use a review queue to manage reviews. If your PR does not appear there, it is probably because it is not successfully building (i.e., it doesn't have a green checkmark), has the If you haven't already done so, please come to https://leanprover.zulipchat.com/, introduce yourself, and mention your new PR. Thank you again for joining our community. |
PR summary a48f3f9d84Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a lemma characterizing Finsupp.support of an addition as the union of supports, in the canonically-ordered setting used by this file.
Changes:
- Introduces
support_add_eq', provingsupport (f1 + f2) = support f1 ∪ support f2. - Uses
support_monoplusle_self_add/le_add_selfto prove the reverse inclusion.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| (f1 - f2).embDomain f = f1.embDomain f - f2.embDomain f := by | ||
| simp_rw [embDomain_eq_mapDomain, mapDomain_tsub f.injective] | ||
|
|
||
| lemma support_add_eq' {f1 f2 : ι →₀ α} [DecidableEq ι] : |
✅ PR Title Formatted CorrectlyThe title of this PR has been updated to match our commit style conventions. |
Finsupp.support_add_eq' for canonically ordered FinsuppsFinsupp.support_add_eq' for canonically ordered Finsupps
|
Thanks for the PR! I'm having a look, but please consider that although this PR is quite short, we only add the |
| (f1 - f2).embDomain f = f1.embDomain f - f2.embDomain f := by | ||
| simp_rw [embDomain_eq_mapDomain, mapDomain_tsub f.injective] | ||
|
|
||
| lemma support_add_eq' {f1 f2 : ι →₀ α} [DecidableEq ι] : |
There was a problem hiding this comment.
Beacuse we have a Finsupp.support_add_eq that takes disjoint support set (although I do believe this needs a better name, will support_add_eq_union suggested by copilot sounds better?)
Ah! I see, thanks for pointing this out! |
faenuccio
left a comment
There was a problem hiding this comment.
Beacuse we have a Finsupp.support_add_eq that takes disjoint support set (although I do believe this needs a better name, will
support_add_eq_unionsuggested by copilot sounds better?)
Ah sure, good point. Can you then please add a small doc both to this and to support_add_eq, mutually pointing to one another and saying " in the case... there is also..."?
…`support_add_eq`
Sure! Does it look better now? |
Greetings! This PR attempts to show that in a
CanonicallyOrderedAddsetting, the support off1 + f2is exactly the union of the supports off1andf2. This result will be handy in combinatorics and when the coefficients are in natural number (for example here)