How to compare/3 without surprises on non-ground terms?

At least to me the two cyclic terms X = [a,b|X] and Y = [b,a|Y] look identical. It is an arbitrary choice where you choose to start writing them down. I am trying to say that cyclic terms are comparable syntactically (maybe, in the source code) but definitely not structurally (or as they are represented in the machine), unless we want to use accidental properties like how it was written or where in memory it resides.

None of what I wrote is rigorous enough to be taken seriously.