Manifesto

One is often interested in defining functions and relations over the natural numbers. For example, one wants to define at least addition and multiplication over them. To do this, one usually specifies the value of the intended function on 00. Then, assuming that one has already defined the function for nn, one proceeds to define the value of the function on S(n)S(n).

This is the basic procedure of defining a recursive function over N\mathbb{N}. First, however, one must ensure that this procedure even works — it is not immediately clear that a function so defined exists as a set.

Theorem RecDef0

Definition by Recursion 0. Let XX be a set. Let xx be some element of XX and let φ:XX\varphi:X \to X be any function. Then, there exists a unique function f:NXf:\mathbb{N} \to X such that

  • f(0)=xf(0)=x and
  • f(S(n))=φ(f(n))f(S(n))=\varphi(f(n)).

Proof: Consider the set F\mathcal{F} of all subsets of N×X\mathbb{N} \times X that satisfy the two conditions above i.e. F={FN×X: (0,x)F  and  (S(n),φ(Fn))F if (n,Fn)F} \mathcal{F} = \{F \subseteq \mathbb{N} \times X:\ (0,x) \in F \ \ \text{and}\ \ (S(n),\varphi(F_n)) \in F \ \text{if}\ (n,F_n) \in F\} This set is non-empty because the entire product set N×X\mathbb{N} \times X itself satisfies both of the conditions of F\mathcal{F}.

Now, define ff to be the intersection of all the FF's in F\mathcal{F} i.e. f=F={pU: FF implies pF} f=\bigcap\mathcal{F}=\{p\in\mathcal{U}:\ F\in\mathcal{F}\ \text{implies}\ p \in F\} ff, thus defined, is a valid set because F\mathcal{F} is non-empty; otherwise, ff would be U\mathcal{U} itself, which is not a set. Also, as all elements in F\mathcal{F} satisfy both conditions of the theorem, so must ff satisfy both conditions of the theorem.

Next, one must show that ff maps a given value to at most one value. Essentially, one has to show that if nNn\in\mathbb{N} and y,y~Xy,\tilde{y} \in X and (n,y),(n,y~)f(n,y), (n,\tilde{y}) \in f, then y=y~y = \tilde{y}. This is accomplished by induction:

  • The property to be shown is true for 00. For, suppose (0,y),(0,y~)f(0,y),(0,\tilde{y}) \in f. Well, (0,x)f(0,x) \in f also. Now, if both yy and y~\tilde{y} are xx, one is done. Otherwise, assume for the sake of a contradiction that one of them is not xx. Without loss of generality let it be yy which is not equal to xx. Consider, now, the set f=f{(0,y)}f'=f\setminus\{(0,y)\}. (0,x)f(0,x) \in f' because (0,x)f(0,x) \in f and (0,x)(0,y)(0,x)\neq(0,y) by construction. Also, say (n,fn)f(n,f_n) \in f'. Then, (n,fn)f(n,f_n) \in f also; so since ff satisfies the second condition of this theorem, (S(n),φ(fn))f(S(n),\varphi(f_n)) \in f. But as S(n)0S(n) \neq 0 by Peano axiom 3, it must be that (S(n),φ(fn))(0,y)(S(n),\varphi(f_n))\neq(0,y); hence, (S(n),φ(fn))f(S(n),\varphi(f_n)) \in f'. Thus, ff' also satisfies the conditions of F\mathcal{F} i.e. fFf'\in\mathcal{F}. But then, f=Ff=f{(0,y)}f f=\bigcap\mathcal{F} \subseteq f' = f\setminus\{(0,y)\} \subset f which is a contradiction, as ff cannot be a strict subset of itself.
  • Now, suppose that the property is true for some nNn\in\mathbb{N}. Thus, there is one and only one fnXf_n \in X such that (n,fn)f(n,f_n) \in f. Now, consider any two (S(n),y),(S(n),y~)f(S(n),y),(S(n),\tilde{y}) \in f. Certainly, (S(n),φ(fn))f(S(n),\varphi(f_n)) \in f also. Note that since φ\varphi is a function, it has to be many-to-one, so that φ(fn)\varphi(f_n) refers to a unique element of XX. Hence, if both yy and y~\tilde{y} equal φ(fn)\varphi(f_n), then necessarily yy equals y~\tilde{y} and one is done. Otherwise, assume for the sake of a contradiction that one of them is not φ(fn)\varphi(f_n); w.l.o.g. let this be yy. Consider, now, the set f=f{(S(n),y)}f' = f\setminus\{(S(n),y)\}. (0,x)f(0,x) \in f' because (0,x)f(0,x) \in f and (0,x)(S(n),y)(0,x)\neq(S(n),y) (since 0S(n)0 \neq S(n) by Peano axiom 3). Next, suppose (ν,fν)f(\nu,f_\nu) \in f'; then, (ν,fν)f(\nu,f_\nu) \in f so that (S(ν),φ(fν))f(S(\nu),\varphi(f_\nu)) \in f. Now, if ν=n\nu=n, then by the initial assumption, there is only one fnf_n such that (n,fn)=(ν,fn)f(n,f_n)=(\nu,f_n) \in f; so one must have fν=fnf_\nu=f_n. Then, by construction, φ(fν)=φ(fn)y\varphi(f_\nu)=\varphi(f_n) \neq y; so one has that (S(ν),φ(fν))(S(n),y)(S(\nu),\varphi(f_\nu))\neq(S(n),y). If, on the other hand, νn\nu \neq n, then, by Peano axiom 2, one has S(ν)S(n)S(\nu) \neq S(n), so that (S(ν),φ(fν))(S(n),y)(S(\nu),\varphi(f_\nu))\neq(S(n),y) again. Thus, in both cases, (S(ν),φ(fν))f(S(\nu),\varphi(f_\nu)) \in f and (S(ν),φ(fν))(S(n),y)(S(\nu),\varphi(f_\nu))\neq(S(n),y) i.e. (S(ν),φ(fν))f(S(\nu),\varphi(f_\nu)) \in f'. Thus, ff' also satisfies the conditions of F\mathcal{F} i.e. fFf'\in\mathcal{F}. But then, f=Ff=f{(S(n),y)}f f=\bigcap\mathcal{F} \subseteq f' = f\setminus\{(S(n),y)\} \subset f which is a contradiction.

