doctests for abstract_ring, bugfix: elements with the same rational function should compare equal, support for negative powers