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
Conversation
Can you merge master? Feel free to ping me on this one, it looks straightforward to review. |
This PR/issue depends on:
|
@@ -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) := |
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.
These changes are worth a remark in the description
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.
Please also explain why you did this!
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.
Isn't it clear? You don't want to end up with overly explicit binders after rewriting a local assumption.
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.
I think that argument probably leads you replacing every ∀ i ∈ s,
in mathlib with ∀ ⦃i⦄, i ∈ s →
...
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.
Not quite all, no. But, yes, I think that's a good thing.
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.
Was there ever a Zulip thread about this?
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.
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.
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.
bors d+
✌️ YaelDillies can now approve this pull request. To approve and merge a pull request, simply reply with |
bors merge |
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>
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. If you want to switch to GitHub's built-in merge queue, visit their help page. |
Match leanprover-community/mathlib#18611 [`data.finset.lattice`@`9d684a893c52e1d6692a504a118bfccbae04feeb`..`2d44d6823a96f9c79b7d1ab185918377be663424`](https://leanprover-community.github.io/mathlib-port-status/file/data/finset/lattice?range=9d684a893c52e1d6692a504a118bfccbae04feeb..2d44d6823a96f9c79b7d1ab185918377be663424)
Match leanprover-community/mathlib#18611 [`data.finset.lattice`@`9d684a893c52e1d6692a504a118bfccbae04feeb`..`2d44d6823a96f9c79b7d1ab185918377be663424`](https://leanprover-community.github.io/mathlib-port-status/file/data/finset/lattice?range=9d684a893c52e1d6692a504a118bfccbae04feeb..2d44d6823a96f9c79b7d1ab185918377be663424)
Dualise a few existing lemmas, protect
finset.sup_eq_bot_iff
/finset.inf_eq_top_iff
, movemap_finset_sup
/map_finset_inf
fromorder.hom.lattice
todata.finset.lattice
, make binders semi-implicit infinset.disjoint_sup_left
and friends to avoid overly explicit binders in a local assumption after rewriting.