#11474: Elliptic curves should be unique parent structures
-------------------------------+--------------------------------------------
   Reporter:  SimonKing        |          Owner:  cremona      
       Type:  defect           |         Status:  new          
   Priority:  major            |      Milestone:  sage-4.7.1   
  Component:  elliptic curves  |       Keywords:  unique parent
Work_issues:                   |       Upstream:  N/A          
   Reviewer:                   |         Author:               
     Merged:                   |   Dependencies:               
-------------------------------+--------------------------------------------

Comment(by SimonKing):

 My approach is:

 A) Let `EllipticCurve_generic` inherit from `UniqueRepresentation`. If I
 am not mistaken, every other elliptic curve inherits from that, so, that
 should be fine.

 B) The `__init__` methods should be uniform: ''All'' `__init__` methods
 should accept precisely one argument, namely an immutable sequence "ainvs"
 (in particular, the underlying field can be obtained from ainvs).

 C) By `__classcall__` methods, make sure that the existing ways of
 constructing an elliptic curve will still work. In particular, it will
 create the immutable sequence "ainv".

 One detail to consider: Sometimes an elliptic curve is taken from the
 Cremona database (see `sage.schemes.elliptic_curves.ell_rational_field`).
 The database provides certain attributes. It is possible that an elliptic
 curve ''with the same a-invariant'' is already in the cache, ignorant of
 the additional attributes.

 But the classcall method could very well assign those additional
 attributes to an elliptic curve found in the cache before returning it.
 So, it should still work.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11474#comment:1>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to