Characterization of factorial balanced set of words. In the following, all words are defined over the alphabet $\{0,1\}$. If $w$ is a word, then


*

*we let $h\left(w\right)$ denote the number of $1$s in $w$;

*we let $\left|w\right|$ denote the length of $w$;

*we set $\pi\left(w\right) = \dfrac{h\left(w\right)}{\left|w\right|}$ (this is called the slope of $w$).
A set $S$ of words is said to be factorial if every factor of every word $w \in S$ again belongs to $S$.
In Algebraic Combinatorics on Words M. Lothaire prove the following statement:
Let $X$ be a factorial set of words over the alphabet $\{0,1\}$. Then $X$ is balanced if and only if for all $u,v\in X$ with $|u|,|v| > 0$ holds
$$|\pi(u) - \pi(v)| < \frac{1}{|u|} + \frac{1}{|v|}.$$
The proof can be found here:
http://www-igm.univ-mlv.fr/~berstel/Lothaire/AlgCWContents.html in the chapter on Sturmian words (Proposition 2.1.7). In the proof they claim, that if $|x| > |y|$ and $x = zt$ with $|z| = |y|$ one can prove by induction over $|x|+|y|$ that
$$|\pi(t) - \pi(y)| < \frac{1}{|t|} + \frac{1}{|y|}.$$
However, I have not been able to work out how this is done. Can someone explain how this is proved?
 A: I suspect (without really having read this section of Lothaire's book) that the words "Arguing by induction" signify that the whole proof of "if $X$ is balanced, then $\left|\pi\left(x\right) - \pi\left(y\right)\right| < \dfrac{1}{\left|x\right|} + \dfrac{1}{\left|y\right|}$" is being organized as follows:
Assume that $X$ is balanced. We want to prove the inequality $\left|\pi\left(x\right) - \pi\left(y\right)\right| < \dfrac{1}{\left|x\right|} + \dfrac{1}{\left|y\right|}$ for any two nonempty words $x, y \in X$. We prove this by strong induction on $\left|x\right|+\left|y\right|$. In the inductive step, assume that $\left|x\right| > \left|y\right|$ (since the $\left|x\right| = \left|y\right|$ case is easy, and the $\left|x\right| < \left|y\right|$ case turns into the $\left|x\right| > \left|y\right|$ case when $x$ and $y$ are swapped). Then, write $x$ as $x = zt$ with $\left|z\right| = \left|y\right|$. Then, $t$ is a nonempty word shorter than $x$. Hence, $\left|t\right|+\left|y\right| < \left|x\right|+\left|y\right|$. Thus, our induction hypothesis shows that the inequality that we are trying to prove for our two words $x$ and $y$ is already proved for the two words $t$ and $y$. In other words, we have $\left|\pi\left(t\right) - \pi\left(y\right)\right| < \dfrac{1}{\left|t\right|} + \dfrac{1}{\left|y\right|}$.
