with(Groebner): with(combinat): gen_ord_lower := proc() local eqs, nterms, basis, realroots, posroots, i; eqs := [ -S + Y + Z, -E + Y + Z*x^2 + Y_t*x^4 + Z*x^4, -E_N + Y_N + Z_N*x^2 + Y_Nt*x^4 + Z_N*x^4, -Y + P_N, -Y_t + P_Nt, -Y_N, -Y_Nt, -Z, -Z_N, -P_N + x + E*x + x^3 + E_N*x^3, -P_Nt + x + E*x ]; nterms := [ P_Nt, P_N, Z_N, Z, Y_Nt, Y_N, Y_t, Y, E_N, E, S ]; basis := gbasis(eqs, lexdeg(nterms[1..-2], [S])); print("gen ord lower basis computed", k); print(basis[1]); realroots := fsolve(denom(solve(basis[1] = 0, S)) = 0, x); posroots := select(type, [realroots], positive); print(posroots); 1/min(seq(posroots[i], i=1..nops(posroots))); end: gen_rpn_lower := proc() local eqs, nterms, basis, realroots, posroots, i; eqs := [ -S + Y + Z, -E + Y + Z + Y_t*x^2 + Z*x^2, -E_N + Y_N + Z_N + Y_Nt*x^2 + Z_N*x^2, -Y + P_N, -Y_t + P_Nt, -Y_N, -Y_Nt, -Z, -Z_N, -P_N + x + E*x^2 + x^4 + E_N*x^5, -P_Nt + x + E*x^2 ]; nterms := [ P_Nt, P_N, Z_N, Z, Y_Nt, Y_N, Y_t, Y, E_N, E, S ]; basis := gbasis(eqs, lexdeg(nterms[1..-2], [S])); print("gen rpn lower basis computed", k); print(basis[1]); realroots := fsolve(denom(solve(basis[1] = 0, S)) = 0, x); posroots := select(type, [realroots], positive); print(posroots); 1/min(seq(posroots[i], i=1..nops(posroots))); end: gen_alph_lower := proc() local eqs, nterms, basis, realroots, posroots, i; eqs := [ -S + Y + Z, -E + Y + Z + Y_t + Z, -E_N + Y_N + Z_N + Y_Nt + Z_N, -Y + P_N, -Y_t + P_Nt, -Y_N, -Y_Nt, -Z, -Z_N, -P_N + x + E*x + x^2 + E_N*x^2, -P_Nt + x + E*x ]; nterms := [ P_Nt, P_N, Z_N, Z, Y_Nt, Y_N, Y_t, Y, E_N, E, S ]; basis := gbasis(eqs, lexdeg(nterms[1..-2], [S])); print("gen alph lower basis computed", k); print(basis[1]); realroots := fsolve(denom(solve(basis[1] = 0, S)) = 0, x); posroots := select(type, [realroots], positive); print(posroots); 1/min(seq(posroots[i], i=1..nops(posroots))); end: