Let $(M_i)_{i\in I}$ be a family of monoids, $A$ a monoid and $(h_i:A\rightarrow M_i)_{i\in I}$ a family of homomorphisms.
Let $M$ be the sum of the family $(M_i)_{i\in I}$ amalgamated by $A$. Let $\phi$ be the canonical homomorphism of $\text{Mo}(S)$ onto $M$, where $S$ denotes the sum of the family $(M_i)_{i\in I}$ and $\text{Mo}(S)$ the free monoid constructed on $S$.
For all $a\in A$, the element $\phi(i,h_i(a))$ is independent of $i$ and denoted by $h(a)$. For all $i\in I$, write $\phi_i(x)=\phi(i,x)$ for $(i,x)\in S$.
Furthermore, suppose that, for all $i\in I$, there exists a subset $P_i$ of $M_i$ containing $e_i$ such that the mapping $A\times P_i\rightarrow M_i,\,(a,p)\mapsto h_i(a).p$, is bijective.
For $x\in M$, every finite sequence $\sigma=(a;i_1,\ldots,i_n;p_1,...,p_n)$ with $a\in A$ and $i_\alpha\in I$ and $p_\alpha\in P_{i_\alpha}$, for $1\leq \alpha\leq n$, satisfying $$x=h(a).\prod_{\alpha=1}^n\phi_{i_\alpha}(p_\alpha)$$ is called a decomposition of $x$. If $i_\alpha\ne i_{\alpha+1}$ for $1\leq \alpha<n$ and $p_\alpha\ne e_{i_\alpha}$ for $1\leq\alpha\leq n$, then $\sigma$ is called reduced. The natural number $n$ is called the length of the decomposition and is denoted by $l(\sigma)$.
It can be shown that every element $x$ of $M$ admits a unique reduced decomposition $\sigma$. If $\sigma'\ne\sigma$ is another decomposition of $x$, then $l(\sigma)<l(\sigma')$.
Now, let $y\in M$. Suppose there exist $i\in I$ and $a,b\in A$ and $p\in P_i-\{e_i\}$ such that $$h(a)=y=h(b)\phi_i(p). \ \ \ \ \ \ \ (*)$$ Then, the sequences $(a)$ and $(b;i;p)$ are two reduced decompositions of $y$. By uniqueness, we must have $(a)=(b;i;p)$; but this makes no sense since we would be equating a 1-tuple with a 3-tuple–what sort of equality would that be?
Isn't $(a)\ne(b;i;p)$ just as nonsensical as $(a)=(b;i;p)$?
I want to show that $(*)$ forces $p=e_i$; but I am not able to derive a contradiction from $p\ne e_i$ because I'm not sure what to do with the expression "$(a)=(b;i;p)$".