This completes the induction to show that ff is many-to-one.

To complete the demonstration that ff is a function, one still needs to show that the domain and codomain of ff are N\mathbb{N} and XX respectively. Since the proofs needed for both are quite similar, I only demonstrate the fact that ff's domain is N\mathbb{N} i.e. that domf={nU: χX [(n,χ)f]}=N \text{dom}f=\{n\in\mathcal{U}:\ \exists \chi \in X\ [(n,\chi) \in f]\}=\mathbb{N} Well, certainly, since fN×Xf\subseteq\mathbb{N} \times X, domfN\text{dom}f\subseteq\mathbb{N}. Now, clearly 0domf0\in\text{dom}f since (0,x)f(0,x) \in f. Also, if ndomfn\in\text{dom}f, then there is a χ\chi such that (n,χ)f(n,\chi) \in f; hence, (S(n),φ(χ))f(S(n),\varphi(\chi)) \in f so that S(n)fS(n) \in f. Thus, by induction, Ndomf\mathbb{N}\subseteq\text{dom}f.

Finally, I show that ff is unique. To begin with, assume that there is another function f:NXf':\mathbb{N} \to X which satisfies the conditions of this theorem. Then, in particular, ff' is a subset of N×X\mathbb{N} \times X satisfying the conditions of F\mathcal{F} i.e. fFf'\in\mathcal{F}. Hence, f=Fff=\bigcap\mathcal{F} \subseteq f'. Next, to show that fff' \subseteq f, suppose (n,χ~)f(n,\tilde{\chi}) \in f'. Then, necessarily, as fN×Xf'\subseteq\mathbb{N} \times X, nNn\in\mathbb{N} and χ~X\tilde{\chi} \in X. Now, certainly, as ff's domain is the whole of N\mathbb{N}, there is some χX\chi \in X such that (n,χ)f(n,\chi) \in f. Since fff \subseteq f', this means that (n,χ)f(n,\chi) \in f' also. But then, as ff' is a many-to-one mapping, it must be that χ~=χ\tilde{\chi}=\chi; hence, (n,χ~)f(n,\tilde{\chi}) \in f too.

Theorem RecDef1

Definition by Recursion 1. Let XX be a set. Let xx be some element of XX and let φ:X×NX\varphi:X\times\mathbb{N} \to X be any function. Then, there exists a unique function f:NXf:\mathbb{N} \to X such that

  • f(0)=xf(0)=x and
  • f(S(n))=φ(f(n),n)f(S(n))=\varphi(f(n),n).

Proof Sketch: On the outset, this theorem looks more general than the previous one. After all, the previous theorem is a clear special case of this one. However, one can actually derive this theorem from the previous one. To do this, assume XX, xx and φ\varphi to be given as prescribed by this theorem.

Now, define X~=X×N\tilde{X}=X\times\mathbb{N} and φ~:X~X~\tilde{\varphi}:\tilde{X}\to\tilde{X} to be φ~(x,n)=(φ(x,n),S(n))\tilde{\varphi}(x,n)=(\varphi(x,n),S(n)). Applying the previous theorem on X~\tilde{X}, (x,0)(x,0) and φ~\tilde{\varphi} yields a unique function f~:NX~\tilde{f}:\mathbb{N}\to\tilde{X} such that

  • f~(0)=(x,0)\tilde{f}(0)=(x,0) and
  • f~(S(n))=φ~(f~(n))=(φ(f~(n)),S(n))\tilde{f}(S(n))=\tilde{\varphi}(\tilde{f}(n))=(\varphi(\tilde{f}(n)),S(n))

Next, one can define the required function thus: f:Nnfirst(f~(n))Xf:\mathbb{N}\ni n\mapsto\text{first}(\tilde{f}(n))\in X. Here, the function first:X~X\text{first}:\tilde{X}\to X simply returns the first member of an ordered pair in X~=X×N\tilde{X}=X\times\mathbb{N} i.e. first(x,n)=x\text{first}(x,n)=x. An entirely analogous function second\text{second} can also be defined and using this, one can show by an easy induction that second(f~(n))=n\text{second}(\tilde{f}(n))=n for all nNn\in\mathbb{N}.

Finally, the reader can verify that ff does indeed satisfy the required conditions of the theorem.

results matching ""

    No results matching ""