From 927e70cfb6eb1a51d119351ab1035504bd4ecb26 Mon Sep 17 00:00:00 2001 From: Jeroen Demeyer Date: Wed, 17 Sep 2014 15:42:09 +0200 Subject: [PATCH 1/4] Remove genus2reduction --- build/deps | 4 - build/install | 1 - build/pkgs/genus2reduction/SPKG.txt | 33 -- build/pkgs/genus2reduction/checksums.ini | 4 - .../pkgs/genus2reduction/package-version.txt | 1 - build/pkgs/genus2reduction/spkg-install | 32 -- src/sage/interfaces/all.py | 3 +- src/sage/interfaces/genus2reduction.py | 287 +++++++++++------- 8 files changed, 187 insertions(+), 178 deletions(-) delete mode 100644 build/pkgs/genus2reduction/SPKG.txt delete mode 100644 build/pkgs/genus2reduction/checksums.ini delete mode 100644 build/pkgs/genus2reduction/package-version.txt delete mode 100755 build/pkgs/genus2reduction/spkg-install diff --git a/build/deps b/build/deps index 60317fe267d..f03b0e4e125 100644 --- a/build/deps +++ b/build/deps @@ -46,7 +46,6 @@ all-sage: \ $(INST)/$(FLINTQS) \ $(INST)/$(FPLLL) \ $(INST)/$(FREETYPE) \ - $(INST)/$(GENUS2REDUCTION) \ $(INST)/$(GAP) \ $(INST)/$(GD) \ $(INST)/$(GDMODULE) \ @@ -285,9 +284,6 @@ $(INST)/$(LINBOX): $(INST)/$(MPIR) $(INST)/$(NTL) $(INST)/$(GIVARO) \ $(INST)/$(IML): $(INST)/$(MPIR) $(INST)/$(GSL) $(INST)/$(ATLAS) +$(PIPE) "$(SAGE_SPKG) $(IML) 2>&1" "tee -a $(SAGE_LOGS)/$(IML).log" -$(INST)/$(GENUS2REDUCTION): $(INST)/$(PARI) - +$(PIPE) "$(SAGE_SPKG) $(GENUS2REDUCTION) 2>&1" "tee -a $(SAGE_LOGS)/$(GENUS2REDUCTION).log" - $(INST)/$(PALP): +$(PIPE) "$(SAGE_SPKG) $(PALP) 2>&1" "tee -a $(SAGE_LOGS)/$(PALP).log" diff --git a/build/install b/build/install index d16548687b5..ea45fb0acf3 100755 --- a/build/install +++ b/build/install @@ -343,7 +343,6 @@ GAP=`newest_version gap` GCC=`newest_version gcc` GD=`newest_version gd` GDMODULE=`newest_version gdmodule` -GENUS2REDUCTION=`newest_version genus2reduction` GFAN=`newest_version gfan` GF2X=`newest_version gf2x` GIT=`newest_version git` diff --git a/build/pkgs/genus2reduction/SPKG.txt b/build/pkgs/genus2reduction/SPKG.txt deleted file mode 100644 index dc3a1031fd8..00000000000 --- a/build/pkgs/genus2reduction/SPKG.txt +++ /dev/null @@ -1,33 +0,0 @@ -= genus2reduction = - -MAINTAINER: - William Stein - -This is the home of genus2reduction, so there isn't an auxiliary download -cite for updates. If building this breaks because PARI changes, this is -the place to fix it. - -== Releases == - -=== genus2reduction-0.3.p8 (Jeroen Demeyer, Mitesh Patel, September 4, 2010) === - * #9738: don't catch signals and exit cleanly upon EOF - * #9738: Remove obsolete dist/ directory. See #5903. - -=== genus2reduction-0.3.p7 (Jeroen Demeyer, July 24, 2010) === - * upgrade to PARI 2.4.3 - -=== genus2reduction-0.3.p6 (Jaap Spies, Jan 25th, 2010) === - * made SAGE64=yes also work with Open Solaris 64 bit - -=== genus2reduction-0.3.p5 (William Stein, April 5, 2009) === - * trac 5573: "mod --> Mod" change. - -=== genus2reduction-0.3.p4 (William Stein, December 8th, 2008) === - * change genus2reduction to include GPL copyright file and email from liu making the program GPL'd (#4743) - -=== genus2reduction-0.3.p3 (Michael Abshoff, May 18th, 2008) === - * add 64 bit OSX support - -=== genus2reduction-0.3.p2 (William Stein, Feb. 21st, 2008) === - * Put -lgmp -lm *back* in the build line. Tim Abbot had removed them claiming they aren't needed, but that's not correct. They are needed, since, e.g., pari relies on them. Maybe they aren't needed on Linux for some reason, but on OS X they definitely are. Please don't remove them again. - diff --git a/build/pkgs/genus2reduction/checksums.ini b/build/pkgs/genus2reduction/checksums.ini deleted file mode 100644 index 6922b6b8309..00000000000 --- a/build/pkgs/genus2reduction/checksums.ini +++ /dev/null @@ -1,4 +0,0 @@ -tarball=genus2reduction-VERSION.tar.bz2 -sha1=df358e78da17ce74cd5b63f379e7f7f91c21f08e -md5=46bd298ef0699d7fb7763d08228a3ce1 -cksum=2690437212 diff --git a/build/pkgs/genus2reduction/package-version.txt b/build/pkgs/genus2reduction/package-version.txt deleted file mode 100644 index c6a13cb3138..00000000000 --- a/build/pkgs/genus2reduction/package-version.txt +++ /dev/null @@ -1 +0,0 @@ -20140211 diff --git a/build/pkgs/genus2reduction/spkg-install b/build/pkgs/genus2reduction/spkg-install deleted file mode 100755 index 0346e994c35..00000000000 --- a/build/pkgs/genus2reduction/spkg-install +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash - -if [ "$SAGE_LOCAL" = "" ]; then - echo "SAGE_LOCAL undefined ... exiting"; - echo "Maybe run 'sage -sh'?" - exit 1 -fi - -if [ "$SAGE64" = "yes" ]; then - echo "64 bit build" - CFLAGS="$CFLAGS -m64 "; export CFLAGS -fi - -echo "Compiling genus2reduction.c" - -cd src/ - -$CC $CFLAGS -O2 -I"$SAGE_LOCAL/include/pari" -L"$SAGE_LOCAL/lib" \ - -o genus2reduction genus2reduction.c -lpari -lgmp -lm - -if [ $? -ne 0 ]; then - echo "Error building genus2reduction" - exit 1 -fi - -if [ ! -f genus2reduction ]; then - echo "Mysterious error building genus2reduction" - exit 1 -fi - -cp genus2reduction "$SAGE_LOCAL"/bin/ - diff --git a/src/sage/interfaces/all.py b/src/sage/interfaces/all.py index 66457bc03df..90edec342c9 100644 --- a/src/sage/interfaces/all.py +++ b/src/sage/interfaces/all.py @@ -1,4 +1,5 @@ # interfaces to other interpreters +from sage.misc.lazy_import import lazy_import from frobby import frobby from four_ti_2 import four_ti_2 @@ -7,7 +8,7 @@ from gap import gap, gap_reset_workspace, gap_console, set_gap_memory_pool_size, Gap from gap3 import gap3, gap3_console, gap3_version, Gap3 -from genus2reduction import genus2reduction, Genus2reduction +lazy_import('sage.interfaces.genus2reduction', ['genus2reduction', 'Genus2reduction']) from gfan import gfan, Gfan from giac import giac, giac_console, Giac from gp import gp, gp_console, gp_version, Gp diff --git a/src/sage/interfaces/genus2reduction.py b/src/sage/interfaces/genus2reduction.py index 03edf0323af..4408eb62fb2 100644 --- a/src/sage/interfaces/genus2reduction.py +++ b/src/sage/interfaces/genus2reduction.py @@ -8,6 +8,9 @@ - William Stein (2006-03-05): wrote Sage interface to genus2reduction +- Jeroen Demeyer (2014-09-17): replace genus2reduction program by PARI + library call (:trac:`15808`) + ACKNOWLEDGMENT: (From Liu's website:) Many thanks to Henri Cohen who started writing this program. After this program is available, many people pointed out to me (mathematical as well as programming) @@ -20,34 +23,22 @@ code however they want. """ -######################################################################## +#***************************************************************************** # Copyright (C) 2006 William Stein +# Copyright (C) 2014 Jeroen Demeyer # -# Distributed under the terms of the GNU General Public License (GPL) -# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. # http://www.gnu.org/licenses/ -######################################################################## - +#***************************************************************************** -import os -from expect import Expect from sage.structure.sage_object import SageObject +from sage.rings.all import ZZ, QQ, PolynomialRing +from sage.libs.pari.all import pari -class Genus2reduction_expect(Expect): - def __init__(self, server=None, server_tmpdir=None, logfile=None): - Expect.__init__(self, - name = 'genus2reduction', - prompt = 'enter', - command = 'genus2reduction', - server = server, - server_tmpdir = server_tmpdir, - maxread = 10000, - restart_on_ctrlc = True, - logfile = logfile, - verbose_start = False) - - def __getattr__(self, attrname): - raise AttributeError +roman_numeral = ["", "I", "II", "III", "IV", "V", "VI", "VII"] class ReductionData(SageObject): r""" @@ -152,9 +143,9 @@ class is R, then the following is the meaning of sur un corps de valuation discrete", Trans. AMS 348 (1996), 4577-4610, Section 7.2, Proposition 4). """ - def __init__(self, raw, P, Q, minimal_equation, minimal_disc, + def __init__(self, pari_result, P, Q, minimal_equation, minimal_disc, local_data, conductor, prime_to_2_conductor_only): - self.raw = raw + self.pari_result = pari_result self.P = P self.Q = Q self.minimal_equation = minimal_equation @@ -186,9 +177,50 @@ def _local_data_str(self): K = sorted(D.keys()) for p in K: s += 'p=%s\n%s\n'%(p, D[p]) - s = '\t' + '\n\t'.join(s.split('\n')) + s = '\t' + '\n\t'.join(s.strip().split('\n')) return s +def divisors_to_string(divs): + """ + Convert a list of numbers (representing the orders of cyclic groups + in the factorization of a finite abelian group) to a string + according to the format shown in the examples. + + INPUT: + + - ``divs`` -- a (possibly empty) list of numbers + + OUTPUT: a string representation of these numbers + + EXAMPLES: + + sage: from sage.interfaces.genus2reduction import divisors_to_string + sage: print divisors_to_string([]) + (1) + sage: print divisors_to_string([5]) + (5) + sage: print divisors_to_string([5]*6) + (5)^6 + sage: print divisors_to_string([2,3,4]) + (2)x(3)x(4) + sage: print divisors_to_string([6,2,2]) + (6)x(2)^2 + """ + s = "" + n = 0 # How many times have we seen the current divisor? + for i in range(len(divs)): + n += 1 + if i+1 == len(divs) or divs[i+1] != divs[i]: + # Next divisor is different or we are done? Print current one + if s: + s += "x" + s += "(%s)"%divs[i] + if n > 1: + s += "^%s" % n + n = 0 + + return s or "(1)" + class Genus2reduction(SageObject): r""" Conductor and Reduction Types for Genus 2 Curves. @@ -314,33 +346,33 @@ class Genus2reduction(SageObject): `J(X_1(p))` is trivial for all primes `p`.) """ def __init__(self): - self.__expect = Genus2reduction_expect() + pass def _repr_(self): - return "Genus 2 reduction program" + """ + EXAMPLES:: - def console(self): - genus2reduction_console() + sage: genus2reduction + Genus 2 reduction PARI interface + """ + return "Genus 2 reduction PARI interface" def raw(self, Q, P): r""" - Return the raw output of running the + Return a string emulating the raw output of running the old ``genus2reduction`` program on the hyperelliptic curve - `y^2 + Q(x)y = P(x)` as a string. + `y^2 + Q(x)y = P(x)`. INPUT: - - ``Q`` - something coercible to a univariate polynomial over Q. - ``P`` - something coercible to a univariate polynomial over Q. - OUTPUT: - - ``string`` - raw output - ``Q`` - what Q was actually input to auxiliary @@ -349,11 +381,12 @@ def raw(self, Q, P): - ``P`` - what P was actually input to auxiliary genus2reduction program - EXAMPLES:: sage: x = QQ['x'].0 sage: print genus2reduction.raw(x^3 - 2*x^2 - 2*x + 1, -5*x^5)[0] + doctest:...: DeprecationWarning: the raw() method is provided for backwards compatibility only, use the result of the genus2reduction() call instead of parsing strings + See http://trac.sagemath.org/15808 for details. a minimal equation over Z[1/2] is : y^2 = x^6-240*x^4-2550*x^3-11400*x^2-24100*x-19855 @@ -370,17 +403,99 @@ def raw(self, Q, P): reduction at p : [I{1-0-0}] page 170, (1), f=1 the prime to 2 part of the conductor is 1416875 - in factorized form : [2,0;5,4;2267,1] + in factorized form : [5,4;2267,1] + """ + from sage.misc.superseded import deprecation + deprecation(15808, 'the raw() method is provided for backwards compatibility only, use the result of the genus2reduction() call instead of parsing strings') + + d = self(Q, P) + + s = "a minimal equation over Z[1/2] is :\n" + s += "y^2 = %s\n\n" % str(d.minimal_equation).replace(" ", "") + s += "factorization of the minimal (away from 2) discriminant :\n" + s += "%s\n\n" % str(pari(d.minimal_disc).factor()).replace(" ", "") - Verify that we fix trac 5573:: + for p in sorted(d.local_data.keys()): + s += "p=%s\n" % p + s += d.local_data[p].replace(":", " :") + "\n" + + if d.prime_to_2_conductor_only: + s += "the prime to 2 part of the conductor is %s\n" % d.conductor + else: + s += "the conductor is %s\n" % d.conductor + s += "in factorized form : %s" % str(pari(d.conductor).factor()).replace(" ", "") + + return s, d.Q, d.P + + def __call__(self, Q, P): + """ + Compute and return the :class:`ReductionData` corresponding to + the genus 2 curve `y^2 + Q(x) y = P(x)`. + + EXAMPLES:: + + sage: x = polygen(QQ) + sage: genus2reduction(x^3 - 2*x^2 - 2*x + 1, -5*x^5) + Reduction data about this proper smooth genus 2 curve: + y^2 + (x^3 - 2*x^2 - 2*x + 1)*y = -5*x^5 + A Minimal Equation (away from 2): + y^2 = x^6 - 240*x^4 - 2550*x^3 - 11400*x^2 - 24100*x - 19855 + Minimal Discriminant (away from 2): 56675000 + Conductor (away from 2): 1416875 + Local Data: + p=2 + (potential) stable reduction: (II), j=1 + p=5 + (potential) stable reduction: (I) + reduction at p: [V] page 156, (3), f=4 + p=2267 + (potential) stable reduction: (II), j=432 + reduction at p: [I{1-0-0}] page 170, (1), f=1 + + :: + + sage: genus2reduction(x^2 + 1, -5*x^5) + Reduction data about this proper smooth genus 2 curve: + y^2 + (x^2 + 1)*y = -5*x^5 + A Minimal Equation (away from 2): + y^2 = -20*x^5 + x^4 + 2*x^2 + 1 + Minimal Discriminant (away from 2): 48838125 + Conductor: 32025 + Local Data: + p=3 + (potential) stable reduction: (II), j=1 + reduction at p: [I{1-0-0}] page 170, (1), f=1 + p=5 + (potential) stable reduction: (IV) + reduction at p: [I{1-1-2}] page 182, (5), f=2 + p=7 + (potential) stable reduction: (II), j=4 + reduction at p: [I{1-0-0}] page 170, (1), f=1 + p=61 + (potential) stable reduction: (II), j=57 + reduction at p: [I{2-0-0}] page 170, (2), f=1 + + Verify that we fix :trac:`5573`:: sage: genus2reduction(x^3 + x^2 + x,-2*x^5 + 3*x^4 - x^3 - x^2 - 6*x - 2) Reduction data about this proper smooth genus 2 curve: - y^2 + (x^3 + x^2 + x)*y = -2*x^5 + 3*x^4 - x^3 - x^2 - 6*x - 2 - ... + y^2 + (x^3 + x^2 + x)*y = -2*x^5 + 3*x^4 - x^3 - x^2 - 6*x - 2 + A Minimal Equation (away from 2): + y^2 = x^6 + 18*x^3 + 36*x^2 - 27 + Minimal Discriminant (away from 2): 1520984142 + Conductor (away from 2): 954 + Local Data: + p=2 + (potential) stable reduction: (II), j=1 + reduction at p: [I{1-0-0}] page 170, (1), f=1 + p=3 + (potential) stable reduction: (I) + reduction at p: [II] page 155, (1), f=2 + p=53 + (potential) stable reduction: (II), j=12 + reduction at p: [I{1-0-0}] page 170, (1), f=1 """ - from sage.rings.all import QQ - R = QQ['x'] + R = PolynomialRing(QQ, 'x') P = R(P) Q = R(Q) if P.degree() > 6: @@ -388,68 +503,41 @@ def raw(self, Q, P): if Q.degree() >=4: raise ValueError("Q (=%s) must have degree at most 3"%Q) - E = self.__expect - try: - E.eval(str(Q).replace(' ','')) - s = E.eval(str(P).replace(' ','')) - except RuntimeError: - # If something goes wrong genus2reduction often goes into - # a bad state, and quitting it fixes things, since next - # time it is used, it is started cleanly. See trac 5573. - E.quit() - raise ValueError("error in input; possibly singular curve? (Q=%s, P=%s)"%(Q,P)) - i = s.find('a minimal') - j = s.rfind(']') - return s[i:j+2], Q, P - - def __call__(self, Q, P): - from sage.rings.all import ZZ, QQ - from sage.misc.all import sage_eval - - s, Q, P = self.raw(Q, P) - raw = s - - if 'the prime to 2 part of the conductor' in s: - prime_to_2_conductor_only = True - else: - prime_to_2_conductor_only = False - x = QQ['x'].gen(0) - i = s.find('y^2 = ') + len('y^2 = ') - j = i + s[i:].find('\n') - minimal_equation = sage_eval(s[i:j], locals={'x':x}) + res = pari.genus2red(Q, P) + conductor = ZZ(res[0]) + minimal_equation = R(res[2]) - s = s[j+1:] - i = s.find('[') - j = s.find(']') - minimal_disc = ZZ(eval(s[i+1:j].replace(',','**').replace(';','*'))) - - phrase = 'the conductor is ' - j = s.find(phrase) - assert j != -1 - k = s[j:].find('\n') - prime_to_2_conductor = ZZ(s[j+len(phrase):j+k]) + minimal_disc = QQ(res[2].poldisc()).abs() + if minimal_equation.degree() == 5: + minimal_disc *= minimal_equation[5]**2 + # Multiply with suitable power of 2 of the form 2^(2*(d-1) - 12) + b = 2 * (minimal_equation.degree() - 1) + k = QQ((12 - minimal_disc.valuation(2), b)).ceil() + minimal_disc >>= 12 - b*k + minimal_disc = ZZ(minimal_disc) local_data = {} - while True: - i = s.find('p=') - if i == -1: - break - j = s[i+2:].find('p=') - if j == -1: - j = s.find('\n \n') - assert j != -1 - else: - j = j + (i+2) - k = i + s[i:].find('\n') - p = ZZ(s[i+2:k]) - data = s[k+1:j].strip().replace(' : ',': ') - local_data[p] = data - s = s[j:] + for red in res[3]: + p = ZZ(red[0]) + + t = red[1] + data = "(potential) stable reduction: (%s)" % roman_numeral[int(t[0])] + t = t[1] + if len(t) == 1: + data += ", j=%s" % t[0].lift() + elif len(t) == 2: + data += ", j1+j2=%s, j1*j2=%s" % (t[0].lift(), t[1].lift()) + + t = red[2] + if t: + data += "\nreduction at p: %s, " % str(t[0]).replace('"', '').replace("(tame) ", "") + data += divisors_to_string(t[1]) + ", f=" + str(res[0].valuation(red[0])) - return ReductionData(raw, P, Q, minimal_equation, minimal_disc, local_data, - prime_to_2_conductor, prime_to_2_conductor_only) + local_data[p] = data + return ReductionData(res, P, Q, minimal_equation, minimal_disc, local_data, + conductor, (minimal_disc % 2 == 0)) def __reduce__(self): return _reduce_load_Genus2reduction, tuple([]) @@ -459,8 +547,3 @@ def __reduce__(self): def _reduce_load_genus2reduction(): return genus2reduction - -import os -def genus2reduction_console(): - os.system('genus2reduction') - From 11946d65c963f03b83d0c03503ccad16377f4e46 Mon Sep 17 00:00:00 2001 From: Jeroen Demeyer Date: Sun, 21 Sep 2014 22:37:12 +0200 Subject: [PATCH 2/4] Fix documentation --- src/sage/interfaces/genus2reduction.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/interfaces/genus2reduction.py b/src/sage/interfaces/genus2reduction.py index 4408eb62fb2..073ce164d02 100644 --- a/src/sage/interfaces/genus2reduction.py +++ b/src/sage/interfaces/genus2reduction.py @@ -192,7 +192,7 @@ def divisors_to_string(divs): OUTPUT: a string representation of these numbers - EXAMPLES: + EXAMPLES:: sage: from sage.interfaces.genus2reduction import divisors_to_string sage: print divisors_to_string([]) From 1068fef87401f820747d4f938a56d2429afbe4b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?= Date: Sun, 5 Oct 2014 21:06:32 +0200 Subject: [PATCH 3/4] trac #15808 correct name for _reduce + a few pep8 changes --- src/sage/interfaces/genus2reduction.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/sage/interfaces/genus2reduction.py b/src/sage/interfaces/genus2reduction.py index 073ce164d02..73d41d66d72 100644 --- a/src/sage/interfaces/genus2reduction.py +++ b/src/sage/interfaces/genus2reduction.py @@ -40,6 +40,7 @@ roman_numeral = ["", "I", "II", "III", "IV", "V", "VI", "VII"] + class ReductionData(SageObject): r""" Reduction data for a genus 2 curve. @@ -163,7 +164,7 @@ def _repr_(self): yterm = '' else: yterm = '+ (%s)*y '%self.Q - s = 'Reduction data about this proper smooth genus 2 curve:\n' + s = 'Reduction data about this proper smooth genus 2 curve:\n' s += '\ty^2 %s= %s\n'%(yterm, self.P) s += 'A Minimal Equation (away from 2):\n\ty^2 = %s\n'%self.minimal_equation s += 'Minimal Discriminant (away from 2): %s\n'%self.minimal_disc @@ -180,6 +181,7 @@ def _local_data_str(self): s = '\t' + '\n\t'.join(s.strip().split('\n')) return s + def divisors_to_string(divs): """ Convert a list of numbers (representing the orders of cyclic groups @@ -221,6 +223,7 @@ def divisors_to_string(divs): return s or "(1)" + class Genus2reduction(SageObject): r""" Conductor and Reduction Types for Genus 2 Curves. @@ -540,10 +543,11 @@ def __call__(self, Q, P): conductor, (minimal_disc % 2 == 0)) def __reduce__(self): - return _reduce_load_Genus2reduction, tuple([]) + return _reduce_load_genus2reduction, tuple([]) # An instance genus2reduction = Genus2reduction() + def _reduce_load_genus2reduction(): return genus2reduction From f35c94473e316c01c968f2a43027868c517815a2 Mon Sep 17 00:00:00 2001 From: Jeroen Demeyer Date: Wed, 8 Oct 2014 15:21:57 +0200 Subject: [PATCH 4/4] Fix "away from 2" check --- src/sage/interfaces/genus2reduction.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sage/interfaces/genus2reduction.py b/src/sage/interfaces/genus2reduction.py index 73d41d66d72..392e09336b1 100644 --- a/src/sage/interfaces/genus2reduction.py +++ b/src/sage/interfaces/genus2reduction.py @@ -486,7 +486,7 @@ def __call__(self, Q, P): A Minimal Equation (away from 2): y^2 = x^6 + 18*x^3 + 36*x^2 - 27 Minimal Discriminant (away from 2): 1520984142 - Conductor (away from 2): 954 + Conductor: 954 Local Data: p=2 (potential) stable reduction: (II), j=1 @@ -539,8 +539,9 @@ def __call__(self, Q, P): local_data[p] = data + prime_to_2_conductor_only = (-1 in res[1].component(2)) return ReductionData(res, P, Q, minimal_equation, minimal_disc, local_data, - conductor, (minimal_disc % 2 == 0)) + conductor, prime_to_2_conductor_only) def __reduce__(self): return _reduce_load_genus2reduction, tuple([])