Is it possible to get implicitly multiplied output?
With implicit_multiplication(True)
, we can enter expressions using spaces instead of *
to separate multiplied subexpressions:
sage: var('x, y, z')
sage: implicit_multiplication(True)
sage: 3 x^4 y + 2 z sin(x z 3 y) - 3 y^2
3*x^4*y - 3*y^2 + 2*z*sin(3*x*y*z)
This works similarly for polynomials.
Is it possible to set (or implement practically) an option that automatically postparses output to use implicit multiplication? For example,
sage: R.<a,b,c> = QQ[]; R
Multivariate Polynomial Ring in a, b, c over Rational Field
sage: implicit_multiplication_output(True)
sage: R.random_element()
1/7 a b - 1/4 a c - c^2 + c