sympy/sympy — pull request #1199 by ness01 (2012-04-03 15:14:28+00:00)
Title: Generalized polynomial rings

This PR is meant to be a start in a series of pull requests implementing basic commutative algebra using Groebner bases. It builds on my previous one (groebner bases for modules), but only the new monomial orders are used. Thus the first five commits are not technically part of this PR.

This PR implements very little actual content. There are two main commits ("beef up DMP" and "Implement Generalized poly rings") and a few smaller ones I separated out. The first one extends the `polys.DMP` and `polys.DMF` classes to carry an optional reference to a containing ring. This information is used mainly for two purposes: automatic coercion and pretty printing. The second main commit extends the PolynomialRing class, please refer to the commit message for more details.

All commits include tests where appropriate, except that "functionality tests" for the first main commit are only added in the second one, since it seemed more natural to tests the two together.