User menu

User login

You are here

Primary tabs

definition by cases

Definition A (total) functionf:ℕk→ℕnormal-:fnormal-→superscriptℕkℕf:\mathbb{N}^{k}\to\mathbb{N} is said to be defined by cases if there are functions f1,…,fm:ℕk→ℕnormal-:subscriptf1normal-…subscriptfmnormal-→superscriptℕkℕf_{1},\ldots,f_{m}:\mathbb{N}^{k}\to\mathbb{N}, and predicatesΦ1⁢(?),…,Φm⁢(?)subscriptnormal-Φ1?normal-…subscriptnormal-Φm?\Phi_{1}(\boldsymbol{x}),\ldots,\Phi_{m}(\boldsymbol{x}), which are pairwise exclusive

Since fff is a total function (domain is all of ℕksuperscriptℕk\mathbb{N}^{k}), we see that S⁢(Φ1)∪⋯∪S⁢(Φm)=ℕkSsubscriptnormal-Φ1normal-⋯Ssubscriptnormal-ΦmsuperscriptℕkS(\Phi_{1})\cup\cdots\cup S(\Phi_{m})=\mathbb{N}^{k}.

Proposition 1.

As above, if the functions f1,…,fm:ℕk→ℕnormal-:subscriptf1normal-…subscriptfmnormal-→superscriptℕkℕf_{1},\ldots,f_{m}:\mathbb{N}^{k}\to\mathbb{N}, as well as the predicates Φ1⁢(?),…,Φm⁢(?)subscriptnormal-Φ1?normal-…subscriptnormal-Φm?\Phi_{1}(\boldsymbol{x}),\ldots,\Phi_{m}(\boldsymbol{x}), are primitive recursive, then so is the function f:ℕk→ℕnormal-:fnormal-→superscriptℕkℕf:\mathbb{N}^{k}\to\mathbb{N} defined by cases from the fisubscriptfif_{i} and Φjsubscriptnormal-Φj\Phi_{j}.

To see this, we first need the following:

Lemma 1.

If functions f1,…,fm:ℕk→ℕnormal-:subscriptf1normal-…subscriptfmnormal-→superscriptℕkℕf_{1},\ldots,f_{m}:\mathbb{N}^{k}\to\mathbb{N} are primitive recursive, so is f1+⋯+fmsubscriptf1normal-⋯subscriptfmf_{1}+\cdots+f_{m}.

Proof.

By induction on mmm. The case when m=1m1m=1 is clear. Suppose the statement is true for m=nmnm=n. Then f1+⋯+fn+fn+1=add⁡(f1+⋯+fn,fn+1)subscriptf1normal-⋯subscriptfnsubscriptfn1addsubscriptf1normal-⋯subscriptfnsubscriptfn1f_{1}+\cdots+f_{n}+f_{{n+1}}=\operatorname{add}(f_{1}+\cdots+f_{n},f_{{n+1}}), which is primitive recursive, since addadd\operatorname{add} is, and that primitive recursiveness is preserved under functionalcomposition.
∎

where φSsubscriptφS\varphi_{S} denotes the characteristic function of setSSS. By assumption, both fisubscriptfif_{i} and φS⁢(Φi)subscriptφSsubscriptnormal-Φi\varphi_{{S(\Phi_{i})}} are primitive recursive, so is their product, and hence the sum of these products. As a result, fff is primitive recursive too. ∎