Hi Martin!
I am not an expert for imap.
But look at iparith.cc.
if ((w=r->idroot->get(v->Name(),myynest))!=NULL){
...}
else
{
Werror("identifier %s not found in %s",v->Fullname(),u->Fullname());
}
First we have to understand, what imap does...
pure Singular.
> ring r=0,(x,y,z),dp;
> poly f=x+y*z;
> ring q=0,(y,z,x),dp;
> f;
? `f` is undefined
? error occurred in STDIN line 4: `f;`
> fetch(r,f);
zx+y
> imap(r,f);
yz+x
So, you can see, that $f$ does not exist in the current scope (ring).
Hence imap is not really a function but some command which gets past
the name of the poly $f$ in the ring $r$.
As you have not defined $f$ in the singular interpreter (idrecs) anywhere, it
can not find it.
If you would like to extend the interface to Singular interpreter to allow
entering idrecs, you will have
to do something like the following (I did that once in my original Python
interface).
- allocate idrec with some name (I used ggetid for existing id, for new ids,
the function is probably enterid).
- set POLY_CMD to it and write
- copy your poly and write into the idrec.
Cheers,
Michael
Am 12.12.2009 um 19:18 schrieb Martin Albrecht:
>> Instead, my questions are:
>> 1. Can you please fix #7654?
>
> I will take a look.
>
>> 2. Is there a wrapper for singular's "imap"?
>
> Almost, I am CCing [libsingular-devel] maybe someone there can immediately
> make sense of the error message below (marked with "<<<<<<<<<<<<"):
>
> sage: P.<x,y,z,a,b,c> = QQ[]
> sage: f = P.random_element()
> sage: R.<a,b,x,y,z> = QQ[]
> sage: from sage.libs.singular.function import singular_function
> sage: imap = singular_function('imap')
>
> sage: imap(P,f)
> ? identifier _ not found in _ #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> ---------------------------------------------------------------------------
> RuntimeError Traceback (most recent call last)
> ...
> RuntimeError:
>
> 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://www.informatik.uni-bremen.de/~malb
> _jab: [email protected]
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "libsingular-devel" group.
> 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/libsingular-devel?hl=en.
>
--
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org