I want to use this lemma, it is used for canonical numbers used to detect if two trees are isomorphic or not, in AHU algorithm, but the thing is how can i proof this statement with induction?
Lemma: If $x_{1},…,x_{n}$ and $y_{1},…,y_{m}$ are lists of canonical numbers ordered by size, then the concatenations $x_{1}x_{2}⋯x_{n}=y_{1}y_{2}⋯y_{m}$ if and only if $n=m$ and $x_{i}=y_{i}$ for all $i$
I already gave a hint on your other question, but here I give another strategy.
Let $s=s_1s_2\cdots s_n$ be a string, then we call $t\sqsubset s$ an initial part of $s$ if $t=s_1s_2\cdots s_m$ for some $m\leq n$. E.g. if $s=\mathtt{abcdef}$ then $t=\mathtt{abc}$, $t'=\mathtt{abcdef}$ and $t''=\varepsilon$ (the empty string) are all initial parts of $s$.
Now let $X=d_1d_2\cdots d_k$ be a canonical number, with the $d_i$'s its digits. Then $X$ is a string of $0$'s and $1$'s. You can show the following:
Let $x_1=d_1^1d_2^1\cdots d_{k_1}^1$, $x_2=d_1^2d_2^2\cdots d_{k_2}^2$, $\dots$, $x_n=d_1^nd_2^n\cdots d_{k_n}^n$ be the strings of the canonical numbers $x_1,\dots,x_n$. Then let $C=d_1^1\cdots d_{k_1}^1d_1^2\cdots d_{k_2}^2\cdots\cdots d_1^n\cdots d_{k_n}^n$ be the concatenation of the canonical numbers $x_1,\dots,x_n$. You can show that:
From this it should be clear that $x_1\cdots x_n=y_1\cdots y_m$, then $n=m$.
The part that $x_i=y_i$ for all $i$ should follow easily from the fact that the lists are ordered by the size of the numbers. The other direction of the if and only if is hopefully obvious.