Assume a set which contains non-unique numbers. That is $X = \{A \mid (\exists i,j)[A_i=A_j] \}$. There is another set which contains the unique values from X with a weight associated with each unique value. For example, if $X=\{10,10,20\}$, then $U=\{(10,0.5),(20,0.5)\}$. I would like to use set-builder notation to write $U$. My initial thought is
$U = \left\{ (A^\prime,W) \mid (\forall i \neq j)[A^\prime_i \neq A^\prime_j] \right\}$ where $|U| \leq |X|$ (size of $U$ is definitely not larger than $X$) and $W_i=\Sigma(???)/\Sigma(A_i)$. I don't know how to write the nominator for $W_i$ to say "summation of those $A_i$s which are equal".
Any idea on how to properly express that? If you think $X$ and $U$ need corrections, fell free to propose that.
P.S: There is no "set-builder" tag and I can not add that.