Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 7 years ago

ensaba gravatar image

Why does 23t23y factors only when the variables are polynomial ring over the rational numbers?

The expression 23t23y can be factored as (23)(yt).

If I try to use sage in this way to do the factorization:

var('y t')
E = -2/3*y + 2/3 * t
E.factor()

The result is still E.

On the other hand, if do it like this:

R.<y,t> = PolynomialRing(QQ)
E = -2/3*t +2/3*y
E.factor()

The result is as expected.

Why does the call to factor() works as expected when the variable y and t are defined to be a polynomial ring in QQ and not work then they are symbolic expressions.