| 
 (new) exquo and therefore gcd cannot handle UP(x, EXPR INT) --Bill Page,  Mon, 11 Jul 2005 15:56:25 -0500 replyUpdate of bug #10530 (project axiom): Status: None => transferred fricas (1) -> gcd((x-2^a)::UP(x, 
 Type: UnivariatePolynomial(x, Gives 1, while the correct answer should be  fricas gcd((x-2^a)::UP(x, 
 Type: UnivariatePolynomial(x, In fact, to ensure that algebraic relations are respected inside expressions one has to normalize all involved expressions: fricas uP := UP(x, 
 Type: Type fricas p1 := (x-2^a)::uP 
 Type: UnivariatePolynomial(x, fricas p2 := simplify((x-2^a)*(x+2^a))::uP 
 Type: UnivariatePolynomial(x, fricas cl1 := coefficients(p1) 
 Type: List(Expression(Integer)) fricas cl2 := coefficients(p2) 
 Type: List(Expression(Integer)) fricas ncl := normalize(concat(cl1, 
 Type: List(Expression(Integer)) fricas ncl1 := first(ncl, 
 Type: List(Expression(Integer)) fricas ncl2 := rest(ncl, 
 Type: List(Expression(Integer)) fricas np1 := reduce(_+, 
 Type: UnivariatePolynomial(x, fricas np2 := reduce(_+, 
 Type: UnivariatePolynomial(x, fricas gcd(np1, 
 Type: UnivariatePolynomial(x, Not nice, but in general this is what is needed (below are simpler attempts which sometimes work, but may fail). Internal Cause In EXPR INT,   fricas simplify((x-2^a)*(x+2^a))::UP(x, 
 Type: UnivariatePolynomial(x, Therefore exquo in: exquo(simplify((x-2^a)*(x+2^a))::UP(x,EXPR INT),(x-2^a)::UP(x,EXPR INT)) fails.  In details, it calls  Thus, in our case, at one point p1 is  To get correct result we need to express coefficients of p1 and p2
in terms of independent kernels.  In more general contexts (in
particular involving  Wed 09/29/2004 at 16:02, comment #1:I should have added: fricas exquo(normalize(simplify(((A-2^a)*(A+2^a)))::EXPR INT), 
 Type: Union(Expression(Integer), fricas exquo(simplify((A-2^a)*(A+2^a))::UP(A, 
 Type: Union("failed", This shows that using normalize separately on polynomials does not help, we need to normalize list of coefficients as a whole. Few examples showing that without normalization FriCAS does not always treat  fricas dom:=UP('x,
 Type: Type fricas p:dom:=x-2^a 
 Type: UnivariatePolynomial(x, fricas q:=(x-2^a)*(x+2^a) 
 Type: Expression(Integer) fricas qq:= simplify(q) 
 Type: Expression(Integer) fricas r:= q::dom 
 Type: UnivariatePolynomial(x, fricas rr:= qq::dom 
 Type: UnivariatePolynomial(x, fricas gcd(p, 
 Type: UnivariatePolynomial(x, fricas exquo(q, 
 Type: Union(Expression(Integer), fricas gcd(p, 
 Type: UnivariatePolynomial(x, fricas gcd(p, 
 Type: UnivariatePolynomial(x, fricas gcd(p, 
 Type: UnivariatePolynomial(x, fricas q - qq 
 Type: Expression(Integer) fricas simplify q - qq 
 Type: Expression(Integer) fricas simplify ((r - rr)::EXPR INT) 
 Type: Expression(Integer) fricas t:Boolean:=(r = rr) 
 Type: BooleanStatus: open => closed | 

 , as given by
, as given by



![\label{eq6}\left[ 1, \: -{{2}^{a}}\right] 
\label{eq6}\left[ 1, \: -{{2}^{a}}\right]](images/2534023711493191576-16.0px.png)
![\label{eq7}\left[ 1, \: -{{4}^{a}}\right] 
\label{eq7}\left[ 1, \: -{{4}^{a}}\right]](images/1328962384442545567-16.0px.png)
![\label{eq8}\left[ 1, \: -{{e}^{a \ {\log \left({2}\right)}}}, \: 1, \: -{{{e}^{a \ {\log \left({2}\right)}}}^{2}}\right] 
\label{eq8}\left[ 1, \: -{{e}^{a \ {\log \left({2}\right)}}}, \: 1, \: -{{{e}^{a \ {\log \left({2}\right)}}}^{2}}\right]](images/6420658689589790620-16.0px.png)
![\label{eq9}\left[ 1, \: -{{e}^{a \ {\log \left({2}\right)}}}\right] 
\label{eq9}\left[ 1, \: -{{e}^{a \ {\log \left({2}\right)}}}\right]](images/3553955505766949696-16.0px.png)
![\label{eq10}\left[ 1, \: -{{{e}^{a \ {\log \left({2}\right)}}}^{2}}\right] 
\label{eq10}\left[ 1, \: -{{{e}^{a \ {\log \left({2}\right)}}}^{2}}\right]](images/3846284423031515559-16.0px.png)



 and
 and  are treated as two variables
without relations in EXPR INT.  But
 are treated as two variables
without relations in EXPR INT.  But

 , which is zero
mathematically, but
, which is zero
mathematically, but 

 the same as
the same as 













