On Aug 24, 12:02 pm, "William Stein" <[EMAIL PROTECTED]> wrote:
>[...]
> Just as another data point, since I happened to see it when reading
> source code, in the Ginac library (http://www.ginac.de) we find this comment:
>
> /** This method establishes a canonical order on all numbers. For complex
> * numbers this is not possible in a mathematically consistent way
> but we need
> * to establish some order and it ought to be fast. So we simply define it
> * to be compatible with our method csgn.
> [...]
/pedantic ON
It is, of course, possible to establish a total ordering on the
complex numbers.
In many ways. So it is not true to say otherwise.
The issue is that cryptic phrase, "in a mathematically consistent
way".
If all you are interested in is, say, topology, then every total
ordering gives you
an order topology on the set. Nothing mathematically inconsistent in
this context.
What is usually meant by the phrase is that one cannot have a total
ordering
on the complex numbers that simultaneously preserves the full range of
cherished properties,
including the algebraic ones, that we know and love about the usual
ordering of the reals.
For example, that the order on the complex numbers be an extension of
the natural ordering of the reals,
that ((0 < a) and (0 < b)) implies (0 < ab), that the order topology
be the same as that induced by the usual Euclidean metric, etc.
/pedantic OFF
Whether this last context is the appropriate one to drive the issue of
whether there should be a default order implemented for complex
numbers in Sage (or even Python, for that matter) is debatable. IMHO,
if it is useful to programming to have a default comparison, such as
for sorting lists, then I think it would be OK to have one. Document
what it does, and if necessary, explain to your students the reason
for it.
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---