Dear John, dear William,

On Feb 20, 11:45 pm, "William Stein" <[EMAIL PROTECTED]> wrote:
> On Wed, Feb 20, 2008 at 1:22 PM, John Palmieri <[EMAIL PROTECTED]> wrote:
>
> >  By the way, is the following a bug?
>
> >  sage: singular.LIB('ncall.lib')
> >  sage: R=singular.ring(0,'(x1,x12,x2)','dp')
> >  sage: C=singular.matrix(3,3,'1,-1,-1, -1,1,-1, -1,-1,1')
> >  sage: C
>
> >  1, -1,-1,
> >  -1,1, -1,
> >  -1,-1,1
> >  sage: R=singular.ring(0,'(x1,x12,x2)','dp')
> >  sage: C
> >  `sage1`
>
> >  Calling singular.ring(...) seems to redefine C.
>
> >  (I discovered this because when I was making a copy of the algebra S,
> >  I wanted to use the same matrix C for the copy, but by that point it
> >  had been redefined to be `sage1`, to my surprise.)
>
> No, it is not a bug.  It's a perfect example of how
> Singular itself has a rather -- let's say old fashioned ...

... or neatly ordered...

The point is that a matrix in Singular has coefficients in a ring.
There may be different rings at the same time, but only one of them is
active (its nick name is "basering"). If you want to access a matrix
then you first have to make its ring active (using "setring").

Above, you define a ring, define a matrix in that ring, and then
change the ring (it doesn't matter that it is re-defined by an exact
copy of itself). So the matrix is lost.

Yours
       Simon


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

Reply via email to