Finding invariant cubics --Section 2

Define a map

\(\(\(\(f[{x_, y_}]\  = \ {y, \ \((a + y)\)/\((b + x)\)};\)\ 

    \(\(ff[{x0_, x1_, x2_}] = {x0\ \((b\ x0 + x1)\), x2\ \((b\ x0 + x1)\), \ 
          x0\ \((a\ x0 + x2)\)}\) \); \)\(\ \ \)\( (*\ 
      in\ homogeneous\ coordinates\ *) \)\)\)

Set up the invariant cubic contains   (Subscript[e, 1]),  (Subscript[e, 2]),  
    and q

su[{x0_, x1_, x2_}] = x0 + x1 + x2;
testesp = 
        Table[su[{i, j, k}], {i, 0, 3}, {j, 0, 3}, {k, 0, 3}];
ex = Position[testesp, 3];
mono = 
        Table[x0^(ex[[j, 1]] - 1) x1^(ex[[j, 2]] - 
                  1) x2^(ex[[j, 3]] - 1) , {j, 
            1, Dimensions[ex][[1]]}]   ;
coeff = Array[c, Dimensions[mono][[1]]];

testh[{x0_, x1_, x2_}] = Factor[Simplify[mono . coeff]];

Invariant function should vanish at e_1, e_2 and q

{testh[{0, 1, 0}], testh[{0, 0, 1}], testh[{1, -a, 0}]}

c[4] = 0; c[1] = 0; 
    c[10] =  (a^3) c[4] - (a^2) c[7] + a c[9];

Compare the test function and its preimage

testfunction = Expand[Simplify[testh[{x0, x1, x2}]]]

Rename the coefficient according to Theorem 2.1 in the page 4

c[7] = C1; c[9] = C2; c[8] = C3; c[3] = C4; c[5] = C5; c[2] = C6; 
    c[6] = C7;

testfunction

testimage = 
      Factor[testh[
            ff[{x0, x1, 
                x2}]]/(x0 (b x0 + x1) (a x0 + 
                  x2) )]

CoefficientList[testimage, {x0, x1, x2}]

differ = Factor[testimage - t  testfunction]

CoefficientList[differ, {x0, x1, x2}]

Defining equations for parameters and multiplier

<< LinearAlgebra`MatrixManipulation`

M=(({{-a b^2 + a^2 t, b^2 - a t, b, 0, a, 0, 0}, {b^2, 0, -t, 0, 1, a, b}, {-2 a b, 2 b - t, 1, 0, 0, 0, 0}, {-a - t, 1, 0, 0, 0, 0, 0}, {0, 0, 0, b, -t, 1, 0}, {1, 0, 0, -t, 0, 0, 0}, {0, 0, 0, 1, 0, -t, 0}, {2 b, 0, 0, 0, 0, 0, 1 - t}}));

Condition for invariant function:

Factor[Det[TakeMatrix[M, {1, 1}, {7, 7}]]]

Factor[Det[TakeMatrix[M, {2, 1}, {8, 7}]]]

Parameters :

Simplify[
      Solve[a + a b t + a b (t^4) - (b^2) (t^4) - a (t^5) + 
              b (t^5) == 
            0 && -1 + t - a t - b t + a (t^2) + b (t^2) + (b^2) (t^3) + 
              (b^2) (t^4) + a (t^5) - 2 b (t^5) + (t^6) - a (t^6) + 
              2 b (t^6) - (t^7) == 0, {a, b}]]