Skip to content
This repository was archived by the owner on Nov 6, 2026. It is now read-only.

[Merged by Bors] - feat(data/finset/lattice): Distributivity lemmas - #18611

Closed
YaelDillies wants to merge 13 commits into
masterfrom
finset_compl_sup
Closed

YaelDillies wants to merge 13 commits into
masterfrom
finset_compl_sup

Conversation

@YaelDillies

@YaelDillies YaelDillies commented Mar 18, 2023 •

Copy link
Copy Markdown
Collaborator

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
@kim-em kim-em 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
Copy Markdown
Member

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

@YaelDillies
YaelDillies requested a review from eric-wieser April 30, 2023 08:26
Comment thread src/data/finset/lattice.lean Resolved
@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
@ghost ghost 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
@ghost

ghost commented Apr 30, 2023

Copy link
Copy Markdown

This PR/issue depends on:

Comment thread src/data/finset/lattice.lean Resolved
Comment thread src/data/finset/lattice.lean Resolved
Comment thread src/data/finset/lattice.lean Resolved
Comment thread src/data/finset/lattice.lean Resolved
@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
Comment thread src/data/finset/lattice.lean Resolved

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

Comment thread src/data/finset/lattice.lean Resolved
Comment thread src/data/finset/lattice.lean Resolved
Comment thread src/data/finset/lattice.lean Resolved

@eric-wieser eric-wieser left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

bors d+

@bors

bors Bot commented May 9, 2023

Copy link
Copy Markdown

✌️ 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
Copy Markdown
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 <[email protected]>
@bors

bors Bot commented May 11, 2023

Copy link
Copy Markdown

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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.

4 participants