4 ms·
I can't quite understand the difference between endomorphism ("input and output of the transformer must be from the same category") and homomorphism ("structure
by CapacitorSet 9y ago
I can't quite understand the difference between endomorphism ("input and output of the transformer must be from the same category") and homomorphism ("structure preserving transformation. We always stay in the same category"). Can someone help?
- lsjroberts 9y agoI believe homomorphism is a subset of endomorphism. So a function that turns an array into another array of different length would be endomorphic (since it maintains the same type), but not homomorphic since it has a different structure (a different set of keys).
- catnaroek 9y agoThe other way around. A homomorphism is a structure-preserving map between two arbitrary objects, whereas an endomorphism is a homomorphism where the source and target objects coincide.
- tel 9y agoEndomorphism has less implied structure. Lots of dumb things are endomorphisms. Homomorphism implies "structure preservation" which can make it more specific.
- catnaroek 9y agoI'm surprised to read this coming from you.
- dllthomas 9y agoIt seems "endomorphism" is used both ways (in, presumably, different contexts). https://ncatlab.org/nlab/show/endomorphism https://ncatlab.org/nlab/show/endomorphism I think "endomorphism is a homomorphism ..." is more common, but notably is not the usage in Haskell (https://hackage.haskell.org/package/base/docs/Data-Monoid.html#t:Endo https://hackage.haskell.org/package/base/docs/Data-Monoid.ht...)
- catnaroek 9y agoOf course, Haskell's `Endo` is a type constructor for `Hask`-endomorphisms, but more interesting categories exist. Tell me with a straight face ring and field endomorphisms aren't interesting.
- mmarx 9y agoHomomorphisms are structure-preserving mappings between different types (called “category” in the post, in usual terminology, these would be »objects« in a »category«, though). Endomorphisms are special homomorphisms, mapping from a single type (»object«) to the same type (»object«). It is indeed very unfortunate that the article conflates terminology.