-
Notifications
You must be signed in to change notification settings - Fork 298
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] - refactor(data/finsupp/antidiagonal): Make antidiagonal a finset #7595
Conversation
Also mentioned on zulip, but I disagree with the refactor of class has_antidiagonal (α : Type*) [ordered_add_comm_monoid α] :=
(antidiagonal : α → finset (α × α))
(mem_antidiagonal {{a b c : α}} : (a, b) ∈ antidiagonal c ↔ a + b = c) This has instances for |
I like @digama0 's suggestion of a |
I think Mario's suggestion is to not remove the current version of |
Yes, thanks for reminding me of this. I have now restored the original definition as |
Created ticket for |
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.
LGTM
Co-authored-by: Floris van Doorn <fpvdoorn@gmail.com>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
src/data/finsupp/antidiagonal.lean
Outdated
f.antidiagonal'.support | ||
|
||
@[simp] lemma mem_antidiagonal {f : α →₀ ℕ} {p : (α →₀ ℕ) × (α →₀ ℕ)} : | ||
p ∈ antidiagonal f ↔ p.1 + p.2 = f := | ||
begin | ||
rcases p with ⟨p₁, p₂⟩, | ||
simp [antidiagonal, ← and.assoc, ← finsupp.to_multiset.apply_eq_iff_eq] |
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.
simp [antidiagonal, ← and.assoc, ← finsupp.to_multiset.apply_eq_iff_eq] | |
simp [antidiagonal, antidiagonal', ← and.assoc, ← finsupp.to_multiset.apply_eq_iff_eq] |
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.
This change needs to be made in two places, I have committed it, we'll see if it fixes it.
bors merge |
Pursuant to discussion [here](https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/antidiagonals.20having.20multiplicity) Refactoring so that `finsupp.antidiagonal` and `multiset.antidiagonal` are finsets. ~~Still TO DO: `multiset.antidiagonal`~~
Pull request successfully merged into master. Build succeeded: |
Pursuant to discussion here
Refactoring so that
finsupp.antidiagonal
andmultiset.antidiagonal
are finsets.Still TO DO:multiset.antidiagonal