I am not from pure math background. I am working on an algorithm which works good for all the practical reasons based on the following assumption.
that, if ab = cd and a+b = c+d then, either a = c & b = d or a = d & b = c. where, $a,b,c,d$ $\in$ $\mathbb{Z}$
I am not sure if this is true in the all conditions, but if it's can anyone provide proof, why ?
Thanks in advance.
Addition -1 : Is this also true for pair of N numbers ?
Addition -2 (Answer for the above) - I think I got it, @saulspatz's proof can be generalized (already sufficient), we can say,
After proof since, $a = c $ & $b = d$ then, by saying $b = b1 + b2$ and $c = c1 + c2$ proof can be further generalized for the addition and multiplication of pair of $N$ such numbers.
$a1, a2,...aN \in \mathbb{Z}$
$b1, b2,....bN \in \mathbb{Z} $
Let $a+b=n=c+d$. Then $$ab=cd\implies a(n-a)=c(n-c)$$ so that $$an-a^2=cn-c^2,$$ or$$(a-c)n=a^2-c^2=(a-c)(a+c)$$
Either $a-c,$ and we are done, or $a-c\ne 0$ so we can cancel the $a-c$ to get $$n=a+c$$
Together with $n=aa+b$ this gives $b=c.$
In short, your assumption is correct.