@flacjacket : When working on the fifth heuristic, I am still a bit not convinced this idea of finding the degree. Lets say `h` is `(1 + x**3)/(1 + x**2)` and `hy` is somehow `(1 + x**2)/(1 + x**3)` (which is not obviously, but just for argument) . By this code, `degree(h)` would be 3 and degree `hy` would be 2, and so `deg` would be 3. However on expanding (using as_numer_denom() and throwing the denominator, the degree is clearly 6. I still think dummy symbols. should be used, unless I am  missing something obvious.