[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] Question concerning types...
From: |
Ralf Hemmecke |
Subject: |
Re: [Axiom-developer] Question concerning types... |
Date: |
Sun, 17 Sep 2006 01:43:20 +0200 |
User-agent: |
Thunderbird 1.5.0.5 (X11/20060719) |
Hi
On 09/16/2006 11:19 PM, Martin Rubey wrote:
C Y <address@hidden> 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] Question concerning types..., C Y, 2006/09/16
- Re: [Axiom-developer] Question concerning types..., Martin Rubey, 2006/09/16
- Re: [Axiom-developer] Question concerning types..., C Y, 2006/09/16
- Re: [Axiom-developer] Question concerning types..., Ralf Hemmecke, 2006/09/16
- Re: [Axiom-developer] Question concerning types..., Gabriel Dos Reis, 2006/09/16
- Re: [Axiom-developer] Question concerning types..., C Y, 2006/09/16
- Re: [Axiom-developer] Question concerning types..., Martin Rubey, 2006/09/16
- Re: [Axiom-developer] Question concerning types...,
Ralf Hemmecke <=
- Re: [Axiom-developer] Question concerning types..., Gabriel Dos Reis, 2006/09/16
- Re: [Axiom-developer] Question concerning types..., Gabriel Dos Reis, 2006/09/16
- Re: [Axiom-developer] Question concerning types..., C Y, 2006/09/16
- Re: [Axiom-developer] Question concerning types..., Gabriel Dos Reis, 2006/09/16
- Re: [Axiom-developer] Question concerning types..., C Y, 2006/09/16
- Re: [Axiom-developer] Question concerning types..., Gabriel Dos Reis, 2006/09/17
- Re: [Axiom-developer] Question concerning types..., Martin Rubey, 2006/09/17
- Re: [Axiom-developer] Question concerning types..., Vanuxem GrĂ©gory, 2006/09/16
- RE: [Axiom-developer] Question concerning types..., Bill Page, 2006/09/17
- Re: [Axiom-developer] Question concerning types..., Ralf Hemmecke, 2006/09/16