Ordinal Arithmetic II: Sets
okay so we did logic now we need actual stuff to do the logicking on. because you can't just do logic on nothing. it's like having a skeleton with no fat or muscle or skin like it's cool but it'd be way cooler if you had something to be a skeleton for
so let me introduce you to sets. let's just get all the obvious stuff out first: sets aren't lists. stop pretending that they are lists. you can have lists but sets are not lists. sets are:
unordered: doesn't matter how you sort it, it'll always be the same set. {a,b} = {b,a}
no multiplicity: doesn't matter how many times you repeat an element, that's the same as having it in there once. {a,a,a,a} = {a}
okay if we are clear on that let's actually get to notating sets properly. I'll also for now touch on some "basic sets" that we'll use for convenience to make the explanation easier. otherwise I'd have to start really abstractly and ion wanna do that:
ℕ is the set of natural numbers {0,1,2,3...}
ℤ is the set of integers {...-3,-2,-1,0,1,2,3...}
alright so we can first show sets as just their raw elements like I kinda did there. you usually enclose the raw elements of a set in braces. so like. let S = {1,2,3}. Then 1,2 and 3 are it's elements. you show this relationship with an ∈ symbol. so
1 ∈ S, 2 ∈ S, 3 ∈ S
and when it isn't you put a line through it
4 ∉ S
next, you can show them as a common property they share. you can just do this on it's own but it is heavily preferred that you do it to other sets.
{x∈ℕ|x is odd} would give you the elements of ℕ that are odd.
and lastly you can construct sets from other sets:
{x²|x∈ℕ} gives you the set of all perfect squares.
if you know python list comprehension comparsion becomes a lot easier:
S = [1,2,3,5] (S = {1,2,3,4}) S = [x for x in N if isOdd(x)] (S = {x∈ℕ|x is odd} S = [x**2 for x in N] (S = {x²|x∈ℕ}
now of course don't you ever DARE forget that sets are not lists so pretend that you put all of that trough a set() function too
anyways, just like with logic you can take all these sets and combine them in interesting ways
how combine the set
there are many ways:
union: A ∪ B is the set that has elements that are in either set. {1,2,3}∪{2,3,4} = {1,2,3,4}
intersection: A ∩ B is the set that has elements that are in both sets and nothing else. {1,2,3}∩{2,3,4} = {2,3}
subtraction: A \ B is the set that has elements from A but not from B. {1,2,3}\{2,3,4} = {1}
cartesian product: A × B is the set that has pairs of elements from A and B (in that order). {1,2,3}×{2,3,4} = {(1,2),(1,3),(1,4),(2,2),(2,3),(2,4),(3,2),(3,3),(3,4)}
now let's look at some properties a set can have too:
subset: A ⊆ B (A is a subset of B) only when every element of A is in B. Note that A ⊆ A. If you don't want A = B, then you can use A ⊂ B.
singleton set: a set that only has one element. like {1}
empty set: the set with no elements. there is only one empty set. you show it as ∅ or {}.
note that the empty set is a subset of every set
there is also the power set which is the set of all subsets. You show it as 𝒫(x) but I'll just use P(x) and be obvious when I mean the power set. For example: P({1,2}) = {∅,{1},{2},{1,2}}
finally, let's talk about hereditary sets. these are sets whose elements are hereditary sets themselves too. essentially, you will not find anything other than a set in them.
stuff like {{},{{}},{{},{{}}}} is a hereditary set. for the next parts, we will work strictly with hereditary sets. in part III, we will use them to define ℕ properly.














