error: no ambient ring present / computing kernels of maps to QQ

19 views
Skip to first unread message

Andrew Critch

unread,
Dec 13, 2011, 4:51:44 PM12/13/11
to maca...@googlegroups.com
Hello, 

I'm wondering, what is the intended way to have to Macaulay2 compute the kernel a ring map to QQ?

R=QQ[x]
f=map(QQ,R,{x => 3})
kernel f

produces "error: no ambient ring present".  If I make the target ring QQ[y] instead of QQ, then it works:

R=QQ[x]
f=map(QQ[y],R,{x => 3})
kernel f

produces "ideal(x-3)".  But is a bit unnatural.  So I tried making M2 consider QQ as a polynomial ring by writing QQ[].  M2 accepts this ring, but computes the kernel incorrectly:

R=QQ[x]
f=map(QQ[],R,{x => 3})
kernel f

produces "ideal ()".  So I'm very curious to know how this is supposed to be done.  

Thanks for any input!

--
Critch, Andrew
UC Berkeley
http://math.berkeley.edu/~critch/

Andrew Critch

unread,
Dec 13, 2011, 4:53:45 PM12/13/11
to maca...@googlegroups.com

Grayson, Daniel R.

unread,
Dec 19, 2011, 6:14:08 PM12/19/11
to maca...@googlegroups.com
Your third example is a bug in Macaulay2. The root cause is that "blocks" in the monomial ordering
that contain no variables are elided from the list of blocks, resulting in unexpected behavior:


i1 : R = QQ[x,y,z, MonomialOrder => {Eliminate 0, Eliminate 1}]

o1 = R

o1 : PolynomialRing

i2 : selectInSubring(1,vars R)

o2 = | y z |

1 2
o2 : Matrix R <--- R

i4 : R = QQ[x,y,z, MonomialOrder => {Eliminate 1, Eliminate 1}]

o4 = R

o4 : PolynomialRing

i5 : selectInSubring(1,vars R)

o5 = | y z |

1 2
o5 : Matrix R <--- R

i6 : R = QQ[x,y,z, MonomialOrder => {Eliminate 2, Eliminate 1}]

o6 = R

o6 : PolynomialRing

i7 : selectInSubring(1,vars R)

o7 = | z |

1 1
o7 : Matrix R <--- R


I think we should fix that by retaining those blocks, rather than by writing special purpose code to compensate for their absence (which we have already had to do once before). Then the answer on o2 above would be | x y z |. Any comments?

Your first example illustrates that M2 is expecting both source and target to by polynomial rings. We should fix that, too.

> --
> 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.

Andrew Critch

unread,
Dec 20, 2011, 10:20:39 PM12/20/11
to maca...@googlegroups.com
No intelligent comments, except to agree strongly with this:

Your first example illustrates that M2 is expecting both source and target to by polynomial rings.  We should fix that, too.

I have needed to take the kernel of a map from a polynomial ring to a function field on numerous occasions, and if that ends up being fixed along with the map-to-QQ case, then excellent!

Thanks,

--
Critch

Michael Stillman

unread,
Dec 20, 2011, 10:34:28 PM12/20/11
to maca...@googlegroups.com
I agree, we should fix this! Besides these unimplemented features, there are also some inefficiencies in kernels of ring maps that should be fixed. I'll put it on my todo list. If anyone wants to help, please say so!

-- Mike

Grayson, Daniel R.

unread,
Dec 21, 2011, 12:09:10 AM12/21/11
to maca...@googlegroups.com

On Dec 20, 2011, at 9:20 PM, Andrew Critch wrote:

>
> I have needed to take the kernel of a map from a polynomial ring to a function field on numerous occasions, and if that ends up being fixed along with the map-to-QQ case, then excellent!
>

I think that already works:


i1 : F = frac(QQ[x,y])

o1 = F

o1 : FractionField

i2 : f = map(F,QQ[r,s,t],{x/y,x^2/(y-1),x+y})

2
x x
o2 = map(F,QQ[r, s, t],{-, -----, x + y})
y y - 1

o2 : RingMap F <--- QQ[r, s, t]

i3 : ker f

2 2 2
o3 = ideal(r t + r s - r*s*t + 2r*s - s*t + s)

o3 : Ideal of QQ[r, s, t]

Reply all
Reply to author
Forward
0 new messages