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] - refactor: drop some *HomClasses #10544

Closed
wants to merge 2 commits into from
Closed

Conversation

urkud
Copy link
Member

@urkud urkud commented Feb 14, 2024

Drop classes that mix OrderHomClass with algebraic hom classes.


Open in Gitpod

Drop classes that mix `OrderHomClass` with algebraic hom classes.
@[to_additive (attr := coe)
"Turn an element of a type `F` satisfying `OrderAddMonoidHomClass F α β` into an actual
`OrderAddMonoidHom`. This is declared as the default coercion from `F` to `α →+o β`."]
def OrderMonoidHomClass.toOrderMonoidHom [OrderMonoidHomClass F α β] (f : F) : α →*o β :=
{ (f : α →* β) with monotone' := monotone f }
def OrderMonoidHomClass.toOrderMonoidHom [OrderHomClass F α β] [MonoidHomClass F α β] (f : F) :
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's a bit weird to put this in the OrderMonoidHomClass namespace given that such a class doesn't exist anymore, but I don't have a better suggestion.

Copy link
Member

Choose a reason for hiding this comment

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

How about

Suggested change
def OrderMonoidHomClass.toOrderMonoidHom [OrderHomClass F α β] [MonoidHomClass F α β] (f : F) :
def FunLike.toOrderMonoidHom [OrderHomClass F α β] [MonoidHomClass F α β] (f : F) :

Copy link
Member Author

Choose a reason for hiding this comment

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

Let me do it for all bundled homs at once.

@j-loreaux j-loreaux added awaiting-author A reviewer has asked the author a question or requested changes t-algebra Algebra (groups, rings, fields etc) t-order Order hierarchy labels Feb 14, 2024
@urkud urkud 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 Feb 15, 2024
@urkud urkud requested a review from j-loreaux February 15, 2024 06:00
Copy link
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

Very nice!

bors d+

@mathlib-bors
Copy link

mathlib-bors bot commented Feb 15, 2024

✌️ urkud 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-mathlib4-bot leanprover-community-mathlib4-bot added delegated and removed awaiting-review The author would like community review of the PR labels Feb 15, 2024
@urkud
Copy link
Member Author

urkud commented Feb 15, 2024

bors merge

@github-actions github-actions bot added the ready-to-merge This PR has been sent to bors. label Feb 15, 2024
mathlib-bors bot pushed a commit that referenced this pull request Feb 15, 2024
Drop classes that mix `OrderHomClass` with algebraic hom classes.
@mathlib-bors
Copy link

mathlib-bors bot commented Feb 15, 2024

Build failed (retrying...):

mathlib-bors bot pushed a commit that referenced this pull request Feb 15, 2024
Drop classes that mix `OrderHomClass` with algebraic hom classes.
@mathlib-bors
Copy link

mathlib-bors bot commented Feb 15, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title refactor: drop some *HomClasses [Merged by Bors] - refactor: drop some *HomClasses Feb 15, 2024
@mathlib-bors mathlib-bors bot closed this Feb 15, 2024
@mathlib-bors mathlib-bors bot deleted the YK-hom-class branch February 15, 2024 18:09
riccardobrasca pushed a commit that referenced this pull request Feb 18, 2024
Drop classes that mix `OrderHomClass` with algebraic hom classes.
dagurtomas pushed a commit that referenced this pull request Mar 22, 2024
Drop classes that mix `OrderHomClass` with algebraic hom classes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated ready-to-merge This PR has been sent to bors. t-algebra Algebra (groups, rings, fields etc) t-order Order hierarchy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants