#18383: Coercion and comparison for alternating sign matrices
-------------------------------------+-------------------------------------
Reporter: vdelecroix | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.7
Component: combinatorics | Resolution:
Keywords: | Merged in:
Authors: Vincent Delecroix | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/vdelecroix/18383 | 390e2d7cf57899cde4c7b096ef5b97f0be909574
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by vdelecroix):
Replying to [comment:4 tscrim]:
> Because it assumes the existence of a ''total'' order (which may not be
reasonable for matrices in the future as, IIRC, when they were first
implemented, we only had `__cmp__` in Python). Also `cmp` is going away in
Python3 and `__richcmp__` only calls `_cmp_` as a generic fallback. Plus
the current implementation already acts as how you're intending it to
(which might change as the ASM people might want the comparisons to be the
natural lattice and they would need to revert your changes).
I assumed that there is a total order on `-1,0,1`. Right. The '''only'''
things that change with this ticket are:
1. the embedding `ASM -> MatrixSpace`
2. the fact that coercion takes place in comparisons
3. the fact that `cmp(a1,a2)` answers something when `a1` and `a2` are
both `ASM` instead of raising a `NotImplementedError`.
I will not do anything more complicated as I do not know anything about
`ASM`. If you think that the previous implementation was wrong then open a
follow up ticket (and I might possibly close this one as duplicate). If
you think that some of the three points above are wrong then please be
clearer.
Vincent
--
Ticket URL: <http://trac.sagemath.org/ticket/18383#comment:5>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" 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/sage-trac.
For more options, visit https://groups.google.com/d/optout.