A program $P(\Sigma)$ takes input $\Sigma$, which is an nonempty multiset.
Let $\Phi$ be an empty multiset.
- Take any element $\sigma$ from $\Sigma$.
- If $\sigma \in \Phi$, return true.
- Otherwise, remove $\sigma$ from $\Sigma$ and put it in $\Phi$.
- If $\Sigma$ is now empty, return false. Otherwise, repeat from step 1.
My claim is that if $\Sigma$ is infinite, determining whether or not $P(\Sigma)$ halts is undecidable. Is this true?
The question was edited to refer to multisets. Here is a completely different kind of answer that shows that there is no way to decide effectively whether there is some element that appears more than one time in a multiset.
The proof shows that if there were such an element, then the halting problem would be decidable. It goes as follows. Given a number $e$, we need to determine if the Turing machine $T_e$ with index $e$ halts when it is run with no input.
Given $e$, we can make a multiset $A$ as follows. For all $s$, if $T_e$ halts in exactly $s$ steps then $s$ is put in $A$ twice, and otherwise put $s$ in $A$ once. The multiset is computable: given any $n$, we can tell whether $n$ is in $A$ (it always is), and we can tell how many times $n$ is in $A$ by checking whether $T_e$ halts in exactly $n$ steps.
We are assuming we have a procedure to tell whether there are any duplicates in a given multiset. So we can feed the set $A$ to that procedure, and it tells us. But by construction $A$ has a duplicate if and only if $T_e$ halts. So we can solve the halting problem as follows: given $e$, check whether $A = A_e$ has any duplicates. That would be a computable method to solve the halting problem if there was a computable way to solve the duplicates problem. But there is no computable method to solve the halting problem, so there must be no method to decide if a multiset has duplicates.