Maxima and Macaulay2/Singular



On 8/14/2013 8:33 AM, Dima Pasechnik wrote:
> On 2013-08-14, andre maute <andre.maute at gmx.de> wrote:
>> On 08/14/2013 01:29 AM, Richard Fateman wrote:
>>> On 8/13/2013 1:57 PM, andre maute wrote:
>>>> Hi list,
>>>>
>>>> I am not really satisfied with algsys for solving/simplifying
>>>> polynomial equations.
>>>> I have a set of polynomial equations (40 variables, 70 equations,
>>>> degree 4).
> this is usually rather hopeless to attempt solving nonlinear systems
> with 40 variables. You got lucky here: a good groebner basis
> implementation was able to derive a contradiction from your equations
> quickly, without chocking.
>
>>>> I canceled Maxima after 10 hours of computation.
>>>> This was on a recent machine, with 16 Gb given for the heap to sbcl.
>>>> Then I extracted the polynomial set of equations, put it in a script
>>>> for Macaulay2,
>>>> and the dim command of Macaulay told me, within some seconds, that
>>>> there were no solutions.
>>>>
>>>> Question:
>>>> Does somebody know, if there is some functionality available,
>>>> for calling Macaulay or e.g. Singular within Maxima?
>>> There seem to be several possibilities here:
>>>
>>> 1. The algorithm used by Singular could used by Maxima by recoding in
>>> the Maxima language
>>> or in Lisp.  (It could be that the data structures etc are so foreign
>>> to Lisp that it can't be done,
>>> but that seems somewhat unlikely.)  A difference of more than 10 hours
>>> vs. some seconds
>>> suggests they are just doing different computations entirely.
> Singular has a C library API. Sage uses this.
> Coding this stuff in Lisp or Maxima langauge (or any language) is not easy.

There is also the possibility indicated here:

http://www.singular.uni-kl.de/forum/viewtopic.php?f=10&t=2269&sid=0b5b38d4d1a25419c2696edd2e4343fb

which indicates that someone recently used Singular  (not Macaulay2...) 
from Matlab by writing out
a text string to a file, and then reading it in.  This could probably be 
done even with a Maxima
running on top of GCL.

Generally I prefer to use more-or-less direct function calls when 
possible, but for some computations
the cost of inefficient text I/O  is totally dwarfed by the computation 
time.  Having robust communication
is often difficult -- especially if there are out-of-band error messages 
and unusual circumstances.

>
>>> 2. There could be a linkage to Macaulay2, if it can be called via a
>>> foreign function (FF) call
>>> (possible from SBCL if there is a suitable connection into
>>> Macaulay2).  Most lisps though
>>> not GCL support FF).
>>>
>>> I think there is the functionality but taking advantage of it requires
>>> finding someone
>>>   who knows more about SBCL and Macaulay and FF .  Maybe you??
>> I only know how to set the ring and the ideal in Macaulay and how to
>> call some commands,
>> I believe this should be done by someone, who is more trained in
>> algebraic/arithmetic geometry.
> there is also option 3:
> use Sage, where you can easily go between Maxima and Singular.
> (although Macaulay2 is sometimes more efficient than Singular).
>
>> Andre
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima