#19269: add category Posets to ZZ and QQ
-------------------------------------+-------------------------------------
Reporter: dkrenn | Owner:
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-6.9
Component: categories | Resolution:
Keywords: | Merged in:
Authors: Daniel Krenn | Reviewers:
Report Upstream: N/A | Work issues:
Branch: u/dkrenn/cat/ZZ- | Commit:
poset | a3f031d08ce245e6969fcfd5b703839fb676e4b2
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by vdelecroix):
Hola,
We should try to make the cartesian products of copies of `ZZ` compatible
with the current behavior of `ZZ^n` (actually, I would feel more
confortable if `cartesian_product([ZZ,ZZ])` would return `ZZ^2`). But
vectors are compared with respect to the lexicographic ordering
{{{
sage: V = ZZ^2
sage: my_list = [V((i,j)) for i in range(3) for j in range(3)]
[(0, 0), (0, 1), (0, 2), (1, 0), (1, 1), (1, 2), (2, 0), (2, 1), (2, 2)]
}}}
So it is not (strictly speaking) a cartesian product of posets. Several
solutions:
- change the behavior of comparisons for vectors
- modify `richcmp` to be the product order and keep `cmp` to be the
lexicographic ordering in order to keep the sort feature... we will have
some Python3 troubles later on
- break the sort operation
- find a compromise with respect to the order of the product (how?)
Having so many category for `ZZ` might also be a problem when it comes to
morphisms. What should be
{{{
sage: Hom(ZZ,ZZ)
sage: Hom(ZZ^2, ZZ^2)
}}}
In the category of `Euclidean domains + Posets` there are few elements!
And most of the time, when people think about `ZZ^2` they do not care
about the poset structure. Something likethe following should work out of
the box
{{{
sage: Hom(ZZ^2, ZZ^2, Posets())
sage: Hom(ZZ^2, ZZ^2, Modules(ZZ))
}}}
My question is about the default behavior of `Hom` with this multiple
categories.
Vincent
--
Ticket URL: <http://trac.sagemath.org/ticket/19269#comment:6>
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.