restart;
f1 := 45*p + 35*s - 165*b - 36:
f2 := 35*p + 40*z + 25*t - 27*s:
f3 := 15*w + 25*p*s + 30*z - 18*t - 165*b^2:
f4 := -9*w + 15*p*t + 20*z*s:
f5 := w*p + 2*z*t - 11*b^3:
f6 := 99*w - 11*s*b + 3*b^2:
Trinks := [f1,f2,f3,f4,f5,f6];
infolevel[all] := 4;
G := Groebner[Basis](Trinks,tdeg(s,t,w,p,b,z)):
map(Groebner:-LeadingMonomial,G,tdeg(s,t,w,b,p,z));
G;
G := Groebner[Basis](Trinks,plex(s,t,w,b,p,z)):
map(indets,G);
map(Groebner:-LeadingMonomial,G,plex(s,t,w,b,p,z));
G[1];
G[2];
infolevel[all] := 0;
factor(G[1]);
Trinks1 := [op(Trinks),op(1,%)];
G := Groebner[Basis](Trinks1,plex(s,t,w,p,b,z));
with(Groebner);
Groebner[UnivariatePolynomial](z,Trinks);