Set theory (source code)

= Set theory
{wiki}

Set theory studies <sets>, their <set elements>, and the constructions and sizes possible for them. It supplies a shared vocabulary for <mathematics>: a <function> connects two <sets>, a <binary relation> specifies which pairs of objects are related, and a <probability space> starts with a <set> of possible outcomes. Giving these objects a common language lets a construction from one subject be used in another without repeating its underlying bookkeeping.

A particularly beautiful question is how to compare sizes without first assigning a number. Two <sets> have the same <cardinality> when a <bijection> pairs every member of one with exactly one member of the other. For finite <sets>, this agrees with ordinary counting. For infinite <sets>, it produces surprises: $n\mapsto2n$ bijects the <natural numbers> with the nonnegative <even integers>, and the <Cantor pairing function> bijects the <Cartesian product> $\mathbb N^2$ with $\mathbb N$. A proper <subset> can have the same <cardinality> as its containing <set>.

This does not make all infinite <sets> equally large. <Cantor's diagonal argument> shows that all infinite <binary sequences> cannot be listed by the <natural numbers>. <Cantor's theorem> gives the wider principle: the <power set> of any <set> has strictly greater <cardinality>. The contrast between an explicit enumeration and an impossibility argument makes the meaning of infinity much sharper than a picture of something merely continuing forever.

Set formation itself requires care. <Russell's paradox> shows why not every condition defines a <set> of all objects satisfying it. <Zermelo–Fraenkel set theory> instead uses <axioms> specifying permitted constructions, including <set comprehension> within a previously given <set>. The restrictions are useful: they let us form the collections ordinary arguments need while blocking the unrestricted construction that produces the paradox.