Hi
On 09/16/2006 11:19 PM, Martin Rubey wrote:
C Y <[EMAIL PROTECTED]> writes:
(1) -> Q == Quaternion Fraction Integer;
Oh, I feared that this would cause trouble...
in Axiom:
Q ==> Quaternion Fraction Integer;
Well that should work, but actually I used Aldor syntax. In Axiom you
would have to write
Q := Quaternion Fraction Integer;
But note then Q is a variable and could change so if you then say
P := Polynomial Q
p1: P := 1
Q := Integer
p2: P := 1
can you assure that p1=p2? Note, the have the same type P which is
Polynomial Q. Or will p1 become invalid by assigning Integer to Q?
Well, typing that into Axiom will surely reveal the answer, but could
you say without doing it?
Oh, I just realised some weakness of Axiom...
P := Polynomial
Although Polynomial is the name of a constructor, a full type must
be specified in the context you have used it. Issue )show
Polynomial for more information.
Seems that not everything is first class... :-(
(2) -> m(a1: Q, a2: Q, a3: Q, a4: Q): Matrix Q := matrix[[a1,a2],[a3,a4]];
in Axiom and in Aldor:
m(a1: Q, a2: Q, a3: Q, a4: Q): Matrix Q == matrix[[a1,a2],[a3,a4]];
Oh yes, thank you Martin, that was a stupid mistake of mine.
Ralf
_______________________________________________
Axiom-developer mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/axiom-developer