This question is created taking reference from this question. I am aware of Chinese remainder theorem and used that to solve problems of this type. However, answer given in the site referred uses a special property and I want to see how it is derived. Therefore, posting it as question here. I am rewriting the question and answer in a general form and I hope i am writing in the right way (note that my knowledge on modular arithmetic is limited).
Consider
$N \equiv r_1 \pmod {d_1}\\N \equiv r_2 \pmod {d_2}\\N \equiv r_3 \pmod {d_3}\\N \equiv r_4 \pmod {d_4}\\$
So, to find N, we can use Chinese remainder theorem. But, suppose
$d_1-r_1=d_2-r_2=d_3-r_3=d_4-r_4=k$
So, based on the answer provided in the referred site,
the required number can be written as
$N = m \times LCM(d_1,d_2,d_3,d_4)-k$ where m is a positive integer
How this can be proven mathematically?
My attempt
I have rewritten it in the following form and was trying to solve.
$N=n_1d_1+r_1\\N=n_2d_2+r_2\\N=n_3d_3+r_3\\N=n_4d_4+r_4$
Let $LCM(d_1,d_2,d_3,d_4)=L$
Then
$N=L+r_1\\N=L+r_2\\N=L+r_3\\N=L+r_4$
please help.