This notebook calculates  the polynomial S in the case 
d_  1  =  d_  2  =  d_  3  =  4 ,  
    and then illustrates a sample check on the coefficients .   
One needs to run the Do Loop below for 
all 30 relevant partitions of 12,  
    these giving the various powers of the a_i appearing in the monomial .   The example illustrated below is the partition  (4 1 1 1 1 1 1 1 1) .   When checking the partitions with no 4 appearing we may save time by assuming by symmetry that no 4  
      th power of an a or b or c appears in the monomial.

(x*H1  +  y*H2  +  z*H3)^3  (a1*H1  + b1*H2  + 
            c1*H3) (a2*H1  + b2*H2  + c2*H3) (a3*H1  + b3*H2  + 
            c3*H3) (a4*H1  + b4*H2  + c4*H3) (a5*H1  + b5*H2  + 
            c5*H3) (a6*H1  + b6*H2  + c6*H3) (a7*H1  +  
            b7*H2  +  c7*H3)  (a8*H1  +  b8*H2  +  
            c8*H3) (a9*H1  +  b9*H2  +  c9*H3);

P  =  Expand[%];

F  =  
        P /. { H1^12  -> 0,  H1^11  -> 0, H1^10  -> 0,  
            H1^9  -> 0,  H1^8  -> 0,  H1^7  -> 0,  
            H1^6  -> 0,  H1^5  ->  0,  H2^12  -> 0 ,  
            H2^11  -> 0, H2^10  -> 0,  H2^9  -> 0,  
            H2^8  -> 0,  H2^7  -> 0,  H2^6  ->  0,  
            H2^5  -> 0,  H3^12  -> 0, H3^11  -> 0,  
            H3^10  -> 0,  H3^9  -> 0,  H3^8  -> 0,  
            H3^7  -> 0, H3^6 -> 0,  
            H3^5 -> 0,   H1^4  ->  1,  H2^4  ->  1,  
            H3 ^4 -> 1};

a300  =  F /. {x -> 1,  y -> 0,  z -> 0 }; 
    a030  =  F /. {x -> 0,  y -> 1,  z -> 0 }; 
    a003  =  F /. {x -> 0,  y -> 0,  z -> 1 }; 
    G  =  F  -  a300*x^3  -  a030*y^3  - a003*z^3; 
    Q =  G /. {z -> 0}; 
    Q /. {y^2  -> 0,  x -> 1,  y  -> 1};

a210  =  %/3; 
    Q /. {x^2  -> 0,  x -> 1,  y  -> 1};

a120  =  %/3; R  =  G  -  Q; S  =  R /. {y -> 0}; 
    S /. {z^2  -> 0,  x -> 1,  z -> 1};

a201  =  %/3; 
    S /. {x^2  -> 0,  x -> 1,  z -> 1};

a102  =  %/3 ;T  =  R  - S ;T0  =  
        T /. {x -> 0} ;T0 /. {z^2  -> 0,  
          y -> 1,  z -> 1} ;

a021  =  %/3 ;T0 /. {y^2  -> 0,  
          y -> 1,  z -> 1} ;

a012  =  %/3; (T  -  T0) /. {x -> 1 ,  y -> 1,  
        z -> 1};

a111  =  %/6;

S =  
        a300 a120 a021 a003   -  a300 a120 a012^2  -  
          a300 a111 a030 a003  +  a300 a111 a021 a012  +  
          a300 a102 a030 a012  -  a300 a102 a021^2  -  
          a210^2 a021 a003  +  a210^2 a012^2  +  
          a210 a201 a030 a003  -  a210 a201 a021 a012  +  
          a210 a120 a111 a003  -  a210 a120 a102 a012   -  
          2 a210 a111^2 a012  +  3 a210 a111 a102 a021  -  
          a210 a102^2 a030  -  a201^2 a030 a012   +  
          a201^2 a021^2  -  a201 a120^2 a003  +  
          3 a201 a120 a111 a012  -  a201 a120 a102 a021  -  
          2 a201 a111^2 a021  +  a201 a111 a102 a030  +  
          a120^2 a102^2   -  2 a120 a111^2 a102  +  
          a111^4;

