"Bill Page" <[EMAIL PROTECTED]> writes: > > > In other words, consider the following example: > > > > > b := monomial(x,[0,0]::DirectProduct(2,NNI))$P > > > > > > Can you explain this result? > > > > > > (23) -> degree b > > > > > > (23) [0,0] > > > Type: DirectProduct(2,NonNegativeInteger) > > > > > > (24) -> b+x > > > > > > (24) x + x > > > Type: > > DistributedMultivariatePolynomial([x,y],Expression Integer) > > > > Here, we have two *different* "variables", the only happen to > > bear the same name. > > No. That is the wrong analysis. Axiom does not have any concept of "variable" > that would allow you to make this statement without first giving the context > of the domain.
We agree, only I did not express myself clearly enough -- obviously, the quotation marks did not suffice. I should have written: ... two different "things" ... > > What I consider very problematic is, that > > > > (b+x)::EXPR INT > > > > gives 2x. I believe that this can lead to very "surprising" > > results. > > > This is only surprising if one does not understand the meaning of expression > 'x+x' in (24). Don't worry, I don't find it surprising. In fact, I wrote that it could *lead* to "surprising" results. I.e., I could imagine that some innocent looking computation would not be correct in the situation above. For example, differentiate(b+x,x) gives one, but differentiate(b+x,x)@EXPR INT gives two. Note that I did not even need to ask to coerce b+x to EXPR INT... Of course, as we are discussing this now, this does not come as a surprise. But I bet that even for quite an experienced axiom user, who did not follow this thread for some reason, it will be difficult to spot the mistake. Especially if he doesn't realize that she wanted to compute something else... > Part of the reason for the confusion, I think, is because the common > OutputForm for polynomials does not typographically identify polynomial > variables versus coefficients. But if, say the polynomial variables were > always printed in bold face roman type but the coefficients were printed in > italic, it might be more clear what is going on. I think that this is a very nice idee. I guess this could be even realized on text terminals, couldn't it? Martin _______________________________________________ Axiom-developer mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/axiom-developer
