I'm pretty clear with definition of substitutability for primary cases, within which the target variable to be replaced is totally free or completely bound, all over the formula.
For example, assume we're gonna find $\phi_{t}^{x}$ (Let $S$ be a unary function):
1- $x$ is bound and not free in $\phi$: $\phi:\equiv \forall x(x=y \rightarrow Sx = Sy)$ where $t=S0$
So, $\phi_{t}^{x} = (S0=y \rightarrow SS0 = Sy)$. But in view of the substitutability test, we can say $t$ is substitutable in $\phi$ instead of $x$.
2- $x$ is free in $\phi$ and $y$ does occur in $t$: $\phi:\equiv \forall y(x=y \rightarrow Sx = Sy)$ where $t=Sy$
So, $\phi_{t}^{x} = \forall y(Sy=y \rightarrow SSy = Sy)$. In view of the substitutability test, $t$ is NOT substitutable in $\phi$ instead of $x$.
But I'm not completely clear about "partially-free occurrences" of $x$:
3- $x$ is partially-free (or partially-bound): $\phi:\equiv x=y \rightarrow (\forall x)(Sx = Sy)$ where $t=Sy$
In this case, one is authorized to replace first $x$ with $t$ (because its a free occurrence), but not the second one (due to its bound property). Therefore, it can't pass the substitutability test, in overall case. Mathematically:
$\phi_{t}^{x} = Sy=y \rightarrow (SSy = Sy)$
So, can I conclude results below, in summary?
Substitutability is
1- defined
2- undefined
3- undefined