I would guess that a rewrite rule like WW → W to remove repeated subwords […] allow us to reduce any element of the free idempotent monoid on n generators to a ‘normal form’

The difficulty is that we’re allowed to apply the rewrite rule backwards too, as W → WW. Sometimes you can simplify a word only after you make it longer with the backwards rule. There was actually a very relevant problem posed in the KöMaL contest: A. 234., posed in 2000. “https://www.komal.hu/verseny/2000-03/A.h.shtml” has the solution, “https://www.komal.hu/verseny/2000-03/mat.e.shtml” has the English specification. This asks you to prove that the monoid is finite by proving that you can rewrite any word to a word that is not longer than 8 letters. The solution page also notes that there are multiple essentially different cases when you do need to make the word longer at first. The simplest example that it gives is:

abacbcacb = abacbca(cb) → abacbca(cbcb) = ab(acbcacbc)b → ab(acbc)b = aba(cbcb) → aba(cb) = abacb

I don’t really understand how this monoid works either though.

]]>Dylan McDermott gave a much easier proof of nonconfluence on the Category Theory Community Server:

ababcbabc → ababc → abc

but also

ababcbabc → abcbabc

]]>Thanks—that’s great!

I just learned that there’s a formula for the number of elements of the free monoid on letters:

So, the cardinality of the free idempotent rig on letters is bounded by 4 to this power, but it’s a terribly bad bound.

I found this formula here:

• Todd Rowland and Eric W. Weisstein, Free idempotent monoid, MathWorld–A Wolfram Web Resource.

]]>Good! That gives a reference that—if it’s correct—should prove the rewrite rule I described is nonconfluent:

• Jean Berstel and Christophe Reuteneur, Square-free words and idempotent semigroups, in *Combinatorics on Words*, ed. M. Lothaire, *Encyclopedia of Mathematics and its Applications* volume 17, Addison-Wesley Publishing Co., Reading, Massachusetts, 1983.

This reference proves that

bacbcabc = bacabc

in the free commutative monoid on 3 generators, even though both sides are square-free words, so there is no way to further reduce them using the rewrite rule WW → W (where W is any word).

The proof is here:

]]>