Does there exist a multiline equation environment which automatically shows the changes from one line to the other?
I am thinking of an environment that would take inputs like
E[d] & = \sum_{d=0}^{\infty} \frac{\lambda^d}{d!} d e^{-\lambda}\\
& = \sum_{d=1}^{\infty} \frac{\lambda^d}{d!} d e^{-\lambda}\\
& = \lambda \sum_{d=1}^{\infty} \frac{\lambda^{d-1}}{d!} d e^{-\lambda}\\
& = \lambda \sum_{d=1}^{\infty} \frac{\lambda^{d-1}}{(d-1)!} e^{-\lambda}\\
& = \lambda \sum_{d=0}^{\infty} \frac{\lambda^{d}}{(d)!} e^{-\lambda}\\
& = \lambda\\
and output something like
Ideally, the math in the output should not be distorted as in the above example (e.g. the (d-1) in exponent should still have exponent size).
Edit : I am looking for an environment that would produce this kind of output automatically, without having to manually identify the changes and tag them with a certain color (which is what I did using colorbox to generate the example).