Set that keeps unique categories of objects
There is no official operation that accomplishes what you want, but you can always define an operation $\cup_{\succ}$ which does so. Just define the operation in words.



If for some reason you want a "physical" implementation, then here is one way. Each set is a collection of pairs, i.e.
$$
\begin{align*}
S_1 &amp;= \{ (apple,apple), (orange,orange), (pear,pear) \}, \\
S_2 &amp;= \{ (apple,betterApple), (orange,orange), (banana,banana) \}.
\end{align*}
$$
Furthermore, there is some partial order $\prec$ such that $(x,y),(z,w)$ are comparable iff $x = z$. When you take the union $S_1 \cup S_2$, you get
$$
S_1 \cup S_2 = \{ (apple,apple), (apple,betterApple), (orange,orange), (pear,pear), (banana,banana) \}.
$$
Then you can define a function
$$
\phi(S) = \{ x \in S : \text{ no $y \in S$ satisfies $y \succ x$ } \}.
$$
What you want is $\phi(S_1 \cup S_2)$.