Ralf, I think that the map
coerce : Fraction Polynomial Complex Integer -> % which is apparently x+-> [x,x] in )sh DirectProduct(2,Fraction Polynomial Complex Integer) should not be called a coercion. I think it would be unusual to want the interpreter to apply this map automatically that way it apparently does now. I think it would be worth trying to remove it (or renaming it) and see what impact it has on the regression tests. Regards, Bill Page. On Thu, Jun 10, 2010 at 11:01 AM, Ralf Hemmecke <[email protected]> wrote: > Does someone have an idea, why I get DirectProduct below? > I would have accepted, if it fails. (Actually it shouldn't since > coercing to Fraction(...) should have been easy. But I agree, it's > inside the argument of a type (SquareMatrix), so a bit tricky.) > > Anyway, the interpreter seems to use > > *: (DirectProduct(2, R), %) -> DirectProduct(2,R) > > So it converts > > (101) -> ((20 + 97*%i)*x + 4*%i):: > DirectProduct(2,Fraction(Polynomial(Complex(Integer)))) > > (101) [(20 + 97%i)x + 4%i,(20 + 97%i)x + 4%i] > > Why does the interpreter consider that to be easier than converting my > element just to Fraction(Polynomial(Complex(Integer))) and do the right > thing? > > Strange... > > Ralf > > > (98) -> p::SquareMatrix(2, Fraction Polynomial(Complex Integer)) > > +(5 + 12%i)x + %i (- 21 - 14%i)x+ > (98) | | > + (- 21 - 14%i)x 49x + 4 + > Type: > SquareMatrix(2,Fraction(Polynomial(Complex(Integer)))) > (99) -> inverse(%) > > + 49x + 4 (21 + 14%i)x + > |------------------ ------------------| > |(20 + 97%i)x + 4%i (20 + 97%i)x + 4%i| > (99) | | > | (21 + 14%i)x (5 + 12%i)x + %i | > |------------------ ------------------| > +(20 + 97%i)x + 4%i (20 + 97%i)x + 4%i+ > Type: > Union(SquareMatrix(2,Fraction(Polynomial(Complex(Integer)))),...) > (97) -> (((20 + 97*%i)*x + 4*%i)::Fraction(Polynomial(Complex Integer)))*% > > + 49x + 4 (21 + 14%i)x + > (97) | | > +(21 + 14%i)x (5 + 12%i)x + %i+ > Type: > SquareMatrix(2,Fraction(Polynomial(Complex(Integer)))) > (100) -> ((20 + 97*%i)*x + 4*%i) * % > > (100) [(70 + 14%i)x + 4,(26 + 26%i)x + %i] > Type: > DirectProduct(2,Fraction(Polynomial(Complex(Integer)))) > > -- > You received this message because you are subscribed to the Google Groups > "FriCAS - computer algebra system" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/fricas-devel?hl=en. > > -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/fricas-devel?hl=en.
