#12880: Inconsistent domain, codomain and parent in EllipticCurveIsogeny
-----------------------------------+------------------------
       Reporter:  nthiery          |        Owner:  cremona
           Type:  defect           |       Status:  new
       Priority:  minor            |    Milestone:  sage-6.2
      Component:  elliptic curves  |   Resolution:
       Keywords:                   |    Merged in:
        Authors:                   |    Reviewers:
Report Upstream:  N/A              |  Work issues:
         Branch:                   |       Commit:
   Dependencies:  #11474           |     Stopgaps:
-----------------------------------+------------------------
Changes (by pbruin):

 * priority:  major => minor
 * dependencies:   => #11474


Old description:

> In the following example, the domain and codomain of phi does not match
> with that of its parent::
>
> {{{
>     sage: sage: E = EllipticCurve(j=GF(7)(0))
>     sage: phi = EllipticCurveIsogeny(E, [E(0), E((0,1)), E((0,-1))])
>     sage: phi.parent()
>     Set of Morphisms from Abelian group of points on Elliptic Curve
> defined by y^2 = x^3 + 1 over Finite Field of size 7 to Abelian group of
> points on Elliptic Curve defined by y^2 = x^3 + 1 over Finite Field of
> size 7 in Category of hom sets in Category of Schemes
>     sage: phi.parent().domain()
>     Abelian group of points on Elliptic Curve defined by y^2 = x^3 + 1
> over Finite Field of size 7
>     sage: phi.domain()
>     Elliptic Curve defined by y^2 = x^3 + 1 over Finite Field of size 7
>     sage: phi.parent().codomain()
>     Abelian group of points on Elliptic Curve defined by y^2 = x^3 + 1
> over Finite Field of size 7
>     sage: phi.codomain()
>     Elliptic Curve defined by y^2 = x^3 + 1 over Finite Field of size 7
> }}}

New description:

 In the following example, the domain and codomain of phi do not match
 those of its parent::
 {{{
 sage: E = EllipticCurve(j=GF(7)(0))
 sage: phi = EllipticCurveIsogeny(E, [E(0), E((0,1)), E((0,-1))])
 sage: phi.parent()
 Set of Morphisms from Abelian group of points on Elliptic Curve defined by
 y^2 = x^3 + 1 over Finite Field of size 7 to Abelian group of points on
 Elliptic Curve defined by y^2 = x^3 + 1 over Finite Field of size 7 in
 Category of hom sets in Category of Schemes
 sage: phi.parent().domain()
 Abelian group of points on Elliptic Curve defined by y^2 = x^3 + 1 over
 Finite Field of size 7
 sage: phi.domain()
 Elliptic Curve defined by y^2 = x^3 + 1 over Finite Field of size 7
 sage: phi.parent().codomain()
 Abelian group of points on Elliptic Curve defined by y^2 = x^3 + 1 over
 Finite Field of size 7
 sage: phi.codomain()
 Elliptic Curve defined by y^2 = x^3 + 1 over Finite Field of size 7
 }}}

--

Comment:

 It should be very easy to fix in principle:
 {{{
 #!diff
 diff --git a/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py
 b/src/sage/schemes/e
 index 5cdbbdf..a729d3a 100644
 --- a/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py
 +++ b/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py
 @@ -1322,12 +1322,9 @@ class EllipticCurveIsogeny(Morphism):
          self._codomain = self.__E2

          # sets up the parent
 -        parent = homset.Hom(self.__E1(0).parent(), self.__E2(0).parent())
 +        parent = homset.Hom(self.__E1, self.__E2)
          Morphism.__init__(self, parent)

 -        return
 -
 -
      # initializes the base field
      def __init_algebraic_structs(self, E):
          r"""
 }}}
 The only problem is that this breaks testing for equality of isogenies,
 due to #11474.  Suppose `E -> E1` is an isogeny and `E2` is an elliptic
 curve that is equal but not ''identical'' to `E1`.  Then `Hom(E, E1)` and
 `Hom(E, E2)` will also be equal but not identical; since the coercion
 model assumes uniqueness of parents, it will never regard corresponding
 elements of `Hom(E, E1)` and `Hom(E, E2)` as equal.

 For some reason the Hom sets between the groups of points, on the other
 hand, ''are'' identical, which explains why equality testing currently is
 not broken.

--
Ticket URL: <http://trac.sagemath.org/ticket/12880#comment:6>
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.

Reply via email to