axiom-math
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-math] Curious behavior of Taylor series


From: Jay Belanger
Subject: Re: [Axiom-math] Curious behavior of Taylor series
Date: Mon, 21 Aug 2006 14:43:11 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Ralf Hemmecke <address@hidden> writes:

> On 08/21/2006 06:27 PM, Jay Belanger wrote:
>> Ralf Hemmecke <address@hidden> writes:
>>
>>> On 08/21/2006 03:38 AM, Jay Belanger wrote:
>>>> Martin Rubey <address@hidden> writes:
>>>>
>>>>> "Igor Khavkine" <address@hidden> writes:
>>>>>
>>>>>> Can someone explain the following behavior of Taylor series in Axiom?
>>>>>>
>>>>>> (113) -> y := taylor x
>>>>>>    (113)  x
>>>>>>                          Type: UnivariateTaylorSeries(Expression 
>>>>>> Integer,x,0)
>>>>>> (114) -> x*y
>>>>>>    (114)  x x
>>>>>>                          Type: UnivariateTaylorSeries(Expression 
>>>>>> Integer,x,0)
>>>>>> (115) -> coefficient(%,1)
>>>>>>    (115)  x
>>>>>>                                                      Type: Expression 
>>>>>> Integer
>>>>> The reason is that Axiom cannot really know whether you meant x in (114) 
>>>>> to be
>>>>> an element of the coefficient Ring EXPR INT, or to be a univariate Taylor
>>>>> series. In case of doubt, it usually chooses the wrong possibility :-)
>>>> When multiplying two elements, shouldn't Axiom try to coerce them to
>>>> be in the same structure?  (I realize it doesn't, particularly here,
>>>> but wouldn't that be reasonable behavior?)
>>> But Axiom coerced the two x to the same domain!!!

Looking back, it didn't.  One of the x's is in Expression Integer, and
the other is UTS.

>> Not in any meaningful way.
>
> Well, but how can you tell this to Axiom?

Axiom could try to coerce x to be the same type as y, or y to be the
same type as x.  The latter would lose structure, and should fail.
So x should be coerced to the same domain as y.

> It should be impossible to construct the domain
> UnivariateTaylorSeries(Expression Integer,x,0).  I guess the Axiom
> designers thought that returning that domain for taylor x would be
> reasonable. I must say, I question that.  UTS(Fraction Integer, x,
> 0) would have been sufficient and you wouldn't have the trouble.

Yes.  I obviously need to learn more to find out what's going on
here. 

> But see, x is a symbol which should be coerce into a Taylor
> series. The interpreter has several choices. So assuming the ideal
> that the interpreter should have no mathematical knowledge itself,
> it can only take the available information from the library. But
> there are several available ways to go from x to UTS(Expression
> Integer,x,0). So how can the interpreter ever know that it does the
> wrong thing?

The problem is that it didn't even try to go from x to UTS; x ends up
as an Expression Integer.  I think it should have tried coercing x
before multiplying x and y.

>> And it isn't coercing x to be in the same domain as the other x, which
>> is what I think should happen.
>
> Well, what should happen is, that Axiom users should not be confronted
> with such terribly confusing stuff. First the user should learn that
> Expression Integer is very very dangerous (as you can see) if used in
> connection with a polynomial or powerseries domain.

It is dangerous to use Expression Integer as above, but I don't think
it should be.  I think the commands at the beginning of this thread
were reasonable and should work.

Jay




reply via email to

[Prev in Thread] Current Thread [Next in Thread]