https://123dok.net/document/q7w4epoz-an-explicit-formula-for-the-intersection-of-two-polynomials-of-regular-languages.html