Two polynomials $r_1, r_2 \in R[X]$ are equal if and only if the cofficients $a_i, b_i$ are equal for all $i, 0 \leq i \leq n$ - Purely a definition? I've read that two polynomials $r_1, r_2 \in R[X]$ on the form $r = a_nX^n + ... + a_1X + a_0$ are equal if and only if the cofficients of $r_1, r_2$: $a_i, b_i$ are equal for all $i, 0 \leq i \leq n$. Here $R[X]$ denote the polynomial ring on $R$, where $R$ is a ring.
Is this purely a definition or can I proof this ? Can two polynomials with different cofficients achieve the same values for all $x \in R$ ?
I can write $a_nX^n + ... a_1X + a_0 = b_nX^n + ... b_1X + b_0$ set $X = 0$ and deduce $a_0 = b_0$. Then $a_nX^n + ... a_1X = b_nX^n + ... b_1X$ implies $X(a_nX^{n-1} + ... a_1) = X(b_nX^{n-1} + ... b_1)$ but now I can't conclude $a_1 = b_1$ ?
Thanks
 A: Yes, this is purely by definition. If you were to formally define/construct polynomials, you'd define $R[X]$ as the set of functions $r \colon {\mathbb N} \to R$ that have only finitely many non-zero elements (equipped with the suitable structure of a ring). The values $r(i)$ are the ''coefficients'' and two such functions are equal if all their ''coefficients'' are equal.
A: Purely by definition, as @Magdiragdag pointed out.
But beware: the subtlety here is that polynomials and polynomials functions are not necessarily the same thing!
Polynomials can be turned into functions if you "plug in" values for X.  But if the values for X lies in a finite field then it can happen that different polynomials give rise to the same polynomial function!
For example, take the field $Z_2 = \{0,1\}$ of residues mod 2, then $X^2$ and $X$ are different polynomials in $Z_2[X]$ (they have different coefficients) but the corresponding polynomial functions are the same, since $X^2 = X$ for $X = 0$ and $1$. More generally, the different polynomials $X^p$ and $X$ give rise to the same polynomial function for $X$ lying in the field $Z_p$ of residues mod p (p a prime), as an immediate consequence of Fermat's Little Theorem.
To go on with your argument and conclude that $a_1 = b_1$ in the polynomials seen as polynomial functions over R you must be able to choose a nonzero X in the field R which is not a root of neither $a_n X^{n−1}+\cdots+a_1$, nor $b_n X^{n−1}+\cdots+b_1$, which you can do safely if your ring R is an infinite field, such as the rationals, the reals or the complex numbers.
So, following your proof, for infinite fields R we get that polynomials in R[X] and polynomials functions with domain R are "the same thing". But this is not true for an arbitrary ring R, as the examples above point out.
