hcju/proofwikiqa huggingface dataset:
Let us extract the largest square divisor of $n$, and write: :$n = m^2 r$ where $r$ is square-free. === Necessary Condition === Suppose $r$ has no prime divisor in the form $4 k + 3$. If $r = 1$ then $n^2 = m^2 + 0^2$ and nothing needs to be proved. If $r > 1$ then $r$ is a product of one or more primes, each of which is either $2$ or in the form $4 k + 1$. Now from Fermat's Two Squares Theorem, each of these can be expressed as the sum of two squares. By the extension to the Brahmagupta-Fibonacci Identity, the product of all these can itself be expressed as the sum of two squares. So $r = a^2 + b^2$, say. Then: :$n = m^2 \paren {a^2 + b^2} = \paren {m a}^2 + \paren {m b}^2$ So $n$ can be expressed as the sum of two squares. {{qed|lemma}} === Sufficient Condition === Now suppose that $n$ can be expressed as the sum of two squares, say: :$n = m^2 r = a^2 + b^2$ First, any common divisor of $a$ and $b$ may be cancelled as follows. If $\gcd \set {a, b} = d$, then we can write: :$a = a' d, b = b' d$ where $\gcd \set {a', b'} = 1$ from Integers Divided by GCD are Coprime. So: :$m^2 r = d^2 \paren {a'^2 + b'^2}$ As $r$ is square-free, $d \divides m$ and so, writing $m' = \dfrac m d$, we get: :$m'^2 r = a'^2 + b'^2$ We need to show that $r$ has no prime factor of the form $4 k + 3$. {{AimForCont}} $p = 4 k + 3$ divides $r$. Then: :$a'^2 + b'^2 \equiv 0 \implies a'^2 \equiv -b'^2 \pmod p$ If $p \divides a'$ we would have: :$p \divides b'$ which contradicts $\gcd \set {a', b'} = 1$. So: :$\gcd \set {a', p} = \gcd \set {b', p} = 1$ and we can apply Fermat's Little Theorem: :$a'^{p-1} \equiv b'^{p-1} \equiv 1 \pmod p$ So, we put $p = 4 k + 3$: {{begin-eqn}} {{eqn | l = 1       | o = \equiv       | r = a'^{p - 1}       | rr= \pmod p }} {{eqn | o = \equiv       | r = a'^{4 k + 2}       | rr= \pmod p }} {{eqn | o = \equiv       | r = \paren {a'^2}^{2 k + 1}       | rr= \pmod p }} {{eqn | o = \equiv       | r = \paren {-b'^2}^{2 k + 1}       | rr= \pmod p }} {{eqn | o = \equiv       | r = \paren {-1}^{2 k + 1} \paren {b'^2}^{2 k + 1}       | rr= \pmod p }} {{eqn | o = \equiv       | r = \paren {-1} b'^{p - 1}       | rr= \pmod p }} {{eqn | o = \equiv       | r = -1       | rr= \pmod p }} {{end-eqn}} $-1 \equiv 1 \pmod p$ is not possible for an odd prime. So we have obtained our contradiction. The result follows. {{qed}}
=== Proof for Even Integer === Let $x \in \Z$ be even. Then from Square Modulo 4: : $x^2 \equiv 0 \pmod 4$ Hence there are two possibilities for $x^2$: : $x^2 \equiv 0 \pmod 8$ : $x^2 \equiv 4 \pmod 8$ The fact that there do exist such squares can be demonstrated by example: : $2^2 = 4 \equiv 4 \pmod 8$ : $4^2 = 16 \equiv 0 \pmod 8$ {{qed|lemma}} === Proof for Odd Integer === Let $x \in \Z$ be odd. Then from Odd Square Modulo 8: : $x^2 \equiv 1 \pmod 8$ {{qed}} Category:Modulo Arithmetic Category:Square Numbers lnlg5jce70nwthgxaxgwp9txarizxio
=== Sufficient Condition === Suppose $r$ is not of the form $4^n \paren {8 m + 7}$. Then we need to show that it can always be expressed as the sum of three squares. {{ProofWanted}} === Necessary Condition === From Square Modulo 8, the squares modulo $8$ are $0, 1$ and $4$. So the sum of three squares can be congruent modulo $8$ to any of the values $0, 1, 2, 3, 4, 5$ or $6$, but not $7$. So no number of the form $8 m + 7$ can be the sum of three squares. Now, suppose that $\exists n \ge 1, m \ge 0$ such that: :$4^n \paren {8 m + 7} = x^2 + y^2 + z^2$ As the {{LHS}} is congruent modulo 4 to $0$, and as squares modulo 4 are either $0$ or $1$, it must be that $x, y$ and $z$ are all even. Putting $x = 2 x_1, y = 2 y_1, z = 2 z_1$, we get: :$4^{n - 1} \paren {8 m + 7} = x_1^2 + y_1^2 + z_1^2$ If $n - 1 > 1$ then $x_1, y_1$ and $z_1$ are all still even, and the argument can be repeated: :$4^{n - 2} \paren {8 m + 7} = x_2^2 + y_2^2 + z_2^2$ Thus we descend through all powers of $4$ till $8 m + 7$ itself is expressed as the sum of three squares. But this is impossible, as we saw above. So the assumption that $4^n \paren {8 m + 7}$ can be expressed as the sum of three squares is false. {{qed}}
:$(1)$: We have by  definition that each point is in exactly $r$ blocks, and each block is of size $k$. We have that $b k$ is the number of blocks times the size of each block. We also have that $r v$ is the number of points times the number of blocks each point is in. The two must clearly be equal. :$(2)$: Comparing the left and right hand sides of the equation we can see that: {{LHS}}: An arbitrary point must be paired with $v-1$ other points. If $\lambda>1$ then every point is paired $\lambda \paren {v - 1}$ times. {{RHS}}: An arbitrary point is paired with $k-1$ other points for each of the $r$ blocks it is in. Therefore it is paired $r \paren {k - 1}$ times. Both values give the number of times an arbitrary point is paired, therefore {{LHS}} = {{RHS}}. :$(3)$: From equation $(1)$, we have that $r = \dfrac {b k} v$ From $(2)$ we have that: :$r = \dfrac {v - 1} {k - 1} \lambda$ So: {{begin-eqn}} {{eqn | l = \frac {b k} v       | r = \frac {v - 1} {k - 1} \lambda       | c = substituting for $r$ }} {{eqn | ll= \leadsto       | l = b k \paren {k - 1}       | r = \lambda v \paren {v - 1}       | c =  }} {{eqn | ll= \leadsto       | l = b \binom k 2       | r = \lambda \binom v 2       | c = Binomial Coefficient with Two }} {{end-eqn}} {{qed}} {{proof wanted|Yes I know the other ones are obvious but there's other things I'd rather do at the moment.}} Category:Design Theory gqbhu5o11u9crjnq5sivnlla3s9z8u1
Let $S = \set s$. For $f$ to be an injection, all we need to do is show: :$\forall x_1, x_2 \in S: \map f {x_1} = \map f {x_2} \implies x_1 = x_2$ But as $S$ is a singleton, it follows that: :$x_1 = x_2 = s$ Hence the result. {{qed}} Category:Injections Category:Singletons 8uicojvbyk3yq3v7gffgk7xd1qriew8
Let $T = \left\{{t}\right\}$. For $f$ to be a surjection, all we need to do is show: :$\forall y \in T: \exists x \in S: f \left({x}\right) = y$. As $S \ne \varnothing$, $\exists s \in S$. As $f: S \to T$ is a mapping, it follows that $f \left({s}\right) \in T$. So as $f \left({s}\right) \in T$ it follows that $t = f \left({s}\right)$. As $T = \left\{{t}\right\}$, it follows that $\forall y \in T: \exists x \in S: y = f \left({x}\right)$. Hence the result. {{qed}} Category:Surjections Category:Singletons dropzzlu7ywnrfc0ao5bkoc4gb1rq0a
{{begin-eqn}} {{eqn | l = \map G z       | r = \sum_{n \mathop = 0}^\infty r z^n       | c = {{Defof|Generating Function}} }} {{eqn | r = r \sum_{n \mathop = 0}^\infty z^n       | c =  }} {{eqn | r = \frac r {1 - z}       | c = Sum of Infinite Geometric Sequence }} {{end-eqn}} for $\size z < 1$. {{qed}}
From Equation of Circle: :$x^2 + y^2 = r^2$ Thus $y = \pm \sqrt {r^2 - x^2}$. It follows that from the geometric interpretation of the definite integral: {{begin-eqn}} {{eqn | l = A       | r = \int_{-r}^r \paren {\sqrt {r^2 - x^2} - \paren {-\sqrt {r^2 - x^2} } } \rd x }} {{eqn | r = \int_{-r}^r 2 \sqrt {r^2 - x^2} \rd x }} {{eqn | r = \int_{-r}^r 2 r \sqrt {1 - \frac {x^2} {r^2} } \rd x }} {{end-eqn}} Let $x = r \sin \theta$ (note that we can do this because $-r \le x \le r$). Thus $\theta = \map \arcsin {\dfrac x r}$ and $\rd x = r \cos \theta \rd \theta$. {{begin-eqn}} {{eqn | l = A       | r = \int_{\map \arcsin {\frac {-r} r} }^{\map \arcsin {\frac r r} } 2 r^2 \sqrt {1 - \frac {\paren {r \sin \theta}^2} {r^2} } \cos \theta \rd \theta       | c = Integration by Substitution }} {{eqn | r = \int_{-\frac \pi 2}^{\frac \pi 2} 2 r^2 \sqrt {1 - \sin^2 \theta} \cos \theta \rd \theta }} {{eqn | r = \int_{-\frac \pi 2}^{\frac \pi 2} 2 r^2 \sqrt {\cos^2 \theta} \cos \theta \rd \theta       | c = Sum of Squares of Sine and Cosine }} {{eqn | r = r^2 \int_{-\frac \pi 2}^{\frac \pi 2} 2 \cos^2 \theta \rd \theta }} {{eqn | r = r^2 \int_{-\frac \pi 2}^{\frac \pi 2} \paren {1 + \map \cos {2 \theta} } \rd \theta       | c = Double Angle Formula for Cosine: Corollary 1 }} {{eqn | r = r^2 \intlimits {\theta + \frac 1 2 \map \sin {2 \theta} } {-\frac \pi 2} {\frac \pi 2}       | c = from Integration of Constant and Primitive of Cosine Function }} {{eqn | r = r^2 \paren {\frac \pi 2 + \frac 1 2 \map \sin {2 \cdot \frac {-\pi} 2} - \frac {-\pi} 2 - \frac 1 2 \map \sin {2 \cdot \frac \pi 2} } }} {{eqn | r = r^2 \paren {2 \cdot \frac \pi 2 + 2 \cdot \frac 1 2 \cdot 0} }} {{eqn | r = \pi r^2 }} {{end-eqn}} {{qed}}
Proof by shell integration: The circle can be divided into a set of infinitesimally thin rings, each of which has area $2 \pi t \rd t$, since the ring has length $2 \pi t$ and thickness $\rd t$. {{Handwaving|The fact that the above is a valid approximation needs to be established.}} {{begin-eqn}} {{eqn | l = A       | r = \int_0^r 2 \pi t \rd t       | c = Perimeter of Circle }} {{eqn | r = \bigintlimits {\pi t^2} 0 r }} {{eqn | r = \pi r^2 }} {{end-eqn}} {{Qed}}
:File:Area Equal.jpg Refer to the figure. Construct a circle with radius r and circumference $c$, where its area is denoted by $C$. Construct a triangle with height r and base $c$, where its area is denoted by $T$. === Lemma 1: $T = \pi r^2$ === {{begin-eqn}} {{eqn | l = T       | r = \frac {r c} 2       | c = Area of Triangle in Terms of Side and Altitude }} {{eqn | r = \frac {r 2 \pi r} 2       | c = Perimeter of Circle }} {{eqn | r = \pi r^2 }} {{end-eqn}} {{qed|lemma}} === Lemma 2: $T \ge C$ === :File:Area Smaller.jpg {{AimForCont}} $T < C$. It should be possible to construct a regular polygon with area $P$, where $T < P < C$. For any given regular polygon: :$P = \dfrac {h q} 2$ where: :$q$ is the perimeter of the polygon :$h$ is the height of any given triangular part of it :$P$ is the area.   On one hand: :$P > T \implies \dfrac {h q} 2 > \dfrac {r c} 2$ On the other hand: :$0 < h < r \land 0 < q < c \implies \dfrac {h q} 2 < \dfrac {r c} 2$ Hence a contradiction is obtained. Hence $\neg T < C$. Hence $T \ge C$. {{qed|lemma}} === Lemma 3: $T \le C$ === :File:Area Greater.jpg {{AimForCont}} $T > C$. It should be possible to construct a regular polygon with area $P$, where $C < P < T$. From Area of Polygon by Inradius and Perimeter: :$P = \dfrac {h q} 2$ where: :$q$ is the perimeter of the regular polygon :$h$ is the inradius of the regular polygon :$P$ is the area. as each triangle has the base $B = \dfrac q n$ and area $A = \dfrac {h q} {2 n}$ and with $n$ triangles we get $P = \dfrac {h q} 2$ {{improve|Better to link to the result which demonstrates this. The redlink Area of Polygon by Inradius and Perimeter opens up the result which is to be linked to. Note that first it needs to be established that a polygon can indeed be divided into $n$ congruent isosceles triangles, as far as I know this has not yet been done.}} On one hand: :$P < T \implies \dfrac {h q} 2 < \dfrac {r c} 2$ On the other hand: :$0 < h = r \land 0 < c < q \implies \dfrac {h q} 2 > \dfrac {r c} 2$ Hence a contradiction is obtained. Hence $\neg T > C$. Hence $T \le C$. {{qed|lemma}} === Final Proof === :$T \ge C$ (from Lemma 2) :$T \le C$ (from Lemma 3) :$\therefore T \mathop = C$ :$\therefore C \mathop = T \mathop = \pi r^2$ (from Lemma 1) {{qed}}
Expressing the area in polar coordinates: {{begin-eqn}} {{eqn | l = \iint \rd A       | r = \int_0^r \int_0^{2 \pi} t \rd t \rd \theta       | c =  }} {{eqn | r = \intlimits {\int_0^r t \theta} 0 {2 \pi} \rd t       | c =  }} {{eqn | r = \int_0^r 2 \pi t \rd t       | c =  }} {{eqn | r = 2 \pi \paren {\intlimits {\frac 1 2 t^2} 0 r}       | c =  }} {{eqn | r = 2 \pi \paren {\frac 1 2 r^2}       | c =  }} {{eqn | r = \pi r^2       | c =  }} {{end-eqn}} {{qed}}
Let the circle of radius $r$ be divided into many sectors: :400px If they are made small enough, they can be approximated to triangles whose heights are all $r$. Let the bases of these triangles be denoted: :$b_1, b_2, b_3, \ldots$ From Area of Triangle in Terms of Side and Altitude, their areas are: :$\dfrac {r b_1} 2, \dfrac {r b_2} 2, \dfrac {r b_3} 2, \ldots$ The area $\mathcal A$ of the circle is given by the sum of the areas of each of these triangles: {{begin-eqn}} {{eqn | l = \mathcal A       | r = \dfrac {r b_1} 2 + \dfrac {r b_2} 2 + \dfrac {r b_3} 2 + \cdots       | c =  }} {{eqn | r = \dfrac r 2 \left({b_1 + b_2 + b_3 + \cdots}\right)       | c =  }} {{end-eqn}} But $b_1 + b_2 + b_3 + \cdots$ is the length of the circumference of the circle. From Perimeter of Circle: :$b_1 + b_2 + b_3 + \cdots = 2 \pi r$ Hence: {{begin-eqn}} {{eqn | l = \mathcal A       | r = \dfrac r 2 \left({b_1 + b_2 + b_3 + \cdots}\right)       | c =  }} {{eqn | r = \dfrac r 2 \left({2 \pi r}\right)       | c =  }} {{eqn | r = \pi r^2       | c =  }} {{end-eqn}} It needs to be noted that this proof is intuitive and non-rigorous. {{qed}}
Apart from the programs given, the only other single-instruction programs are of the form: {| |- ! align="right" | Line !! ! align="left" | Command |- | align="right" | $1$ || | align="left" | $J \left({m, n, q}\right)$ |} The convention is that, at the start of the program, $R_1$ contains the input, and all other registers contain $0$. Suppose $q > 1$. Then whatever $m$ or $n$ are, the program either jumps to $q$ (a location outside the program) or steps one instruction. In either case the program stops without changing what is in $R_1$. Hence this is another way of computing the identity function $I_\N$. Suppose $q = 1$. If $m = n$, then whatever is held in the registers, $r_m = r_n$ and the program will go back to execute step 1 again. Thus the program will loop round and do step 1 endlessly, and never terminate. If $m \ne n$, then the program's behaviour depends on the contents of $R_n$ and $R_m$. If $m = 1$ and $n \ne 1$, then the program will compare the input against the contents of $r_n$. If $r_1 = 0$ the program will go into an endless loop, and never terminate. Otherwise, i.e. if $r_1 \ne 0$, the program will never terminate with $r_1$ unchanged. If $m \ne 1$ and $n \ne 1$ then the program will once more never terminate, as $r_m = r_n = 0$ at the start of the program. So the program: {| |- ! align="right" | Line !! ! align="left" | Command |- | align="right" | $1$ || | align="left" | $J \left({m, n, 1}\right)$ |} does ''not'' specify a URM computable function, as: * when $m = n$ the program will never terminate for any input; * when $m \ne n, m = 1$ the program will never terminate on input $0$; * when $m \ne n, n = 1$ the program similarly will never terminate on input $0$; * when $m \ne n, m \ne 1, n \ne 1$ the program will never terminate for any input. In all cases there is at least one input for which the program will never terminate. The result follows from the definition of URM computability. {{qed}} Category:URM Programs Category:Primitive Recursive Functions 1hwd2h1sy1wfp6cs5zq3tnfc9rlrkpe
The distance in the horizontal direction between $A$ and $B$ is given by $\size {x_1 - x_2}$. The distance in the vertical direction between $A$ and $B$ is given by $\size {y_1 - y_2}$. By definition, the angle between a horizontal and a vertical line is a right angle. So when we place a point $C = \tuple {x_1, y_2}$, $\triangle ABC$ is a right triangle. Thus, by Pythagoras's Theorem: :$d^2 = \size {x_1 - x_2}^2 + \size {y_1 - y_2}^2$ and the result follows. {{qed}}
The null URM program by definition has no instructions. Therefore, the contents of $R_1$ remain unchanged when "running" it. {{qed}} Category:URM Programs Category:Identity Mappings tvva77btbxxa4siytxywya9ssbokgg2
Let $f: \N \to \N$ and $g: \N \to \N$ be URM computable functions of one variable. Let $P$ be a URM program which computes $f$. Let $Q$ be a URM program which computes $g$. Let $s = \lambda \left({Q}\right)$ be the number of basic instructions in $Q$. Let $u = \rho \left({Q}\right)$ be the number of registers used by $Q$. In order to compute $f \circ g$ the program must compute $g$ first (by running $Q$), then use the output of $Q$ as the input of $P$, which must then compute $f$. After $Q$ has computed the value of $g \left({n}\right)$, its output is to be found in $R_1$. Its instruction pointer is greater than $s$, and may at this point be indeterminate. Also, the contents of $R_2, R_3, \ldots, R_u$ are also indeterminate. So we need to do the following things: # The instruction pointer needs to be set to the line immediately after the end of $Q$, that is, to line $s+1$. # The registers used by $Q$, except $R_1$, the one holding the output of $Q$, must be set to $0$. So a Clear Registers Program $Z \left({2, u}\right)$ must be appended to the end of $Q$. # The program $P$ must be appended to the end of $Q$ with $Z \left({2, u}\right)$ appended. However, $P$ no longer starts at line $1$ but at line $\left({q + u - 1}\right)$, so any <tt>Jump</tt> instructions of the form $J \left({m, n, q}\right)$ in $P$ must have $q$ changed to $\left({q + u - 1}\right)$. When that has been achieved, the following happens: # The program runs $Q$, amended if necessary so that the instruction pointer ends up at $s+1$. # The contents of $R_2$ to $R_u$ are then set to zero. # $P$ is now run, with the output of $Q$ in its input $R_1$, and all the other registers set to zero. The output of $P$ can now be found in $R_1$. The resulting program $Q$ followed by $Z \left({2, u}\right)$ followed by $P$ is called: * the '''concatenation of $Q$ and $P$''', or, in general: * a '''concatenated''' program, and is denoted $Q * P$. Note that this is read: * Run $Q$ first; * Then run $P$. So it is read from '''left to right'''. In that sense the notation is different from that of $f \circ g$ for the composition of $f$ and $g$, which is read from '''right to left'''. So $f \circ g$ is computed by $Q * P$. {{qed}} Its length $\lambda \left({Q * P}\right)$ is given as: :$\left({Q * P}\right) = \lambda \left({Q}\right) + \left({u-1}\right) \lambda \left({P}\right)$. The $u-1$ comes from the length of the Clear Registers Program. Thus we have an algorithm for concatenating two URM programs, as follows:
For ease of analysis, let us assume that: * Each of $P$ and $Q$ have already had the appropriate Clear Registers Program $Z \left({2, \rho \left({P}\right)}\right)$ and $Z \left({2, \rho \left({Q}\right)}\right)$ appended to them; * Each of $P$ and $Q$ have already had the appropriate amendments made to their exit jumps so as to lead to the first line of the appropriate Clear Registers Program. (Note that if the latter is a null URM program, this will be the line immediately following the end of the program). Thus we can discuss $P$ and $Q$ without reference to these technical details. When concatenating programs, the only amendments made to the programs themselves are to the contents of the <tt>Jump</tt>. So it is clear that the number, type and order of the basic instructions of both programs are the same. All we have to consider are the amendments to the <tt>Jump</tt>s. Suppose the lengths of $P$ and $Q$ are as follows: * $\lambda \left({P}\right) = t$; * $\lambda \left({Q}\right) = s$. First we look at the <tt>Jump</tt>s of $R$. When we form $\left({Q * R}\right)$, every <tt>Jump</tt> of $R$ of the form $J \left({m, n, q}\right)$ is replaced by $J \left({m, n, q + s}\right)$. Then when forming $P * \left({Q * R}\right)$ the <tt>Jump</tt> $J \left({m, n, q + s}\right)$ is replaced by $J \left({m, n, q + s + t}\right)$. On the other hand, when we form $\left({P * Q}\right) * R$, every <tt>Jump</tt> of $R$ of the form $J \left({m, n, q}\right)$ is replaced directly by $J \left({m, n, q + \left({s + t}\right)}\right)$. Thus the <tt>Jump</tt>s of $R$ have been replaced by the same instructions in each of $\left({P * Q}\right) * R$ and $P * \left({Q * R}\right)$. Now we look at the <tt>Jump</tt>s of $Q$. When forming $\left({Q * R}\right)$, we have already ensured that every <tt>Jump</tt> of $Q$ of the form $J \left({m, n, q}\right)$ where $q > s$ has been replaced by $J \left({m, n, s + 1}\right)$. So when forming $P * \left({Q * R}\right)$ the <tt>Jump</tt> $J \left({m, n, s + 1}\right)$ is replaced by $J \left({m, n, s + t + 1}\right)$. On the other hand, when forming $\left({P * Q}\right)$, every <tt>Jump</tt> of $Q$ of the form $J \left({m, n, q}\right)$ is replaced by $J \left({m, n, q + t}\right)$. We have that $\left({P * Q}\right)$ has $s + t$ instructions. When $q > s$, we take account of the fact that $q + t > s + t$. So in $\left({P * Q}\right) * R$, <tt>Jump</tt>s of the form $J \left({m, n, s + 1}\right)$ are replaced by $J \left({m, n, s + t + 1}\right)$. This agrees with the corresponding <tt>Jump</tt>s in $P * \left({Q * R}\right)$. Similarly, we can show that all other <tt>Jump</tt>s of $Q$, and all <tt>Jump</tt>s of $P$, are amended in exactly the same way in each of $\left({P * Q}\right) * R$ and $P * \left({Q * R}\right)$. Hence the result. {{qed}} Category:URM Programs 1pn5stq6phjehkuuq9jwon8qf6t8qeh
{{begin-eqn}} {{eqn	| l = \int \cos x \rd x 	| r = \frac 1 2 \int \paren {e^{i x} + e^{-i x} } \rd x 	| c = Cosine Exponential Formulation }} {{eqn	| r = \frac 1 {2 i} \paren {e^{i x} - e^{-i x} } + C 	| c = Primitive of Exponential of a x }} {{eqn	| r = \sin x + C 	| c = Sine Exponential Formulation }} {{end-eqn}} {{qed}}
From Derivative of Sine Function: :$\dfrac{\mathrm d}{\mathrm dx} \sin x = \cos x$ The result follows from the definition of primitive. {{Qed}}
From Derivative of Cosine Function: :$\map {\dfrac \d {\d x} } {-\cos x} = \sin x$ The result follows from the definition of primitive. {{qed}}
Each <tt>Jump</tt> of the form $\map J {m, n, q}$ where $q > l$ leads to a line which does not contain an instruction. The line $\map J {m, n, l + 1}$ likewise contains no instructions, by definition. Therefore, when jumping to $\map J {m, n, l + 1}$ the program behaves in exactly the same way: that is, it stops when the instruction $\map J {m, n, l + 1}$ causes the program to jump to line $l + 1$. After the URM program has terminated, its output sits in $R_1$ by convention. Once the URM program reaches line $l + 1$ it has by definition terminated, and because of the modifications to the <tt>Jump</tt>s as defined above, there is no other way that it ''can'' terminate. Any further instructions that are added to a URM program that are placed at line $l + 1$ and those following will therefore be executed in order (as long as none of them are <tt>Jump</tt>s) and the program will then ''really'' terminate. By adding the Clear Registers Program $\map Z {2, u}$ to the end of $P$, the only effect this will have on the operation of the program is to clear all the registers to $0$ except the one the output is in. {{qed}} Category:URM Programs 2ia7tx3ry8qzafgkt88e310ng2i3l4f
This follows immediately from: * The fact that the basic primitive recursive functions are URM computable; * Functions obtained by substitution from URM computable functions are URM computable; * Functions obtained by primitive recursion from URM computable functions are URM computable; * The definition of primitive recursive function. {{qed}}
The proof proceeds by the Principle of Mathematical Induction. === Base Case === First we note that $f_0: \N \to \N$ is the zero function, which is a basic primitive recursive function. This is our base case. === Induction Hypothesis === This is our induction hypothesis: :$f_k: \N \to \N$ is primitive recursive for some given $k \in \N$. Then we need to show: :$f_{k + 1}: \N \to \N$ is primitive recursive. === Induction Step === This is our induction step: :$\map {f_{k + 1} } n = k + 1 = \map \Succ k = \map \Succ {\map {f_k} n}$ Now $\map {f_k} n$ is primitive recursive from our induction hypothesis. Thus $\map {f_{k + 1} } n$ is obtained from the basic primitive recursive function $\Succ$ and $\map {f_k} n$ by substitution. The result follows by the Principle of Mathematical Induction. {{qed}} Category:Primitive Recursive Functions Category:Constant Mappings d9lze0g0094p4jharia6vybbweoagps