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: Port/Data.Finset.Pointwise #1911

Closed
wants to merge 24 commits into from

Conversation

arienmalec
Copy link
Collaborator

@arienmalec arienmalec commented Jan 28, 2023

Mathbin -> Mathlib

fix certain import statements

move "by" to end of line

add import to Mathlib.lean
@arienmalec arienmalec added help-wanted The author needs attention to resolve issues mathlib-port This is a port of a theory file from mathlib. labels Jan 28, 2023
@LukasMias
Copy link
Collaborator

Opened a Zulip thread on some of the to_additive failures in this file: https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/to_additive.20for.20generated.20lemmas

@semorrison semorrison added the blocked-by-other-PR This PR depends on another PR to Mathlib label Jan 30, 2023
bors bot pushed a commit that referenced this pull request Jan 30, 2023
A misaligned `to_additive` causes some proofs to fail in #1911. No backport needed, the misalign happened due to a mathlib4 exclusive mistake as I understand.
@semorrison semorrison removed the blocked-by-other-PR This PR depends on another PR to Mathlib label Jan 30, 2023
@semorrison
Copy link
Contributor

This PR/issue depends on:

@LukasMias
Copy link
Collaborator

Finset.vsub apparently used to be a dangerous instance, due to the β in VSub α β being an outParam and hence producing subgoals of the form [Decidable ?α]. The usual tricks failed me, but switching around VSub α β and Decidable α works. Though this feels like something that could break things down the line & might need backporting? Some expert opinion would be appreciated, maybe there's a better fix, too.

@arienmalec arienmalec removed the help-wanted The author needs attention to resolve issues label Jan 31, 2023
Mathlib/Data/Finset/Pointwise.lean Outdated Show resolved Hide resolved
#align finset.image_add Finset.image_add

/-- The singleton operation as a `MulHom`. -/
@[to_additive "The singleton operation as an `add_hom`."]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@[to_additive "The singleton operation as an `add_hom`."]
@[to_additive "The singleton operation as an `AddHom`."]

Mathlib/Data/Finset/Pointwise.lean Outdated Show resolved Hide resolved
scoped[Pointwise] attribute [instance] Finset.nsmul Finset.npow Finset.zsmul Finset.zpow

/-- `Finset α` is a `Semigroup` under pointwise operations if `α` is. -/
@[to_additive "`Finset α` is an `add_semigroup` under pointwise operations if `α` is. "]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@[to_additive "`Finset α` is an `add_semigroup` under pointwise operations if `α` is. "]
@[to_additive "`Finset α` is an `AddSemigroup` under pointwise operations if `α` is. "]

#align finset.add_semigroup Finset.addSemigroup

/-- `Finset α` is a `CommSemigroup` under pointwise operations if `α` is. -/
@[to_additive "`Finset α` is an `add_comm_semigroup` under pointwise operations if `α` is. "]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@[to_additive "`Finset α` is an `add_comm_semigroup` under pointwise operations if `α` is. "]
@[to_additive "`Finset α` is an `AddCommSemigroup` under pointwise operations if `α` is. "]

variable [MulOneClass α]

/-- `Finset α` is a `MulOneClass` under pointwise operations if `α` is. -/
@[to_additive "`Finset α` is an `add_zero_class` under pointwise operations if `α` is."]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@[to_additive "`Finset α` is an `add_zero_class` under pointwise operations if `α` is."]
@[to_additive "`Finset α` is an `AddZeroClass` under pointwise operations if `α` is."]

Comment on lines 770 to 771
/-- The singleton operation as a `monoid_hom`. -/
@[to_additive "The singleton operation as an `add_monoid_hom`."]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
/-- The singleton operation as a `monoid_hom`. -/
@[to_additive "The singleton operation as an `add_monoid_hom`."]
/-- The singleton operation as a `MonoidHom`. -/
@[to_additive "The singleton operation as an `AddMonoidHom`."]

Comment on lines 789 to 790
/-- The coercion from `Finset` to `set` as a `monoid_hom`. -/
@[to_additive "The coercion from `Finset` to `set` as an `add_monoid_hom`."]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
/-- The coercion from `Finset` to `set` as a `monoid_hom`. -/
@[to_additive "The coercion from `Finset` to `set` as an `add_monoid_hom`."]
/-- The coercion from `Finset` to `Set` as a `MonoidHom`. -/
@[to_additive "The coercion from `Finset` to `Set` as an `AddMonoidHom`."]

Comment on lines 810 to 811
/-- Lift a `monoid_hom` to `Finset` via `image`. -/
@[to_additive "Lift an `add_monoid_hom` to `Finset` via `image`", simps]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
/-- Lift a `monoid_hom` to `Finset` via `image`. -/
@[to_additive "Lift an `add_monoid_hom` to `Finset` via `image`", simps]
/-- Lift a `MonoidHom` to `Finset` via `image`. -/
@[to_additive "Lift an `AddMonoidHom` to `Finset` via `image`", simps]

#align finset.coe_pow Finset.coe_pow

/-- `Finset α` is a `Monoid` under pointwise operations if `α` is. -/
@[to_additive "`Finset α` is an `add_monoid` under pointwise operations if `α` is. "]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@[to_additive "`Finset α` is an `add_monoid` under pointwise operations if `α` is. "]
@[to_additive "`Finset α` is an `AddMonoid` under pointwise operations if `α` is. "]

@jcommelin jcommelin added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review labels Jan 31, 2023
@arienmalec
Copy link
Collaborator Author

I'll just run fix-comments.sh here -- may have forgotten this step.

@arienmalec arienmalec added awaiting-review and removed awaiting-author A reviewer has asked the author a question or requested changes labels Jan 31, 2023
@jcommelin
Copy link
Member

@arienmalec unfortunately fix-comments.py doesn't know how to fix the docstrings passed to to_additive. So please fix those manually.

@arienmalec
Copy link
Collaborator Author

@arienmalec unfortunately fix-comments.py doesn't know how to fix the docstrings passed to to_additive. So please fix those manually.

Ah, I see it now. Done.

@jcommelin
Copy link
Member

Thanks 🎉

bors merge

@github-actions github-actions bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels Jan 31, 2023
bors bot pushed a commit that referenced this pull request Jan 31, 2023
port of data.finset.pointwise



Co-authored-by: Lukas Miaskiwskyi <lukas.mias@gmail.com>
@bors
Copy link

bors bot commented Jan 31, 2023

Build failed:

  • Build

@jcommelin
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Feb 1, 2023
port of data.finset.pointwise



Co-authored-by: Lukas Miaskiwskyi <lukas.mias@gmail.com>
@bors
Copy link

bors bot commented Feb 1, 2023

Build failed:

  • Build

@jcommelin
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Feb 1, 2023
port of data.finset.pointwise



Co-authored-by: Lukas Miaskiwskyi <lukas.mias@gmail.com>
Co-authored-by: Johan Commelin <johan@commelin.net>
@bors
Copy link

bors bot commented Feb 1, 2023

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat: Port/Data.Finset.Pointwise [Merged by Bors] - feat: Port/Data.Finset.Pointwise Feb 1, 2023
@bors bors bot closed this Feb 1, 2023
@bors bors bot deleted the port/Data.Finset.Pointwise branch February 1, 2023 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mathlib-port This is a port of a theory file from mathlib. ready-to-merge This PR has been sent to bors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants