I have an equation like this: $(i_1 \cdot x) \oplus (i_2 \cdot x) = r$ where $i_1, i_2,$ and $r$ are known values and $\oplus$ is xor.
What I need is that same equation but expressed as $i_3 \cdot x = r$ where $i_3$ should incorporate both $i_1$ and $i_2$ in some way
By doing some tests with random values for $x$, I ended up finding that doing $(i_1\cdot x) \oplus (i_2 \cdot x)$ is the same as doing $x \cdot (i_1 \oplus i_2) + \text{remainder}$.
I got this from the distributive property which says that $a\cdot x + b\cdot x = x(a+b)$ but this doesn't seem to work with the $\oplus$ operator.
The workaround with the remainder doesn’t work for me because it adds a second unknown to the equation which I can't even predict.
Is there another way to do this or something I missed?
The distributive law $(a \oplus b)x = ax \oplus bx$ holds. Indeed \begin{align} ax \oplus bx &= ax(bx)' + (ax)'bx \\ &= ax(b' + x') + (a' + x')bx \\ &= axb' + axx' + a'bx + bxx'\\ &= ab'x + a'bx\\ &= (ab' + a'b)x\\ &= (a \oplus b)x \end{align}
The counterpart for sets is that intersection distributes over symmetric difference.