I have a list of polynomials like this example but much longer:

`polys = {a*b*c + c*d*e + f*g*h + u*v*w, a*c^2, g*l*m, g*l*m + a*b*d, a*b*c + u*v*w, z*z*z + t*t*t}; `

I want to compute all the cases for roots that arise from the single term polynomials. For example:

`tempPolys1 = polys; monos1 = Table[ MonomialList[tempPolys1[[i]]], {i, 1, Length[tempPolys1]}]; monolen1 = Table[Length[monos1[[i]]], {i, 1, Length[tempPolys1]}]; triplets1 = tempPolys1[[Flatten[Position[monolen1, Min[monolen1]]]]]; rules = Reduce[triplets1 == 0] (*(g == 0 && a == 0) || (g == 0 && c == 0) || (l == 0 && a == 0) || (l == 0 && c == 0) || (m == 0 && a == 0) || (m == 0 && c == 0)*) `

Then I want to iterate this by substituting each case separately into polys, seeing if any polynomials turn into a single term polynomial and generating the cases that arise from the new system of polynomials.

I realize Reduce essentially does this, but I want the individual cases to stop at the point where either all polynomials are zero or there isn’t one with just one term (there may be many polynomials left over with lots of terms and reduce will get stuck).

Here is the code I have written which seems to work but is not efficient on large lists of polynomials:

`Clear[F, G]; FinalList = {}; numZeroed = {} F[rule_] := Module[{tempPolys, monos, monolen, triplets, monoMin}, tempPolys = Cases[polys /. ToRules[rule], Except[0]]; monos = Table[MonomialList[tempPolys[[i]]], {i, 1, Length[tempPolys]}]; monolen = Table[Length[monos[[i]]], {i, 1, Length[tempPolys]}]; monoMin = Min[monolen]; If[monoMin > 1, AppendTo[FinalList, rule]; AppendTo[numZeroed, Length[rule]]; Return[]]; triplets = tempPolys[[Flatten[Position[monolen, monoMin]]]]; G[BooleanMinimize[rule && Reduce[triplets == 0]]]] G[ORrules_] := Module[{rules1}, rules1 = List @@ ORrules; Do[F[rules1[[j]]], {j, Length[rules1]}]] G[rules]; FinalList (*outputs all possible cases*) `

The terms in the polynomials will each always be degree 3.

Is there a better way to take advantage of built-in functions to make this efficient on large lists of polynomials?