# Set Theory

A Set is a collection of well defined objects.
The objects that make up a set are known as members of the set.

Example consider a set:
A = (1,2,3)
1,2 and 3 are objects of Set A

$1 \in A$
$4 \notin A$

Rules of Set:
Rule 1: Given an object o, and a set S
Either o $\in$ S or
o $\notin$ S

Rule 2: Two sets S1 and S2 are considered equal, given
S1 contains every element from S2.
S2 contains every element from S1.

Theorem: Consider two sets, S1 and S2.
For S1 = S2, it is enough for the following conditions to be satisfied.
for every object x, if $x \in S1$, then $x \in S2$.
for every object y, if $y \in S2$, then $y \in S1$.

Set Examples:
{1,2,3} - Set of numbers one, two and three.
{5} - A Set containing single element five.
{2+3i, 4-5j} - A Set containing two complex numbers.

Singleton Set:
A set containing only one element is called a Singleton set.
Example of singleton set:
{1} -> A Singleton set with 1 member, the number one.

Theorem: {s1} = {s2} only if s1 = s2
$x \in {s1}$ only if x = s1

Unordered Pair:
A set containing two elements is called an unordered pair.
Example: {2,3}

Theorem: {x,y} = {y,x}
$i \in {x,y}$ only if i = x or i = y.
{x,y} = {a,b} if x=a and y=b OR
x=b and y=a

Subset:
Consider two sets, S1 and S2.
Definition of subset: $S2 \subset S1$ if S1 contains every member contained in S2.

Theorem:
Consider two sets S1 and S2. S1 = S2 only if $S1 \subset S2$ and $S2 \subset S1$.

Next: Set Difference