\begin{lemma}[Unique lifting of byte-value blocks]
Let $B$ be a list of U8 bytes and let $P,Q$ be lists of natural numbers.
If $\operatorname{map}(b\mapsto b.\mathit{val},B)=P\mathbin{++}Q$,
there is a pair of byte lists $(I,T)$ such that $B=I\mathbin{++}T$,
their value maps are respectively $P,Q$, and any byte lists with those
two value maps equal $I,T$, respectively.
\end{lemma}
\begin{proof}
A U8 scalar is determined by its natural value. Consequently equal
value maps imply equal byte lists: induct on the first list, exclude
an empty/nonempty mismatch by the map equality, equate the two head
values and hence the two heads, and apply induction to the tails.
To construct the blocks, induct on $P$. If $P=[]$, take $I=[]$ and
$T=B$. If $P=p::P'$, the equality forces $B=b::B'$ with
$b.\mathit{val}=p$ and the value map of $B'$ equal to $P'++Q$.
Apply induction to $B'$, and prepend $b$ to its first block.
This proves the concatenation and both map equations. Finally compare
any proposed first block with $I$, and any proposed second block with
$T$, using the value-map injectivity proved above. No bound or alphabet
condition on $P,Q$ is assumed: their realizability follows from the
given equality to an actual byte list.
\end{proof}
