Re: [sage-devel] Error in ideal.variety(QQbar) for a polynomial ideal over the rational

2014-06-27 Thread Nicolas M. Thiery
On Fri, Jun 27, 2014 at 06:19:33PM -0700, Martin Albrecht wrote:
> already fixed it seems:  http://trac.sagemath.org/ticket/16485

Nice, that was quicker than quick :-)

Thanks for the pointer and for the fix!

Nicolas
--
Nicolas M. Thiéry "Isil" 
http://Nicolas.Thiery.name/

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Error in ideal.variety(QQbar) for a polynomial ideal over the rational

2014-06-27 Thread Martin Albrecht
already fixed it seems:  http://trac.sagemath.org/ticket/16485

On Friday 27 Jun 2014 17:43:13 Nicolas M. Thiery wrote:
>   Hi!
> 
> I have a zero-dimensional ideal of polynomials over the rational, and
> getting an error when requesting the solutions over QQbar:
> 
> sage: R. = QQ[]
> sage: eq = [5/9*p00^2 + 2/3*p00*p01 + 1/3*p01^2 + 2/9*p00*p02 +
> 2/3*p01*p02 + 5/9*p02^2 - 5/9, :   5/9*p00*p10 + 1/3*p01*p10 +
> 1/9*p02*p10 + 1/3*p00*p11 + 1/3*p01*p11 + 1/3*p02*p11 + 1/9*p00*p12 +
> 1/3*p01*p12 + 5/9*p02*p12 - 4/9, :   5/9*p00*p10 + 1/3*p01*p10 +
> 1/9*p02*p10 + 1/3*p00*p11 + 1/3*p01*p11 + 1/3*p02*p11 + 1/9*p00*p12 +
> 1/3*p01*p12 + 5/9*p02*p12 - 4/9, :   5/9*p10^2 + 2/3*p10*p11 +
> 1/3*p11^2 + 2/9*p10*p12 + 2/3*p11*p12 + 5/9*p12^2 - 5/9, :   p00^2
> + p01^2 + p02^2 - 1,
> :   p00*p10 + p01*p11 + p02*p12,
> :   p00*p10 + p01*p11 + p02*p12,
> :   p10^2 + p11^2 + p12^2 - 1]
> sage: I.dimension()
> 0
> sage: I.vector_space_dimension()
> 16
> sage: I.variety()
> []
> 
> So far, so good. However:
> 
> sage: I.variety(QQbar)
> ...
>
> /opt/sage-git/local/lib/python2.7/site-packages/sage/rings/polynomial/multi
> _polynomial_ideal.pyc in _variety(T, V, v) 2619 vbar =
> v.copy()
>2620 vbar[variable] = root
> -> 2621 Tbar = [ f.subs({variable:root}) for f in T ]
>2622 _variety(Tbar,V,vbar)
>2623
> 
>
> /opt/sage-git/local/lib/python2.7/site-packages/sage/rings/polynomial/multi
> _polynomial_libsingular.so in
> sage.rings.polynomial.multi_polynomial_libsingular.MPolynomial_libsingular.
> subs
> (build/cythonized/sage/rings/polynomial/multi_polynomial_libsingular.cpp:22
> 725)() TypeError: keys do not match self's parent
> 
> I manage to get some of the solutions via a triangular decomposition,
> but not all of them::
> 
> sage: J1, J2 = I.triangular_decomposition()
> sage: J2.variety(QQbar)
> [{p12: -0.9082482904638630?, p00: -0.4082482904638630?, p11:
> 0.09175170953613699?, p01: -0.9082482904638630?, p10: -0.4082482904638630?,
> p02: 0.09175170953613699?}, {p12: -0.09175170953613699?, p00:
> 0.4082482904638630?, p11: 0.9082482904638630?, p01: -0.09175170953613699?,
> p10: 0.4082482904638630?, p02: 0.9082482904638630?}, {p12:
> 0.09175170953613699?, p00: -0.4082482904638630?, p11: -0.9082482904638630?,
> p01: 0.09175170953613699?, p10: -0.4082482904638630?, p02:
> -0.9082482904638630?}, {p12: 0.9082482904638630?, p00: 0.4082482904638630?,
> p11: -0.09175170953613699?, p01: 0.9082482904638630?, p10:
> 0.4082482904638630?, p02: -0.09175170953613699?}] sage: J1.variety(QQbar)
> *BANG AS ABOVE*
> 
> Any insight? Should I file a ticket?
> 
> Cheers,
>   Nicolas
> --
> Nicolas M. Thiéry "Isil" 
> http://Nicolas.Thiery.name/

