Zulip Chat Archive

Stream: Is there code for X?

Topic: inversion of a group with zero as a monoid_with_zero_hom?


Michael Stoll (Apr 16 2022 at 17:55):

If G is a comm_group_with_zero, then group_with_zero.inv : G → G is a monoid_with_zero_hom. Is this available in mathlib somewhere?

Michael Stoll (Apr 16 2022 at 18:04):

def inv_as_monoid_with_zero_hom {G : Type*} [comm_group_with_zero G] : G →*₀ G :=
{ to_fun := group_with_zero.inv, map_zero' := inv_zero, map_one' := inv_one,
  map_mul' := λ x y, mul_inv₀ }

María Inés de Frutos Fernández (Apr 16 2022 at 18:14):

Could you use docs#inv_monoid_with_zero_hom?


Last updated: Dec 20 2023 at 11:08 UTC