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

For example,

ex:=(a b)**{1/2};
expand_power(_);

Maybe some function like Assumption in Mathematica can be added.

in General questions by (2.2k points)
edited by

1 Answer

0 votes

I found a way to do it. One can use function refine in sympy, for example,

from sympy import refine, sqrt, Q
from sympy.abc import L

ex:=(\lambda**{-2})**{1/2};
substitute(_,$\lambda->L$);
refine(_._sympy_(), Q.positive(L));

But there is an another question: How to transform sympy expression to cadabra2 expression?

by (2.2k points)
...