I am struggling with a proof from my discrete mathematics class. We have to prove that multiset union is idempotent, i.e. $M \sqcup M = M$, where $\sqcup $ denotes the union of multisets.
We have defined multiset union (using lambda notation) as $M_1 \sqcup M_2 := \lambda x : X \cdot M_1(x) + M_2(x)$, which means that the union operated on a value will output the number of times the value appears in their union. However, if we apply union to the same set, won't the number of times a value appears in the union be twice that of the multiset on its own? How do I go about proving this?
Edit: Is this even correct? Might there be a mistake in the book?