axiom-developer
[Top][All Lists]
Advanced

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

Re: [Axiom-developer] aldor stream oddities


From: Ralf Hemmecke
Subject: Re: [Axiom-developer] aldor stream oddities
Date: Fri, 10 Aug 2007 12:01:52 +0200
User-agent: Thunderbird 2.0.0.6 (X11/20070728)

On 08/10/2007 10:20 AM, Franz Lehner wrote:
On Fri, 10 Aug 2007, Bill Page wrote:
What is a "sequence domain"? Can you give a brief explanation or a reference?
see below
On Fri, 10 Aug 2007, Martin Rubey wrote:
Do you mean "potentially" infinite sequences of some ground ring, with
componentwise addition and scalar multiplication?
Exactly. It's straightforward, still I don't want to reduplicate code.
Actually UnivariateTaylorSeries could do it, but contains too much.

Suppose you have a ring R. You can (mathematically) produce S=R^{(N)}, the ring of sequences (N being the natural numbers).

Now, in Axiom we should have a problem with saying that S is an additive group. Not in the mathematical sense, of course, but in Axiom we want to be able to compute.

Do you want the following to happen?

(1) -> f(): Integer == 1
   Function declaration f : () -> Integer has been added to workspace.
           Type: Void
(2) -> s: Stream(Integer) := generate f
   (2)  [1,1,1,1,1,1,1,1,1,1,...]
           Type: Stream Integer
(3) -> t: UnivariateTaylorSeries(Integer,x,0) := series s
                 2    3    4    5    6    7    8    9    10      11
   (3)  1 + x + x  + x  + x  + x  + x  + x  + x  + x  + x   + O(x  )
           Type: UnivariateTaylorSeries(Integer,x,0)
(4) -> zero?(t-t)
   (4)  false
           Type: Boolean

I don't.

And for that reason, one should be really careful in defining the library. Aldor's LibAlgebra, takes a bit more care.

%5 >> DenseUnivariateTaylorSeries(Integer) has Ring
F @ Boolean

The category Ring is reserved for structures with complete equality testing.

Ralf

--------------------------------------------------------------------
If follows a paragraph from the Algebra User Guide and Reference Manual, version 1.1.0 - April 19, 2005 by Manuel Bronstein and Mark Moreno Maza

Chapter 2.

The libaldor categories AdditiveType, ArithmeticType and
LinearCombinationType already export the basic arithmetic operations
provided respectively by abelian groups, rings and modules. In fact
AbelianGroup, Ring and Module do inherit their exports from them.
There is however a fundamental difference: while the libaldor
categories export the usual operations =, +, -, ..., they make no
assumption about their algebraic properties whatsoever. On the other
hand, the corresponding algebraic categories in Algebra do assume that
= is a complete equality test, and that the arithmetic operations
satisfy the algebraic axioms of their mathematical structure. So for
example, while Integer is extended by Algebra to be a Ring (among
other things), SingleFloat remains an ArithmeticType but is not a
Ring. There is a similar relationship between LinearArithmeticType and
Algebra, both provided by Algebra. Mathematical types such as
DenseMatrix(R) or DenseUnivariatePolynomial(R) allow their argument R
to be an ArithmeticType rather than a Ring, but those among their
functions that require a complete equality on R are not exported when
R is not a Ring. Similarly, while DenseUnivariatePolynomial(R) is
always an ArithmeticType, it is a Ring only when R itself is a Ring.






reply via email to

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