Skip to content
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(data/finset/lattice): Distributivity lemmas #18611

Closed
wants to merge 13 commits into from

Conversation

YaelDillies
Copy link
Collaborator

@YaelDillies YaelDillies commented Mar 18, 2023

Dualise a few existing lemmas, protect finset.sup_eq_bot_iff/finset.inf_eq_top_iff, move map_finset_sup/map_finset_inf from order.hom.lattice to data.finset.lattice, make binders semi-implicit in finset.disjoint_sup_left and friends to avoid overly explicit binders in a local assumption after rewriting.


Open in Gitpod

@YaelDillies YaelDillies added awaiting-review The author would like community review of the PR t-order Order hierarchy labels Mar 18, 2023
@eric-wieser eric-wieser added the awaiting-CI The author would like to see what CI has to say before doing more work. label Mar 18, 2023
@github-actions github-actions bot removed the awaiting-CI The author would like to see what CI has to say before doing more work. label Mar 20, 2023
@semorrison semorrison added the modifies-synchronized-file This PR touches a files that has already been ported to mathlib4, and may need a synchronization PR. label Mar 28, 2023
@eric-wieser
Copy link
Member

Can you merge master? Feel free to ping me on this one, it looks straightforward to review.

@eric-wieser eric-wieser added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Apr 30, 2023
@YaelDillies YaelDillies added awaiting-review The author would like community review of the PR blocked-by-other-PR This PR depends on another PR which is still in the queue. A bot manages this label via PR comment. and removed awaiting-author A reviewer has asked the author a question or requested changes labels Apr 30, 2023
@mathlib-dependent-issues-bot mathlib-dependent-issues-bot removed the blocked-by-other-PR This PR depends on another PR which is still in the queue. A bot manages this label via PR comment. label Apr 30, 2023
@mathlib-dependent-issues-bot
Copy link
Collaborator

This PR/issue depends on:

@eric-wieser eric-wieser added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels May 2, 2023
@YaelDillies YaelDillies added awaiting-review The author would like community review of the PR and removed awaiting-author A reviewer has asked the author a question or requested changes labels May 3, 2023
@@ -410,16 +409,20 @@ lemma sup_inf_distrib_right (s : finset ι) (f : ι → α) (a : α) :
s.sup f ⊓ a = s.sup (λ i, f i ⊓ a) :=
by { rw [_root_.inf_comm, s.sup_inf_distrib_left], simp_rw _root_.inf_comm }

protected lemma disjoint_sup_right : disjoint a (s.sup f) ↔ ∀ i ∈ s, disjoint a (f i) :=
by simp only [disjoint_iff, sup_inf_distrib_left, sup_eq_bot_iff]
protected lemma disjoint_sup_right : disjoint a (s.sup f) ↔ ∀ ⦃i⦄, i ∈ s → disjoint a (f i) :=
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes are worth a remark in the description

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also explain why you did this!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it clear? You don't want to end up with overly explicit binders after rewriting a local assumption.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that argument probably leads you replacing every ∀ i ∈ s, in mathlib with ∀ ⦃i⦄, i ∈ s →...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not quite all, no. But, yes, I think that's a good thing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was there ever a Zulip thread about this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not about iffs specifically. But it really is just an extension of the rule we've been applying elsewhere. Note that the reason I'm modifying this one in particular is because the one side implication isn't stated as a separate lemma with i an implicit argument. And since changing the binder implicitness fixes my use case without introducing a redundant lemma, we might as well.

Copy link
Member

@eric-wieser eric-wieser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors d+

@bors
Copy link

bors bot commented May 9, 2023

✌️ YaelDillies can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@leanprover-community-bot-assistant leanprover-community-bot-assistant added delegated The PR author may merge after reviewing final suggestions. and removed awaiting-review The author would like community review of the PR labels May 9, 2023
@YaelDillies
Copy link
Collaborator Author

bors merge

bors bot pushed a commit that referenced this pull request May 10, 2023
Dualise a few existing lemmas, protect `finset.sup_eq_bot_iff`/`finset.inf_eq_top_iff`, move `map_finset_sup`/`map_finset_inf` from `order.hom.lattice` to `data.finset.lattice`, make binders semi-implicit in `finset.disjoint_sup_left` and friends to avoid overly explicit binders in a local assumption after rewriting.



Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@bors
Copy link

bors bot commented May 11, 2023

Pull request successfully merged into master.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot changed the title feat(data/finset/lattice): Distributivity lemmas [Merged by Bors] - feat(data/finset/lattice): Distributivity lemmas May 11, 2023
@bors bors bot closed this May 11, 2023
@bors bors bot deleted the finset_compl_sup branch May 11, 2023 02:08
YaelDillies added a commit to leanprover-community/mathlib4 that referenced this pull request May 12, 2023
bors bot pushed a commit to leanprover-community/mathlib4 that referenced this pull request May 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated The PR author may merge after reviewing final suggestions. modifies-synchronized-file This PR touches a files that has already been ported to mathlib4, and may need a synchronization PR. t-order Order hierarchy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants