3 ms·
> An other assumption which is just that is that equality is transitive through f. This is not a generalised fact in any language which allows overriding equali
by masklinn 6y ago
> An other assumption which is just that is that equality is transitive through f. This is not a generalised fact in any language which allows overriding equality.
Simple example: hashsets equality & conversion to sequences.
Hashset equality, to the extent that it's present, is always based on the presence of items in the set.
But the iteration order of two hashsets with the same contents can depend on the way they were initialised (as that influences whether collisions happen) and the order in which items were added.
So given a and b be hashsets and f be toArray (or whatever), it is very common to have a == b but f(a) != f(b).