#14054: Cythoned UniqueRepresentation
-----------------------------------------------+----------------------------
Reporter: SimonKing | Owner: tbd
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-5.8
Component: performance | Resolution:
Keywords: cython UniqueRepresentation | Work issues: Fix
non-uniqueness trouble of combinatorial free modules
Report Upstream: N/A | Reviewers: Travis
Scrimshaw
Authors: Simon King | Merged in:
Dependencies: #14017, #6495 | Stopgaps:
-----------------------------------------------+----------------------------
Comment (by SimonKing):
I found:
- Before this patch, `CombinatorialFreeModule` did inherit from
`UniqueRepresentation`, but destroyed the uniqueness property.
- With my changes to `UniqueRepresentation`, `CombinatorialFreeModule`
behaves as follows, ''if'' one keeps inheriting from
`UniqueRepresentation`:
{{{
sage: G = CombinatorialFreeModule(ZZ, [1,2,3,4], prefix="G")
sage: y = CombinatorialFreeModule(ZZ, [1,2,3,4], prefix='y')
sage: G is y
False
sage: G == y
False
sage: G <= y
True
sage: y <= G
True
}}}
Hence, while the uniqueness of the old `UniqueRepresentation` was
destroyed, it is preserved in the new version.
- Since uniqueness is preserved, the bug exposed in comment:49 has
actually been fixed!
- However, since I wanted to preserve the old behaviour, I made
`CombinatorialFreeModule` inherit from `CachedRepresentation`, not from
`UniqueRepresentation`. In this way, the original bug was re-established.
And since by coincidence the order of tests changed, the bug surfaced.
I am now trying if anything breaks if one returns to the old layout of
`CombinatorialFreeModule`.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14054#comment:54>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.