How to construct a free magma without using identifications/disjoint union?

41 Views Asked by At

Let $S$ be a set. We define a sequence of sets $(S_n)_{n\in\mathbb{N}^*}$ recursively as follows: $S_1=S$ and for $n\ge2$ $$S_n=\bigcup_{k=1}^{n-1}\{k\}\times\big(S_k\times S_{n-k}\big).$$ Let $M_S=\bigcup_{n\ge 1}\{n\}\times S_n$. We will identify $S_n$ and its canonical image in $M_S$. For every $w\in M_S$, there exists a unique natural number $n$ such that $w\in S_n$: denote it by $l(w)$.

For $w,w'\in M_S$: let $ww'$ denote the image of $(w,w')$ under the canonical injection of $S_{l(w)}\times S_{l(w')}$ into the sum set $S_{l(w)+l(w')}$.

The set $M_S$ together with the law $(w,w')\mapsto ww'$ is called the free magma constructed on $S$.

How can I revise this construction into one without identifications? Can I just replace "$S_n$" with "$\{n\}\times S_n$" everywhere? But then what happens to the length function $l$? Aren't the $S_n$ and $S_m$ disjoint anyway for $n\ne m$? Why does the construction employ a disjoint union then?

Edit:

Is it possible to show that $$(\forall n)(\forall m)(n\in\mathbb{N}^*\land m\in\mathbb{N}^*\land m\ne n\Rightarrow S_n\cap S_m=\emptyset)?$$ Would I need to induct on $n,m$?