[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] about Expression Integer
From: |
Martin Rubey |
Subject: |
Re: [Axiom-developer] about Expression Integer |
Date: |
19 Feb 2006 22:45:03 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
"Bill Page" <address@hidden> 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] about Expression Integer, Francois Maltey, 2006/02/16
- Re: [Axiom-developer] about Expression Integer, Martin Rubey, 2006/02/17
- RE: [Axiom-developer] about Expression Integer, Bill Page, 2006/02/17
- Re: [Axiom-developer] about Expression Integer, Martin Rubey, 2006/02/18
- Re: [Axiom-developer] about Expression Integer, Ralf Hemmecke, 2006/02/19
- RE: [Axiom-developer] about Expression Integer, Bill Page, 2006/02/19
- Re: [Axiom-developer] about Expression Integer, Martin Rubey, 2006/02/19
- RE: [Axiom-developer] about Expression Integer, Bill Page, 2006/02/19
- Re: [Axiom-developer] about Expression Integer,
Martin Rubey <=
- DMP([x], DMP([x], Integer)) (was Re: [Axiom-developer] about Expression Integer), Ralf Hemmecke, 2006/02/20
- RE: [Axiom-developer] about Expression Integer, Bill Page, 2006/02/20
- Re: [Axiom-developer] about Expression Integer, Francois Maltey, 2006/02/20
- RE: [Axiom-developer] about Expression Integer, Bill Page, 2006/02/20
- Re: [Axiom-developer] about Expression Integer, Ralf Hemmecke, 2006/02/21
- RE: [Axiom-developer] about Expression Integer, Bill Page, 2006/02/21
- Re: [Axiom-developer] about Expression Integer, Ralf Hemmecke, 2006/02/21
- RE: [Axiom-developer] about Expression Integer, Bill Page, 2006/02/21
- Re: [Axiom-developer] about Expression Integer, Ralf Hemmecke, 2006/02/21
- RE: [Axiom-developer] about Expression Integer, Bill Page, 2006/02/21