Revert 3996bda..bf6090b

This rolls back to commit 3996bdafbe7b755b54c2fb7268486d60db1e0eed.
Revert "Revert 3996bda..bf6090b"

This reverts commit 79278ef5d78166af019050da1a440ead85f1b016.
Bug in PolynomialSemiring  removed

causing endless loop intest