sympy/sympy — pull request #2484 by katjasophie (2013-09-25 10:52:58+00:00)
Title: factor_list: fix factorization of polynomials over polynomial rings or fraction fields

When factoring polynomials over a polynomial ring or a fraction field, factor_list currently does not compute the correct factorization.

With the current master, I get:
```
In [1]: D, t = ring('t', ZZ)

In [2]: R, x = ring('x', D)

In [3]: f = (t**2 - 1) * x

In [4]: f.factor_list()
Out[4]: (1, [(t - 1, 1), (t + 1, 1), (x, 1)])
```

That is incorrect, since ```t**2 - 1``` is an element of the ground domain. Therefore, the correct factorization would be ```(t**2 - 1, [(x, 1)])```.
Computing and dividing out the content of a polynomial first solves this.