Sage: Ticket #5065: elliptic curve torsion subgroup doesn't know its identity
https://trac.sagemath.org/ticket/5065
<p>
The torsion subgroup of an elliptic curve appears to be quite broken -- it barfs when trying to coerce in 0,
</p>
<pre class="wiki">sage: E = EllipticCurve(1)
sage: T = E.torsion_subgroup()
sage: T(0)
...
...
TypeError: Argument x (= 0) is of wrong type.
</pre><p>
further, it returns a mysterious 1 when coercing in a 1
</p>
<pre class="wiki">sage: a = T(1); a
1
sage: b = T.gens()[0]-T.gens()[0]; b
(0 : 1 : 0)
sage: a+b
TypeError: unsupported operand parent(s) for '+': 'Abelian group of points on Elliptic Curve defined by y^2 + x*y + y = x^3 - 19*x + 26 over Rational Field' and 'Torsion Subgroup isomorphic to Multiplicative Abelian Group isomorphic to C6 x C2 associated to the Elliptic Curve defined by y^2 + x*y + y = x^3 - 19*x + 26 over Rational Field'
</pre><p>
Yet, it's all cool with the original curve.
</p>
<pre class="wiki">sage: E(0)
(0 : 1 : 0)
sage: E(1)
...
...
TypeError: v (=(1,)) must have 3 components
sage:
</pre>en-usSagehttps://trac.sagemath.org/chrome/site/logo_sagemath_trac.png
https://trac.sagemath.org/ticket/5065
Trac 1.1.6boothbyFri, 23 Jan 2009 08:29:58 GMTsummary changed
https://trac.sagemath.org/ticket/5065#comment:1
https://trac.sagemath.org/ticket/5065#comment:1
<ul>
<li><strong>summary</strong>
changed from <em>elliptic curve torsion subgroup doesn't know it's identity</em> to <em>elliptic curve torsion subgroup doesn't know its identity</em>
</li>
</ul>
TicketmabshoffThu, 23 Apr 2009 08:04:24 GMTmilestone set
https://trac.sagemath.org/ticket/5065#comment:2
https://trac.sagemath.org/ticket/5065#comment:2
<ul>
<li><strong>milestone</strong>
set to <em>sage-4.0</em>
</li>
</ul>
TicketcremonaThu, 07 May 2009 16:21:15 GMT
https://trac.sagemath.org/ticket/5065#comment:3
https://trac.sagemath.org/ticket/5065#comment:3
<p>
Here is the reason. the torsion subgroup class is derived from the Abelian group class, which in Sage is always a multiplicative group! So it can coerce in 1 to give the identity 1, but not 0.
</p>
<p>
I produced a lovely patch adding proper additive support to the <a class="missing wiki">AbelianGroup?</a> class months ago, motivated mainly by situations such as this, but nobody else was interested and it never got in. (To be fair, the patch is on trac labelled "not for review" for some reason).
</p>
<p>
Of course, for this specific group we could easily write a call() function to handle this, but the whole point of my Abeliangroup patch was that if you say that a group is additive on creation then that was all automatic. Sigh.
</p>
<p>
I see that this was reported 3 months ago. Sorry, I never saw it until now!
</p>
TicketdavidloefflerMon, 20 Jul 2009 20:23:37 GMTowner, component changed
https://trac.sagemath.org/ticket/5065#comment:4
https://trac.sagemath.org/ticket/5065#comment:4
<ul>
<li><strong>owner</strong>
changed from <em>was</em> to <em>davidloeffler</em>
</li>
<li><strong>component</strong>
changed from <em>number theory</em> to <em>elliptic curves</em>
</li>
</ul>
TicketdavidloefflerFri, 09 Oct 2009 09:12:37 GMTowner deleted
https://trac.sagemath.org/ticket/5065#comment:5
https://trac.sagemath.org/ticket/5065#comment:5
<ul>
<li><strong>owner</strong>
changed from <em>davidloeffler</em> to <em>(none)</em>
</li>
</ul>
TicketcremonaSat, 14 Aug 2010 16:47:11 GMTstatus changed; resolution, upstream set
https://trac.sagemath.org/ticket/5065#comment:6
https://trac.sagemath.org/ticket/5065#comment:6
<ul>
<li><strong>status</strong>
changed from <em>new</em> to <em>closed</em>
</li>
<li><strong>resolution</strong>
set to <em>fixed</em>
</li>
<li><strong>upstream</strong>
set to <em>N/A</em>
</li>
</ul>
<p>
In 4.5.3.alpha3 this works fine:
</p>
<pre class="wiki">sage: E = EllipticCurve(j=1)
sage: T = E.torsion_subgroup()
sage: T(0)
(0 : 1 : 0)
</pre><p>
thanks to the new Abelian Groups support. So this ticket can be closed as fixed.
</p>
TicketmpatelSat, 14 Aug 2010 21:01:56 GMTresolution, milestone changed
https://trac.sagemath.org/ticket/5065#comment:7
https://trac.sagemath.org/ticket/5065#comment:7
<ul>
<li><strong>resolution</strong>
changed from <em>fixed</em> to <em>duplicate</em>
</li>
<li><strong>milestone</strong>
changed from <em>sage-4.5.3</em> to <em>sage-duplicate/invalid/wontfix</em>
</li>
</ul>
<p>
I'm setting the resolution to "duplicate" and changing the milestone accordingly.
</p>
Ticket