Either my understanding of lquo/rquo (Category XFreeAlgebra) is wrong or
there is a bug in the implementation of these functions in
XDistributedPolynomial (XDPOLY).
p1:= 3*x*y*x*z --> 3 x y x z
lquo(p1,3*x*y) --> 9 x z (expected: x z)
I think that by "left simplification" is meant mult by a left
inverse/recip, similiar as in group theory, although there is no leftRecip
of 3*x*y in XDPOLY, of course. Am I off the track?
Details below:
-- Cat XFreeAlgebra (xpoly.spad, L28)
-- lquo : (%, %) -> %
-- ++ \spad{lquo(x, y)} returns the left simplification of \spad{x} by
\spad{y}.
--
-- https://github.com/fricas/fricas/blob/master/src/algebra/xpoly.spad
-- lines 400-404
--
-- lquo(p : %, q : %) : % ==
-- +/ [t.c * r for t in q | (r := lquo(p, t.k)) ~= 0]
--
-- rquo(p : %, q : %) : % ==
-- +/ [r * t.c for t in q | (r := rquo(p, t.k)) ~= 0]
XDP:=XDPOLY(Symbol,Fraction Integer)
--
[x,y,z]:=[s::XDP for s in [x,y,z]@List Symbol]
--
p1:= 3*x*y*x*z --> 3 x y x z
--
lquo(p1,x*y) --> 3 x z
rquo(p1,x*z) --> 3 x y
-- however
lquo(p1,3*x*y) --> 9 x z (expected: x z)
rquo(p1,2*x*z) --> 6 x y (expected: (3/2) x y)
--
leftRecip(3)$XDP --> 1/3
)clear all
XDP:=XDPOLY(Symbol,Expression Integer)
[x,y,z]:=[s::XDP for s in [x,y,z]@List Symbol]
a:EXPR INT
p1:=a*x*y*x*z --> a x y x z
--
lquo(p1,x*y) --> a x z
rquo(p1,x*z) --> a x y
lquo(p1,a*x*y) --> a^2 x z
-- ...
--
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 view this discussion visit
https://groups.google.com/d/msgid/fricas-devel/786fd2ec-db67-44c2-9e93-2832bad8feb5n%40googlegroups.com.