> For the complete documentation index, see [llms.txt](https://isubasinghe.gitbook.io/isithas-wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://isubasinghe.gitbook.io/isithas-wiki/math/set_theory.md).

# set\_theory

## Basic idea

Foundation of modern math: everything is built from sets and membership ($\in$). Relations and functions are themselves sets of ordered pairs.

## Key formulas

* Membership: $x \in A$
* Subset: $A \subseteq B \iff \forall x., x\in A \Rightarrow x\in B$
* Union/intersection/difference: $A\cup B$, $A\cap B$, $A\setminus B$
* Cartesian product: $A\times B = {(a,b) : a\in A, b\in B}$
* Relation $R$ on $X$: $R \subseteq X\times X$
