axiom-math
[Top][All Lists]
Advanced

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

[Axiom-math] Re: [fricas-devel] Re: Type equivalence of domains in Axiom


From: Martin Rubey
Subject: [Axiom-math] Re: [fricas-devel] Re: Type equivalence of domains in Axiom and Aldor
Date: 27 Oct 2007 08:53:42 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Francois Maltey <address@hidden> writes:

> Martin almost convinces me that the algebraic 
>                [f (u,v) for (u,v) in [a,b,c] X [1,2,3]] 
> is better than [f (u,v) for u in [a,b,c] repeat for v in [1,2,3]]
> 
> but I expect a syntax suggar and automatic coerce.

It occurred to me that the following might make it even clearer:

what does a looping construct have to do with a Cartesian product?  Except that
one may (but doesn't have to) use it to *implement* a function that returns all
elements of a Cartesian product.

> The * isn't the better operator because this locks
>     {1,2,3} * {1,2,3} = {1,2,3,4,6,9} 
> and {1,2,3} + {1,2,3} = {2,3,4,5,6}

I actually wondered already once, why "+" is not union$Set, "-" not
difference$Set.  I didn't think of the possibility above, although I doubt that
it would be too useful.  After all, you can even define it only if the elements
understand "+" and "*".

Martin





reply via email to

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