Proof of Lemma 1 in Shoenfield's Mathematical Logic I'm having a little trouble with the proof of Lemma 1 (link to screenshot below) in Shoenfield's Mathematical Logic. The overall scheme is easy enough--it's just induction on n. What I don't get is why the induction hypothesis allows us to conclude that $v_i$ is $v_i'$ for $i=1,...,k$ from $v_1...v_k$ and $v_1'...v_k'$ being compatible. That would seemingly require that we know that k is less than n, and as far as I can tell that's not at all guaranteed.
I'm pretty sure that you could argue that $v_i$ and $v_i'$ are the same (or rather, that $u_1$ and $u_1'$ are the same) on the basis of syntax alone. But for that I think you would need to consider a bunch of different cases (the case when v is a function, when it is a predicate, when it is a variable, etc.), which I'd rather not do. So if it's really as simple as invoking the induction hypothesis, I'd love it if someone could explain why.
Here's a screenshot of the lemma.
Here's a link to the book: https://www2.karlin.mff.cuni.cz/~krajicek/shoenfield.pdf. Everything is on pages 14 and 15.
 A: Let us record the context inline for reference:



Schoenfield's approach considers syntactic objects as strings of symbols and we have to interpret operations as such. So, a designator of the form $\mathbf{uv_{1}\ldots v_{n}}$ is string counterpart of the familiar notation $\mathbf{u(v_{1},\ldots, v_{k})}$, where $\mathbf{v_{i}}$ may be an individual variable or a constant, but also a compound term formed by a function. Thus, $\mathbf{u_{1},\ldots, u_{n}}$ is a sequence of strings while $\mathbf{u_{1}\ldots u_{n}}$ is one string composed by a concatenation of strings.
So, let us call $\mathbf{u_{1}\ldots u_{n}}$ and $\mathbf{u'_{1}\ldots u'_{n}}$, $\mathbf{U}_{n}$ and $\mathbf{U'}_{n}$, respectively. If $\mathbf{U}_{n}$ and $\mathbf{U'}_{n}$ are compatible, $\mathbf{U'}_{n}$ is obtained from $\mathbf{U}_{n}$ by concatenating some string $\mathbf{v'_{1}\ldots v'_{k}}$ to the right end of $\mathbf{U}_{n}$, at least, the initial symbols being identical. Hence, if $\mathbf{u_{1}}$ is of the form $\mathbf{vv_{1}\ldots v_{k}}$, then, $\mathbf{u'_{1}}$ is of the form $\mathbf{vv'_{1}\ldots v'_{k}}$.
Suppose, next, that $\mathbf{v_{1}}$ and $\mathbf{v'_{1}}$ are not compatible. Then, $\mathbf{v_{1}}$ must be the last symbol of the initial segment and $\mathbf{v'_{1}}$ must be the first symbol of the adjoined segment. Then, if $\mathbf{u_{1}}$ must be of the form $\mathbf{vv_{1}v_{2}\ldots v_{k}}$, then, $\mathbf{u_{1}}$ must be of the form $\mathbf{vv_{1}v'_{1}\ldots v'_{k}}$. But this is impossible, for the length of the designator $\mathbf{v}$ in $\mathbf{vv_{1}v'_{1}\ldots v'_{k}}$ would be $k+1$. Therefore, $\mathbf{v_{1}}$ and $\mathbf{v'_{1}}$ are compatible. This is a basis for  Schoenfield's remark that

If $\mathbf{uv}$ and $\mathbf{u'v'}$ are compatible, then $\mathbf{u}$
and $\mathbf{u'}$ are compatible; if $\mathbf{uv}$ and $\mathbf{uv'}$
are compatible, then $\mathbf{v}$ and $\mathbf{v'}$ are compatible.

Consequently, $\mathbf{v_{1}}$ and $\mathbf{v'_{1}}$ are identical.
We set down as the inductive hypothesis that $\mathbf{v_{i}}$ and $\mathbf{v'_{i}}$ are identical for the length $k, i = 1,\ldots k$. Then, it should be difficult to see that the rest follows for $n$ as indicated in the excerpt.
Notice that what Schoenfield does is actually to prove the unique readability theorem.
