hcju/proofwikiqa huggingface dataset:
Construct the altitude from $A$. Let the length of the altitude be $h$ and the foot of the altitude be $D$. Let the distance from $D$ to $B$ be $z$. :300px From Pythagoras's Theorem: :$\paren 1: \quad h^2 + \paren {a - z}^2 = b^2$ and: :$\paren 2: \quad h^2 + z^2 = c^2$ By subtracting $\paren 1$ from $\paren 2$: :$2 a z - a^2 = c^2 - b^2$ which can be expressed in terms of $z$ as: :$z = \dfrac {a^2 + c^2 - b^2} {2 a}$ Substituting for $z$ in $\paren 2$ and simplifying yields: : $h = \sqrt {c^2 - \paren {\dfrac{a^2 + c^2 - b^2}{2a}}^2}$ and so: {{begin-eqn}} {{eqn | l = Q       | r = \frac 1 2 a \sqrt {c^2 - \paren {\frac{a^2 + c^2 - b^2}{2a} }^2}       | c = Area of Triangle in Terms of Side and Altitude }} {{eqn | r = \sqrt {\frac {4 c^2 a^2 - \left({a^2 + c^2 - b^2}\right)^2} {16} } }} {{eqn | r = \sqrt {\frac {\paren {2ac - a^2 - c^2 + b^2} \paren {2ac + a^2 + c^2 - b^2} } {16} }       | c = Difference of Two Squares }} {{eqn | r = \sqrt {\frac {\paren {b^2 - \paren {a - c}^2} \paren {\paren {a + c}^2 - b^2} } {16} } }} {{eqn | r = \sqrt {\frac {\paren {b - a + c} \paren {b + a - c} \paren {a + c - b} \paren {a + b + c} } {16} }       | c = Difference of Two Squares }} {{eqn | r = \sqrt {\frac {\paren {a + b + c} \paren {a + b - c} \paren {a - b + c} \paren {-a + b + c} } {16} } }} {{eqn | r = \sqrt {\paren {\frac {a + b + c} 2} \paren {\frac {a + b + c} 2 - c} \paren {\frac {a + b + c} 2 - b} \paren {\frac {a + b + c} 2 - a} } }} {{eqn | r = \sqrt {s \paren {s - c} \paren {s - b} \paren{s - a} }       | c = Definition of semiperimeter }} {{end-eqn}} {{qed}}
A triangle can be considered as a cyclic quadrilateral one of whose sides has degenerated to zero. From Brahmagupta's Formula, the perimeter of a cyclic quadrilateral is given by: :$\sqrt {\paren {s - a} \paren {s - b} \paren {s - c} \paren {s - d}}$ where $s$ is the semiperimeter: :$s = \dfrac {a + b + c + d} 2$ The result follows by letting $d$ tend to zero. {{qed}}
:700px Let $T$ be the area of $\triangle ABC$. Construct the incircle of $\triangle ABC$. Let the incenter of $\triangle ABC$ be $M$. Let the inradius of $\triangle ABC$ be $r$. $\triangle ABC$ is made up of three triangles: $\triangle AMB$, $\triangle BMC$ and $\triangle CMA$. From Area of Triangle in Terms of Side and Altitude, the areas of $\triangle AMB$, $\triangle BMC$ and $\triangle CMA$ are given by: :$\Area \paren {\triangle AMB} = \dfrac {r c} 2$ :$\Area \paren {\triangle BMC} = \dfrac {r a} 2$ :$\Area \paren {\triangle CMA} = \dfrac {r b} 2$ Thus: :$\paren 1: \quad T = \dfrac {r \paren {c + a + b} } 2 = r s$ where $s$ is the semiperimeter of $\triangle ABC$. Construct the excircle of $\triangle ABC$ with excenter $N$ tangent to $AB$, and to $AC$ and $BC$ produced at $D$ and $E$ respectively. We note that $s = CD = CE$. Therefore: :$DA = s - b$ :$EB = s - a$ Note that: :$AF + DA = BG + EB$ and: :$AF + BG = C$ Note also that: :$\triangle NDC$ is similar to $\triangle MFC$ :$\triangle NDA$ is similar to $\triangle AFM$ from which: :$\dfrac R r = \dfrac s {s - c}$ :$\dfrac R {s - b} = \dfrac {s - a} r$ Substituting for $R$: $R = \dfrac {r s} {s - c} = \dfrac {\paren {s - a} \paren {s - b} } r$ and so: :$r^2 = \dfrac {\paren {s - a} \paren {s - b} \paren {s - c}} s$ Thus $\paren 1$ becomes: :$T = s \sqrt {\dfrac {\paren {s - a} \paren {s - b} \paren {s - c}} s} = \sqrt {s \paren {s - a} \paren {s - b} \paren {s - c}}$ {{qed}}
We observe that: :$\map \Add {n, 0} = n + 0 = n$ and that :$\map \Add {n, m + 1} = n + \paren {m + 1} = \paren {n + m} + 1 = \map \Succ {\map \Add {n, m} }$ where $\Succ$ is the successor function, which is a basic primitive recursive function. We are to show that $\Add$ is defined by primitive recursion. So we need to find primitive recursive functions $f: \N \to \N$ and $g: \N^3 \to \N$ such that: :$\map \Add {n, m} = \begin{cases} \map f n & : m = 0 \\ \map g {n, m - 1, \map \Add {n, m - 1} } & : m > 0 \end{cases}$ Because $\map \Add {n, 0} = n$, we can see that: :$\map f n = n$. That is, $f$ is the basic primitive recursive function $\pr_1^1: \N \to \N$. Because $\map \Add {n, m + 1} = \map \Succ {\map \Add {n, m} }$, we can see that $g$ needs to be a function which maps the ordered triple $\tuple {n, m, \map \Add {n, m} }$ to $\map \Succ {\map \Add {n, m} }$. A suitable function is: :$g: \N^3 \to \N$ where $\map g {n_1, n_2, n_3} = \map \Succ {n_3}$ because then: :$\map g {n, m, \map \Add {n, m} } = \map \Succ {\map \Add {n, m} }$ It remains to be shown that $g$ is primitive recursive. This is achieved by using the projection function: :$\map g {n_1, n_2, n_3} = \map \Succ {\map {\pr_3^3} {n_1, n_2, n_3} }$ Thus $g$ is obtained by substitution from the basic primitive recursive functions $\Succ$ and $\pr_3^3$ and so is primitive recursive. So $\Add$ is obtained by primitive recursion from the primitive recursive functions $\pr_1^1$ and $g$, and so is primitive recursive. {{qed}} Category:Primitive Recursive Functions 95nbchdnbufaaogke2kaxcs6usiyunb
We observe that: :$\map \Mult {n, 0} = n \times 0 = 0$ and that :$\map \Mult {n, m + 1} = n \times \paren {m + 1} = \paren {n \times m} + n = \map \Add {\map \Mult {n, m}, n}$. We are to show that $\Mult$ is obtained by primitive recursion from known primitive recursive functions. First we note that: :$\map \Mult {n, 0} = 0 = \map \Zero n$ where $\map \Zero n$ is the  zero function, which is basic primitive recursive. Next we need to find a primitive recursive function $g: \N^3 \to \N$ such that: :$\map \Mult {n, m + 1} = \map g {n, m, \map \Mult {n, m} }$ Because $\map \Mult {n, m + 1} = \map \Add {\map \Mult {n, m}, n}$, we see that a suitable function for $g$ is: :$\map g {n_1, n_2, n_3} = \map \Add {n_3, n_1}$ Using projection functions, we can write this as: :$\map g {n_1, n_2, n_3} = \map \Add {\map {\pr_3^3} {n_1, n_2, n_3}, \map {\pr_1^3} {n_1, n_2, n_3} }$. This shows that $g$ is obtained by substitution from $\Add$, which is primitive recursive, and the basic primitive recursive functions $\pr_3^3$ and $\pr_1^3$. So $g$ is primitive recursive. So $\Mult$ is obtained by primitive recursion from the primitive recursive functions $g$ and $\Zero$, and so is primitive recursive. {{qed}} Category:Primitive Recursive Functions nuewcnrlqmjys1fme8euz4utktjtlv1
We have that: {{begin-eqn}} {{eqn | l = a n + b       | r = \map \Add {\map \Mult {a, n}, b}       | c =  }} {{eqn | r = \map \Add {\map \Mult {a, n}, \map {f_b} n}       | c =  }} {{eqn | r = \map \Add {\map \Mult {\map {f_a} n, \map {\pr_1^1} n}, \map {f_b} n}       | c =  }} {{end-eqn}} where: * $\Mult$ is primitive recursive * $\Add$ is primitive recursive * the constant functions $f_a$ and $f_b$ are primitive recursive * The projection function $\pr_1^1$ is a basic primitive recursive function. Note that we need to use the projection function (in this case, the identity function) in order to satisfy the definition of substitution, even when there is only one variable. So $\Mult$ is obtained by using two levels of substitution from the above primitive recursive functions. {{qed}} Category:Primitive Recursive Functions 4yt2hry6ggmnj7w5vojcg1hwjv9binf
Let $n = \left({n_1, n_2, \ldots, n_{i-1}, n_i \ldots, n_k}\right)$. We see that: :$g \left({n_1, n_2, \ldots, n_k}\right) = f \left({\operatorname{pr}^k_1 \left({n}\right), \operatorname{pr}^k_2 \left({n}\right), \ldots, \operatorname{pr}^k_{i-1} \left({n}\right), f_a \left({n}\right), \operatorname{pr}^k_i \left({n}\right), \ldots, \operatorname{pr}^k_k \left({n}\right)}\right)$ We have that: * $\operatorname{pr}^k_j$ is a basic primitive recursive function for all $j$ such that $1 \ne j \le k$ * $f_a$ is a primitive recursive function. So $g$ is obtained by substitution from primitive recursive functions and so is primitive recursive. {{qed}} Category:Primitive Recursive Functions d9j44atmv91ffg8o7430zpvybkrx5pk
We observe that: :$\exp \left({n, 0}\right) = n^0 = 1$ and that :$\exp \left({n, m + 1}\right) = n^\left({m + 1}\right) = \left({n^m}\right) \times n = \operatorname{mult} \left({\exp \left({n, m}\right), n}\right)$. Thus $\exp$ is defined by primitive recursion from the primitive recursive function $\operatorname{mult}$. Hence the result. {{qed}} Category:Primitive Recursive Functions f7a3x2f6ck2r58nl30z8om71yn89ep0
Let $a, b \in \Z$ such that $a$ and $b$ are not both zero. Let $S$ be the set of all positive integer combinations of $a$ and $b$: :$S = \set {x \in \Z, x > 0: x = m a + n b: m, n \in \Z}$ First we establish that $S \ne \O$. We have: {{begin-eqn}} {{eqn | l = a > 0       | o = \implies       | r = \size a = 1 \times a + 0 \times b       | c =  }} {{eqn | l = a < 0       | o = \implies       | r = \size a = \paren {-1} \times a + 0 \times b       | c =  }} {{eqn | l = b > 0       | o = \implies       | r = \size b = 0 \times a + 1 \times b       | c =  }} {{eqn | l = b < 0       | o = \implies       | r = \size b = 0 \times a + \paren {-1} \times b       | c =  }} {{end-eqn}} As it is not the case that both $a = 0$ and $b = 0$, it must be that at least one of $\size a \in S$ or $\size b \in S$. Therefore $S \ne \O$. As $S$ contains only positive integers, $S$ is bounded below by $0$ and therefore $S$ has a smallest element. Call this smallest element $d$: we have $d = u a + v b$ for some $u, v \in \Z$. Let $x \in S$. By the Division Theorem: : $x = q d + r, 0 \le r < d$ Suppose $d \nmid x$. Then $x \ne q d$ and so $0 < r$. But: {{begin-eqn}} {{eqn | lo= \exists m, n \in \Z:       | l = x       | r = m a + n b       | c =  }} {{eqn | ll= \leadsto       | l = r       | r = x - q d       | c =  }} {{eqn | r = \paren {m a + n b} - q \paren {u a + v b}       | c =  }} {{eqn | r = \paren {m - q u} a + \paren {n - q v} b       | c =  }} {{eqn | ll= \leadsto       | o =       | r = \paren {r \in S} \land \paren {r < d}       | c =  }} {{end-eqn}} which contradicts the choice of $d$ as the smallest element of $S$. Therefore $\forall x \in S: d \divides x$. In particular: :$d \divides \size a = 1 \times a + 0 \times b$ :$d \divides \size b = 0 \times a + 1 \times b$ Thus: : $d \divides a \land d \divides b \implies 1 \le d \le \gcd \set {a, b}$ However, note that as $\gcd \set {a, b}$ also divides $a$ and $b$ (by definition), we have: {{begin-eqn}} {{eqn | l = \gcd \set {a, b}       | o = \divides       | r = \paren {u a + v b} = d       | c = Common Divisor Divides Integer Combination }} {{eqn | ll= \leadsto       | l = \gcd \set {a, b}       | o = \divides       | r = d       | c =  }} {{eqn | ll= \leadsto       | l = \gcd \set {a, b}       | o = \le       | r = d       | c =  }} {{end-eqn}} Since $d$ is the smallest number in $S$: :$\gcd \set {a, b} = d = u a + v b$ {{qed}}
Consider the Euclidean algorithm in action: {{begin-eqn}} {{eqn | l = a       | r = q_1 b + r_1       | c =  }} {{eqn | l = b       | r = q_2 r_1 + r_2       | c =  }} {{eqn | l = r_1       | r = q_3 r_2 + r_3       | c =  }} {{eqn | l = \cdots       | o =        | c =  }} {{eqn | l = r_{n - 2}       | r = q_n r_{n - 1} + r_n       | c =  }} {{eqn | l = r_{n - 1}       | r = q_{n + 1} r_n + 0       | c =  }} {{end-eqn}} First it will be established that there exist $x_i, y_i \in \Z$ such that: :$(1): \quad a x_i + b y_i = r_i$ for $i \in \set{1, 2, \ldots, n - 1}$. The proof proceeds by induction. === Basis for the Induction === When $i = 1$, let $x_1 = 1, y_1 = -q_1$. When $i = 2$, let $x_2 = -q_2, y_2 = 1 + q_1 q_2$. This is the basis for the induction. === Induction Hypothesis === Our induction hypothesis is that the integer solutions to $(1)$ have been found for all $i$ such that $i \le k$ where $k < n - 1$. === Induction Step === We know that: :$r_{k - 1} = r_k q_{k + 1} + r_{k + 1}$ Thus, by the induction hypothesis: :$\paren {a x_{k - 1} + b y_{k - 1} } - \paren {a x_k + b y_k} q_{k + 1} = r_{k + 1}$ which can be rewritten as: :$\paren {x_{k - 1} - x_k q_{k + 1} } a + \paren {y_{k - 1} - y_k q_{k + 1} } b = r_{k + 1}$ Hence we have the following solutions to $(1)$ when $i = k + 1$: :$x_{k + 1} = x_{k - 1} - x_k q_{k + 1}$ :$y_{k + 1} = y_{k - 1} - y_k q_{k + 1}$ The result follows by the Principle of Mathematical Induction. {{qed}}
Let $a, b \in \Z$ such that $a$ and $b$ are not both zero. Let $J$ be the set of all integer combinations of $a$ and $b$: :$J = \set {x: x = m a + n b: m, n \in \Z}$ First we show that $J$ is an ideal of $\Z$ Let $\alpha = m_1 a + n_1 b$ and $\beta = m_2 a + n_2 b$, and let $c \in \Z$ Then $\alpha,\beta \in J$ and : {{begin-eqn}} {{eqn | l = \alpha + \beta        | r = m_1 a + n_1 b + m_2 a + n_2 b  }} {{eqn | r = \paren {m_1 + m_2} a + \paren {n_1 + n_2} b }} {{eqn | ll= \leadsto       | l = \alpha + \beta       | o = \in       | r = J }} {{end-eqn}} {{begin-eqn}} {{eqn | l = c \alpha       | r = c \paren {m_1 a + n_1 b} }} {{eqn | r = \paren {c m_1} a + \paren {c n_1} b }} {{eqn | ll= \leadsto       | l =  c \alpha       | o = \in       | r = J }} {{end-eqn}} Thus $J$ is an integral ideal. We have that: {{begin-eqn}} {{eqn | l = a       | r = 1 a + 0 b       | c =  }} {{eqn | lo= \land       | l = b       | r = 0 a + 1 b       | c =  }} {{eqn | ll= \leadsto       | l = a, b       | o = \in       | r = J       | c =  }} {{end-eqn}} $a$ and $b$ are not both zero, thus: :$J \ne \set 0$ By the something {theorem about ideals}: :$\exists x_0 > 0 : J = x_0 \Z$ :$a \in J \land \set {J = x_0 \Z} \implies x_0 \divides a$ :$b \in J \land \set {J = x_0 \Z} \implies x_0 \divides b$ :$x_0 \divides a \land x_0 \divides b \implies x_0 \in \map D {a, b}$ {{explain|What is $\map D {a, b}$?}} Furthermore: :$x_0 \in J \implies \exists r, s \in \Z : x_0 = r a + s b$ Let $x_1 \in \map D {a, b}$. Then: {{begin-eqn}} {{eqn | l = x_1 \in \map D {a, b}       | o = \leadsto       | r = x_1 \divides a \land x_1 \divides b }} {{eqn | o = \leadsto       | r = x_1 \divides \paren {r a + s b} }} {{eqn | o = \leadsto       | r = x_1 \vert x_0 }} {{eqn | o = \leadsto       | r = \size {x_1} \le \size {x_0} = x_0 }} {{end-eqn}} Thus: :$x_0 = \max \set {\map D {a, b} } = \gcd \set {a, b} = r a + s b$ {{qed}}
Let $\gcd \set {a, b} = d$. Let $\dfrac a d = p$ and $\dfrac b d = q$. From Integers Divided by GCD are Coprime: :$\gcd \left\{{p, q}\right\} = 1$ From Integer Combination of Coprime Integers: :$\exists x, y \in \Z: p x + q y = 1$ The result follows by multiplying both sides by $d$. {{qed}}
We have that Integers are Euclidean Domain, where the Euclidean valuation $\nu$ is defined as: :$\map \nu x = \size x$ The result follows from Bézout's Lemma on Euclidean Domain. {{qed}}
We can use Primitive Recursion on One Variable to find $g: \N^2 \to \N$ and $h: \N \to \N$ such that: :$h \left({n}\right) = \begin{cases} \operatorname{zero} \left({n}\right) & : n = 0 \\ g \left({n-1, h \left({n-1}\right)}\right) & : n > 0  \end{cases} $ By setting: :$g \left({n, m}\right) = \operatorname{pr}^2_1\left({n, m}\right)$ we see that setting $h = \operatorname{pred}$ fits the pattern. We have that the $\operatorname{pr}^2_1$ and $\operatorname{zero}$ functions are basic primitive recursive functions. Hence the result. {{qed}} Category:Primitive Recursive Functions kusr6vu7kyaaq9k2mx8hkzzx11jlpxq
We see that: $n \mathop {\dot -} \paren {m + 1} = \begin{cases} 0 & : n \mathop {\dot -} m = 0 \\ \paren {n \mathop {\dot -} m} - 1 & : n \mathop {\dot -} m > 0 \end{cases}$ Hence we can define cut-off subtraction as: :$n \mathop {\dot -} m = \begin{cases} n & : m = 0 \\ \operatorname{pred} \paren {n \mathop {\dot -} \paren {m - 1} } & : m > 0 \end{cases}$ This is a definition by primitive recursion from the primitive recursive function $\operatorname{pred}$. Hence the result. {{qed}}
We see that: :$\max \left({n, m}\right) = \left({n \ \dot - \ m}\right) + m$ because: :$(1):\quad n > m \implies \left({n \ \dot - \ m}\right) + m = n - m + m = n$ :$(2):\quad n < m \implies \left({n \ \dot - \ m}\right) + m = 0 + m = m$ :$(3):\quad n = m \implies \left({n \ \dot - \ m}\right) + m = 0 + m = m = n$ Hence we see that $\max$ is obtained by substitution from the primitive recursive function $n \ \dot - \ m$. Hence the result. {{qed}} Category:Primitive Recursive Functions j6mmj7vimyzj9hlemx08lzwqrqsvlsh
From the definitions of max and min: :$\max \left({a, b}\right) = \begin{cases} b: & a \le b \\ a: & b \le a \end{cases}$ and :$\min \left({a, b}\right) = \begin{cases} a: & a \le b \\ b: & b \le a \end{cases}$ * Let $a < b$. Then: : $\max \left({a, b}\right) + \min\left({a, b}\right) = b + a$ * Let $a > b$. Then: : $\max \left({a, b}\right) + \min \left({a, b}\right) = a + b$ * Finally, let $a = b$. Then: : $\max \left({a, b}\right) = \min \left({a, b}\right) = a = b$ Hence: : $\max \left({a, b}\right) + \min \left({a, b}\right) = 2a = 2b = a + b$ {{qed}} Note that this result does not apply to $a, b \in \C$ as there is no concept of ordering on the complex numbers $\C$. Category:Algebra cfpqqeriqz6p5nfk1w3v9b8xl2f9cfc
From Sum Less Maximum is Minimum we have that: :$\min \left({n, m}\right) = n + m  - \max \left({n, m}\right)$. As $n + m \ge \max \left({n, m}\right)$, we have that: :$\min \left({n, m}\right) = n + m \ \dot - \ \max \left({n, m}\right)$ Hence we see that $\min$ is obtained by substitution from: * the primitive recursive function $n \ \dot - \ m$ * the primitive recursive function $\max \left({n, m}\right)$. Hence the result. {{qed}} Category:Primitive Recursive Functions ls9kaltnxfkakt319rjmj8ioumz3th8
We note that: :$\size {n - m} = \paren {n \mathop {\dot -} m} + \paren {m \mathop {\dot -} n} = \map {\operatorname {add} } {\paren {n \mathop {\dot -} m}, \paren {m \mathop {\dot -} n} }$ Next we note that: :$m \mathop {\dot -} n = \map {\pr^2_2} {n, m} \mathop {\dot -} \map {\pr^2_1} {n, m}$ where $\pr^2_k$ is the projection function. Then: {{begin-eqn}} {{eqn | l = \map {\operatorname {adf} } {n, m}       | r = \size {n - m}       | c =  }} {{eqn | r = \paren {n \mathop {\dot -} m} + \paren {m \mathop {\dot -} n}       | c =  }} {{eqn | r = \map {\operatorname {add} } {\paren {n \mathop {\dot -} m}, \paren {m \mathop {\dot -} n} }       | c =  }} {{eqn | r = \map {\operatorname {add} } {\paren {n \mathop {\dot -} m}, \paren {\map {\pr^2_2} {n, m} \mathop {\dot -} \map {\pr^2_1} {n, m} } }       | c =  }} {{end-eqn}} Hence we see that $\operatorname {adf}$ is obtained by substitution from: :the primitive recursive function $n \mathop {\dot -} m$ :the primitive recursive function $\map {\operatorname {add} } {n, m}$ :the projection function. Hence the result. {{qed}} Category:Primitive Recursive Functions 80gkgdqvx01gp9gkqlv41rm4j7i8s6b
This follows immediately from: * a set is primitive recursive if its characteristic function is primitive recursive * the fact that every Primitive Recursive Function is URM Computable. {{qed}}
We note that: :$1 \mathop {\dot -} n = \begin{cases} 1 & : n = 0 \\ 0 & : n > 0 \end{cases}$ and so the characteristic function $\chi_{\left\{{0}\right\}}$ is given by $\chi_{\left\{{0}\right\}} \left({n}\right) = 1 \mathop {\dot -} n$. So $\chi_{\left\{{0}\right\}}$ is obtained by substitution from the primitive recursive function $1 \mathop {\dot -} n$ using constants, which are primitive recursive. Hence the result. {{qed}} Category:Primitive Recursive Functions 89z90wvo7yu203urczj8d1365qzgprg
We have that the characteristic function $\chi_{\left\{{0}\right\}}$ of $\left\{{0}\right\}$ is primitive recursive. We note that: * If $n = 0$ then $\chi_{\left\{{0}\right\}} \left({n}\right) = 1$ therefore $\chi_{\left\{{0}\right\}} \left({\chi_{\left\{{0}\right\}} \left({n}\right)}\right) = 0$. * If $n > 0$ then $\chi_{\left\{{0}\right\}} \left({n}\right) = 0$ therefore $\chi_{\left\{{0}\right\}} \left({\chi_{\left\{{0}\right\}} \left({n}\right)}\right) = 1$. Thus $\chi_{\left\{{0}\right\}} \left({\chi_{\left\{{0}\right\}}\left({n}\right)}\right) = \chi_{\N^*} \left({n}\right)$. So $\chi_{\N^*}$ is obtained by substitution from the primitive recursive function $\chi_{\left\{{0}\right\}}$. Hence the result. {{qed}} Category:Primitive Recursive Functions etnxxmg7gvuqeciionb7ged49tauysn
We have that the characteristic function $\chi_{\N^*}$ of $\N^*$, where $\N^* = \N \setminus \left\{{0}\right\}$, is primitive recursive. We also have by definition that $\operatorname{sgn} \left({n}\right) = \chi_{\N^*} \left({n}\right)$. Thus $\operatorname{sgn}$ is primitive recursive. Now $\N - \N^* = \left\{{0}\right\}$ from Relative Complement of Relative Complement. We also have by definition that $\overline {\operatorname{sgn}} \left({n}\right) = \chi_{\left\{{0}\right\}} \left({n}\right)$. Thus $\overline {\operatorname{sgn}}$ is primitive recursive from Complement of Primitive Recursive Set. {{qed}} Category:Primitive Recursive Functions ha43yde7o896e1ool8qnxktcqd60vyg
The characteristic function $\chi_\N: \N \to \N$ is defined as: :$\forall n \in \N: \chi_\N \left({n}\right) = 1$. So: : $\chi_\N \left({n}\right) = f^1_1 \left({n}\right)$ The constant function $f^1_1$ is primitive recursive. Hence the result. {{qed}} Category:Primitive Recursive Functions Category:Natural Numbers 10vvk2mb2nm8d17tlbp91j9l7rcdjpc
By definition, we have that the characteristic function $\chi_{\N \mathop \setminus S} \left({n}\right) = 1$ {{iff}} $\chi_S \left({n}\right) = 0$. So: : $\chi_{\N \mathop \setminus S} \left({n}\right) = \chi_{\left\{{0}\right\}} \left({\chi_S \left({n}\right)}\right)$ Thus $\chi_{\N \mathop \setminus S}$ is obtained by substitution from $\chi_{\left\{{0}\right\}}$ and $\chi_S$. The result follows from Set Containing Only Zero is Primitive Recursive. {{qed}} Category:Primitive Recursive Functions Category:Relative Complement e3bgbvgrhzig0xzivxy54xijrzynxu7
$A$ and $B$ are primitive recursive, therefore so are their [Definition:Characteristic Function of Set|characteristic functions]] $\chi_A$ and $\chi_B$. Let $n \in \N$ be a natural number. From Characteristic Function of Intersection: Variant 1: :$\chi_{A \cap B} \left({n}\right) = \chi_A \left({n}\right) \times \chi_B \left({n}\right)$ So: : $\chi_{A \cap B} \left({n}\right) = \operatorname{mult} \left({\chi_A \left({n}\right), \chi_B \left({n}\right)}\right)$ Thus $A \cap B$ is defined by substitution from the primitive recursive functions $\operatorname{mult}$, $\chi_A$ and $\chi_B$. Hence the result. {{qed}} Category:Primitive Recursive Functions Category:Set Intersection f9dru7looqz6dy9n09w241yqb5xr2du
$A$ and $B$ are primitive recursive, therefore so are their characteristic functions $\chi_A$ and $\chi_B$. Let $n \in \N$ be a natural number. Then $n \in A \cup B \iff \chi_A \left({n}\right) + \chi_B \left({n}\right) > 0$. So: {{begin-eqn}} {{eqn | l = \chi_{A \cup B} \left({n}\right)       | r = \operatorname{sgn} \left({\chi_A \left({n}\right) + \chi_B \left({n}\right)}\right)       | c = Signum Function is Primitive Recursive }} {{eqn | r = \operatorname{sgn} \left({\operatorname{add} \left({\chi_A \left({n}\right), \chi_B \left({n}\right)}\right)}\right)       | c = Addition is Primitive Recursive }} {{end-eqn}} Thus $A \cup B$ is defined by substitution from the primitive recursive functions $\operatorname{sgn}$, $\operatorname{add}$, $\chi_A$ and $\chi_B$. Hence the result. {{qed}} Category:Primitive Recursive Functions Category:Set Union jzuuii96m9d4tlnaycoc63rmwvfejmx
If $n \in E$ then $n$ is of the form $n = 2 k$ where $k \in \N$. We have that: * if the characteristic function $\chi_E \left({n}\right) = 1$ then $\chi_E \left({n + 1}\right) = 0$. * if the characteristic function $\chi_E \left({n}\right) = 0$ then $\chi_E \left({n + 1}\right) = 1$. So $\chi_E$ can be defined by: :$\chi_E \left({n}\right) = \begin{cases} 1 & : n = 0 \\ \overline{\operatorname{sgn}} \left({\chi_E \left({n-1}\right)}\right) & : n > 0 \end{cases}$ So $\chi_E$ is obtained by primitive recursion from the constant $1$ and the primitive recursive function $\overline{\operatorname{sgn}}$. Hence the result. {{qed}} Category:Primitive Recursive Functions nx2plwwvqk0tjkft9114n6rqixp076f
This follows immediately from: * a relation is primitive recursive if its characteristic function is a primitive recursive * the fact that every Primitive Recursive Function is URM Computable. {{qed}}