)cl all

R := Integer
ls : List Symbol := [a,b,c,d,e,f]
V := OVAR(ls)
P := NSMP(R, V)
p1: P :=  a*b*c*d*e*f - 1
p2: P := a*b*c*d*e +a*b*c*d*f +a*b*c*e*f +a*b*d*e*f +a*c*d*e*f +b*c*d*e*f
p3: P :=  a*b*c*d + a*b*c*f + a*b*e*f + a*d*e*f + b*c*d*e + c*d*e*f
p4: P := a*b*c + a*b*f + a*e*f + b*c*d + c*d*e + d*e*f
p5: P := a*b + a*f + b*c + c*d + d*e + e*f
p6: P := a + b + c + d + e + f
lp := [p1, p2, p3, p4, p5, p6]
lextripack :=  LEXTRIPK(R,ls)
lg := groebner(lp)$lextripack
lexTriangular(lg,false)$lextripack
lts := lexTriangular(lg,true)$lextripack
[[init(p) for p in (ts :: List(P))] for ts in lts]
squareFreeLexTriangular(lg,true)$lextripack
reduce(+,[degree(ts) for ts in lts])
ls2 : List Symbol := concat(ls,new()$Symbol)
zdpack := ZDSOLVE(R,ls,ls2)
concat [univariateSolve(ts)$zdpack for ts in lts]
concat [realSolve(ts)$zdpack for ts in lts]
