Hey Charles, (CC: sage-devel),

On Monday 11 Jun 2012, you wrote:
> Hi Martin,
> 
> I have a few SAGE-related questions for you.
> 
> This small patch (against sage 5.0) will make the variety() function
> work on ideals of BooleanPolynomials. It essentially adds a few basic
> functions that were missing (is_univariate(), variable(1), degree(x),
> univariate_polynomial(), ....), and then the existing mechanisms start
> working.
> 
> After the patch, this should work:
> 
> sage: R.<x,y,z> = BooleanPolynomialRing(3)
> sage: p = [ x*y*z + x*z + y + 1, x*y+x*z+y*z, x+y+z+1 ]
> sage: I = ideal(p)
> sage: I.variety()
> 
> and give the same result as:
> 
> sage: R.<x,y,z> = GF(2)[]
> sage: p = [ x*y*z + x*z + y + 1, x*y+x*z+y*z, x+y+z+1 ]
> sage: I = ideal(p)
> sage: I.variety()
> 
> However, there is a caveat. The variety() function fails when the
> ideal is of positive dimension (which makes sense...). However, over
> ideals of BooleanPolynomial, it does not fail (indeed, they are all of
> dimension zero), but IT RETURNS A WRONG RESULT.
> 
> For instance,
> 
> sage: R.<x,y,z> = BooleanPolynomialRing(3)
> sage: p = [ x*y*z + x*z + y + 1 ]
> sage: I = ideal(p)
> sage: I.variety()
> 
> returns garbage (x=z=0, y=1 is obviously a solution), while :
> 
> sage: R.<x,y,z> = GF(2)[]
> sage: p = [ x*y*z + x*z + y + 1 ]
> sage: I = ideal(p)
> sage: I.variety()
> 
> fails. What should we do about this ?

I guess we'll have to debug it and fix it? :) We should create a ticket for 
your patch and fix the issue "there"?

> Also, I spotted two other very minor problems.
> 
> a) in pbory.pyx, the .variables() function counts "1" as a variable.
> This contradicts the way every other functions behave.

I don't seem to understand what you mean, as this works fine:

sage: P.<x,y> = BooleanPolynomialRing()
sage: x.variables()
(x,)
sage: (x+1).variables()
(x,)


> b) in multi_polynomial_libsingular.pyx, line 16865, this is a
> TypeError, while the docstring advertize a ValueError
> 
> Are these two details worth tickets/patches ?

Yes, we should definitely open tickets and upload patches!

Cheers,
Martin

--
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
_www: http://martinralbrecht.wordpress.com/
_jab: martinralbre...@jabber.ccc.de

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

Reply via email to