On Fri, Oct 21, 2011 at 4:25 PM, Ralf Hemmecke wrote:
> On 10/21/2011 09:17 PM, Waldek Hebisch wrote:
>>
>> I propose to change 'selectfirst' to 'first' and
>> 'selectsecond' to 'second'.
>

Ok. I would prefer also that it export 'elt' so that one might write
x.1 and x.2 or or x(1) and x(2).

> I support it and would even change
>
> makeprod     : (A,B) -> %
>
> to
>
> product: (A,B) -> %

Yes.

>
> since I don't like abbreviations in function names.
>

I tend to agree although shorter notations are also nice. Maybe

  prod:(A,B) -> %

would be ok?

Conversion from 'List Any' would also be nice

  [x,y]::Product(A,B)
  [x,y,z]::Product(A,Product(B,C))

where domainOf(x)=A, domainOf(y)=B etc. Conversion from 'List A' could
be a special case

  [x,y]::Product(A,A)
  etc.

> Or maybe even
>
> pair: (A,B) -> %
>
> would be a good name.
>

No so good, or rather I think it belongs to another domain that could
be called 'Pair', as in OpenAxiom and mentioned below.

> In fact, thinking about it. I would reserve "Product" for something that is
> not just the product of two things.
>
Of course that depends on what you mean by "just the product of two things" ...

Like DirectProduct, the domain Product(A,B) is already something more
than "just the product of two things". It conditionally exports
[Abelian]Group, [Abelian]Monoid, OrderedSet, Finite and several other
categories depending on A and B. Probably more such conditional
exports could be added.

> Anyway, I also question the existence of that domain at all. In fact, it's
> something that would be called Cross in Aldor + an extension of Cross to
> (conditionally) export all the categories that are given in Product. Oh,
> yes, sorry, that wouldn't work since I'd have to iterate the "has" operator
> over a tuple (the argument for Cross). So, fixed length is necessary for
> Product.
>

The similarity to Cross is significant.

> But then, why not calling it Pair and also have Triple and Quadruple as
> domains?
>

Yes, I think it make sense to have such domains but similar to Cross,
they should *not* export more than the minimum required constructor
and "accessor' functions. They are more like "data structure" domains
then "algebraic" (mathematical) domains.  That distinction has often
been made in Axiom before.

Regards,
Bill Page.

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en.

Reply via email to