I am trying to understand quantifier-free induction in the system called PRA - primitive recursive arithmetic which states the following:
$$ \frac{ \varphi[0] \quad \varphi[n] \implies \varphi[Sn]}{\varphi[m]} $$
Now, suppose we are given a rational approximation of $\sqrt{2}$ as follows (I will work with the naturals together with zero):
$$ \textrm{Let } x_0:=1 \\ \textrm{Set } x_{n+1}:=\frac{1}{2} \left( x_n + \frac{2}{x_n} \right) \textrm{for } n=0,1,2,...$$
I want to construct the following term:
$$ c(a) = \left\{\begin{matrix} 0, a < \sqrt{2}\\ 1, a \geq \sqrt{2} \end{matrix}\right. $$
for any given rational number $a$. I will use the following definitions for comparison:
$$ \begin{matrix} \sqrt{2} > a \triangleq \exists n \geq 0 . x_n > a + 2^{-n} \\ \sqrt{2} \leq a \triangleq \forall n \geq 0 . x_n \leq a + 2^{-n} \end{matrix} $$
Denote $\varphi[n] := x_n \leq a + 2^{-n} $ and $ \psi[n] := x_n > a + 2^{-n}$. Then,
$$ c(a) = \left\{\begin{matrix} 0, \exists n \geq 0 . \psi[n] := x_n > a + 2^{-n} \\ 1, \forall n \geq 0 . \varphi[n] := x_n \leq a + 2^{-n} \end{matrix}\right. $$
I will assume that the quantifiers can be eliminated in the final claims. For example, $\exists n \geq 0 . \psi[n] := x_n > a + 2^{-n}$ means that a relevant $n$ has been constructed.
Questions:
Can we use induction to show $c(a)=0$?
Is the following true in PRA about these two particular formulas?
$\forall n \geq 0 . \varphi[n] \Longleftrightarrow \varphi[m]$ assuming $m$ is free in $\varphi[m]$. In other words, does $\forall n \geq 0 . \varphi[n]$ admit quantifier elimination?
Is $c(a)$ decidable?
Update: after an insightful answer, I have started wondering how to define $c(a)$ for a transcendent number, such as $\pi$, which is still definable as a Cauchy sequence though.
Update: as seen in here, comparison of transcendental numbers with arbitrary rationals is much more subtle.