axiom-developer
[Top][All Lists]
Advanced

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

Re: [Axiom-developer] Re: Dimensions as types...


From: Ralf Hemmecke
Subject: Re: [Axiom-developer] Re: Dimensions as types...
Date: Tue, 29 Aug 2006 16:45:19 +0200
User-agent: Thunderbird 1.5.0.5 (X11/20060719)

I just wanted to point out that you can give the Aldor Category "Dimension" an
algebraic structure. This is in fact one of the main advantages of Aldor over
SPAD.

The code will read roughly as follows:

Scalar: Dimension with {
        scalar: %;
} == AuxiliaryDimension add {
        scalar: % == [1, ""];
}

DimensionThing: Group == add {
        Rep == Dimension;
        1: % == per ConstantDimension;
        (x: %) * (y: %): % == per(x * y);
        (x: %) / (y: %): % == ...
}

Yep, that is exactly what I called a wrapper domain in my previous mail. And note that the line

(x: %) * (y: %): % == per(x * y);

is wrong. It should read "per(rep x * rep y)" on the right hand side.
And note also that the * on the right hand side is the _domain constructor_ that I defined in the file dimension.as.

The main point is that one defines the various dimension domains like Length, Time, etc. on the top level with basically no relation to each other. In order to work with these things one creates another domain that has domains like Length, Time, Mass, etc as elements.

Ralf

PS: Martin probably wanted Scalar = ConstantDimension. No?




reply via email to

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