Welcome to Cadabra Q&A, where you can ask questions and receive answers from other members of the community.
+1 vote

I have Mathematica installed on my computer and want to use Mathematica to simplify the scalar part an expression using the simplify algorithm, for which I tried using
kernel(scalar_backend="mathematica");

But, it shows "None" as output meaning. How can I thus connect Mathematica and Cadabra?

In particular I tried,

kernel(scalar_backend="mathematica");
ex:= (\sin{x}**2 + \cos{x}**2) A_{m};
simplify(_);

Which doesn't set sinx^2+cosx^2=1.

in General questions by (560 points)

1 Answer

+1 vote

Brown paper bag situation. I simplified some of the source just before release of 2.2.0, which had the side effect that simplify does not see the Mathematica backend... I have just pushed changes to github which fix this (and your example works with those fixes).

If you don't want to recompile, try

map_mma(_, "FullSimplify")

which does work with 2.2.0 (but is of course less clean because you can't switch back to Sympy easily).

by (66.3k points)

By the way, the 'None' output after the first line is to be expected. The function kernel does not return anything, and the Cadabra ';' postfix thus has nothing to print. As usual in Python, you get None.

...