On Dec 3, 2008, at 2:01 AM, Thomas Kahle wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Dear all,
>
> I wonder where I can read about sage's automagic type inference.
> If use something like
>
> sage: R = QQ['x1,x2']
> sage: (x1,x2) = R.gens()
> sage: J = (x1*x2, x1-x2)* R
>
> sage infers J to be an MPolynomialIdeal and makes Singular accessible.
> Now, I am working on a class BinomialIdeal which derives from
> MPolynomialIdeal and want sage to check whether an MPolynomialIdeal is
> in fact a binomial ideal and then type it accordingly.
>
> How could I do this ?

For now. See the documentation at the top of sage/structure/ 
parent.pxd and sage/structure/coerce.pxd. (These should have been  
added to the reference manual, but I'm not seeing them online.) When  
the docs directory is finally moved I'll add some to the programming  
guide too.

The short answer is that you need to add an _l_action_ method to  
MPolynomialRing_libsingular (or one of its superclasses) that takes  
as input the tuple and produces an idea. This sounds like a good  
interface for creating ideals, so please do.

- Robert


--~--~---------~--~----~------------~-------~--~----~
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-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to