# Writing elements as a linear combination in a basis in a quotient ring

This post is a wiki. Anyone with karma >750 is welcome to improve it.

I have an explicit ideal in a multivariable polynomial ring R. I know a priori that the quotient ring R/I is finite dimensional (as a vector space). In fact I have an explicit basis in R/I. I have all this programmed into sage. Is there a way to find the linear combination for a given element in R/I in the given basis?

example:

sage: R.<e1,e2>=PolynomialRing(QQ)

sage: I = ideal(e1^3 -2 * e2 * e1 +1, e2 * e1^2 - e2^2 - e1)

sage: I.vector_space_dimension()

6

sage: f22= e2^2 - e1; f21 = e2*e1 - 1; f11 = e1^2 - e2; f1= e1; f2 = e2; f0 = 1;

sage: I.reduce(f21*f21)

e1*e2

sage: I.reduce(f21*f21) == f21 + f0

True

I have an ideal I in R and I know that the quotient ring R/I is 6 dimensional over the field. I have the basis f22,f21,f11,f2,f1,f0 of R/I as a vector space over QQ. I would like to find the structure constants of this finite dimensional algebra. For example compute f21^2 in the quotient ring, and write it in the basis, we get f21^2=f21+f0. But I only get it by hand and would like to compute it with sage, so that I could get the whole set of structure constants.

edit retag close merge delete

Sort by » oldest newest most voted

You can use the lift method. You can look at the following links for concrete examples:

more

Thanks. I think that the lift can only be used to find a combination of given elements where the coefficients come from the whole polynomial ring, and not just from the field. What I need is a linear combination where the coefficients come from the field. See the extended question.

( 2016-05-06 15:07:04 +0100 )edit

You want I.normal_basis(). The documentation is abysmal (both in Sage and for the underlying Singular routine). In practice it appears that the leading term g.lt() of the result of g=I.reduce(f) belongs to I.normal_basis(). So, you can subtract that off, reduce the result, pick off the next leading term, etc. to get the coefficients you're after. You can of course use a change of basis matrix to use your own preferred basis. For certain nice quotients I.reduce(f) yields an expression that's a linear combination of I.normal_basis(), but sometimes I've had to use the iterative approach. It's never been enough of a bottleneck for me to investigate what's actually going on (i.e. read Singular's kbase method's source code), and there's at least no correctness concerns with this approach.

more