Opened 12 years ago

Last modified 12 years ago

## #9829 new enhancement

# Implement implicitly multiplied output

Reported by: | mpatel | Owned by: | was |
---|---|---|---|

Priority: | major | Milestone: | |

Component: | user interface | Keywords: | |

Cc: | Merged in: | ||

Authors: | Reviewers: | ||

Report Upstream: | N/A | Work issues: | |

Branch: | Commit: | ||

Dependencies: | Stopgaps: |

### Description

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.

But it's not yet possible to set an option so that Sage automatically postparses the output to multiply implicitly. For example,

sage: R.<a,b,c> = QQ[]; R Multivariate Polynomial Ring in a, b, c over Rational Field sage: implicit_multiplication_output(True) # not implemented! sage: R.random_element() 1/7 a b - 1/4 a c - c^2 + c

Ideally, we would be able to use the output in later inputs with little or no modification.

AskSage question (by me).

**Note:**See TracTickets for help on using tickets.

See source:/sage/misc/preparser.py@13719#L1209 for the input transformation.