Documentation

Cons z (indexMapFromList [(x0,[y00,y01]), (x1,[y10]), (x2,[y20,y21,y22])])
represents the partial fraction
z + y00x0 + y01x0^2 + y10x1 + y20x2 + y21x2^2 + y22x2^3
The denominators x0, x1, x2, ... must be irreducible,
but we can't check this in general.
It is also not enough to have relatively prime denominators,
because when adding two partial fraction representations
there might concur denominators that have non-trivial common divisors.

fromFactoredFraction x y
computes the partial fraction representation of y % product x,
where the elements of x must be irreducible.
The function transforms the factors into their standard form
with respect to unit factors.

There are more direct methods for special cases
like polynomials over rational numbers
where the denominators are linear factors.

Remove trailing zeros in sub-lists
because if lists are converted to fractions by multiToFraction
we must be sure that the denominator of the (cancelled) fraction
is indeed the stored power of the irreducible denominator.
Otherwise mulFrac leads to wrong results.

Transforms a product of two partial fractions
into a sum of two fractions.
The denominators must be at least relatively prime.
Since T requires irreducible denominators,
these are also relatively prime.