An identity in an arbitrary commutative ring This fact might be either trivial, wrong, or well known.
Let $R$ be a commutative ring. Let $u_1,\dots,u_{s-1},u_s\in R$ and $m,M\in R$. Let us assume that $m,M$ satisfy
$$(m-u_1) \dots (m-u_{s-1})=0,$$
$$(M-m)(M-u_s)=0.$$
Question. Is it true that $M$ satisfies:
$$(M-u_1)\dots (M-u_{s-1})(M-u_{s})=0?$$
Obviously if $R$ has no zero divisors, then the answer is positive. It is evidently positive for $s=2$. I think it is still true for $s=3$ by a straightforward computation.
 A: This is actually trivial. Write $M-u_k=(M-m)+(m-u_k)$; this gives $(M-u_1)\dots (M-u_{s-1})\in R(M-m)$. Multiplying by $(M-u_s)$ gives $(M-u_1)\dots (M-u_{s})=0$.
A: Yes.
I claim that
(1) $\prod\limits_{i=1}^s \left(M-u_i\right) = \prod\limits_{i=1}^{t} \left(m-u_i\right) \cdot \prod\limits_{i=t+1}^{s} \left(M-u_i\right) $ for every $t \in \left\lbrace 0,1,...,s-1\right\rbrace$.
In fact, you can prove (1) by induction over $t$. The base case $t = 0$ is tautological. In the induction step, you need to show that
$\prod\limits_{i=1}^{t} \left(m-u_i\right) \cdot \prod\limits_{i=t+1}^{s} \left(M-u_i\right) = \prod\limits_{i=1}^{t-1} \left(m-u_i\right) \cdot \prod\limits_{i=t}^{s} \left(M-u_i\right)$
for every $t \in \left\lbrace 1,2,...,s-1\right\rbrace$. Clearly, this equation rewrites as
$\left(m-u_t\right)\left(M-u_s\right)A = \left(M-u_t\right)\left(M-u_s\right)A$,
where $A = \prod\limits_{i=1}^{t-1} \left(m-u_i\right) \cdot \prod\limits_{i=t+1}^{s-1} \left(M-u_i\right)$.
Thus, the induction will be complete once we show that
$\left(m-u_t\right)\left(M-u_s\right) = \left(M-u_t\right)\left(M-u_s\right)$.
But this is clear since
$\left(m-u_t\right)\left(M-u_s\right) - \left(M-u_t\right)\left(M-u_s\right)
= -\underbrace{\left(M-m\right)\left(M-u_s\right)}_{=0} = 0$.
So we have proven (1) by induction. Applying (1) to $t=s-1$, we obtain
$\prod\limits_{i=1}^s \left(M-u_i\right) = \underbrace{\prod\limits_{i=1}^{s-1} \left(m-u_i\right)}_{=\left(m-u_1\right)\left(m-u_2\right)...\left(m-u_{s-1}\right)=0} \cdot \prod\limits_{i=s}^{s} \left(M-u_i\right) = 0$,
qed.
