def two_descent(self, verbose=True, selmer_only=False, first_limit=20, second_limit=8, n_aux=-1, second_descent=True): """ Compute 2-descent data for this curve. INPUT: - ``verbose`` (bool, default ``True``) -- print what mwrank is doing. - ``selmer_only`` (bool, default ``False``) -- ``selmer_only`` switch. - ``first_limit`` (int, default 20) -- bound on `|x|+|z|` in quartic point search. - ``second_limit`` (int, default 8) -- bound on `\log \max(|x|,|z|)`, i.e. logarithmic. - ``n_aux`` (int, default -1) -- (only relevant for general 2-descent when 2-torsion trivial) number of primes used for quartic search. ``n_aux=-1`` causes default (8) to be used. Increase for curves of higher rank. - ``second_descent`` (bool, default ``True``) -- (only relevant for curves with 2-torsion, where mwrank uses descent via 2-isogeny) flag determining whether or not to do second descent. *Default strongly recommended.* OUTPUT: Nothing -- nothing is returned. TESTS (see #7992):: sage: EllipticCurve([0, prod(prime_range(10))]).mwrank_curve().two_descent() Basic pair: I=0, J=-5670 disc=-32148900 2-adic index bound = 2 2-adic index = 2 Two (I,J) pairs Looking for quartics with I = 0, J = -5670 Looking for Type 3 quartics: Trying positive a from 1 up to 5 (square a first...) Trying positive a from 1 up to 5 (...then non-square a) (2,0,-12,19,-6) --nontrivial...(x:y:z) = (2 : 4 : 1) Point = [-2488:-4997:512] height = 6.46767239... Rank of B=im(eps) increases to 1 Trying negative a from -1 down to -3 Finished looking for Type 3 quartics. Looking for quartics with I = 0, J = -362880 Looking for Type 3 quartics: Trying positive a from 1 up to 20 (square a first...) Trying positive a from 1 up to 20 (...then non-square a) Trying negative a from -1 down to -13 Finished looking for Type 3 quartics. Mordell rank contribution from B=im(eps) = 1 Selmer rank contribution from B=im(eps) = 1 Sha rank contribution from B=im(eps) = 0 Mordell rank contribution from A=ker(eps) = 0 Selmer rank contribution from A=ker(eps) = 0 Sha rank contribution from A=ker(eps) = 0 sage: EllipticCurve([0, prod(prime_range(100))]).mwrank_curve().two_descent() Traceback (most recent call last): ... RuntimeError: Aborted """ from sage.libs.mwrank.mwrank import _two_descent # import here to save time first_limit = int(first_limit) second_limit = int(second_limit) n_aux = int(n_aux) second_descent = int( second_descent) # convert from bool to (int) 0 or 1 # TODO: Don't allow limits above some value...??? # (since otherwise mwrank just sets limit tiny) self.__descent = _two_descent() self.__descent.do_descent(self.__curve, verbose, selmer_only, first_limit, second_limit, n_aux, second_descent) if not self.__two_descent_data().ok(): raise RuntimeError, "A 2-descent did not complete successfully."
def two_descent(self, verbose = True, selmer_only = False, first_limit = 20, second_limit = 8, n_aux = -1, second_descent = True): """ Compute 2-descent data for this curve. INPUT: - ``verbose`` (bool, default ``True``) -- print what mwrank is doing. - ``selmer_only`` (bool, default ``False``) -- ``selmer_only`` switch. - ``first_limit`` (int, default 20) -- bound on `|x|+|z|` in quartic point search. - ``second_limit`` (int, default 8) -- bound on `\log \max(|x|,|z|)`, i.e. logarithmic. - ``n_aux`` (int, default -1) -- (only relevant for general 2-descent when 2-torsion trivial) number of primes used for quartic search. ``n_aux=-1`` causes default (8) to be used. Increase for curves of higher rank. - ``second_descent`` (bool, default ``True``) -- (only relevant for curves with 2-torsion, where mwrank uses descent via 2-isogeny) flag determining whether or not to do second descent. *Default strongly recommended.* OUTPUT: Nothing -- nothing is returned. TESTS (see #7992):: sage: EllipticCurve([0, prod(prime_range(10))]).mwrank_curve().two_descent() sage: EllipticCurve([0, prod(prime_range(100))]).mwrank_curve().two_descent() Traceback (most recent call last): ... RuntimeError: Aborted """ from sage.libs.mwrank.mwrank import _two_descent # import here to save time first_limit = int(first_limit) second_limit = int(second_limit) n_aux = int(n_aux) second_descent = int(second_descent) # convert from bool to (int) 0 or 1 # TODO: Don't allow limits above some value...??? # (since otherwise mwrank just sets limit tiny) self.__descent = _two_descent() self.__descent.do_descent(self.__curve, verbose, selmer_only, first_limit, second_limit, n_aux, second_descent) if not self.__two_descent_data().ok(): raise RuntimeError, "A 2-descent did not complete successfully."
def two_descent( self, verbose=True, selmer_only=False, first_limit=20, second_limit=8, n_aux=-1, second_descent=True ): """ Compute 2-descent data for this curve. INPUT: - ``verbose`` (bool, default ``True``) -- print what mwrank is doing. - ``selmer_only`` (bool, default ``False``) -- ``selmer_only`` switch. - ``first_limit`` (int, default 20) -- bound on `|x|+|z|` in quartic point search. - ``second_limit`` (int, default 8) -- bound on `\log \max(|x|,|z|)`, i.e. logarithmic. - ``n_aux`` (int, default -1) -- (only relevant for general 2-descent when 2-torsion trivial) number of primes used for quartic search. ``n_aux=-1`` causes default (8) to be used. Increase for curves of higher rank. - ``second_descent`` (bool, default ``True``) -- (only relevant for curves with 2-torsion, where mwrank uses descent via 2-isogeny) flag determining whether or not to do second descent. *Default strongly recommended.* OUTPUT: Nothing -- nothing is returned. TESTS (see #7992):: sage: EllipticCurve([0, prod(prime_range(10))]).mwrank_curve().two_descent() Basic pair: I=0, J=-5670 disc=-32148900 2-adic index bound = 2 2-adic index = 2 Two (I,J) pairs Looking for quartics with I = 0, J = -5670 Looking for Type 3 quartics: Trying positive a from 1 up to 5 (square a first...) Trying positive a from 1 up to 5 (...then non-square a) (2,0,-12,19,-6) --nontrivial...(x:y:z) = (2 : 4 : 1) Point = [-2488:-4997:512] height = 6.46767239... Rank of B=im(eps) increases to 1 Trying negative a from -1 down to -3 Finished looking for Type 3 quartics. Looking for quartics with I = 0, J = -362880 Looking for Type 3 quartics: Trying positive a from 1 up to 20 (square a first...) Trying positive a from 1 up to 20 (...then non-square a) Trying negative a from -1 down to -13 Finished looking for Type 3 quartics. Mordell rank contribution from B=im(eps) = 1 Selmer rank contribution from B=im(eps) = 1 Sha rank contribution from B=im(eps) = 0 Mordell rank contribution from A=ker(eps) = 0 Selmer rank contribution from A=ker(eps) = 0 Sha rank contribution from A=ker(eps) = 0 sage: EllipticCurve([0, prod(prime_range(100))]).mwrank_curve().two_descent() Traceback (most recent call last): ... RuntimeError: Aborted """ from sage.libs.mwrank.mwrank import _two_descent # import here to save time first_limit = int(first_limit) second_limit = int(second_limit) n_aux = int(n_aux) second_descent = int(second_descent) # convert from bool to (int) 0 or 1 # TODO: Don't allow limits above some value...??? # (since otherwise mwrank just sets limit tiny) self.__descent = _two_descent() self.__descent.do_descent(self.__curve, verbose, selmer_only, first_limit, second_limit, n_aux, second_descent) if not self.__two_descent_data().ok(): raise RuntimeError("A 2-descent did not complete successfully.")