It has been over a decade (already!) since I studied a module on formal languages & automata during my undergraduate Mathematics degree. In considering a few things in combinatorial group theory (that I cannot share just yet; I might do some day soon), I thought of a theorem I recall vaguely from back then.
I would like some help in tracking down that theorem, please.
It goes something like this:
Let $A=\{a\}$. Then the language $$L=\{\varepsilon\}\cup\{ a^p\in A^*\mid p\text{ is prime}\}$$ cannot be described by a monoid "in a particular way".
Now, what that way is exactly, I've forgotten.
(I'm not sure whether we could have $|A|>1$ with $$L'=\{w\in A^*\mid |w|\text{ is prime}\},$$ which would make sense.)
I think it has something to do with regular languages. I found quite quickly online that $L$ is not regular. That rings a bell. The proof of that relies on the Pumping Lemma.
If I remember correctly, there are monoids that correspond nicely with a certain type of language, in that, for any language $K$ of that type, there is some process, let's call it $\mathcal{M}$, that produces such a monoid $\mathcal{M}(K)$ from $K$, and a process $\mathcal{L}$ that, given a monoid $M$ of the particular type, it produces a language $\mathcal{L}(M)$ from $M$ with the desired properties, such that
$$\mathcal{L}(\mathcal{M}(K))=K\quad\text{and}\quad \mathcal{M}(\mathcal{L}(M))=M.$$
But I could be wrong.
This seems relevant because I think $\mathcal {M}(L)$ is involved in the theorem in question.
I understand that this is not a lot to work with. There might be multiple theorems that fit the bill even. Therefore, I have included the tag soft-question for good measure.
I guess you refer to the syntactic monoid of a language. See also the French entry of Wikipedia, which gives more details. A key property is that a language is regular if and only if its syntactic monoid is finite. You can also check Chapter 4 of this link for reference.