550 | | |

| 550 | def descend_to(self, K): |

| 551 | r""" |

| 552 | Given a subfield ``K`` and an elliptic curve ``self`` defined over a field ``L``, |

| 553 | determine whether there exists an elliptic curve over ``K`` which is |

| 554 | isomorphic over ``L`` to ``self``. If one exists, find it. |

| 555 | |

| 556 | INPUT: |

| 557 | |

| 558 | - ``K`` -- subfield of the base field of the curve |

| 559 | |

| 560 | OUTPUT: |

| 561 | |

| 562 | An elliptic curve defined over ``K`` which is isomorphic to ``self`` |

| 563 | over the base field of ``self``. None, if one does not exist. |

| 564 | |

| 565 | .. note:: |

| 566 | |

| 567 | Does not verify that ``K`` is a subfield of the base field of ``self``. |

| 568 | |

| 569 | EXAMPLES:: |

| 570 | |

| 571 | sage: K.<a> = QuadraticField(97) |

| 572 | sage: E = EllipticCurve('37a1').change_ring(K).quadratic_twist(a-3) |

| 573 | sage: E.descend_to(QQ) |

| 574 | Elliptic Curve defined by y^2 = x^3 - 15479341056/1369*x - 481469424205824/50653 over Rational Field |

| 575 | |

| 576 | :: |

| 577 | |

| 578 | sage: E = EllipticCurve(j=2*a) |

| 579 | sage: E.descend_to(QQ) |

| 580 | sage: |

| 581 | """ |

| 582 | # We would like to test that K is a subring of the base field of self, but it isn't implemented at this time. |

| 583 | if not K.is_field(): #or not K.is_subring(self.base_field()) |

| 584 | raise TypeError, "Input must be a subfield of the base field of the curve." |

| 585 | if self.base_field()==K: |

| 586 | return self |

| 587 | j = self.j_invariant() |

| 588 | if not j in K: |

| 589 | return None |

| 590 | E = EllipticCurve(j=j).change_ring(K) |

| 591 | E2 = E.change_ring(self.base_field()) |

| 592 | d = self.is_quadratic_twist(E2) |

| 593 | if d == 1: |

| 594 | return E |

| 595 | if d == 0: |

| 596 | return None |

| 597 | Etwist = self.quadratic_twist(d) |

| 598 | if Etwist.is_isomorphic(E2): |

| 599 | return E |

| 600 | else: |

| 601 | return None |

| 602 | |