Assume I have a first order- ($\mathsf{FO}$-) formula $ \varphi(x)$ with free variable $x$ and bounded variables $x',x''$. Then, $\varphi(x) \in \mathsf{FO}^3$ since it has $3$ distinct variables.
Furthermore, assume there is a situation such that we want to call that formula $\varphi$ with parameter $x'$ instead of $x$. Writing $\varphi(x')$ does not work because there is a name clash between the parameter $x'$ and the bounded variable $x'$. Hence, we have to replace the bounded variable $x'$ with $x$ and then write $\varphi(x')$. Of course we could use another variable like $y$ but we want to use as few variables as possible. How do write something like this?
$$ \varphi(x')[x' \leftarrow x]$$
This does not really make sense since we would replace both the parameter $x$ and the bounded variable $x$. Is there any standard notation for my situation? The idea is really simple and I don't want the notation to be too bloated.
I think that there is no "compact" formalization of the required double substitution.
Assuming that [using $v_0, v_1, v_2$] :
we have :
with $v_2$ a new variable. This condition licences us to prove the equivalence.
Now we can perform the second substitution :
But, in general :
We can try with the approach to substitution in John Bell & Moshe Machover, A Course in Mathematical Logic (1977), page 57-on.
The "syntax" for substitution is : $\alpha(x,t)$ and the basic defintion is Definition 3.3 [page 59] :
Thus, considering again the formula :
we perform an alphabetic change using $v_n$, where $v_n$ is the first variable not occurring in $\varphi$, getting :
and then the substitution : $v_1 ← v_0$ (now $v_0$ is free for $v_1$ in the formula), to get :
The result will be :