My lecture notes for minimum spanning trees say that:
A graph can have several minimum spanning trees but if the edge weights are distinct then the minimum spanning tree is unique. Without loss of generality, we can assume that the edge weights are distinct
I'm trying to convince myself that the distinct edge weights assumption in MST algorithms is a valid one but haven't made much progress. I thought about maybe considering the smallest absolute difference between two adjacent edge weights (call this $\delta$) and then let $\alpha = \delta / m$ where $m$ is the number of edges. If there's $k$ edges of the same weight $w$, order them arbitrarily and replace the edge weight by $w + i\times\alpha$ for $0\le i<k$. Then all edge weights are unique and any MST algorithm applied for these new weights should give a valid MST for the original weights. I'm not convinced that this works though.