If we define a color with transparency as $(r,g,b,a)$ (red,green,blue,alpha), with $r,g,b,a\in[0,1]$, how do we define $(r_1,g_1,b_1,a_1)+(r_2,g_2,b_2,a_2)$?
The definition must be closed, and must represent the computer science version of adding (blending) two alpha colors.
I tried taking alpha averages, but I don't seem to get closure. I also got that if $a_1r_1=a_2r_2$ then the displayed color is the same.
Addendum
I believe the answer is:
$$\big(\frac{a_1r_1+a_2r_2}{2},\frac{a_1g_1+a_2g_2}{2},\frac{a_1b_1+a_2b_2}{2},\frac{a_1+a_2}{2}\big)$$
It depends on what kind of mixing you denote with "$+$". If you overlay layers then it is not even a commutative operation (e.g., if both are opaque, the top layer always wins). To really "mix" we should consider what we expect to happen with a coloured background behind the single and the mixed layer. I assume that $(r,g,b,a)$ covering $(r',b',g')$ results in $(ar+(1-a)r',ag+(1-a)g',ab+(1-a)b')$. For $$ (r,g,b,a)=(r_1,g_1,b_1,a_1)+(r_2,g_2,b_2,a_2)$$ I assume we desire that $(ar+(1-a)r',ag+(1-a)g',ab+(1-a)b')$ should be the arithmetic average of $(a_1r_1+(1-a_1)r',a_1g_1+(1-a_1)g',a_1b_1+(1-a_1)b')$ and $(a_2r_2+(1-a_2)r',a_2g_2+(1-a_2)g',a_2b_2+(1-a_2)b')$. This implies that $1-a=\frac{(1-a_1)+(1-a_2)}{2}$, i.e., $$a=\frac{a_1+a_2}2$$ (from the background contribution). And then from $ar=\frac{a_1r_1+a_2r_2}2$ etc. we find $$r=\frac{a_1r_1+a_2r_2}{a_1+a_2} $$ i.e., weighted averages.