3 ms·
In order to deal with quotients it is not necessary to normalize to a single representative for each equivalence class (though sometimes that can be useful). T
by jacobolus 6y ago
In order to deal with quotients it is not necessary to normalize to a single representative for each equivalence class (though sometimes that can be useful).
The more important part is a facility for detecting whether two objects are equivalent, and a guarantee that all other operations respect the structure.
- dragonwriter 6y ago> In order to deal with quotients it is not necessary to normalize to a single representative for each equivalence class I may have been thinking about too close of an analogy with mathematical quotients where there are other operations and you are going to want to apply those to the canonical form generally, but, sure, I can see that. My point was in languages where you can construct user-defined generics types, a general implementation is usually straightforward but not particularly useful, because it's an abstraction you'd almost never consume except in defining concrete types. General operations on quotient-like types aren't something that there is much call for. And I think that's just as true with or without canonicalization. I would suspect that that is why, unlike say iterables (or in languages with more powerful type systems, monads) it's not something you see supported out of the box in type systems.
- deleted 6y ago[deleted]