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: s ∩ t * s ∪ t ⊆ s * t #1619

Closed
wants to merge 6 commits into from

Conversation

YaelDillies
Copy link
Collaborator

@YaelDillies YaelDillies added the mathlib3-pair This PR is a forward-port of a mathlib3 PR or part of one, either under review or recently merged label Jan 17, 2023
@semorrison semorrison added the awaiting-author A reviewer has asked the author a question or requested changes label Mar 26, 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 Mar 27, 2023
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.

Mostly looks good, though CI is failing

Mathlib/Data/Finset/NAry.lean Show resolved Hide resolved
Mathlib/Data/Finset/Pointwise.lean Outdated Show resolved Hide resolved
Mathlib/Data/Polynomial/RingDivision.lean Show resolved Hide resolved
Mathlib/Data/Set/NAry.lean Outdated Show resolved Hide resolved
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.

This should fix CI

Mathlib/Data/Finset/Pointwise.lean Outdated Show resolved Hide resolved
Mathlib/Data/Finset/Pointwise.lean Outdated Show resolved Hide resolved
Mathlib/Data/Finset/Pointwise.lean Outdated Show resolved Hide resolved
Mathlib/Data/Finset/Pointwise.lean Outdated Show resolved Hide resolved
Mathlib/Data/Finset/Pointwise.lean Outdated Show resolved Hide resolved
Mathlib/Data/Finset/Pointwise.lean Outdated Show resolved Hide resolved
Mathlib/Data/Finset/Pointwise.lean Outdated Show resolved Hide resolved
Comment on lines 2041 to 2042
@[to_additive (attr := simp)]
-- Porting note: should take priority over `Finite.toFinset_singleton`
@[to_additive (attr := simp high)]
Copy link
Member

Choose a reason for hiding this comment

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

As an explanation of what's going on here; lean reduces the definition of (1 : Set _) because it's hidden in an implicit argument. As a mwe:

import Mathlib.Data.Set.Pointwise.Finite
import Mathlib.Data.Finset.Pointwise


namespace Set

open scoped Pointwise

variable {α : Type _} [One α]

/-- A version of `toFinset` with an explicit `s` argument. -/
noncomputable def Finite.toFinset' (s : Set α) (hs : s.Finite) : Finset α := hs.toFinset

/-- A copy of `Finite.toFinset_singleton` -/
@[simp] lemma Finite.toFinset'_singleton (a : α) (hs : Set.Finite {a} := finite_singleton _) : hs.toFinset' _ = {a} :=
  Finite.toFinset_singleton _

-- ok
@[simp] theorem Finite.toFinset'_one (h : (1 : Set α).Finite := finite_one) : h.toFinset' _ = 1 :=
  Finite.toFinset_singleton _

-- rejected by linter
@[simp] theorem Finite.toFinset_one (h : (1 : Set α).Finite := finite_one) : h.toFinset = 1 :=
  Finite.toFinset_singleton _

end Set

#lint

I think this probably happened in Lean 3 too, but there the simp priority was automatically correct.

@eric-wieser
Copy link
Member

bors d+

Please merge once CI passes.

@bors
Copy link

bors bot commented Mar 27, 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.

@github-actions github-actions bot added delegated and removed awaiting-review The author would like community review of the PR labels Mar 27, 2023
@eric-wieser
Copy link
Member

bors merge

@github-actions github-actions bot added the ready-to-merge This PR has been sent to bors. label Mar 27, 2023
bors bot pushed a commit that referenced this pull request Mar 27, 2023
Match leanprover-community/mathlib#17961



Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com>
Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>
@bors
Copy link

bors bot commented Mar 27, 2023

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat: s ∩ t * s ∪ t ⊆ s * t [Merged by Bors] - feat: s ∩ t * s ∪ t ⊆ s * t Mar 27, 2023
@bors bors bot closed this Mar 27, 2023
@bors bors bot deleted the inter_mul_union_subset branch March 27, 2023 19:19
joelriou pushed a commit that referenced this pull request Mar 30, 2023
Match leanprover-community/mathlib#17961



Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com>
Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated mathlib3-pair This PR is a forward-port of a mathlib3 PR or part of one, either under review or recently merged ready-to-merge This PR has been sent to bors.
Projects
No open projects
Status: SHA added
Development

Successfully merging this pull request may close these issues.

None yet

5 participants