Martin Rubey wrote:
> 
> Waldek Hebisch <hebi...@math.uni.wroc.pl> writes:
> 
> > Martin Rubey wrote:
> >> 
> >> I have a request: please document the difference between
> >> 
> >> \section{category COMPAR Comparable}
> >> <<category COMPAR Comparable>>=
> >> )abbrev category COMPAR Comparable
> >> 
> >> and 
> >> 
> >> \section{category ORDSET OrderedSet}
> >> <<category ORDSET OrderedSet>>=
> >> )abbrev category ORDSET OrderedSet
> >
> > OrderedSet should be a natural order, Comparable is just some
> > order which not necessarly makes any sense from user point of
> > view.
> 
> Sorry for bothering you (actually: everybody!) again:
> 
>     is there any (at least: vague) definition of "natural"?
> 

I am not aware of resonable mathematical definition.  Above
I used "natural" in informal way.

> Things that come to mind:
> 
> * it seems that we need to have ordering even if no "natural" order is
>   available, as in EXPR INT.  
>

Main reason to have order is printing.  Linear form means that we
will have some order of terms.  In principle we could print things
in more or less random order, but it seems better to consistently
use the same order.

There are a few places (like choosing between exp(x) and exp(-x))
where we essentially need to implement axiom of choice.  Again,
using unnatural order is resonable in such situation.

> * Possibly we also want to have two different orders: a fast one, and a
>   mathematical one...
> 

AFAICS in most cases even fast order would be slower than
alternatives.  For example using hash tables is faster than
binary search.  I would rather say that because user sees
reslult sorted in "technical" way we want this order to
stay reasonably close to natural one.

> * in python, as far as I know, any two things are comparable, and it's
>   (if I remember correctly) expressively designed for hashing etc.,
>   i.e. for exactly the same functionality you have in mind for
>   Comparable.
> 
>   I think I would be nice to reflect this intention very clearly even in
>   the name of the category.  Brainstorming: OrderedDatastructure.
> 

Well, I do not care much about name.  But Comparble was intended
to avoid confusion with OrderedSet -- using Ordered as part
of new name IMHO maximizes confusion.

> PS: one final personal thing:  I strongly prefer
> 
>     Expression(R: Comparable): Exports 
> 
> over
> 
>     Expression(R : Comparable): Exports 
> 
> 

You mean spacing?  I definitely prefer the second form,
the first IMHO lacks visual balance.  More generally, I think
that operators in general should be surrounded by spaces,
except for most thightly binding operator like *, ::, @, $.

-- 
                              Waldek Hebisch
hebi...@math.uni.wroc.pl 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to fricas-devel@googlegroups.com
To unsubscribe from this group, send email to 
fricas-devel+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to