#17979: Reimplementation of IntegerListsLex
-------------------------------------+-------------------------------------
Reporter: aschilling | Owner:
Type: defect | Status: needs_work
Priority: blocker | Milestone: sage-6.6
Component: combinatorics | Resolution:
Keywords: days64 | Merged in:
Authors: Bryan Gillespie, | Reviewers:
Anne Schilling, Nicolas M. Thiery | Work issues:
Report Upstream: N/A | Commit:
Branch: | 652a6d552c10b95fd3c735094fe105e4081e47ce
public/ticket/17979 | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by bgillespie):
Replying to [comment:155 ncohen]:
> This identification of list worries me a bit. The exception in
`__iter__` was added because we consider it a bug that some element of the
set may never be listed in `__iter__`, and this is exactly the problem we
have again here. For a different reason, i.e. because some lists are
identified.
It's pretty natural to follow this equivalence (think for instance
monomials `x*y^2` and `x*y^2*z^0`), but I definitely see your point.
Would it be useful to specify a more feature-ful class `IntegerList`
(returned by this class) which takes into account these equivalences and
provides comparison operations for lexicographic ordering? This would
help to make more clear the assumptions being made on the lists during
iteration, and would result in both `IntegerList([2,2,0,0])` and
`IntegerList([2,2,0,0,0])` being contained in
`IntegerListsLex(4,min_length=3,max_length=4)` in the example above, since
they are the same object, and at least one representative satisfies the
desired criterion.
--
Ticket URL: <http://trac.sagemath.org/ticket/17979#comment:157>
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.