[Merged by Bors] - feat(Data/Finsupp/Defs): Support of f + single a b#16076
Closed
[Merged by Bors] - feat(Data/Finsupp/Defs): Support of f + single a b#16076
f + single a b#16076Conversation
PR summary f254d4a66dImport 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/declarations_diff.sh <optional_commit>
## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>The doc-module for |
b-mehta
reviewed
Aug 28, 2024
Contributor
|
aod, I think. @YaelDillies will know
…On Wed, 28 Aug 2024, 14:33 Violeta Hernández, ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In Mathlib/Data/Finsupp/Defs.lean
<#16076 (comment)>
:
> @@ -910,6 +910,20 @@ theorem support_add_eq [DecidableEq α] {g₁ g₂ : α →₀ M} (h : Disjoint
theorem single_add (a : α) (b₁ b₂ : M) : single a (b₁ + b₂) = single a b₁ + single a b₂ :=
(zipWith_single_single _ _ _ _ _).symm
+theorem support_single_add [DecidableEq α] {a : α} {b : M} {f : α →₀ M}
+ (ha : a ∉ f.support) (hb : b ≠ 0) : support (single a b + f) = insert a f.support := by
+ have H := support_single_ne_zero a hb
+ apply (support_add_eq _).trans
+ · rw [H, insert_eq]
+ · rwa [H, disjoint_singleton_left]
+
+theorem support_add_single [DecidableEq α] {a : α} {b : M} {f : α →₀ M}
+ (ha : a ∉ f.support) (hb : b ≠ 0) : support (f + single a b) = insert a f.support := by
+ have H := support_single_ne_zero a hb
Yes, this works even without commutative addition. Is there any type alias
for reversing the order of addition?
—
Reply to this email directly, view it on GitHub
<#16076 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHESIOSND5ZHTOAEHVSGIPLZTW7TLAVCNFSM6AAAAABM7EALEWVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDENRWGEZDKMRXGI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Ruben-VandeVelde
approved these changes
Aug 30, 2024
Contributor
Ruben-VandeVelde
left a comment
There was a problem hiding this comment.
Seems like deduplicating the proofs is non-obvious, so
maintainer merge
|
🚀 Pull request has been placed on the maintainer queue by Ruben-VandeVelde. |
eric-wieser
reviewed
Aug 30, 2024
Ruben-VandeVelde
approved these changes
Aug 31, 2024
Contributor
Ruben-VandeVelde
left a comment
There was a problem hiding this comment.
Thanks!
maintainer merge
|
🚀 Pull request has been placed on the maintainer queue by Ruben-VandeVelde. |
Contributor
|
Pull request successfully merged into master. Build succeeded: |
f + single a bf + single a b
bjoernkjoshanssen
pushed a commit
that referenced
this pull request
Sep 9, 2024
bjoernkjoshanssen
pushed a commit
that referenced
this pull request
Sep 9, 2024
bjoernkjoshanssen
pushed a commit
that referenced
this pull request
Sep 12, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Used within my work with the Cantor normal form.