Trac #34791: move ProductTree and prod_with_derivative() to sage.rings.generic
The class `ProductTree` and the function `prod_with_derivative()` were
introduced in #34303. Both are fully generic in principle, but they
remained in `hom_velusqrt.py` in the heat of the moment.
We should move them to a more suitable place; it seems
`sage.rings.generic` is an appropriate choice. Slight tweaks to
`ProductTree` while we're at it.
URL: https://trac.sagemath.org/34791
Reported by: lorenz
Ticket author(s): Lorenz Panny
Reviewer(s): Kwankyu Lee
Committer
Release Manager