4 ms·
I'm not exactly sure where the contra- and co- originally came from, but here's some cat-egory theory. Now suppose you have a special pipe that when you push a
by kmill 9y ago
I'm not exactly sure where the contra- and co- originally came from, but here's some cat-egory theory.
Now suppose you have a special pipe that when you push a dog into it, a cat comes out on the other end. This is called a dog-to-cat pipe. If you stick a dog-to-cat pipe to the end of a pipe of dog, then you get a pipe of cat (from the point of view of the sink end). The transformation varies with the direction of the dog-to-cat pipe. Hence covariant.
Now, what if you have a cat-to-dog pipe and stick it to the source end of a pipe of dog? Then you have a pipe of cat, from the source's point of view. The transformation varies against the direction of the cat-to-dog-pipe. Hence contravariant.
The example in the parent comment is with the more realistic example of a terrier-to-dog pipe or a dog-to-animal pipe. Of course, a pipe of dog is just a special name for a dog-to-dog pipe.
(Where this gets somewhat more complicated is when you have pipes which take pipes.)