Symmetry of local intersection lengths with a kernel correction
Let $A$ be a two-dimensional Noetherian local domain and let $a,b\in A\setminus\{0\}$ satisfy $\ell_A(A/(a,b))<\infty$. Put $$K_a(b)=\ker(b:A/(a)\to A/(a)),$$ and, for a prime $\mathfrak p$, put $o_{\mathfrak p}(a)=\ell_{A_{\mathfrak p}}(A_{\mathfrak p}/aA_{\mathfrak p})$ and $o^{\mathfrak p}(b)=\ell_{A/\mathfrak p}((A/\mathfrak p)/b(A/\mathfrak p))$. Then $$\ell_A(A/(a,b))=\ell_A K_a(b)+\sum_{\substack{\operatorname{ht}\mathfrak p=1\\a\in\mathfrak p}}o_{\mathfrak p}(a)o^{\mathfrak p}(b),$$ $$\ell_A K_a(b)=\ell_A K_b(a)<\infty,$$ and the displayed prime sum equals the corresponding sum with $a,b$ exchanged. Lengths and sums are taken in $\mathbb N\cup\{\infty\}$; the sums are finitely supported sums, with value zero if the nonzero support is infinite.
Here multiplication on a principal quotient may have a kernel, retained in the displayed correction term.