Reduce a sequence with a stack: if the next color equals the top, pop; otherwise push. Equal-pair cancellation has a unique reduced result. One proof is local confluence: disjoint deletions commute, and the only overlap is three equal colors, where either deletion leaves the same one color. Since every deletion shortens the sequence, these local agreements imply uniqueness.
If some cards are kept, every deleted gap before, between, or after them must reduce to empty. Conversely, if all these gaps reduce to empty, delete each gap internally and obtain the kept sequence.