[Aldor-l] exports and constants

Ralf Hemmecke ralf at hemmecke.de
Tue Jul 25 10:10:53 EDT 2006


On 07/25/2006 03:19 PM, Bill Page wrote:
> Actually, I think what I want is to have that the expression
> "R has Field" does not necessarily involve the concept of "type"
> as such. In Axiom (from which Aldor was derived), it is common
> to consider this use of Field as testing an attribute. In the
> design of Axiom, attributes are asserted and tested by the
> programmer.
> 
> For example you might see:
> 
>   if R has commutative("*") then
>     determinant: $ -> R
> 
> but 'commutative' is not defined as a category anywhere.

Not in Axiom, but have you looked into the files by Peter Broadbery for 
the creation of libaxiom?

There is a file as/attrib.as.pamphlet which starts like this...

---BEGIN
import from AxiomLib;
inline from AxiomLib;

macro {
	Attribute X == X: Category == with;
}

Attribute nil;
Attribute infinite;
Attribute arbitraryExponent;
...
Attribute commutative(T: Type);
---END


The attributes are an ad hoc way to state properties in a bit more 
formal way. But we certainly all agree that there should be a better 
language construct that enables the programmer to state properties by 
arbitrary logical formulas.

> Polynomial Integer has commutative("*")

We had that before... for libaxiom 'commutative("*")' is a category 
constructor. So don't be surprised if

Polynomial Integer has commutative("HappyBirthday")

also gives true.

Ralf



More information about the Aldor-l mailing list