$\operatorname{LMOpRightEuclideanDivision}(L_1, L_2, x, M, b)$
libname := libname, FileTools:-JoinPath(["maple","lib","dcfun.mla"],base=homedir):
with(dcfun):
Let us consider the lowest common left multiple $L$ of two simple linear Mahler operators $L_1$ and $L_2$.
b := 2;
$$2$$
L1 := RamRatPolyToLMOp(1/(1 - 2*x), x, M , b);
$$2 x -1-\left(2 x^{2}-1\right) M$$
L2 := RamRatPolyToLMOp(1/(1 - 3*x), x, M , b);
$$-1+3 x -\left(3 x^{2}-1\right) M$$
L := LMOpLCLM([L1,L2],x , M, b);
$$\left(6 x^{8}-5 x^{4}+1\right) M^{2}+\left(-6 x^{6}-6 x^{5}-x^{4}+5 x^{3}+4 x^{2}-x -1\right) M +6 x^{4}+x^{3}-4 x^{2}+x$$
We perform the divisions of $L$ by $L_1$ and $L_2$. As expected, we find that both remainders $R_1$ and $R_2$ are zero.
Q1, R1 := LMOpRightEuclideanDivision(L, L1, x, M, b);
$$\left(-3 x^{4}+1\right) M +3 x^{3}+2 x^{2}-x, 0$$
Q2, R2 := LMOpRightEuclideanDivision(L, L2, x, M, b);
$$\left(-2 x^{4}+1\right) M +2 x^{3}+x^{2}-x, 0$$
[R1, R2];
$$[0, 0]$$
Let us now consider a case where we use ramified rational functions in the coefficients. We search for the order $1$ right factors of a given linear Mahler operator $L$.
b := 3;
$$3$$
L := (x^3 + 2*x - 1)*(x^6 - x^3 + 1)*(x^6 + x^3 + 1)*M^2 - (x^2 + 1)*(x^10 + x^9 + 2*x^5 + x - 1)*M + x*(x^9 + 2*x^3 - 1);
$$\left(x^{3}+2 x -1\right) \left(x^{6}-x^{3}+1\right) \left(x^{6}+x^{3}+1\right) M^{2}-\left(x^{2}+1\right) \left(x^{10}+x^{9}+2 x^{5}+x -1\right) M +x \left(x^{9}+2 x^{3}-1\right)$$
ric_sol := LMOpSolve(L, x, M, b, 'output' = 'riccati', 'free' = K);
$$\left\{\frac{K_{2} x^{\frac{9}{2}}-x^{3} K_{1}-K_{2} x^{\frac{3}{2}}-K_{1}}{\left(x^{2}+x +1\right) \left(x^{2}-x +1\right) \left(K_{2} x^{\frac{3}{2}}-K_{1} x -K_{2} \sqrt{x}-K_{1}\right)}\right\}$$
We find one parametrization, the parameter $(K_1:K_2)$ being in the projective space ${\mathbb P}_1(\mathbb Q)$. The parametrization appears as a ramified rational function of $x$.
u := op(ric_sol);
$$\frac{K_{2} x^{\frac{9}{2}}-x^{3} K_{1}-K_{2} x^{\frac{3}{2}}-K_{1}}{\left(x^{2}+x +1\right) \left(x^{2}-x +1\right) \left(K_{2} x^{\frac{3}{2}}-K_{1} x -K_{2} \sqrt{x}-K_{1}\right)}$$
Let us verify that we actually have a right factor.
Q, R := LMOpRightEuclideanDivision(L, M - u, x, M, b);
$$-\frac{\left(x^{\frac{39}{2}} K_{2}-x^{18} K_{1}+2 x^{\frac{35}{2}} K_{2}-2 x^{\frac{33}{2}} K_{2}-2 x^{16} K_{1}-2 x^{\frac{29}{2}} K_{2}+2 K_{2} x^{\frac{27}{2}}-2 x^{13} K_{1}+2 x^{\frac{23}{2}} K_{2}-2 x^{\frac{21}{2}} K_{2}-2 x^{10} K_{1}-2 x^{\frac{17}{2}} K_{2}+2 x^{\frac{15}{2}} K_{2}-2 x^{7} K_{1}+2 x^{\frac{11}{2}} K_{2}-2 K_{2} x^{\frac{9}{2}}-2 x^{4} K_{1}-2 x^{\frac{5}{2}} K_{2}+K_{2} x^{\frac{3}{2}}-2 K_{1} x +K_{1}\right) M}{-K_{2} x^{\frac{9}{2}}+x^{3} K_{1}+K_{2} x^{\frac{3}{2}}+K_{1}}-\frac{3 x^{\frac{13}{2}} K_{2}+2 x^{9} K_{1}-2 x^{\frac{19}{2}} K_{2}+x^{\frac{25}{2}} K_{2}+x^{11} K_{1}-x^{\frac{31}{2}} K_{2}+x^{15} K_{1}+2 x^{\frac{17}{2}} K_{2}-2 x^{\frac{15}{2}} K_{2}+2 x^{7} K_{1}+x^{13} K_{1}-x^{\frac{23}{2}} K_{2}+x^{\frac{21}{2}} K_{2}+x^{\frac{29}{2}} K_{2}-K_{2} x^{\frac{27}{2}}+x^{14} K_{1}+x^{12} K_{1}-3 x^{\frac{11}{2}} K_{2}+x^{5} K_{1}-x^{\frac{7}{2}} K_{2}+x^{\frac{5}{2}} K_{2}+x^{10} K_{1}+2 x^{8} K_{1}+x^{4} K_{1}+x^{6} K_{1}-K_{1} x^{2}+3 K_{2} x^{\frac{9}{2}}-x^{3} K_{1}-K_{2} x^{\frac{3}{2}}-K_{1} x}{-K_{2} x^{\frac{9}{2}}+x^{3} K_{1}+K_{2} x^{\frac{3}{2}}+K_{1}}, 0$$
R;
$$0$$
The remainder is $0$, as expected.