On Wed, Aug 6, 2008 at 4:03 PM, Ralf Hemmecke wrote:
> Bill Page wrote:
>> All of this is as is should be for me to write something like:
>>
>>  Ring(a:Symbol,z:Symbol,m:Symbol,o:Symbol) == Join(Associative(a),
>> Commutative(a), Identity(a,z), Associative(m), Commutative(m),
>> Identity(m,o), ... etc.
>>
>>   Ring("+","0","*","1")
>>
>> which I expect to export
>>
>>  +:(%,%)->%
>>  0:%
>>  *:(%,%)->%
>>  1:%
>>
>> and to satisfy all of the expected properties.
>
> That doesn't look too bad. But I have some issues.
>
> 1) You connect here Symbol with an identifier in the language. So your
> "Symbol" domain should be rather something builtin to the language
> than just an ordinary library domain.
>

Yes, knowledge of Symbol is (partially) built-in to SPAD and even more
so in the interpreter.

> 2) Your approach is a first approximation, but imagine you give some
> properties inside Join. It might happen that another property follows
> logically from that knowledge base, but you have not explicitly included
> it. So it would be nice to state a logical formula for "Commutative(m)"
> etc. instead of just giving the property a reasonable name and hide
> its meaning in the documentation, in accessible to the compiler.
>

Sure, but that is (for the most part) intentially beyond the scope of
the implementation of categories in Axiom and Aldor. Categories
currently are associated with domains only by explicit assertion,
although such assertions can be made conditional, e.g.

  if D has Ring or D has Field then
    Monoid

for a limited range of conditional expressions. These limitations are
intended to make it possible to do more at compile time and to make it
possible to generate efficient code.

> ...
> Of course, D can take advantage if it knows that * is commutative, but
> that is something else than expression simplification.

Yes.

> ...

Regards,
Bill Page.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
open-axiom-devel mailing list
open-axiom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open-axiom-devel

Reply via email to