Discussion:
[sage-devel] how to use a singular lib
Daniel Krenn
2018-11-23 18:03:54 UTC
Permalink
Singular is shipped with symodstd.lib (it contains an algorithm for
computing a Groebner basis in a special case).
How can I access it from within Sage?

I looked up the code and coming from an ideal's groebner_basis method,
it is somehow clear how to extend this, but how do I make the actual
call to one of the library's functions? (I seems just straight forward
to call something in Singular's standard library.)

Is there any code that calls some function from a Singular-library that
I can look up?

Best

Daniel
--
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+***@googlegroups.com.
To post to this group, send email to sage-***@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.
Simon King
2018-11-23 19:49:53 UTC
Permalink
Hi Daniel,
Post by Daniel Krenn
Singular is shipped with symodstd.lib (it contains an algorithm for
computing a Groebner basis in a special case).
How can I access it from within Sage?
I looked up the code and coming from an ideal's groebner_basis method,
it is somehow clear how to extend this, but how do I make the actual
call to one of the library's functions? (I seems just straight forward
to call something in Singular's standard library.)
Is there any code that calls some function from a Singular-library that
I can look up?
How do you plan to use singular? Via pexpect or via libsingular?

For the former, there is code in
src/sage/groups/matrix_gps/finitely_generated.py (where Singular's
finvar.lib is used).

For the latter, I am not so sure. However, there is
sage.libs.singular.function.SingularLibraryFunction. I am guessing that
its documentation will explain how to use a function from one of
Singular's libraries.

Best regards,
Simon
--
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+***@googlegroups.com.
To post to this group, send email to sage-***@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.
'Martin R. Albrecht' via sage-devel
2018-11-23 20:18:00 UTC
Permalink
Indeed, this should work:

_ = sage.libs.singular.function.lib("symodstd.lib")
syModStd = sage.libs.singular.function.singular_function("syModStd")
Post by Simon King
Hi Daniel,
Post by Daniel Krenn
Singular is shipped with symodstd.lib (it contains an algorithm for
computing a Groebner basis in a special case).
How can I access it from within Sage?
I looked up the code and coming from an ideal's groebner_basis method,
it is somehow clear how to extend this, but how do I make the actual
call to one of the library's functions? (I seems just straight forward
to call something in Singular's standard library.)
Is there any code that calls some function from a Singular-library that
I can look up?
How do you plan to use singular? Via pexpect or via libsingular?
For the former, there is code in
src/sage/groups/matrix_gps/finitely_generated.py (where Singular's
finvar.lib is used).
For the latter, I am not so sure. However, there is
sage.libs.singular.function.SingularLibraryFunction. I am guessing that
its documentation will explain how to use a function from one of
Singular's libraries.
Best regards,
Simon
--
_pgp: https://keybase.io/martinralbrecht
_www: https://martinralbrecht.wordpress.com
_jab: ***@jabber.ccc.de
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
--
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+***@googlegroups.com.
To post to this group, send email to sage-***@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.
Daniel Krenn
2018-11-23 20:56:09 UTC
Permalink
Post by 'Martin R. Albrecht' via sage-devel
_ = sage.libs.singular.function.lib("symodstd.lib")
syModStd = sage.libs.singular.function.singular_function("syModStd")
Oh, this is easy. Thanks :)
--
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+***@googlegroups.com.
To post to this group, send email to sage-***@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.
Daniel Krenn
2018-11-23 20:58:09 UTC
Permalink
Post by Simon King
Hi Daniel,
Post by Daniel Krenn
Singular is shipped with symodstd.lib (it contains an algorithm for
computing a Groebner basis in a special case).
How can I access it from within Sage?
I looked up the code and coming from an ideal's groebner_basis method,
it is somehow clear how to extend this, but how do I make the actual
call to one of the library's functions? (I seems just straight forward
to call something in Singular's standard library.)
Is there any code that calls some function from a Singular-library that
I can look up?
How do you plan to use singular? Via pexpect or via libsingular?
No idea; my first plan was to extend the existing groebner-basis code to
accept a new algorithm, namely the one from symodstd.
At the moment it seems that libsingular provides the functionality to do
some experimenting, which is fine :)

Thanks

Daniel
--
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+***@googlegroups.com.
To post to this group, send email to sage-***@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.
Loading...