Re: [fricas-devel] Re: Type equivalence of domains in Axiom and Aldor
Martin Rubey <[email protected]> 27 Oct 2007 08:53:42 +0200
| Newsgroups | gmane.comp.mathematics.axiom.general |
|---|---|
| Message-ID | <[email protected]> |
Francois Maltey <[email protected]> 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