Set Theory
Set Theory is about the collection of things. They can be considered as an example of Category Theory. 1
There are multiple ways of defining set theory: 2
This page will go over some common aspects of Set Theory regardless of the specific definition. 2
Sets
Properties of sets: 1
- Sets can contain no elements, one element, or many elements.
- Elements in a set have no order among themselves.
- A set
Ais a subset of another setB, ifBcontains all of the elements inA. - The empty set is always a subset of all sets.
Functions
Properties of functions:
- Must always map every element in the input set to one element in an output set. 1
- Can map multiple elements in an input set to one element in the output set. 3
- Cannot map an element in an input set to multiple elements in an output set. 3
- Functional composition is associative. 1
Functions as they relate to the empty set: 1
- There is always a function to go from the empty set to any other set.
- The only way you can have a function that goes to the empty set is to have the empty set as an input.
Special functions:
- An identity function maps every element in a set back to itself. 3
- A bijective function maps every element in the input set is to exactly one element in the output set. This function is considered to be invertible. 1
Isomorphism
Things that are function-like are also known as morphisms. In particular, functions that can be inverted are isomorphisms. When there exists an invertible function between two sets, then those two sets are isomorphic. 1
Products
A Cartesian product of sets is a new set of every ordered combination you can make with one element from each set. It is associative. 2
All Cartesian products have a "projection".
Projections extract the elements from each
combination. For example, for a Cartesian product
A x B = C, you can define the
projections C -> A and
C -> B to get back the
A and B sets respectively.
These projections are morphisms and are not
invertible. 2
The product is the dual of the sum (See: Category Theory). 2
Sums
A sum of sets is a new set that contains all of the elements from multiple sets, with duplicate elements included. 2
Unlike products, you cannot go back to the
original sets after combining them. This is because
the sum C of A + B
contains elements from A which cannot
be mapped back to B and elements from
B which cannot be mapped back to
A. 2
The sum is the dual of the product, and is also known as the coproduct (See: Category Theory). 2