First, domain and codomain. Sets serve as the domain and codomain of functions, and since sets are our objects, the functions will clearly have the objects of this category as their domain and codomain.
I don’t think this gives you the normal category of sets? I believe that’s usually defined taking the codomain of a morphism to be the range of a function, which is a superset of its codomain. That is, the function “plus one” on the natural numbers has a codomain of the positive integers; but its range may be the natural numbers, or the reals, or indeed any superset of the positive integers. And these functions are indistinguishable as sets, but in the category of sets, there’s a morphism for every one of them.
The terminology is the other way round. The range (also called the image) of a function is the set of values it actually takes. The codomain is whichever superset of the range you are considering as the set the function maps to, the “result type” of the function. So the range of the +1 function on the domain ℕ is the positive integers, but the codomain is any superset of that, and gives a different morphism in the category Set for each one.
Whelp, I’ve been getting that wrong for some time now, thanks.
Ah, apparently “range” is ambiguously used as both “codomain” and “image”. I think I was taught it as codomain (before I was taught that word), and then at some point started to think of codomain as “the one that isn’t the range”.
That was my intention. Thanks for pointing it out. One of the mistakes of this series was the naive belief that simplicity comes from vagueness, when it actually comes from precision. Dumb of me.
I don’t think this gives you the normal category of sets? I believe that’s usually defined taking the codomain of a morphism to be the range of a function, which is a superset of its codomain. That is, the function “plus one” on the natural numbers has a codomain of the positive integers; but its range may be the natural numbers, or the reals, or indeed any superset of the positive integers. And these functions are indistinguishable as sets, but in the category of sets, there’s a morphism for every one of them.
The terminology is the other way round. The range (also called the image) of a function is the set of values it actually takes. The codomain is whichever superset of the range you are considering as the set the function maps to, the “result type” of the function. So the range of the +1 function on the domain ℕ is the positive integers, but the codomain is any superset of that, and gives a different morphism in the category Set for each one.
Whelp, I’ve been getting that wrong for some time now, thanks.
Ah, apparently “range” is ambiguously used as both “codomain” and “image”. I think I was taught it as codomain (before I was taught that word), and then at some point started to think of codomain as “the one that isn’t the range”.
https://en.wikipedia.org/wiki/Range_(mathematics)
It’s older terminology. Everyone says image now.
I thought I had it right, and then mixed it up in my head myself.
That was my intention. Thanks for pointing it out. One of the mistakes of this series was the naive belief that simplicity comes from vagueness, when it actually comes from precision. Dumb of me.