Length decomposition in a finite algebra
Let $R$ be a commutative Noetherian local ring, $B$ a commutative $R$-algebra finite as an $R$-module, and $b\in B$. If $\ell_R(B/bB)<\infty$, then $$\ell_R(B/bB)=\sum_{\mathfrak n\in\operatorname{Max}B}\ell_{B_{\mathfrak n}}(B_{\mathfrak n}/bB_{\mathfrak n})\,\ell_R(B/\mathfrak n).$$ Here $\ell$ denotes module length; the sum is the finitely supported sum over maximal ideals.