-
Notifications
You must be signed in to change notification settings - Fork 297
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
refactor(algebra/big_operators,data/finset): use finset.disjoint
in definitions
#1456
Merged
mergify
merged 6 commits into
leanprover-community:master
from
Vierkantor:finset-sum-disjoint
Sep 18, 2019
Merged
refactor(algebra/big_operators,data/finset): use finset.disjoint
in definitions
#1456
mergify
merged 6 commits into
leanprover-community:master
from
Vierkantor:finset-sum-disjoint
Sep 18, 2019
Conversation
This file contains 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
It should be a painless step from using `filter_inter_filter_neg_eq` to using this lemma
jcommelin
reviewed
Sep 18, 2019
It actually seems that the other tactics are up to the job so we can simply remove the |
Heh, nice! |
rwbarton
approved these changes
Sep 18, 2019
(∀x, p x → ¬ q x) → disjoint (s.filter p) (s.filter q) := | ||
assume h, by simp only [disjoint_iff_ne, mem_filter]; rintros a ⟨_, ha⟩ b ⟨_, hb⟩ eq; | ||
rw [eq] at ha; exact h _ ha hb | ||
|
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 could be stated as disjoint (s.filter p) (s.filter q) \iff (∀x \in s, p x → ¬ q x)
JaredCorduan
pushed a commit
to JaredCorduan/mathlib
that referenced
this pull request
Oct 12, 2019
… definitions (leanprover-community#1456) * Use `finset.disjoint` in `algebra/big_operators` * New lemma `disjoint_filter` It should be a painless step from using `filter_inter_filter_neg_eq` to using this lemma * Update other dependencies of finset.prod_union and finset.prod_bind * Reformat some lines to make them fit within 100 characters * We can actually do away with two non-terminal `simp`s now
anrddh
pushed a commit
to anrddh/mathlib
that referenced
this pull request
May 15, 2020
… definitions (leanprover-community#1456) * Use `finset.disjoint` in `algebra/big_operators` * New lemma `disjoint_filter` It should be a painless step from using `filter_inter_filter_neg_eq` to using this lemma * Update other dependencies of finset.prod_union and finset.prod_bind * Reformat some lines to make them fit within 100 characters * We can actually do away with two non-terminal `simp`s now
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
ready-to-merge
All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
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.
In
algebra/big_operators.lean
, some definitions don't usefinset.disjoint
but write outout s₁ ∩ s₂ = ∅ (which is slightly incompatible with
disjoint
). This pull request changes those definitions to usedisjoint
instead, and includes updates to fix dependencies on these definitions. Since many uses included the lemmafinset.filter_inter_filter_neg_eq
, I introduced a lemmafinset.disjoint_filter
which serves the same role.Zulip discussion: https://leanprover.zulipchat.com/#narrow/stream/113489-new-members/topic/disjoint.20in.20algebra.2Ebig_operators
For reviewers: code review check list