> However, I am not sure if it is efficient to use these commands often.
> Suppose f is a map from basering to some other ring R, and I, J are
> ideals in R. Then, preimage(R,f,I) computes the preimage of I under f.
> I guess internally some Groebner basis computation is done. When you
> then do preimage(R,f,J), I wonder if the same Groebner basis
> computation is repeated, or if the first result was cached.

A priori, the two computations (one with I, one with J) are different.
Computing a kernel is really nothing more than computing a groebner
basis for a well-chosen ideal, which depends on I or J. It's not
inconceivable that some clever person could cache some intermediate
results, but it's not entirely straightforward.

Also, with groebner basis being available in sage, it's easy to
implement at least a naive version in pure sage which should be just
as fast as any other. Here's a crap one (don't laugh):

def kernel(phi, R, J, S, I):
        """phi: list of elements of polyring S, defining a homomorphism from
polyring R to S by specifying the images of the generators.

        This computes the kernel of the induced map R/J --> S/I.
        Limitations: variables in R and S must have different names. Silly,
but it'll do."""


        Y= R.gens()
        X= S.gens()
        k= R.base_ring()
        A= PolynomialRing(k, X + Y, order= "lex")
        L= [A(P) for P in I.gens()] + [ A(Y[i]) - A(phi[i]) for i in range(len
(phi))]

        K= L*A
        ans= K.groebner_basis()

        Yvars= A.gens()[len(X):]
        def only_Y_vars(P):
                for var in P.variables():
                        if var not in Yvars:
                                return False
                return True

        ans= filter(only_Y_vars, ans)
        return [R(P) for P in ans]

Given this one ought to :

(i) write a proper version which has no silly name limitation, uses
term orders cleverly, uses elimination_ideal, etc : all relatively
straightforward.

(ii) add the functionality to SAGE : a lot of trouble as far as i'm
concerned.

Hey if anyone wants to take me through the steps for (ii)... you
wouldn't believe how little i know.

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to