I'm trying to understand why the category of sets is defined the way it is, with singleton sets as terminal objects. If the "Set" category contains all of the possible sets, and all of the possible morphisms between those sets, why wouldn't there be injective, non-surjective morphisms from the singleton sets to all other sets with infinite cardinality? In this case, there wouldn't be any terminal objects.

So what is the rule that leads it to being defined the way it is defined, rather than being defined with infinite sets and morphisms. I guess that it has something to do with it being a "concrete" category. But I don't see how it's so obvious.

Answer:

A terminal object in a category by definition is an object T with the property that for any object C in the category, there is exactly one arrow C -> T. In the category of sets, a singleton object, for example {1} has this property:

For any set S there is a function f:S -> {1} defined by setting f(s)=1 for any element s of S. There can't be another function g:S -> {1}, because for some element s of S, g(s) would have to be an element t of {1} other than 1, but there is no such element t. So there is exactly one function from S to {1} for each object S of the category.

Your remark about there being many functions from {1} to a set S is irrelevant; they go in the wrong direction to be relevant to the definition of terminal object.

python,set,set-theory

I have two OrderedSets and I'm trying to check whether one in a subset of the other - both the elements and their order is important. However, the orderedset package is giving me strange results. >>> import orderedset >>> a = orderedset.OrderedSet([433, 316, 259]) >>> b = orderedset.OrderedSet([433, 316, 69])...

category-theory,set-theory

I'm trying to understand why the category of sets is defined the way it is, with singleton sets as terminal objects. If the "Set" category contains all of the possible sets, and all of the possible morphisms between those sets, why wouldn't there be injective, non-surjective morphisms from the singleton...

algorithm,computer-science,combinatorics,set-theory

I need to partition a set S={1, 2, 3, … , n} consisting of consecutive numbers such that each subset has has at least 2 elements (rule 1) and it consists of consecutive numbers (rule 2). The rules are: Each subset has at least two elements. All elements of all...

haskell,monads,category-theory

Functors can be covariant and contravariant. Can this covariant/contravariant duality also be applied to monads? Something like: class Monad m where return :: a -> m a (>>=) :: m a -> (a -> m b) -> m b class ContraMonad m where return :: a -> m a contrabind...

mapping,combinatorics,computation-theory,np-complete,set-theory

This problem is similar to the "Exact Hitting Set" problem (http://en.wikipedia.org/wiki/Exact_cover#Exact_hitting_set) but with slightly different constraints. I am looking for libraries, implementations, or papers that solve the following. Say I have a set of sets S, and is initialized as follows: S = {N, O, P, E}; N = {1,...

sql,oracle,set-theory

I have a below table Select X,Y from T X | Y ------ 1 | 2 1 | 3 2 | 1 3 | 5 3 | 1 Column X and Y holds Strings, I gave numbers just for example. I need output from this table as below 1,2 1,3...

python,django,orm,django-queryset,set-theory

I aready have checked this question Getting complement of queryset. But, it didn't work. It seems like it's only extracting one field in the result. I have the following two tables: table A 001 a 002 b 003 C table B 001 a 002 b 003 c 004 d 005...

haskell,category-theory,abstract-algebra

Im a Haskell beginner and I'm still learning about Category Theory and its practical use in computer science. I've spent last day watching couple lectures from Berkley's university about category theory, most of its content was showing a mathematical view of Rings, Semigroups, Groups, Magmas, Monoids, etc. Hence, questions raised...