next | previous | forward | backward | up | top | index | toc | Macaulay2 web site

weightVector -- weight vector of a marked set of polynomials

Synopsis

Description

If there is no weight vector, then null is returned.
i1 : R = ZZ/32003[symbol a..symbol d]

o1 = R

o1 : PolynomialRing
i2 : inL = {c^4, b*d^2, b*c, b^2*d, b^3}

       4     2        2    3
o2 = {c , b*d , b*c, b d, b }

o2 : List
i3 : L = {c^4-a*d^3, -c^3+b*d^2, b*c-a*d, -a*c^2+b^2*d, b^3-a^2*c}

       4      3     3      2                  2    2    3    2
o3 = {c  - a*d , - c  + b*d , b*c - a*d, - a*c  + b d, b  - a c}

o3 : List
i4 : weightVector(inL,L)

o4 = {8, 8, 3, 1}

o4 : List
i5 : groebnerCone(inL,L)

o5 = (| 0  0  |, | 1  0 |)
      | 0  0  |  | 0  1 |
      | -2 -3 |  | -2 3 |
      | -3 -4 |  | -3 4 |

o5 : Sequence

Now we construct all of the initial ideals of the rational quartic curve in P^3, then compute weight vectors for each, and then verify that the initial ideals that gfan returned are the initial ideals using these weight vectors.

i6 : I = monomialCurveIdeal(R,{1,3,4})

                        3      2     2    2    3    2
o6 = ideal (b*c - a*d, c  - b*d , a*c  - b d, b  - a c)

o6 : Ideal of R
i7 : time (inLs,Ls) = gfan I
LP algorithm being used: "cddgmp".
     -- used 0.002521 seconds

           2          2   2      3          2   2      3          2   2  
o7 = ({{b*d , a*d, a*c , a c}, {c , a*d, a*c , a c}, {c , b*c, a*c , a c,
     ------------------------------------------------------------------------
      3      3        4     2   2      3        3     2     3        2    3  
     a d}, {c , b*c, b , a*c , a c}, {c , b*c, b , a*c }, {c , b*c, b d, b },
     ------------------------------------------------------------------------
         2   2         2        2   2    3            2        2    3     3  
     {b*d , b d, a*d, a c}, {b*d , b d, b , a*d}, {b*d , b*c, b d, b , a*d },
     ------------------------------------------------------------------------
       4     2        2    3         3      2                  2    2      3
     {c , b*d , b*c, b d, b }}, {{- c  + b*d , - b*c + a*d, a*c  - b d, - b 
     ------------------------------------------------------------------------
        2      3      2                  2    2      3    2      3      2 
     + a c}, {c  - b*d , - b*c + a*d, a*c  - b d, - b  + a c}, {c  - b*d ,
     ------------------------------------------------------------------------
                   2    2      3    2      4    3      3      2            
     b*c - a*d, a*c  - b d, - b  + a c, - b  + a d}, {c  - b*d , b*c - a*d,
     ------------------------------------------------------------------------
      4    3      2    2      3    2      3      2              3    2      2
     b  - a d, a*c  - b d, - b  + a c}, {c  - b*d , b*c - a*d, b  - a c, a*c 
     ------------------------------------------------------------------------
        2      3      2                  2    2    3    2        3      2   
     - b d}, {c  - b*d , b*c - a*d, - a*c  + b d, b  - a c}, {- c  + b*d , -
     ------------------------------------------------------------------------
        2    2                   3    2        3      2       2    2    3  
     a*c  + b d, - b*c + a*d, - b  + a c}, {- c  + b*d , - a*c  + b d, b  -
     ------------------------------------------------------------------------
      2                     3      2                  2    2    3    2      4
     a c, - b*c + a*d}, {- c  + b*d , b*c - a*d, - a*c  + b d, b  - a c, - c 
     ------------------------------------------------------------------------
          3     4      3     3      2                  2    2    3    2
     + a*d }, {c  - a*d , - c  + b*d , b*c - a*d, - a*c  + b d, b  - a c}})

o7 : Sequence
i8 : wtvecs = apply(#inLs, i -> weightVector(inLs#i, Ls#i));
i9 : wtvecs/print;
{1, 1, 4, 6}
{1, 1, 4, 5}
{1, 1, 3, 2}
{2, 2, 3, 1}
{4, 4, 3, 1}
{6, 6, 3, 1}
{1, 1, 2, 4}
{2, 2, 1, 2}
{6, 6, 2, 1}
{8, 8, 3, 1}
i10 : inL1 = wtvecs/(w -> initialIdeal(w,I));
i11 : inL1/toString/print;
ideal(a^2*c,a*d,a*c^2,b*d^2)
ideal(a*d,a^2*c,a*c^2,c^3)
ideal(b*c,a^2*c,a^3*d,a*c^2,c^3)
ideal(b*c,a^2*c,a*c^2,b^4,c^3)
ideal(b*c,c^3,a*c^2,b^3)
ideal(b*c,c^3,b^2*d,b^3)
ideal(a^2*c,a*d,b^2*d,b*d^2)
ideal(a*d,b*d^2,b^2*d,b^3)
ideal(b*c,b*d^2,a*d^3,b^2*d,b^3)
ideal(b*d^2,b*c,c^4,b^2*d,b^3)
i12 : assert(inL1 == inLs/ideal)

Caveat

In the current implementation, it might be possible that a positive vector exists, but the algorithm fails to find it. In this case, use groebnerCone and find one by hand. You might want to email the package author to complain too!

See also

Ways to use weightVector :