Re: [Axiom-developer] A bug in windows Axiom

2007-08-13 Thread Bill Page
On 8/13/07, Alasdair McAndrew wrote: On 8/13/07, Bill Page wrote: > ... > The current installer program for Axiom on Windows installs an older > version of Axiom in which the > > version of Axiom in which the > > > > )set function compile on > > > > bug was not yet fixed (refer to IssueTracker on

Re: [Axiom-developer] A bug in windows Axiom

2007-08-13 Thread Alasdair McAndrew
Thanks, that worked fine! Now - I don't want to have to go through the arduous business of downloading masses of stuff before I can compile Axiom on Windows (and neither do my students). All I want is one simple installation file: download, install and that's it. Do you know if the current Windo

Re: [Axiom-developer] "has" and "with" (was curious algebra failure)

2007-08-13 Thread Bill Page
On 8/13/07, Ralf Hemmecke wrote: > > You have added the Aldor version of the test code to > > > | http://wiki.axiom-developer.org/AnonymousCategories > > For test3() > > -- QQ is a category-valued constant > define QQ:Category == with { +:(Integer,Integer)->Integer } > ttest3():Boole

Re: [Aldor-l] [Axiom-developer] "has" and "with" (was curious algebra failure)

2007-08-13 Thread Gabriel Dos Reis
On Mon, 13 Aug 2007, Ralf Hemmecke wrote: | > The Spad compiler tries to treat category constructors, domain | > constructors, package constructors, and function calls as uniformly as | > possible. What I mean by that is that it applies the principle: | > | >When calling a function, collect

[Axiom-developer] Another strange coercion

2007-08-13 Thread Franz Lehner
Hello, There are many easy examples of this when you use the Axiom interpreter. Perhaps the following is related: Trying to implement free products of monoids FreeProductMonoid(M1:Monoid,M2:Monoid) (see attachment, not very elegant, but I don't know how to avoid "mixed lists" otherwise). I am

[Axiom-developer] Re: "has" and "with" and bug

2007-08-13 Thread Gabriel Dos Reis
On Mon, 13 Aug 2007, Ralf Hemmecke wrote: | > > > I'm saying that the parameter S of the default package | > > > Monad& -- generated for the default implementation of the | > > > category Monad -- is of the named category Monad. | | Sorry, I am too lazy to go back where all began. But let me quot

Re: [Axiom-developer] "has" and "with" (was curious algebra failure)

2007-08-13 Thread Gabriel Dos Reis
On Mon, 13 Aug 2007, Ralf Hemmecke wrote: | > 1. When a function is called, the compiler/interpreter determines | > whether the arguments used to call the function are coercible | > to the type of the formal parameters of the function, when it | > was declared. | > |

Re: [Axiom-developer] "has" and "with" (was curious algebra failure)

2007-08-13 Thread Ralf Hemmecke
1. When a function is called, the compiler/interpreter determines whether the arguments used to call the function are coercible to the type of the formal parameters of the function, when it was declared. What that means concretely is that when we declare a func

Re: [Axiom-developer] "has" and "with" (was curious algebra failure)

2007-08-13 Thread Gabriel Dos Reis
On Mon, 13 Aug 2007, Bill Page wrote: | On 13 Aug 2007 00:39:45 -0500, Gabriel Dos Reis wrote: | > ... | >2. When one defines a category with default implementation, like | >Monad, the compiler extracts the "purely categorial" part of | >Monad, e.g. the exports; then it implic

Re: [Axiom-developer] "has" and "with" (was curious algebra failure)

2007-08-13 Thread Gabriel Dos Reis
William Sit <[EMAIL PROTECTED]> writes: | I think I understand the objection raised by Gaby. In matching Monad to | SetCategory with ..., Axiom is applying a forgetful functor that, given a | monad, forgets all of its operations except those featured in SetCategory with | In this sense, app

Re: [Axiom-developer] "has" and "with" (was curious algebra failure)

2007-08-13 Thread Bill Page
On 13 Aug 2007 00:39:45 -0500, Gabriel Dos Reis wrote: > ... >2. When one defines a category with default implementation, like >Monad, the compiler extracts the "purely categorial" part of >Monad, e.g. the exports; then it implicitly creates a package >Monad& with an im

Re: [Axiom-developer] "has" and "with" (was curious algebra failure)

2007-08-13 Thread Gabriel Dos Reis
On Mon, 13 Aug 2007, Bill Page wrote: | Is it possible to trace how coerce is called in an unmodified Spad | compiler that compiles Monad without an error message? Bill, sorry, I misread this part of your message. I'm starting a new build without the correction applied to the compiler. -- Gaby

Re: [Axiom-developer] "has" and "with" (was curious algebra failure)

2007-08-13 Thread Gabriel Dos Reis
"Bill Page" <[EMAIL PROTECTED]> writes: | Gaby, | | On 8/12/07, you wrote: | > On Sun, 12 Aug 2007, William Sit wrote: | > | > | Isn't the problem whether 'Monad has SetCategory with | > | "*":(%,%)->%' ? My answer would be yes. This should not be | > | related to equivalence of categories or do

Re: [Axiom-developer] "has" and "with" (was curious algebra failure)

2007-08-13 Thread Gabriel Dos Reis
On Mon, 13 Aug 2007, Bill Page wrote: | On 8/13/07, Gabriel Dos Reis wrote: | > ... | > When compiling the default definition of ** for Monad, the compiler | > notices that expt comes from RepeatedSquare(S), where S is the | > parameter of type Monad to Monad&. | | This use of S is confusing to m

Re: [Aldor-l] [Axiom-developer] "has" and "with" (was curious algebra failure)

2007-08-13 Thread Bill Page
On 8/13/07, Gabriel Dos Reis wrote: > On Mon, 13 Aug 2007, Bill Page wrote: > > [...] > > | > > Similarly, an expression of type PositiveInteger is coercible to > | > > Integer bcause PositiveInteger is a subdomain of Integer. Similarly, > | > > a domain expression of type C1 is coercible to C2 if

Re: [Axiom-developer] "has" and "with" (was curious algebra failure)

2007-08-13 Thread Bill Page
On 8/13/07, Gabriel Dos Reis wrote: > ... > When compiling the default definition of ** for Monad, the compiler > notices that expt comes from RepeatedSquare(S), where S is the > parameter of type Monad to Monad&. This use of S is confusing to me. The spad code says: import RepeatedSquaring(%)

Re: [Aldor-l] [Axiom-developer] "has" and "with" (was curious algebra failure)

2007-08-13 Thread Gabriel Dos Reis
On Mon, 13 Aug 2007, Bill Page wrote: [...] | > > Similarly, an expression of type PositiveInteger is coercible to | > > Integer bcause PositiveInteger is a subdomain of Integer. Similarly, | > > a domain expression of type C1 is coercible to C2 if C2 appears | > > in the list of named categorie

Re: [Axiom-developer] "has" and "with" and bug

2007-08-13 Thread Ralf Hemmecke
On 08/13/2007 05:18 PM, William Sit wrote: Ralf Hemmecke wrote: Let's compile and run the program below. woodpecker:~/scratch>aldor -laldor -grun aaa.as has with {foo: ()->()} = T has with {bar: ()->()} = T has with {rhx: ()->()} = T has with {foo: ()->()} = T has with {bar: ()->()} = T has wi

Re: [Axiom-developer] "has" and "with" (was curious algebra failure)

2007-08-13 Thread Gabriel Dos Reis
On Mon, 13 Aug 2007, William Sit wrote: | | | Gabriel Dos Reis wrote: | | > On Sun, 12 Aug 2007, William Sit wrote: | > | > | Isn't the problem whether 'Monad has SetCategory with "*":(%,%)->%' ? | > | > If the question is formulated in terms of "has", then I think the answer | > is unambiguous

Re: [Aldor-l] [Axiom-developer] "has" and "with" (was curious algebra failure)

2007-08-13 Thread Bill Page
On 8/13/07, Ralf Hemmecke wrote: > > The Spad compiler tries to treat category constructors, domain > > constructors, package constructors, and function calls as uniformly as > > possible. What I mean by that is that it applies the principle: > > > >When calling a function, collect candidates,

RE: [Aldor-l] [Axiom-developer] "has" and "with" (was curious algebrafailure)

2007-08-13 Thread Weiss, Juergen
I don't think that the compiler automatically applies the coerce functions. Haven't checked to substantiate that claim though. Regards Juergen Weiss Juergen Weiss | Universitaet Mainz, Zentrum fuer Datenverarbeitung, [EMAIL PROTECTED]| 55099 Mainz, Tel: +49(6131)39-26361, FAX: +49(6131)39-26

Re: [Axiom-developer] "has" and "with" and bug

2007-08-13 Thread William Sit
Ralf Hemmecke wrote: > Let's compile and run the program below. > > woodpecker:~/scratch>aldor -laldor -grun aaa.as > has with {foo: ()->()} = T > has with {bar: ()->()} = T > has with {rhx: ()->()} = T > has with {foo: ()->()} = T > has with {bar: ()->()} = T > has with {rhx: ()->()} = T > MDom h

Re: [Aldor-l] [Axiom-developer] "has" and "with" (was curious algebra failure)

2007-08-13 Thread Ralf Hemmecke
The Spad compiler tries to treat category constructors, domain constructors, package constructors, and function calls as uniformly as possible. What I mean by that is that it applies the principle: When calling a function, collect candidates, filter them by applying the criteria that the a

Re: [Aldor-l] [Axiom-developer] "has" and "with" (was curious algebra failure)

2007-08-13 Thread Gabriel Dos Reis
Ralf Hemmecke <[EMAIL PROTECTED]> writes: | > | Isn't the problem whether 'Monad has SetCategory with "*":(%,%)->%' ? | | > If the question is formulated in terms of "has", then I think the answer | > is unambiguously "yes". | | Gaby, if you are going to implement "yes", then we should keep in m

Re: [Axiom-developer] aldor stream oddities

2007-08-13 Thread Ralf Hemmecke
On 08/11/2007 08:55 PM, Franz Lehner wrote: Now, in Axiom we should have a problem with saying that S is an additive group. That's true. All axioms are satisfied, except uniqueness of inverses and the neutral element. What should it be? A FuzzyAbelianGroup? Well, the problem is that we don't

Re: [Axiom-developer] A bug in windows Axiom

2007-08-13 Thread Bill Page
On 8/13/07, Alasdair McAndrew wrote: > > I'm using Axiom with some cryptography students; at this very early stage we > are having fun with very simple ciphers (Vigenere, Hill, etc), so we need to > transfer from a string to a list of integers. > > Here is how to reproduce the bug: on windows Axio

Re: [Axiom-developer] "has" and "with" (was curious algebra failure)

2007-08-13 Thread Ralf Hemmecke
In Spad there is also the subdomain construction that is used to define PositiveInteger and NonNegativeInteger from Integer. Subdomain automatically provides "coercible to" the parent domain. This is something that Spad has that was never implemented in Aldor. Bill, that should be on our list fo

Re: [Axiom-developer] "has" and "with" (was curious algebra failure)

2007-08-13 Thread Ralf Hemmecke
| Isn't the problem whether 'Monad has SetCategory with "*":(%,%)->%' ? If the question is formulated in terms of "has", then I think the answer is unambiguously "yes". Gaby, if you are going to implement "yes", then we should keep in mind that the Aldor compiler currently does not allow cat

[Axiom-developer] "has" and "with" and bug

2007-08-13 Thread Ralf Hemmecke
I'm saying that the parameter S of the default package Monad& -- generated for the default implementation of the category Monad -- is of the named category Monad. Sorry, I am too lazy to go back where all began. But let me quote that piece of code here. Monad(): Category == SetCategory with

Re: [Axiom-developer] A bug in windows Axiom

2007-08-13 Thread Martin Rubey
"Alasdair McAndrew" <[EMAIL PROTECTED]> writes: > I'm using Axiom with some cryptography students; at this very early stage we > are having fun with very simple ciphers (Vigenere, Hill, etc), so we need to > transfer from a string to a list of integers. > > Here is how to reproduce the bug: on wi

[Axiom-developer] A bug in windows Axiom

2007-08-13 Thread Alasdair McAndrew
Hi, I'm using Axiom with some cryptography students; at this very early stage we are having fun with very simple ciphers (Vigenere, Hill, etc), so we need to transfer from a string to a list of integers. Here is how to reproduce the bug: on windows Axiom, enter the following tiny function: str2l

Re: [Axiom-developer] "has" and "with" (was curious algebra failure)

2007-08-13 Thread Ralf Hemmecke
---BEGIN aaa.as #include "aldor" #include "aldorio" main(): () == { import from Integer; T1 == List Integer; T2 == List Integer; t1: T1 := [1]; t2: T2 := t1; stdout << "t1 = " << t1 << newline; stdout << "t2 = " << t2 << newline; #if Doesnt

Re: [Axiom-developer] "has" and "with" (was curious algebra failure)

2007-08-13 Thread Ralf Hemmecke
Dear Bill, You have added the Aldor version of the test code to | http://wiki.axiom-developer.org/AnonymousCategories For test3() -- QQ is a category-valued constant define QQ:Category == with { +:(Integer,Integer)->Integer } ttest3():Boolean == Integer has QQ you say: --

Re: [Axiom-developer] "has" and "with" (was curious algebra failure)

2007-08-13 Thread William Sit
I think I understand the objection raised by Gaby. In matching Monad to SetCategory with ..., Axiom is applying a forgetful functor that, given a monad, forgets all of its operations except those featured in SetCategory with In this sense, applying a forgetful functor is a form of automatic

Re: [Axiom-developer] "has" and "with" (was curious algebra failure)

2007-08-13 Thread William Sit
Gabriel Dos Reis wrote: > On Sun, 12 Aug 2007, William Sit wrote: > > | Isn't the problem whether 'Monad has SetCategory with "*":(%,%)->%' ? > > If the question is formulated in terms of "has", then I think the answer > is unambiguously "yes". > > But, is that the way the compiler is intended o