eliminate
Synopsis
-
- Usage:
eliminate(v,J)
-
Inputs:
-
v, a ring element or a list, a variable or list of variables of a polynomial ring R
-
J, an ideal, in the ring R
-
Outputs:
-
an ideal, generated by the elements of J not involving the variables v
Description
If the ideal
J is homogeneous, then an effort is made to use the Hilbert function to speed up the computation.
i1 : R = ZZ/101[x,a,b,c,d]
o1 = R
o1 : PolynomialRing
|
i2 : f = x^2+a*x+b
2
o2 = x + x*a + b
o2 : R
|
i3 : g = x^2+c*x+d
2
o3 = x + x*c + d
o3 : R
|
i4 : time eliminate(x,ideal(f,g))
-- used 0.00399782s (cpu); 0.00469474s (thread); 0s (gc)
2 2 2 2
o4 = ideal(a*b*c - b*c - a d + a*c*d - b + 2b*d - d )
o4 : Ideal of R
|
i5 : time ideal resultant(f,g,x)
-- used 0.00245899s (cpu); 0.00262324s (thread); 0s (gc)
2 2 2 2
o5 = ideal(- a*b*c + b*c + a d - a*c*d + b - 2b*d + d )
o5 : Ideal of R
|
i6 : sylvesterMatrix(f,g,x)
o6 = {-3} | 1 a b 0 |
{-2} | 0 1 a b |
{-3} | 1 c d 0 |
{-2} | 0 1 c d |
4 4
o6 : Matrix R <-- R
|
i7 : discriminant(f,x)
2
o7 = - a + 4b
o7 : R
|
One may also switch the order of arguments: the ideal being the first argument. This usage has been deprecated, and should no longer be used.
Caveat
The ring R should not be a quotient ring, or a non-commutative ring. Additionally, it would be nice to be able to use a DegreeLimit, or to be able to interrupt the computation.
Ways to use eliminate :
-
eliminate(List,Ideal)
-
eliminate(RingElement,Ideal)