On 02/22/2013 03:57 PM, Franz Lehner wrote:
> late reply, your message took almost a week to make it over the alps ...

Well, you know... there's too much snow at the moment. ;-)
(The truth is that I've changed my email address and for some reason my
postings are classified as spam or get otherwise blocked. Maybe Waldek
knows more details, but I had the same issue on another google mailinglist.)

>> Why do you believe this?
> Because in FreeModule the ordering of the basis is just a technical
> requirement to have a unique normal form.

Maybe, but it's currently not implemented that way.

https://github.com/hemmecke/fricas-svn/blob/master/src/algebra/indexedp.spad.pamphlet#L196

One would have to implement

  compareterm(a: Term, b: Term): Boolean == smaller?(b.k, a.k)

Additionally PLUS_BODY would have to be modified accordingly.

etc. etc.

>> And more important: What is your use case?
> Formal sums of elements of posets (in my case set partitions).
> A PartialOrder cannot be turned into an OrderedSet without destroying
> the partial order.

Well, as a use case it looks convincing, but you are not yet exploring
the full power of FriCAS.

Let P be your partitions domain. All you care about when you use
partitions in FreeModule is the OrderedSet structure. You know how to
turn your partitions into an ordered set, by just using the Comparable
property. So why not defining

MakeOrderedSet(X: Comparable): OrderedSet with
    coerce: X -> %
    coerce: % -> X
  == X add
    coerce(x: X): % == ...
    coerce(x: %): X == ...
    ((x: %) < (y: %)): Boolean == smaller?(x, y)

Then say

  OrdP: OrderedSet == MakeOrderedSet(P)

and use OrdP instead of P in FreeModule.

Ralf

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to