> "Bill Page writes: > ... > | In the example code that I gave and in my emails I > | have specifically stated that I think equality of functions in > Axiom | should be changed so that it applies EQ after > resolving the functions. >
On Wed, Apr 9, 2008 at 9:42 AM, Gabriel Dos Reis wrote: > > But the question is: Why doing that actually computes anything > menaingful? What is the mathematical definition to measure that > hack against? Where is that definition? > I don't understand why this is difficult for you. As stated at the beginning of this thread, the goal is a write a two argument for of the 'reduce' operator that returns a value that is consistent with the property that: reduce(+,A) + reduce(+,B) = reduce(+, concat(A,B)) In particular this means that reduce(+,[]$List Integer) must return 0. And more generally this should be true for any operation which has a unique idenitity in a given domain. One way to describe this mathematically is to check if the operation comes from a monoid category. There are problems with defining monoids in Axiom but one approach is to check for Monoid and AbelianMonoid. Domains like Integer satisfy both of these categories. We want reduce(+,[]$List Integer) = 0 and reduce(*,[]$List Integer) = 1 In order to implement this it is necessary to test whether the first argument of 'reduce' is the '+' from AbelianMonoid or the '*' from Monoid. It seems clear to me that this requires a definition of function equality that at least is consistent with the syntactical equality. The current definition of '=' in Mapping fails because it depends on the "state" of the function, i.e. whether it is fully resolve yet, or not. Do you find anything unclear in this statement? Regards, Bill Page.. ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ open-axiom-devel mailing list open-axiom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open-axiom-devel