Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Mathematica misinterprets some underscored symbolic variables

Following examples show that the interface between sage and Mathematica misinterprets symbolic variables if they are underscored with numbers:

sage: h_20,h_10,h_2,h_3,h20,h10,h_ij,h_kl=var("h_20,h_10,h_2,h_3,h20,h10,h_ij,h_kl");
sage: mexpr=mathematica((h_20+h_10)^3);
sage: print(mexpr);
                3
     27000 (h_)
sage: mexpr1=mathematica((h20+h10)^3);
sage: print(mexpr1);
                3
     (h10 + h20)
sage: mexpr2=mathematica((h_2+h_3)^3);
sage: print(mexpr2);
             3
     125 (h_)
sage: mexpr3=mathematica((h_ij+h_kl)^3);
sage: print(mexpr2);
                3
     (h10 + h20)
sage: print(mexpr3);
                      3
     ((h_ij) + (h_kl))

I use sage-8.1 and Mathematica 11.2.0 at Linux OpenSUSE Leap v42.3. In this forum I haven't found any other comment regarding this funny behaviour.

Mathematica misinterprets some underscored symbolic variables

Following examples show that the interface between sage and Mathematica misinterprets symbolic variables if they are underscored with numbers:

sage: h_20,h_10,h_2,h_3,h20,h10,h_ij,h_kl=var("h_20,h_10,h_2,h_3,h20,h10,h_ij,h_kl");
sage: mexpr=mathematica((h_20+h_10)^3);
sage: print(mexpr);
                3
     27000 (h_)
sage: mexpr1=mathematica((h20+h10)^3);
sage: print(mexpr1);
                3
     (h10 + h20)
sage: mexpr2=mathematica((h_2+h_3)^3);
sage: print(mexpr2);
             3
     125 (h_)
sage: mexpr3=mathematica((h_ij+h_kl)^3);
sage: print(mexpr2);
                3
     (h10 + h20)
sage: print(mexpr3);
                      3
     ((h_ij) + (h_kl))

I use sage-8.1 and Mathematica 11.2.0 at Linux OpenSUSE Leap v42.3. In this forum I haven't found any other comment regarding this funny behaviour.