# Set Theory

## # Basic Sets

N := Natural Number

Z := Integer

Q := Rational Number

R := Real Number

C := Complex Number

## # Term

### # Disjoint

When two sets have no elements in common, they are said to be disjoint

### # Complement

$A ^ { \prime } = { x : x \in U \text{ and } x \notin A }$

### # Difference

$A \backslash B = A \cap B ^ { \prime } = { x : x \in A \text{ and } x \notin b}$

### # Relations

Subsets of $A × B$ are called relations

A relation is well-defined if each element in the domain is assigned to a unique element in the range.

### # Surjective or onto

满射

each element in B has an A

### # Injective or One-to-one

单射

$a_1 \neq a_2 \Leftrightarrow f(a_1) \neq f(a_2)$

- Countable: can be put in 1-1 correspondence with positive integers
- Integers
- Rational Numbers

- Uncountable
- Interval
`[0, 1]`

- Read line, plane

- Interval

### # Bijective

双射

A map that is both one-to-one and onto is called bijective.

### # Identity Mapping

If S is any set, we will use ids or id to denote the identity mapping from S to itself.

Define this map by id(s)= s for all s $\in$ S.

### # Invertible

A mapping is invertible if and only if it is both one-to-one and onto.

## # Manipulation

- AND: Set Intersection
- OR: Set Union
- XOR: Symmetric Difference