On 06/29/2007 11:36 PM, Franz Lehner wrote:
Hello
here is an algebra question for a change.
Do I understand correctly that there is currently no way to implement
DirectProduct(L: List Group) or DirectProduct(L: Tuple Group)?
That is, one has to manually iterate DirectProduct(G1,G2)
if one wants a direct product of more than two groups?
thanks for your consideration
Franz
Ooops. You seem to be hitting the same problem as me.
If you have a constructor DP which takes a tuple as input, you will run
into the problem that it is (nearly) impossible to create actual
elements of that thing.
Let's try do define something... Again that will be Aldor, but I hope
the problem becomes understandable.
DP(T: Tuple Group): with {
construct: T -> %
} == add {
Rep == Array Pointer;
construct(t: T): % == ...
}
Well the problem is the T here. It is something like (G1, G2, G3) where
all groups might be different. Now take (g1, g2, g3) where gi is of type
Gi. That thing is of type (G1, G2, G3) but not a Tuple(A) for some
domain A, because Tuple constructs homogeneous things. We can only have
that the type of (g1, g2, g3) is Cross(G1, G2, G3).
Well, if you use Cross, you must give the types at compile time. But
that you cannot do.
However, you have said "iterate DirectProduct(G1,G2)" and that lets me
start thinking. I don't claim that I will come up with a good
"workaround" but the iteration idea might be something that I could
eventually turn into something I like. You have to wait a bit, though.
Better listen at the aldor-combinat mailing list. I might forget to post
something to axiom-dev.
Ralf
_______________________________________________
Axiom-developer mailing list
Axiom-developer@nongnu.org
http://lists.nongnu.org/mailman/listinfo/axiom-developer