mathlib icon indicating copy to clipboard operation
mathlib copied to clipboard

feat(algebra/hom/centroid): Introduce the centroid of a (non-unital, non-associative) semiring

Open mans0954 opened this issue 3 years ago • 7 comments

Define the centroid of a (non-unital, non-associative) semiring and shows that it forms a semiring. The centroid of a (non-unital, non-associative) ring is a ring.

When the ring is prime, the centroid is commutative.

Co-authored-by: Yaël Dillies [email protected]


  • [x] depends on #15839

More general results are possible, but would require two sided ideals of non-unital, non-associative semirings, which has not yet been developed.

Open in Gitpod

mans0954 avatar Mar 16 '22 20:03 mans0954

@Vierkantor, @eric-wieser, @YaelDillies : I think Christopher is still waiting on a decision about whether or not to use old_structure_cmd.

j-loreaux avatar Jul 22 '22 20:07 j-loreaux

I think the ball was in @YaelDillies' court (https://github.com/leanprover-community/mathlib/pull/12746#discussion_r846250593), but perhaps we shouldn't be waiting since we have two maintainer votes for old_structure_cmd and plenty of time for Yaël to respond.

eric-wieser avatar Jul 22 '22 21:07 eric-wieser

@mans0954 , do you want to make these changes then? If you don't have time I can knock them out for you soon. Just say the word.

j-loreaux avatar Jul 23 '22 02:07 j-loreaux

Something seems to have changed with to_End_injective.semiring - possibly connected with #12182?

mans0954 avatar Jul 24 '22 07:07 mans0954

/- The `doc_blame` linter reports: -/
/- DEFINITIONS ARE MISSING DOCUMENTATION STRINGS: -/
-- algebra/hom/centroid.lean
#check @centroid_hom.to_add_monoid_hom /- def missing doc string -/
Error: centroid_hom.to_add_monoid_hom - def missing doc string
Error: Process completed with exit code 1.

Where do I need to add a doc string?

mans0954 avatar Jul 25 '22 03:07 mans0954

/- The `doc_blame` linter reports: -/
/- DEFINITIONS ARE MISSING DOCUMENTATION STRINGS: -/
-- algebra/hom/centroid.lean
#check @centroid_hom.to_add_monoid_hom /- def missing doc string -/
Error: centroid_hom.to_add_monoid_hom - def missing doc string
Error: Process completed with exit code 1.

Is this a bug? I found only one other case: https://github.com/leanprover-community/mathlib/blob/741d28519981f307f6f2621b44cb2156792c184a/src/algebra/order/absolute_value.lean#L32

alreadydone avatar Jul 25 '22 04:07 alreadydone

/- The `doc_blame` linter reports: -/
/- DEFINITIONS ARE MISSING DOCUMENTATION STRINGS: -/
-- algebra/hom/centroid.lean
#check @centroid_hom.to_add_monoid_hom /- def missing doc string -/
Error: centroid_hom.to_add_monoid_hom - def missing doc string
Error: Process completed with exit code 1.

Is this a bug? I found only one other case:

https://github.com/leanprover-community/mathlib/blob/741d28519981f307f6f2621b44cb2156792c184a/src/algebra/order/absolute_value.lean#L32

Thanks - that seems to have worked around it.

mans0954 avatar Jul 25 '22 15:07 mans0954

@eric-wieser Are you able to approve this now?

mans0954 avatar Aug 23 '22 21:08 mans0954

@eric-wieser Sorry to pester you again, but I was wondering if you might have a moment to approve this PR?

Thanks.

mans0954 avatar Sep 14 '22 05:09 mans0954

This PR has an approval, and all of the comments appear to have been resolved. Please can I have delegated permission to merge it @eric-wieser ?

mans0954 avatar Sep 20 '22 19:09 mans0954

I'm afraid I'm too time-constrained to refresh myself on the full context here. I don't think I have any major concerns here, so I'm happy to delegate to another maintainer (@jcommelin?) to give it a final pass.

The only thing that immediately comes to mind is the recent discussion on Zulip that mentioned this PR, which suggested another possible name for the objects described here, which might have more backing in literature. That's squarely outside my background though, so even if I could locate the thread, I'm in no place to make a call on it.

At any rate, names are easy to change later, and the current name is certainly good enough for now.

eric-wieser avatar Sep 20 '22 20:09 eric-wieser

Here is the thread.

YaelDillies avatar Sep 20 '22 21:09 YaelDillies

bors merge

jcommelin avatar Sep 21 '22 06:09 jcommelin

Pull request successfully merged into master.

Build succeeded:

bors[bot] avatar Sep 21 '22 10:09 bors[bot]