Understanding a proof of "If $R$ is an integral domain, then $R[x]$ is an integral domain as well". Theorem: If $R$ is an integral domain, then $R[x]$ is an integral domain as well.
Proof:
Let $f(x)=a_0+a_1x+a_2x^2+\cdots+a_nx^n$ and $g(x)=b_0+b_1x+b_2x^2+\cdots+b_mx^m$ be two elements of $R[x]$. Let $0\leq i\leq n$ and $0\leq j\leq m$ such that $i$ & $j$ are the smalles numbers such that $a_i\ne 0$ & $b_j\ne 0$.
$f(x)\cdot g(x)=\sum_{i=0}^{n+m}{c_ix^i}.$
$c_{i+j}=\overbrace{a_{i+j}b_0+a_{i+j-1}b_1+\cdots +a_{i+1}b_{j-1}}^{=0} +\overbrace{a_ib_j}^{\ne 0}+\overbrace{a_{i-1}b_{j+1}+\cdots+a_0b_{i+j}}^{=0}$
$=a_i+b_j\ne 0\Longrightarrow f(x)g(x)\ne 0$


I don't know why $a_{i+j}b_0+a_{i+j-1}b_1+\cdots +a_{i+1}b_{j-1}=0$ and $a_{i-1}b_{j+1}+\cdots+a_0b_{i+j}=0$.

You probably mean $a_ib_j$, not the sum. Anyways, this looks simpler to me: we may assume the polynomials are not constants. Suppose that the leading coefficient of $f$ is $a$ and the leading coefficient of $g$ is $b$, both nonzero. Then the leading coefficient of $fg$ is $ab$, and this is not zero.
