Zulip Chat Archive
Stream: Is there code for X?
Topic: x is invertible if it has left inverse
Kenny Lau (Jun 12 2025 at 13:51):
import Mathlib
def Invertible.ofMulRight {α : Type u} [CommMonoid α] {a : α} (b : α) (h : a * b = 1) : Invertible a :=
⟨b, h ▸ mul_comm b a, h⟩
def Invertible.ofMulLeft {α : Type u} [CommMonoid α] {a : α} (b : α) (h : b * a = 1) : Invertible a :=
⟨b, h, h ▸ mul_comm a b⟩
Eric Wieser (Jun 12 2025 at 13:53):
These are defs so the name should avoid _
Kenny Lau (Jun 12 2025 at 13:54):
edited
Last updated: Dec 20 2025 at 21:32 UTC