get expression for element in terms of generators of ideal

1,017 views
Skip to first unread message

Dave

unread,
Jun 8, 2011, 1:38:01 PM6/8/11
to Macaulay2
Sorry to bother you with an easy question. I have a feeling this is
probably documented somewhere. If so, could someone tell me?

If I have an element p in an ideal I in a ring S with Groebner basis
(f1,f2,...,fk), how do I get M2 to show me how to write F as an S-
linear combination of (f1,f2,...,fk)?

Example:
S=QQ[a,b,c,d];
f1=a*c-b^2;
f2=a*d-b*c;
f3=b*d-c^2;
I=ideal(f1,f2,f3);
p=-b^4+a*b^2*c-c^4-a*b*c*d+b*c^2*d+a^2*d^2;

How do I get M2 to give me an expression like
p=b^2*f1+a*d*f2+c^2*f3?





Douglas Leonard

unread,
Jun 8, 2011, 3:06:54 PM6/8/11
to maca...@googlegroups.com
Well, you typed f1,f2,f3 backwards relative to the default grevlex
monomial ordering used by M2;
and they are not variable names in any ring, so you will not get the
specific version of p you wanted.
Defining I is also unnecessary.
Nevertheless you can find p as an S-combination of these by column
reduction in M2.

Unless you want to define a new ring with 7 variables, try the code:

S=QQ[a,b,c,d];
f1=a*c-b^2
f2=a*d-b*c
f3=b*d-c^2

--I=ideal(f1,f2,f3);
p=-b^4+a*b^2*c-c^4-a*b*c*d+b*c^2*d+a^2*d^2;
M=matrix{{p,f1,f2,f3},{0,1,0,0},{0,0,1,0},{0,0,0,1}}
gens gb M

Doug


>>> Dave <dav...@math.uga.edu> 06/08/11 12:47 PM >>>

--
You received this message because you are subscribed to the Google
Groups "Macaulay2" group.
To post to this group, send email to maca...@googlegroups.com.
To unsubscribe from this group, send email to
macaulay2+...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/macaulay2?hl=en.


Irena Swanson

unread,
Jun 8, 2011, 4:55:11 PM6/8/11
to maca...@googlegroups.com
If you type
p//(gens I)
you will get

i12 : p//(gens I)

o12 = {2} | b2 |
      {2} | ad |
      {2} | c2 |

              3       1
o12 : Matrix S  <--- S


Irena

Douglas Leonard

unread,
Jun 12, 2011, 5:57:00 PM6/12/11
to maca...@googlegroups.com
I thought // was used for quotients as in 7//3 giving 2.
So it makes sense that this is supposed to work on p//gens(I) only if
gens(I) is a Gr\"obner basis.

If it is not, the examples below would seem to suggest that a Gr\"obner
basis is computed
as combinations of the generators before trying to find the quotients
(since in the first the quotients should be 1,0 with remainder 0, and in
the second 0,0 with remainder p2).

A=QQ[x,y,MonomialOrder=>{Position=>Down}];
f1=x^3*y-x;
f2=x*y^3-y;
I=ideal(f1,f2);

p1=x^3*y-x;
M1=matrix{{0,0,-1},{f1,f2,p1},{1,0,0},{0,1,0}};
gens gb M1
p1//gens(I)

p2=x^2*y-x*y^2;
M2=matrix{{0,0,-1},{f1,f2,p2},{1,0,0},{0,1,0}};
gens gb M2
p2//gens(I)

----------------------------------------------------------------------------------------------------------------------------
>>> Irena Swanson <iswa...@reed.edu> 06/08/11 3:55 PM >>>

i12 : p//(gens I)


Irena

--

You received this message because you are subscribed to the Google
Groups "Macaulay2" group.

To view this discussion on the web visit
https://groups.google.com/d/msg/macaulay2/-/TGdmU29TQVU1TEVK.

Daniel R. Grayson

unread,
Jul 18, 2011, 8:50:58 AM7/18/11
to maca...@googlegroups.com


On Sunday, June 12, 2011 9:57:00 PM UTC, Doug wrote:

the examples below would seem to suggest that a Gr\"obner
basis is computed
as combinations of the generators before trying to find the quotients
(since in the first the quotients should be 1,0 with remainder 0, and in
the second 0,0 with remainder p2).

 
That is right. See


http://www.math.uiuc.edu/Macaulay2/doc/Macaulay2-1.4/share/doc/Macaulay2/Macaulay2Doc/html/___Matrix_sp_sl_sl_sp__Matrix.html


where it states that:


> The resulting matrix h is such that f - g*h is the reduction of f modulo a Gröbner basis for the image of g. 

To discover that yourself, you could use "gbTrace".

Reply all
Reply to author
Forward
0 new messages