signature.asc
Description: This is a digitally signed message part.


[sage-devel] Error in ideal.variety(QQbar) for a polynomial ideal over the rational

2014-06-27 Thread Nicolas M. Thiery
Hi!

I have a zero-dimensional ideal of polynomials over the rational, and
getting an error when requesting the solutions over QQbar:

sage: R. = QQ[]
sage: eq = [5/9*p00^2 + 2/3*p00*p01 + 1/3*p01^2 + 2/9*p00*p02 + 2/3*p01*p02 
+ 5/9*p02^2 - 5/9,
:   5/9*p00*p10 + 1/3*p01*p10 + 1/9*p02*p10 + 1/3*p00*p11 + 
1/3*p01*p11 + 1/3*p02*p11 + 1/9*p00*p12 + 1/3*p01*p12 + 5/9*p02*p12 - 4/9,
:   5/9*p00*p10 + 1/3*p01*p10 + 1/9*p02*p10 + 1/3*p00*p11 + 
1/3*p01*p11 + 1/3*p02*p11 + 1/9*p00*p12 + 1/3*p01*p12 + 5/9*p02*p12 - 4/9,
:   5/9*p10^2 + 2/3*p10*p11 + 1/3*p11^2 + 2/9*p10*p12 + 2/3*p11*p12 
+ 5/9*p12^2 - 5/9,
:   p00^2 + p01^2 + p02^2 - 1,
:   p00*p10 + p01*p11 + p02*p12,
:   p00*p10 + p01*p11 + p02*p12,
:   p10^2 + p11^2 + p12^2 - 1]
sage: I.dimension()
0
sage: I.vector_space_dimension()
16
sage: I.variety()
[]

So far, so good. However:

sage: I.variety(QQbar)
...

/opt/sage-git/local/lib/python2.7/site-packages/sage/rings/polynomial/multi_polynomial_ideal.pyc
 in _variety(T, V, v)
   2619 vbar = v.copy()
   2620 vbar[variable] = root
-> 2621 Tbar = [ f.subs({variable:root}) for f in T ]
   2622 _variety(Tbar,V,vbar)
   2623 


/opt/sage-git/local/lib/python2.7/site-packages/sage/rings/polynomial/multi_polynomial_libsingular.so
 in 
sage.rings.polynomial.multi_polynomial_libsingular.MPolynomial_libsingular.subs 
(build/cythonized/sage/rings/polynomial/multi_polynomial_libsingular.cpp:22725)()
TypeError: keys do not match self's parent

I manage to get some of the solutions via a triangular decomposition,
but not all of them::

sage: J1, J2 = I.triangular_decomposition()
sage: J2.variety(QQbar)
[{p12: -0.9082482904638630?, p00: -0.4082482904638630?, p11: 
0.09175170953613699?, p01: -0.9082482904638630?, p10: -0.4082482904638630?, 
p02: 0.09175170953613699?}, {p12: -0.09175170953613699?, p00: 
0.4082482904638630?, p11: 0.9082482904638630?, p01: -0.09175170953613699?, p10: 
0.4082482904638630?, p02: 0.9082482904638630?}, {p12: 0.09175170953613699?, 
p00: -0.4082482904638630?, p11: -0.9082482904638630?, p01: 
0.09175170953613699?, p10: -0.4082482904638630?, p02: -0.9082482904638630?}, 
{p12: 0.9082482904638630?, p00: 0.4082482904638630?, p11: 
-0.09175170953613699?, p01: 0.9082482904638630?, p10: 0.4082482904638630?, p02: 
-0.09175170953613699?}]
sage: J1.variety(QQbar)
*BANG AS ABOVE*

Any insight? Should I file a ticket?

Cheers,
Nicolas
--
Nicolas M. Thiéry "Isil" 
http://Nicolas.Thiery.name/

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.