Module docstring
{"# The embedding of a cancellative semigroup into itself by multiplication by a fixed element. "}
{"# The embedding of a cancellative semigroup into itself by multiplication by a fixed element. "}
mulLeftEmbedding
      definition
     [Mul G] [IsLeftCancelMul G] (g : G) : G ↪ G
        /-- If left-multiplication by any element is cancellative, left-multiplication by `g` is an
embedding. -/
@[to_additive (attr := simps)
      "If left-addition by any element is cancellative, left-addition by `g` is an
        embedding."]
def mulLeftEmbedding [Mul G] [IsLeftCancelMul G] (g : G) : G ↪ G where
  toFun h := g * h
  inj' := mul_right_injective g
        mulRightEmbedding
      definition
     [Mul G] [IsRightCancelMul G] (g : G) : G ↪ G
        /-- If right-multiplication by any element is cancellative, right-multiplication by `g` is an
embedding. -/
@[to_additive (attr := simps)
      "If right-addition by any element is cancellative, right-addition by `g` is an
        embedding."]
def mulRightEmbedding [Mul G] [IsRightCancelMul G] (g : G) : G ↪ G where
  toFun h := h * g
  inj' := mul_left_injective g
        mulLeftEmbedding_eq_mulRightEmbedding
      theorem
     [CommMagma G] [IsCancelMul G] (g : G) : mulLeftEmbedding g = mulRightEmbedding g
        @[to_additive]
theorem mulLeftEmbedding_eq_mulRightEmbedding [CommMagma G] [IsCancelMul G] (g : G) :
    mulLeftEmbedding g = mulRightEmbedding g := by
  ext
  exact mul_comm _ _