Zulip Chat Archive

Stream: new members

Topic: AddMonoid and Monoid


Bjørn Kjos-Hanssen (May 11 2025 at 06:32):

I feel like every additive monoid should be viewable as a (multiplicative) monoid. How to do this, in a way that doesn't lead to conflicting instances down the line?

import Mathlib
instance {E : Type u_2}  [NormedAddCommGroup E] :
    AddMonoid E := AddLeftCancelMonoid.toAddMonoid

instance {E : Type u_2} [NormedAddCommGroup E] : Monoid E := by sorry

Matt Diamond (May 11 2025 at 06:44):

Are you looking for docs#Multiplicative or something else?

Bjørn Kjos-Hanssen (May 11 2025 at 06:47):

How would you use that here?

Matt Diamond (May 11 2025 at 06:49):

Well, you wouldn't have an instance of Monoid E, but you would (and do) have an instance of Monoid (Multiplicative E) and the ability to convert back and forth

Matt Diamond (May 11 2025 at 06:51):

since you have NormedAddCommGroup E, you automatically get a NormedCommGroup (Multiplicative E) instance

Bjørn Kjos-Hanssen (May 11 2025 at 06:52):

Ah, very good!

Notification Bot (May 11 2025 at 07:17):

Bjørn Kjos-Hanssen has marked this topic as resolved.

Notification Bot (May 12 2025 at 02:38):

Bjørn Kjos-Hanssen has marked this topic as unresolved.

Bjørn Kjos-Hanssen (May 12 2025 at 02:38):

Still struggling with this:

import Mathlib
def extracted_1.{u_2, u_1} {𝕜 : Type u_1} (E : Fin 2  Type u_2) [inst : RCLike 𝕜]
  [inst_1 : (i : Fin 2)  NormedAddCommGroup (E i)] :
  CommMonoid (Monoid.PushoutI fun i  MonoidHom.inl 𝕜 (Multiplicative (E i))) := by
  sorry

Certainly seems like a pushout of commutative monoids should be commutative, but how to prove?

Kevin Buzzard (May 12 2025 at 06:10):

Are you sure that's true? Doesn't sound true to me. Free product of two copies of the integers is free group on two generators

Kevin Buzzard (May 12 2025 at 06:10):

docs#Monoid.PushoutI

Kevin Buzzard (May 12 2025 at 06:12):

This is amalgamated product, what you're asking is not true

Bjørn Kjos-Hanssen (May 12 2025 at 06:16):

Thanks @Kevin Buzzard I am really trying to do pushouts of vector spaces but apparently got off track!


Last updated: Dec 20 2025 at 21:32 UTC