axiom-math
[Top][All Lists]
Advanced

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

[Axiom-math] Re: [fricas-devel] Re: [open-axiom-devel] [fricas-devel] Re


From: Gabriel Dos Reis
Subject: [Axiom-math] Re: [fricas-devel] Re: [open-axiom-devel] [fricas-devel] Re: [fricas-devel] Re: iterators and cartesian product.
Date: Wed, 24 Oct 2007 09:13:33 -0500 (CDT)

On Wed, 24 Oct 2007, Bill Page wrote:

| On 10/24/07, Gabriel Dos Reis <address@hidden> wrote:
| > On Tue, 23 Oct 2007, Bill Page wrote:
| >
| > | On 10/23/07, Ralf Hemmecke wrote:
| > | >
| > | > >>> |   Product(1..9,1..4)
| > | > >>> What would be its meaning?
| > | > >
| > | > > If '1..9' and '1..4' are domains then the meaning of 'Product' is
| > | > > already given by the existing domain constructor 'Product' in the
| > | > > Axiom library
| > | >
| > | > Seems OK, but, of course the _domain_ 1..9 is then inappropriate in a
| > | > construction like
| > | >
| > | >    for i in 1..9 repeat ...
| > | >
| > | > don't you agree?
| > | >
| > |
| > | No. My proposal also includes the idea that the construct
| > |
| > |     for i in X repeat
| > |
| > | should expect X to be any domain that supplies a generator (like Aldor).
| >
| > so what wouold
| >
| >        for i in PositiveInteger repeat
| >
| > does concretely?
| >
| 
|   '1..' is another (better?) name for PositiveInteger

No, it is not.  Both behave quite differently in many situations.

| So under my proposal 'for i in PositiveInteger repeat' should function
| identically to the way
| 
|    for i in 1.. repeat

so you want to treat a domain as being identical to its ordered list
of values.  But, a domain is not (just) its set of values.   About
about

      for i in List(Integer) repeat

or

      for n in BinaryTree(Integer) repeat

| works now in the interpreter where '1..' denotes an object of
| 'UniversalSegment PositiveInteger'.

But UniversalSegment is a *particular traversal view* of PositiveInteger.

-- Gaby




reply via email to

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