English
The construction MonoidAlgebra can be endowed with a Semiring structure when M is a monoid; the multiplication and addition satisfy the semiring axioms with the usual definitions.
Русский
Конструкция MonoidAlgebra может быть наделена структурой полугруппы кольцо, когда M образует моноид; сложение и умножение удовлетворяют аксиомам полугруппы кольцо по обычным определениям.
LaTeX
$$$\operatorname{Semiring}(\operatorname{MonoidAlgebra}\; R\; M)$$$
Lean4
@[to_additive]
instance semiring : Semiring (MonoidAlgebra R M) where