This page is a sub-page of our page on Some basic algebraic concepts.
///////
Formalizing the notion of direct sum
Let X be an arbitrary set and let R be a ring with unit element. If {f : X \, \rightarrow \, R} , we define the support \mathrm{supp} f of the function f as
\mathrm{supp} f \, \stackrel {\mathrm{def}}{=} \{ x \in X \, : \, f(x) \neq 0 \} \, .
Definition: The direct sum of R over X is the set of all functions from X to R with finite support. It is denoted by {\bigoplus \atop { X } } R or {\coprod \atop { X } } R .
Let f, g \in {\bigoplus \atop { X } } R and r \in R . If we define
(f+g)(x) \stackrel {\mathrm{def}}{=} f(x) + g(x) \, , \text{ and} \, (rf)(x) \stackrel {\mathrm{def}}{=} r(f(x)) \, ,
we turn {\bigoplus \atop { X } } R into an R -module. If R is a field, then these definitions turn {\bigoplus \atop { X } } R into a vector space over R.
If x \in X we can define the characteristic function \hat{x} of the element x as the function {\hat{x} : X \, \rightarrow \, R} , which takes the values \hat{x}(x) = 1 and \hat{x}( y) = 0 if y \neq x. Using this definition, we can write a function f \in {\bigoplus \atop { X } } R as
f \equiv {\sum\limits_{x \in X}^{ \text {} }}f(x) \hat{x}
where, since \mathrm{supp} f is finite, the sum only contains a finite number of terms.
Notation: This sum is most often written as
f \equiv {\sum\limits_{x \in X}^{ \text {} }}f(x) x \, , \, \text {or} \, f \equiv {\sum\limits_{x \in X}^{ \text {} }}{f_x} x
and it is interpreted as a formal (or direct) sum of elements in X with coefficients in R . Hence, a more “semantically precise” way of writing this direct sum (which is often used in abstract algebra) is
f \equiv {\bigoplus\limits_{x \in X}^{ \text {} }}f(x) x \, .
The R module of Lists (of elements from an arbitrary set)
Let X be an arbitrary set and define the cartesian products of X inductively by X^0 \stackrel {\mathrm{def}}{=} \emptyset , X^1 \stackrel {\mathrm{def}}{=} X , X^{n+1} \stackrel {\mathrm{def}}{=} X \times X^n. The set List(X) of all finite lists of elements of x \in X is defined by
List(X) \stackrel {\mathrm{def}}{=} \bigcup\limits_{n \geq 0}^{ \text {}} X^n \, .
Let {\mathrm{concat} : List(X) \times List(X) \, \rightarrow \, List(X)} denote concatenation of lists, i.e.,
{List(X) \times List(X) \ni (x_1 x_2 \ldots x_m, y_1 y_2 \ldots y_n ) \, \mapsto \, x_1 x_2 \ldots x_m y_1 y_2 \ldots y_n \in List(X)} \, .
The operation \mathrm{concat} is a binary composition on List(X) that we will refer to as multiplication of lists. \mathrm{concat} is obviously associative, and the empty list \emptyset, which we can call 1, works as a unit element under \mathrm{concat}. Hence, with these definitions, (List(X), \mathrm{concat}) has the structure of a monoid, i.e., a semigroup with a unit element.
Terminology: The elements of List(X) are called monomials.
The non-commutative polynomial ring in the variables X over the ring R
Let M = List(X) and let R be a ring with unit element. We define
R\{X\} \stackrel {\mathrm{def}}{=} {\bigoplus\limits_{M}^{ \text {} }}R \, .
Terminology: An element p \in R\{X\} is called a polynomial with variables from X and coefficients from R.
We can write p as a formal sum of “scaled monomials”, i.e., as a sum of monomials m \in M with corresponding coefficients p_m \in R:
p = {\sum\limits_{m \in M}^{ \text {} }}{p_m} m \, ,
Terminology: Each scaled monomial {p_m} m is called a term of the polynomial p.
We will now define a multiplication \ast on R\{X\} which extends the multiplication \mathrm{concat} on M so that (R\{X\}, \ast) becomes a ring.
Definition: The multiplication {\ast : R\{X\} \times R\{X\} \, \rightarrow \, R\{X\}} is defined by:
R\{X\} \times R\{X\} \ni (f, g) \, \mapsto \, f \ast g \in {R\{X\}\, , \text{where} \, (f \ast g)(m) \stackrel {\mathrm{def}}{=}{\sum\limits_{m'm'' = m}^{ \text {} }f(m')g(m'')}}
Hence, when we compute f \ast g, we sum over each pair of monomials (m', m'') which satisfies the conditions m' \in \mathrm{supp} f \, , m'' \in \mathrm{supp} g, and m'm'' = m.
Notation: The multiplication \ast is most often expressed by concatenation of the factors, i.e., fg \,\stackrel {\mathrm{def}}{=} \, f \ast g. Moreover, if we regard f and g as formal sums, i.e.,
f = {\sum\limits_{m \in M}^{ \text {} }}{f_m} m \, , \text{ and } \, g = {\sum\limits_{m \in m}^{ \text {} }}{g_m} m \, ,
we get
fg = {\sum\limits_{m \in M}^{ \text {} }}f_{m'} g_{m''}m'm'' \, .
Here each monomial m \in M corresponds to a sum of all of its possible “factor monomials” m', m'', which satisfy m'm'' = m, i.e., m', and m'', concatenate to m.