45 Reputation

5 Badges

9 years, 6 days

MaplePrimes Activity

These are questions asked by PoslavskySV



I'm using Java OpenMaple interface to call Maple functions from Java on Ubuntu Linux. I'm following the examples provided on Maple website. My Java code:


import com.maplesoft.openmaple.*;

import com.maplesoft.externalcall.MapleException;

class test {

    public static void main( String args[] ) throws Exception {

        String[] a = {"java"};

        Engine  t = new Engine( a, new EngineCallBacksDefault(), null, null );

        try {

            t.evaluate( "factor(-8*((16*I)*g**4*(-4*mc**2+u)**(-2)*(4*mb**2-u)**(-2)*u**(-1)*(12*mb**2-u)*(-4*s*mb**2+16*mb**4-4*u*mb**2+t*u-4*t*mb**2)*s*(4*s*mb**2+4*mc**2*s+16*mc**2*mb**2-s**2-4*t*mc**2+t**2-4*t*mb**2)*(12*mc**2-u)+(16*I)*(4*s*mb**2+4*mc**2*s+u**2-4*mc**2*u+16*mc**2*mb**2-4*u*mb**2-s**2)*(12*mc**2-t)*g**4*(t-4*mb**2)**(-2)*(4*mc**2-t)**(-2)*(-t+12*mb**2)*(-4*s*mb**2+16*mb**4-4*u*mb**2+t*u-4*t*mb**2)*s*t**(-1))**2);" );


        catch ( MapleException e ) {






Maple throws exception:

com.maplesoft.externalcall.MapleException: Error, (in evala/Factors) input must be polynomials over the integers

The input polynoial is valid (when coping and pasting `factor(...)` directly into Maple interface, all works). When trying to factor simple polynomials like "x**2 - I*x" all goes fine too. Tried both Maple 17 and 18 (Linux).

PS. There is no problem when running this code on OS X (I tried Maple 16, 17, 18),  but I need to be able to run Maple with Java on my Linux cluster.


I have a big file (~30Mb) with a single algebraic expression (file contains only one string of the form `expr := a*b + ... :` ). I would like to import this expression into Maple and I use `read` function for that:

    read "s.maple":

I wait for 2 hours, but Maple does not response and no any output provided. Is there any special function for import such data?

I use console Maple18 Linux x86 64.


Update. All goes fine in Maple 16, so the issue is relevant for Maple17 and Maple18.

Good day,


I am working under paper which contains comparison of different tensor software packages focusing on the algebraic manipulations with tensors (namely Maple Physics, Mathematica xAct, Cadabra and Redberry). When doing comparison we’ve found that Maple Physics `Simplify` function sometimes fails to perform even trivial simplifications and almost does not work on harder examples. For example, one can easily see that all expressions below are zero while Maple Physics is unable to simplify them:


with(Physics):with(Library):Setup(spacetimeindices = lowercaselatin):



#Does not give zero:



#Does not give zero:



#Does not give zero:



#Does not give zero:



#Does not give zero:



#Does not give zero:



#Does not give zero:



#Does not give zero:



I’ve attached a single Maple file with about 250 such examples (Maple18_failSimple.txt) and a file (Maple18_allSimple.txt) with 1000 simple examples I used: some of them work correctly, while some fails. All these examples perfectly work in other systems (Mathematica xAct, Cadabra and Redberry).


We use Maple18 with latests Physics package version (December 12), but we also tried latest Maple17 and other versions of Physics: none of them work. In all these examples all tensors have no symmetries, but we observe even worse results in case when tensors have symmetries (nearly all tests fail).


What is important is that when we try to test a little bit more complicated examples, which can be simplified by other packages within milliseconds, Maple Physics not able to perform basic simplification in nearly all cases. I have attached a file (Maple18_failMedium.txt with failed examples and Maple18_allMedium.txt with all examples we used) with more complicated but still simple examples (one can check each example by hand): Physics not able to simplify more than 50% of examples. Finally, I’ve attached harder examples which perfectly work in all three other systems, but none of them work in Maple Physics (Maple18_allHarder.txt).  


So, my question is why `Simplify` is not able to perform such basic simplification of tensorial expressions? May be I miss something and I need to use another special command?


If we are using `Simplify` in a right way, Maple Physics can not be considered as a package for tensorial algebra (in the opposite to what is declared on the Maple website) until these basic simplification functionality will work.



For generating input expressions we’ve written a little program that allows to generate random typical tensorial expressions arising in real computations (like calculation of Feynman diagrams etc.) and to run different system on such expressions in order to simplify them. Specifically we generate an expression (nested sums/products of tensors), then rewrite it in equivalent form (by renaming dummies, shuffling summands and multipliers and expand) and then subtract the result from initial expression. Obviously, simplification of such a prepared source must give zero.  








Edit: Here are some trivial examples that the latest fixed version (version 41.1 Dec/15) still fails to resolve correctly (besides Maple18_allHarder.txt that are still not working in the fixed version):


with(Physics): with(Library): Setup(spacetimeindices = lowercaselatin):


Define(B[a,b], antisymmetric={{a,b}}):

Define(H[a,b,c,d], antisymmetric={{a,b,c,d}}):


#Does not give zero

Simplify(A[c]*B[d,~e]*B[~d,f]*H[e,~f,b,a], tryhard);


Without symmetries:


with(Physics):with(Library):Setup(spacetimeindices = lowercaselatin):



#Does not give zero




Another important issue is that with the current fixed version, the time used by `Simplify` became unacceptably large. As in the notebook that ecterrab provided, Maple Physics takes about 20 minutes on 100 medium examples (Download Simplified100MediumExamples.mw), while other packages spend just few seconds.


We are looking forward for the future updates that will solve these issues.



Good day.

Reading the documentation on Physics package in Maple, I did not find information about how Maple handle dummy indices of tensorial expressions. For example, suppose I have the following tensorial expression in Maple: 

    A[mu] * B[~mu] 

with dummy index mu. Then I want to apply the following simple substitution rule:

    A[alpha] = C[alpha]*C[mu]*C[~mu]  

Here, free index alpha should be...

Page 1 of 1