#11474: Elliptic curves should be unique parent structures
-------------------------------------+-------------------------------------
Reporter: SimonKing | Owner: cremona
Type: defect | Status: needs_info
Priority: major | Milestone: sage-6.3
Component: elliptic curves | Resolution:
Keywords: unique parent | Merged in:
Authors: Simon King | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/defeo/ticket/11474 | 8cbb73e266096e02efc917545aab36d067b7e063
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by pbruin):
Replying to [comment:35 SimonKing]:
> Replying to [comment:34 pbruin]:
> > I would personally prefer a `UniqueFactory`, mostly because I think it
is more natural and uses less black magic than `UniqueRepresentation` +
`__classcall__`, and hence will be easier to understand/extend for other
developers.
>
> ... except for the fact that `UniqueFactory` ''alone'' is not enough to
create a unique parent. You need to additionally adapt `__cmp__` etc, and
this is what inheritance from `UniqueRepresentation` does on top of
`__classcall__`.
Something that I think you recently clarified to me elsewhere, and which
might be worth emphasising here too, is that "unique parents" really
refers to ''two'' conditions:
- equivalent input data (in the sense that we regard the resulting objects
as being "the same", e.g. ''a''-coefficients vs. Cremona label
corresponding to the same curve) should result in identical parents;
- parents should compare equal if and only if they are identical.
I was thinking about the first point, which is the more difficult one
here. If we end up solving this by implementing a `UniqueFactory`, then
the second point can be solved by simply inheriting from
`WithEqualityById`, right?
--
Ticket URL: <http://trac.sagemath.org/ticket/11474#comment:36>
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.