On Tue, Aug 5, 2008 at 6:43 PM, Gabriel Dos Reis wrote:
> On Tue, Aug 5, 2008 at 4:54 PM, Bill Page wrote:
>> On Tue, Aug 5, 2008 at 4:20 PM, Gabriel Dos Reis wrote:
>>>
>>>
>>> The category SetAggregate exports a partial ordering operation for
>>> set inclusion under the name "<".  I consider this harmful.  The
>>> principal reason is that since set inclusion is a *partial ordering*,
>>> its spelling should not be tied to "<", or any other usual relational
>>> comparison because the interpreter (and the compiler in older
>>> versions of Axiom) do *syntactic* replacements of x >= y by
>>> not (x < y) -- and my other misguided syntactic transformations,
>>> -- which is true only if we had a total ordering.
>>>
>>> Thoughts?
>>>
>>
>> As you said: simple syntactic transformations of this kind are
>> "misguided". I think that first of all such transformations should be
>> eliminated.
>
> Just eliminating the syntactic transformations in the interpreter
> does not solve the problem: you get new failures, and they need to
> be resolved.  My proposal fort SetAggregate is to replace "<" with
> "part?".
>

Sure, that would solve the immediate problem. If that is all that is
of interest then why not just replace those references to '<' with
'subset?' and eliminate the export of '<' from SetAggregate?

>> On the other hand, it seems to me that the issue is not
>> the name of the operation but rather the category to which
>> the operation belongs.
>
> It has lot to do with the name.  Most people expect "<" to be somehow
> related to ">=", and to denote total ordering -- and AXIOM certainly does
> that.

Shall we take a vote? ;-)  Since OpenAxiom is supposed to be a
"mathematically" system I think it is sufficient that it conform to
common mathematical usage. Certainly the relationship between partial
orders and total ordering is well understood and essential to
mathematics.

http://en.wikipedia.org/wiki/Totally_ordered_set

>
>> 'SetAggregate' does have an *attribute* named
>> 'partiallyOrderedSet'. I do not understand why this is an attribute
>> and not a category with specific exports.
>
> I don't think that is the fundamental problem here.  Whether it is
> a category or attribute does not change the problem that "<" has
> already a well defined meaning established in the community.
>

Sure. That just says that defining "s < t returns true if all elements
of set aggregate s are also elements of set aggregate t" (as given in
the source of SetAggregate) is against common usage. A more common
notation might be "s <= t returns true if all elements of set
aggregate s are also elements of set aggregate t", i.e. a partial
ordering given by set inclusion.

http://en.wikipedia.org/wiki/Partial_order

>>
>> I agree that explicitly exporting '<'  from SetAggregate is harmful.
>> Similarly explicitly exporting 'subset?' is also wrong.
>
> Could you elaborate on why the latter is wrong?
>

Because it is an explicit export of SetAggregrate. The documentation
says it is defined as: "subset?(u,v) tests if u is a subset of v.
Note: equivalent to reduce(and,{member?(x,v) for x in u},true,false)".
So 'subset?' relation is something that can and should be defined at a
higher level in the category hierarchy, e.g. in HomogeneousAggregate
which already defines 'member?'.

>> It is
>> conventional to use a symbol such as '<=' for partial ordering,
>
> Not in a context where it already means total ordering.
>

I don't understand. Even in the context when '<=' is defined by the
category 'OrderedSet', it still makes sense to me to refer to '<=' as
a partial ordering.

>> and I
>> think it would be usefully represented as an export of a category
>> 'PartiallyOrderedSet' that satisfies the axioms:
>
> I believe that is excessive overloading that does not mix well with
> OrderSet.

A totally ordered set is also a partially ordered set. In what sense
does this not "mix well"?

> Furthermore there can be simulatenously many operations
> that partially order a given set (think of usual "<" and divisibility on
> integers).  In a sense we already know that the above scheme does
> not scale -- see `the monoid problem'.  So just putting "<" is a
> separate category is no solution I fear -- unless we also solve the
> monoid problem.
>

I agree that there is still the monoid problem.  A solution to the
monoid problem would also likely apply to this case but that it is a
separate problem from the subject of your original message. The monoid
problem does not prevent us from usefully defining 'Monoid' (and
'AbelianMonoid') now, and it should not prevent us from defining
concepts like 'PartiallyOrderedSet'.

> ...
> The syntactical transformations are supposed to optimize some indirect
> calls in some cases, but I think correctness should come first,
>

I agree.

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