T = S;

a  =  {a1, a2, a3, a4, a5, a6, a7, a8, a9}

b  =  {b1, b2, b3, b4, b5, b6, b7, b8, b9}

c  =  {c1, c2, c3, c4, c5, c6, c7, c8, c9}

L[X_ ,  i_ ,  1]  :=  
      D[X,  a[[i]],  a[[i]],  a[[i]],  a[[i]]];  
    L[X_ ,  i_ ,  2]  :=  
      D[X,  a[[i]],  a[[i]],  a[[i]],  b[[i]]]; 
    L[X_ ,  i_ ,  3]  :=  
      D[X,  a[[i]],  a[[i]],  a[[i]],  c[[i]]]; 
    L[X_ ,  i_ ,  4]  :=  
      D[X,  a[[i]],  a[[i]],  b[[i]],  b[[i]]]; 
    L[X_ ,  i_ ,  5]  :=  
      D[X,  a[[i]],  a[[i]],  b[[i]],  c[[i]]]; 
    L[X_ ,  i_ ,  6]  :=  
      D[X,  a[[i]],  a[[i]],  c[[i]],  c[[i]]]; 
    L[X_ ,  i_ ,  7]  :=  
      D[X,  a[[i]],  b[[i]],  b[[i]],  b[[i]]]; 
    L[X_ ,  i_ ,  8]  :=  
      D[X,  a[[i]],  b[[i]],  b[[i]],  c[[i]]]; 
    L[X_ ,  i_ ,  9]  :=  
      D[X,  a[[i]],  b[[i]],  c[[i]],  c[[i]]]; 
    L[X_ ,  i_ ,  10]  :=  
      D[X,  a[[i]],  c[[i]],  c[[i]],  c[[i]]]; 
    L[X_ ,  i_ ,  11]  :=  
      D[X,  b[[i]],  b[[i]],  b[[i]],  b[[i]]]; 
    L[X_ ,  i_ ,  12]  :=  
      D[X,  b[[i]],  b[[i]],  b[[i]],  c[[i]]]; 
    L[X_ ,  i_ ,  13]  :=  
      D[X,  b[[i]],  b[[i]],  c[[i]],  c[[i]]]; 
    L[X_ ,  i_ ,  14]  :=  
      D[X,  b[[i]],  c[[i]],  c[[i]],  c[[i]]]; 
    L[X_ ,  i_ ,  15]  :=  
      D[X,  c[[i]],  c[[i]],  c[[i]],  
        c[[i]]];

M = 0; For[p1 = 1,  
      p1  ≤  1,  p1++,  L1  =  L[T, 1, p1];  
      Print[p1]; 
For[p2  = 7,  
        p2  ≤  10,  p2++, L2  =  L[L1,  2,  p2]; 
        Print[p2]; 
For[p3  = p2,  
          p3  ≤  10,  p3++, L3  =  L[L2,  3, p3];  
          Print[M]; 
For[p4  = p3,  
            p4 ≤  10,  p4++, 
            L4  =  L[L3,  4, p4]; 
For[p5  = p4,  
              p5 ≤  10,  p5++, 
              L5  = L[L4, 5, p5]; 
For[p6  = p5,  
                p6  ≤  10, p6++, 
                L6  = L[L5, 6, p6]; 
For[p7 = p6,  
                  p7 ≤  10,  p7++, 
                  L7  = L[L6, 7, p7]; 
For[p8  =  p7,  
                    p8  ≤  10,  p8++, 
                    L8  =  L[L7, 8, p8]; 
For[
                      p9  = p8,  p9  ≤  10,  p9++, 
                      L9  = L[L8, 9, p9]; 
If[L9 < 0,  
                        Print[p1, v, p2, v, p3, v, p4, v, p5, v, p6, v, p7, 
                          v, p8, v, p9]];  
                      If[L9 > 0,  
                        M  =  
                          M + 1]; 
]]]]]]]]]; Print[M];Print[
      FINISHED];