Dear List,

I'm trying to do some algebraic geometrical / arithmetical computation
with Sage and I find myself stuck on the following dumb problem: if I
have an ideal J of a quotient ring R/I (where R is a polynomial ring
and I some ideal of it), I wish to construct the ideal of R (called
p^{-1}(J) or perhaps even simply I+J) which is obtained by pulling
back J by the canonical map p:R->R/I.  This presents no algorithmic
difficulty, since I is given by generators (in R), and J is also given
by generators (in R/I, but they are themselves represented by elements
of R) and it is just a question of taking the union of these lists of
generators (seeing those of J in R/I as arbitrary representatives in
R) to obtain the desired idea.  Unfortunately, this doesn't seem to
work (probably because Sage doesn't know how to handle the canonical
surjection specially?):

vega david /usr/local/src/sage-3.4 $ ./sage
----------------------------------------------------------------------
| Sage Version 3.4, Release Date: 2009-03-11                         |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
sage: R.<x,y> = QQ['x','y']
sage: I = Ideal(y^2 - x^3 - x)
sage: Rq = R.quotient(I)
sage: p = R.hom(Rq)
sage: J = Ideal(p(y)-1)
sage: J
Ideal (ybar - 1) of Quotient of Multivariate Polynomial Ring in x, y over 
Rational Field by the ideal (-x^3 + y^2 - x)
sage: p.inverse_image(J)
---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)

/usr/src/local/sage-3.4/<ipython console> in <module>()

/usr/src/local/sage-3.4/local/lib/python2.5/site-packages/sage/rings/morphism.so
 in sage.rings.morphism.RingHomomorphism.inverse_image 
(sage/rings/morphism.c:3480)()

NotImplementedError: 
sage: whatiwantedwasthis = I + Ideal(y-1)
sage: whatiwantedwasthis
Ideal (-x^3 + y^2 - x, y - 1) of Multivariate Polynomial Ring in x, y over 
Rational Field
sage: p(whatiwantedwasthis)
Ideal (0, ybar - 1) of Quotient of Multivariate Polynomial Ring in x, y over 
Rational Field by the ideal (-x^3 + y^2 - x)
sage: p(whatiwantedwasthis) == J
True

By comparison, Macaulay2 does this:

vega david ~ $ /opt/Macaulay2-1.2-r8438/bin/M2 
Macaulay 2, version 1.2
with packages: Elimination, IntegralClosure, LLLBases, PrimaryDecomposition,
               ReesAlgebra, SchurRings, TangentCone

i1 : R = QQ[x,y]

o1 = R

o1 : PolynomialRing

i2 : I = ideal(y^2-x^3-x)

              3    2
o2 = ideal(- x  + y  - x)

o2 : Ideal of R

i3 : Rq = R/I

o3 = Rq

o3 : QuotientRing

i4 : p = map(Rq,R,matrix{{x,y}})

o4 = map(Rq,R,{x, y})

o4 : RingMap Rq <--- R

i5 : J = ideal(y-1)

o5 = ideal(y - 1)

o5 : Ideal of Rq

i6 : preimage(p,J)

                    3
o6 = ideal (y - 1, x  + x - 1)

o6 : Ideal of R

i7 : use R; whatiwantedwasthis = I + ideal(y-1)

               3    2
o8 = ideal (- x  + y  - x, y - 1)

o8 : Ideal of R

i9 : o6 == whatiwantedwasthis

o9 = true

i10 : p(whatiwantedwasthis)

o10 = ideal (0, y - 1)

o10 : Ideal of Rq

i11 : p(whatiwantedwasthis) == J

o11 = true

(Unfortunately, I can't do my computations in Macaulay2 because I need
polynomial rings over number fields - the above example is in Q - and
it can't handle them.)

So, is there a way in Sage to pull back an ideal by a canonical map?

-- 
     David A. Madore
   ( http://www.madore.org/~david/ )

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to