Now thinking about the "reductum(0)=0" assumption.
I can easily remove it from my code (see below).
tailReduce(x: X, basis: List X): X ==
empty? basis => x
p: R := polynomial x
-- We iterate over the non-leading terms of polynomial(x).
r: R := 0
v: V := representation x
m: C := multiplier x
-- We keep the representation part attached to p and hand it
-- over to denominatorFreeTopReduce. Thus we get the representation
-- from the reduced polynomial.
while not zero? p repeat
r := r + leadingMonomial p
p := reductum p
x := denominatorFreeTopReduce([p, v, 1], basis)
v := representation x
p := polynomial x
m := multiplier(x) * m
r := multiplier(x) * r
[r, v, m]
and compare with
https://github.com/fricas/fricas/commit/a4c3af045560d631f06c68ca542676b84cd227d2#diff-ebde1584f365f97c30d05da63bb4ba4bR117
Waldek, would you prefer this new code in another commit? (I think I
should have done that rewrite before. Sorry.)
I just had a quick check. I modified
GeneralDistributedMultivariatePolynomial in such a way that it gives an
error on reductum(0). Then my test code does not even reach
reduce$ExtendedPolynomialReduction, because groebner stops with the
reductum(0) error.
Ralf
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.