On 6/20/07, Alan Hutchinson wrote:
... I am trying to understand the documentation. Below are some notes based on Chapter 5 of the book. The system seems to be based on a directed graph whose nodes are Axiom objects and whose edges are of two sorts which could be called member a is a member of b if b is a domain (or subdomain?) and a's type is b refines c refines d if all members of c are members of d and in addition all operations of c are operations of d. Is this right?
That is a very good start. I am glad that you are taking the time to understand Axiom at this level. Many people start with Axiom thinking that it is just another computer algebra system (like, Maxima, Maple, Mathematica, etc.) but that can lead to a lot of initial confusion. I have come to believe that it is probably better to emphasis Axiom's type and object system right from the beginning (during the first few experimental computations). I think itis essential to get a basic understanding of these concepts if one is going to progress beyond the first few pages of any tutorial. I personally find most of the Axiom book a little confused (or at least written in a confusing manner) when it discusses types. If you have a computer sciense background or a high tolerance for a terse but accurate description of the Axiom language, then I think the Aldor User's Guide: http://www.aldor.org/mediawiki/index.php/Aldor_Documentation is a great place to start. In so doing you are essentially starting at the end (or a least the latter phase) of the original Axiom development while it was still a research project at IBM. One of the design ojbectives of Aldor was to bring some order and conclusion to the system and programming language design that was a result of the earlier research and experimentation. So even though Aldor is not (at least not yet :) a part of the Axiom open source release and though you may not be planning to program in Aldor, I think it is a good place to start because it distills many of the concepts implemented in Axiom to their essense and presents them in a more rigorous manner than in Axiom itself. In particular you should pay particular attention to Chapters 7: Types and 13: Language-defined types http://aldor.org/docs/HTML/chap7.html http://aldor.org/docs/HTML/chap13.html Pay particularly close attention to the concept of "type satisfaction". Once you understand something about types, I think it much easier to appreciate the kind of things that the Axiom interpreter tries to do to relieve you of the burden of always having to be specific about types and the relationships between objects.
Probably not quite, since c may have operations with the same names as operations in d but different interpretations, in which case c would not refine d.
Actually that is also true. Some thing that is important to remember is that domains members of named categories by *assertion* - not just because they implement a certain set of operations with common signatures. See: A First Course on Aldor with libaldor http://www-sop.inria.fr/cafe/Manuel.Bronstein/libaldor/tutorial.pdf It is also interesting to read: Domains of data and domains of terms in AXIOM by BROWN, R. & DRECKMANN, W in http://www.informatics.bangor.ac.uk/public/math/research/preprints/95/algtop95.html or http://portal.axiom-developer.org/refs/articles/brown-free-c-g.pdf/file_view This is at least in part what gives the concept of "category" in Axiom it's expressive power since the name that we give to categories often stand of mathematical axioms.
In the book, Figure 1 shows a bit of this graph for the "refines" relation and for some basic domains of algebra. Could someone please draw a similar graph with nodes including Type Category Domain Any SetCategory Symbol Variable ? These are the obscurest objects. Someone has tried to explain them in bookvol1 Chapter 5, but it is hard. See the notes below.
As the Aldor documentation points out, the relationship between categories is different from the relationship between domains and categories and form the relationship of objects to domains. Both Categories and Domains are Types (Axiom has a "two-level" type system.). Things like Monoid, Ring, Field, and IntegralDomain are categories, while Any, SetCategory, Symbol and Variable are all domains. If you have some experience with object-oriented programming than it is useful to realize that domains are like "classes". Categories are a little different and more abstract. They help to express generic programming in Axiom - that is a generalized specification for algorithms that apply over a very wide range of data types.
The next issue is how to extend this graph. It seems easy to add a new node X with "member" edges: if X is to be a domain of class C then use C's natural constructor: X := C(...) if X is any other type of object of some type T then declare X : T := ...
I am afraid you might be defining new and mixing old terminology here without making this much clearer. I recommend trying to use the terms as defined in the Aldor documentation.
I have not yet worked out how to refine a domain. There is a hint on page 14 of the book: Complex(R) defines its exports with "Ring with ... if R has Field then Field ..."
Complex is a domain constructor, i.e. a function that returns a domain as a result.
The precompiled distribution doesn't seem to include source code for built-in categories such as Complex, and I don't know how to get much further. I haven't yet found a full account of the syntax used to declare a category such as Complex.
You should have a 'src' directory that was unpacked when you installed the binary version of Axiom. If you don't find it, please tell us exactly what binary version of Axiom you are using and where you downloaded it. You might also be interesting in view the Axiom source code on line. You can do that here: http://wiki.axiom-developer.org/axiom--test--1 For the Complex domain see: http://wiki.axiom-developer.org/axiom--test--1/src/algebra/GaussianSpad
The word with does not have an entry in the Glossary or in bookvol1's index.
You will find this clearly defined in the Aldor documentation.
Please forgive me if these matters have simple answers. I haven't read all the documentation, but I have looked at it for a day or so. This looks like a really powerful package, but learning how to take full advantage of it is not simple.
I think you are right on both points! Thank you for sending your notes. I will try to get time to review them in a little more depth later. Regards, Bill Page. _______________________________________________ Axiom-mail mailing list Axiom-mail@nongnu.org http://lists.nongnu.org/mailman/listinfo/axiom-mail