Changes http://wiki.axiom-developer.org/AxiomDeveloper/diff -- On Friday, March 03, 2006 11:26 AM Vanuxem Gr�gory wrote: > > ... > > Gabriel Dos Reis <[EMAIL PROTECTED]> writes::
> > > | In fact it seems that this problem cannot be properly > > | solved with Aldor. There was some discussion on this > > | list, too. > > | > > | The reason is > > | > > | Rng(): Category == Join(AbelianGroup,SemiGroup) > > | > > | would give a problem... > > > > What problems? > > > > Well, if you inherit an operation, you cannot alter the > > name of the operation. Rng inherits really two different > > monoids, one for addition and one for multiplication. > > > Thus there would be a name conflict... > > Does someone know the compiler and/or the interpreter behavior > (from which category the operation is selected if the categories > define this function ?) in this case ? > If there really is a conflict, i.e. if the name of the operation as well as the source and target domains match exactly, in the case of Aldor, you get an error message telling you there is more than one possible selection for the function. Something similar but messier happens in SPAD. We are talking about categories here, so this does not have any effect on the Axiom interpreter. Every function that the interpreter calls in located in some package or domain and if necessary the function can be selected based on the package or domain name. In the interpreter, since it is interactive if you define the same function more than once on the same source and target domains, then the secobd definition simply replaces the first. In the case of Rng it is interesting to see that in fact it does obtain two different definitions of '*' from AbelianGroup and SemiGroup. If the former it is multiplation of an element (%) of the domain by an Integer and in the latter it is the product of two elements (%) from the domain. This is not a conflict because the signatures are different. You can use 'tangle' and the selection box to quickly extract the code for 'category RNG Rng', 'category SGROUP SemiGroup' and 'category ABELGRP AbelianGroup' at http://wiki.axiom-developer.org/axiom--test--1/src/algebra/CatdefSpad Regards, Bill Page. -- forwarded from http://wiki.axiom-developer.org/[EMAIL PROTECTED]