Generator Functions

Examples

Natural Numbers: $B = \{0\}, F=\{(x \to x + 1)\}$

Integers: $B=\{0\}, F=\{(x \to x + 1), (x \to -x)\}$

$List[X]$ - Set of Lists of elements in $X$: $B=\{[]\}, F=\{(l \to l + [x]) : x \in X\}$

Structural Induction

Let $C$ be the set generated by $B$ by $F$

If $\forall b \in B, P(b)$

And $\forall f \in F, \forall a_1, \dots, a_m \in C, (P(a_1) \land \dots \land P(a_m)) \implies P(f(a_1, \dots, a_m))$

Then $\forall x \in C, P(x)$

Well Ordering Principle

Let $S \sub \N$ be non-empty, $a$ is a minimal element of $S$ if $\forall b \in S, (a \le b)$ (With respect to a partial order)

Well Ordering Principle: For any non-empty $S \sub \N$, $S$ has a minimal element

  1. Check $P(0)$
  2. By contradiction, assume $\exists n \in \N , \neg P(n)$, so that $S=\{n\in\N:\neg P(n)\}$ is non-empty
  3. By WOP, $S$ has a minimal element $m$ (smallest number which $P$ doesn’t hold) Since $P(0)$, $m \ge 1$
  4. Derive contradiction by showing $P(m)$ or find $m'<m$ s.t. $\neg P(m')$