Zulip Chat Archive

Stream: mathlib4

Topic: generalizing Abelianization to `Semigroup`/ any `Mul`


Edward van de Meent (Apr 12 2025 at 13:02):

Right now, in mathlib, docs#Abelianization is defined only for Groups, and definitionally equal to the group quotient by the commutator subgroup. For my personal project i need some free constructions like the free commutative monoid on a type, which could make use of a generalization of this concept, allowing us to define FreeCommMonoid A := Abelianization (FreeMonoid A) and similar.

However, since the "normal subgroup trick" for creating quotients only works on groups, generalizing this concept does require changing the definition to going through the more general docs#Con. Is this a desirable refactor?

Aaron Liu (Apr 12 2025 at 13:13):

You can define FreeCommMonoid A := Multiset A, though I do agree it would be desirable to generalize Abelianization

Edward van de Meent (Apr 12 2025 at 13:14):

i don't know that there is proper API for 1 and multiplication on Multiset though...

Edward van de Meent (Apr 12 2025 at 13:15):

aamof, i suspect there isn't

Aaron Liu (Apr 12 2025 at 13:15):

docs#Multiset.prod is your evaluation map.

Aaron Liu (Apr 12 2025 at 13:16):

Multiset has the additive 0 and +

Edward van de Meent (Apr 12 2025 at 13:16):

@loogle AddMonoid (Multiset ?A)

loogle (Apr 12 2025 at 13:16):

:shrug: nothing found

Aaron Liu (Apr 12 2025 at 13:18):

@loogle AddComnMonoid (Multiset _)

loogle (Apr 12 2025 at 13:18):

:exclamation: unknown identifier 'AddComnMonoid'

Aaron Liu (Apr 12 2025 at 13:18):

@loogle AddCommMonoid (Multiset _)

loogle (Apr 12 2025 at 13:18):

:shrug: nothing found

Aaron Liu (Apr 12 2025 at 13:19):

Found it: docs#Multiset.instAddCancelCommMonoid

Edward van de Meent (Apr 12 2025 at 13:20):

anywho, the precise construction of FreeCommMonoid is really a different question


Last updated: May 02 2025 at 03:31 UTC