Polynomials Closed under Addition/Polynomials over Integral Domain/Proof 1

Proof
Let $p, q$ be polynomials in $x$ over $D$.

We can express them as:
 * $\ds p = \sum_{k \mathop = 0}^m a_k \circ x^k$
 * $\ds q = \sum_{k \mathop = 0}^n b_k \circ x^k$

where:
 * $(1): \quad a_k, b_k \in D$ for all $k$
 * $(2): \quad m, n \in \Z_{\ge 0}$, that is, are non-negative integers.

Suppose $m = n$.

Then:
 * $\ds p + q = \sum_{k \mathop = 0}^n a_k \circ x^k + \sum_{k \mathop = 0}^n b_k \circ x^k$

Because $\struct {R, +, \circ}$ is a commutative ring, it follows that:
 * $\ds p + q = \sum_{k \mathop = 0}^n \paren {a_k + b_k} \circ x^k$

which is also a polynomials in $x$ over $D$.

, suppose $m > n$.

Then we can express $q$ as:
 * $\ds \sum_{k \mathop = 0}^n b_k \circ x^k + \sum_{k \mathop = n \mathop + 1}^m 0_D \circ x^k$

Thus:
 * $\ds p + q = \sum_{k \mathop = 0}^n \paren {a_k + b_k} \circ x^k + \sum_{k \mathop = n \mathop + 1}^m a_k \circ x^k$

which is also a polynomials in $x$ over $D$.

Thus the sum of two polynomials in $x$ over $D$ is another polynomial in $x$ over $D$.

Hence the result.