Dear David,
On Nov 24, 10:38 pm, "David Joyner" <[EMAIL PROTECTED]> wrote:
<snip>
> sage: R = singular.ring(0, '(x,y,z)', 'dp')
> sage: A = singular.matrix(3,3,'0,1,0,-1,0,0,0,0,-1')
> sage: singular.eval('LIB "finvar.lib";')
>
> Now, I'm stuck. Everything I try returns an error.
> For example, I expected R.invariant_ring(A) to work.
> Are there any Singular experts here who can help with this?
Since i did the current version of finvar.lib, i think i'm supposed to
answer.
First, the argument of invariant_ring is a matrix, and not a ring and
a matrix. Hence, the syntax should be
A.invariant_ring()
However, this does not work.
I guess the reason is that invariant_ring returns a tripel of matrices
(return(P,S,IS)) and that the Singular interface can not correctly
parse it.
In Singular, it is possible to say
matrix P,S,IS = invariant_ring(A);
but in sage, the corresponding
P,S,IS = A.invariant_ring()
does not work.
@Martin Albrecht:
- Is there a reasonable way to fix this in the interface?
- If not: What could we do on the side of Singular to make the return
of a tuple (like return(P,S,IS)) comprehensible for the interface? I
guess "return(list(P,S,IS))" would work, but i'm not sure if this
change of syntax wouldn't have nasty consequences for existing
applications.
There is a very clumsy way to pull the output of invariant_ring into
sage:
First, define A and R as above. Then say
singular.eval('matrix P,S,IS=invariant_ring(%s)'%(A.name()))
P=singular('P')
S=singular('S')
IS=singular('IS')
But definitely i do think the correct syntax should be
P,S,IS=A.invariant_ring()
Now, another question on the Singular interface:
In Singular, doing
matrix P,S,IS = invariant_ring(A,1);
would make Singular to additionally print information about the
progress of computations (which, in big examples, might be nice to
have).
However, when i use the Singular interface, i can not see such
informations. Where are they gone?
Yours sincerely
Simon
Yours sincerely
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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---