1 | initial version |
Your polynomials are not polynomials with two indeterminates lambda and t. They are polynomial in t with coefficients in function field in lambda, so the definition of the rings you are working in should reflect that. Here is a possiblity:
sage: R.<l> = FunctionField(QQ) ; R
Rational function field in l over Rational Field
sage: S.<t> = R[] ; S
Univariate Polynomial Ring in t over Rational function field in l over Rational Field
sage: P = (l^6-5*l^4+6*l^2-1)*t^5 + (l^5-4*l^3+3*l^2)*t^6
sage: Q = l*t^2 - l^2*t + l
sage: a,b = P.quo_rem(Q)
sage: a
(l^4 - 4*l^2 + 3*l)*t^4 + ((2*l^6 - 9*l^4 + 3*l^3 + 6*l^2 - 1)/l)*t^3 + (2*l^6 - 10*l^4 + 3*l^3 + 10*l^2 - 3*l - 1)*t^2 + ((2*l^8 - 12*l^6 + 3*l^5 + 19*l^4 - 6*l^3 - 7*l^2 + 1)/l)*t + 2*l^8 - 14*l^6 + 3*l^5 + 29*l^4 - 9*l^3 - 17*l^2 + 3*l + 2
sage: b
(2*l^10 - 16*l^8 + 3*l^7 + 41*l^6 - 12*l^5 - 36*l^4 + 9*l^3 + 9*l^2 - 1)*t - 2*l^9 + 14*l^7 - 3*l^6 - 29*l^5 + 9*l^4 + 17*l^3 - 3*l^2 - 2*l
sage: a*Q+b == P
True
sage: a.degree()
4
sage: b.degree()
1