Total algebra

In abstract algebra, the total algebra of a monoid is a generalization of the monoid ring that allows for infinite sums of elements of a ring. Suppose that "S" is a monoid with the property that, for all formula_1, there exist only finitely many ordered pairs formula_2 for which formula_3. 
Let "R" be a ring. Then the total algebra of "S" over "R" is the set formula_4 of all functions formula_5 with the addition law given by the (pointwise) operation:
and with the multiplication law given by:
The sum on the right-hand side has finite support, and so is well-defined in "R".
These operations turn formula_4 into a ring. There is an embedding of "R" into formula_4, given by the constant functions, which turns formula_4 into an "R"-algebra.
An example is the ring of formal power series, where the monoid "S" is the natural numbers. The product is then the Cauchy product.