Date: Sunday, February 12, 2023 @ 09:58:43 Author: arojas Revision: 1399981
upgpkg: sagemath 9.8-1: Update to 9.8 Added: sagemath/trunk/sagemath-numpy-1.24.patch Modified: sagemath/trunk/PKGBUILD sagemath/trunk/sagemath-bliss-0.77.patch sagemath/trunk/sagemath-gap-4.12.patch sagemath/trunk/sagemath-linbox-1.7.patch sagemath/trunk/sagemath-optional-packages.patch sagemath/trunk/sagemath-singular-4.3.1.p3.patch sagemath/trunk/sagemath-tachyon-0.99.patch sagemath/trunk/test-optional.patch Deleted: sagemath/trunk/sagemath-ipywidgets-8.patch sagemath/trunk/sagemath-pari-2.15.patch ----------------------------------+ PKGBUILD | 40 sagemath-bliss-0.77.patch | 8 sagemath-gap-4.12.patch | 88 + sagemath-ipywidgets-8.patch | 489 ---------- sagemath-linbox-1.7.patch | 2 sagemath-numpy-1.24.patch | 58 + sagemath-optional-packages.patch | 23 sagemath-pari-2.15.patch | 1750 ------------------------------------- sagemath-singular-4.3.1.p3.patch | 14 sagemath-tachyon-0.99.patch | 2 test-optional.patch | 4 11 files changed, 181 insertions(+), 2297 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2023-02-12 09:58:41 UTC (rev 1399980) +++ PKGBUILD 2023-02-12 09:58:43 UTC (rev 1399981) @@ -6,8 +6,8 @@ # Contributor: Stefan Husmann <stefan-husmann at t-online dot de> pkgname=sagemath -pkgver=9.7 -pkgrel=5 +pkgver=9.8 +pkgrel=1 pkgdesc='Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab' arch=(x86_64) url='http://www.sagemath.org' @@ -14,7 +14,7 @@ license=(GPL) depends=(palp brial cliquer maxima-fas gfan sympow nauty python-rpy2 python-fpylll python-cypari2 python-matplotlib python-scipy python-sympy python-networkx python-pplpy python-sphinx python-ipywidgets python-memory-allocator - gap flintqs lcalc lrcalc arb eclib zn_poly gd python-cvxopt singular linbox m4rie pari-galdata pari-seadata-small planarity rankwidth tachyon + gap flintqs lcalc lrcalc arb eclib gd python-cvxopt singular linbox m4rie pari-galdata pari-seadata-small planarity rankwidth tachyon sage-data-combinatorial_designs sage-data-elliptic_curves sage-data-graphs sage-data-polytopes_db sage-data-conway_polynomials iml giac libhomfly libbraiding symmetrica threejs-sage python-primecountpy) optdepends=('cython: to compile cython code' @@ -25,6 +25,7 @@ 'python-igraph: igraph backend for graph theory' 'bliss: bliss backend for graph theory' 'sage-numerical-backends-coin: COIN mixed integer linear programming backend' + 'python-pyscipopt: SCIP mixed integer linear programming backend' 'coin-or-csdp: for computing Lovász theta-function of graphs' 'buckygen: for generating fullerene graphs' 'plantri: for generating some classes of graphs' @@ -48,7 +49,8 @@ 'python-database-knotinfo: interface to the KnotInfo and LinkInfo databases' 'python-phitigra: graph editor' 'topcom: to compute triangulations of point configurations' - 'python-database-cubic-hecke: cubic Hecke algebras') + 'python-database-cubic-hecke: cubic Hecke algebras' + 'msolve: polynomial system solving via msolve') makedepends=(cython boost python-jinja sirocco mcqd coxeter bliss tdlib python-pkgconfig shared_meataxe) conflicts=(sagemath-jupyter) replaces=(sagemath-jupyter) @@ -60,22 +62,20 @@ sagemath-bliss-0.77.patch sagemath-tachyon-0.99.patch sagemath-gap-4.12.patch - sagemath-ipywidgets-8.patch sagemath-tdlib-0.9.patch - sagemath-pari-2.15.patch - sagemath-singular-4.3.1.p3.patch) -sha256sums=('9f26f14aa322e3cf38a71835b12ac34b23026b467f74d54b064c5d025e76fbfd' - 'eee5fa15d8c7be7e009166dbde3ea24bb10d7793dc12880516f278f86b1a6694' + sagemath-singular-4.3.1.p3.patch + sagemath-numpy-1.24.patch) +sha256sums=('2aff28bd1d18c2d526581f5298acb8336f5b92db5675a7403dec8eaf9a86bc4c' + '8a5b935d2fd8815489713db6497e9d44aefd61e8553e8cd4acc2cb1adf625ccc' 'bd188af45ce31579b82407adee8e9bf6033a996f7ea6e328fabca526f31c08ba' - '9d042070df3dfd53a1248659677798da888f733548eda91a6d5169c7aa1907e1' - 'eacea27b214d32cb886a75695153dfc36b5bad2fd2517e8e4eee18e74220e9e3' - '3e1f866944235b999d2d727ed1ced431bd67405b053701c21068607ec76f23c3' - '9760db6c6ec40cc16ab8a0cbf3d019df7f6a69ff292e35622f282b7c888aac77' - '84c1700e285ab1d94d16d0a602417a414447d8a23ac2e55a093285cc4bd2916d' - 'bdf56f85b608da12074780271ae134b02a03278f7b53a183f6dd97d8d72073e0' + '4484bd38b273e7fcc3d54bcd38e1ed3cdade12f3e9dc79235b011ef69e17c10c' + 'fbc87b62c73d20aa12fced28f5d68dc2b3ec7cc9123be424226321195bf2b3b4' + '1a578528bab7be3970954fdfa033afa69fe753da1bab3f41693b0e05e3c849cd' + 'dfdc071e96dcd12b7e7e05953039f3d67aebb757f459c5e29a413ffac6354a9e' + '43dda8c7a8f9331155bdb831cdeb419953ddcb9b72d71d7c1f84f22530e753da' '56a83abecf2ff5a500442adc7a50abbb70006037dd39c39dcdb04b3ca9fb51e2' - '8930fcfc0ec8dc2c49c7bc1e853dbc33d8bf8fc0508f22f28980858b7264048f' - 'c2685c8a1fb272eef58f830897fda9e6f6671fde1ced59cc55bd5cddb2da7b19') + '4d0d59361e6002157cb7dd87807bb902b70756321d1805efb22556f607c3a62a' + '800b2704c73b7d48602b69edb9f128a20ef5e1ad6860779bd3ef25583464e6f9') prepare(){ cd sage-$pkgver @@ -89,10 +89,8 @@ patch -p1 -i ../sagemath-tachyon-0.99.patch # Port to GAP 4.12 https://trac.sagemath.org/ticket/34391 patch -p1 -i ../sagemath-gap-4.12.patch -# Fixes for ipywidgets 8 https://trac.sagemath.org/ticket/34460 - patch -p1 -i ../sagemath-ipywidgets-8.patch -# Update to PARI 2.15 https://trac.sagemath.org/ticket/34537 - patch -p1 -i ../sagemath-pari-2.15.patch +# Fix tests with numpy 1.24 https://trac.sagemath.org/ticket/34816 + patch -p1 -i ../sagemath-numpy-1.24.patch # Arch-specific patches # assume all optional packages are installed Modified: sagemath-bliss-0.77.patch =================================================================== --- sagemath-bliss-0.77.patch 2023-02-12 09:58:41 UTC (rev 1399980) +++ sagemath-bliss-0.77.patch 2023-02-12 09:58:43 UTC (rev 1399981) @@ -109,10 +109,10 @@ cdef int encoding_numbits(int n): r""" -@@ -124,9 +125,6 @@ cdef void add_gen(void *user_param, unsigned int n, const unsigned int *aut): - +@@ -125,9 +126,6 @@ cdef void add_gen(void *user_param, unsigned int n, const unsigned int *aut): sig_free(done) + -cdef void empty_hook(void *user_param, unsigned int n, const unsigned int *aut): - return - @@ -119,7 +119,7 @@ ##################################################### # constructing bliss graphs from edge lists ##################################################### -@@ -345,10 +343,10 @@ cdef canonical_form_from_edge_list(int Vnr, list Vout, list Vin, int Lnr=1, list +@@ -346,10 +344,10 @@ cdef canonical_form_from_edge_list(int Vnr, list Vout, list Vin, int Lnr=1, list if directed: d = bliss_digraph_from_labelled_edges(Vnr, Lnr, Vout, Vin, labels, partition) @@ -132,7 +132,7 @@ for i in range(len(Vout)): x = Vout[i] -@@ -640,11 +638,11 @@ cdef automorphism_group_gens_from_edge_list(int Vnr, Vout, Vin, int Lnr=1, label +@@ -643,11 +641,11 @@ cdef automorphism_group_gens_from_edge_list(int Vnr, Vout, Vin, int Lnr=1, label if directed: d = bliss_digraph_from_labelled_edges(Vnr, Lnr, Vout, Vin, labels, partition) Modified: sagemath-gap-4.12.patch =================================================================== --- sagemath-gap-4.12.patch 2023-02-12 09:58:41 UTC (rev 1399980) +++ sagemath-gap-4.12.patch 2023-02-12 09:58:43 UTC (rev 1399981) @@ -38,7 +38,7 @@ index e8e32f82c9..9d45160f44 100644 --- a/src/sage/coding/linear_code.py +++ b/src/sage/coding/linear_code.py -@@ -466,27 +466,27 @@ class AbstractLinearCode(AbstractLinearCodeNoMetric): +@@ -465,27 +465,27 @@ class AbstractLinearCode(AbstractLinearCodeNoMetric): 0 sage: C = codes.HammingCode(GF(4, 'z'), 3) sage: C.automorphism_group_gens() @@ -74,7 +74,7 @@ Defn: z |--> z), ((1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); (2,13)(3,14)(4,20)(5,11)(8,18)(9,19)(10,15)(16,21), Ring endomorphism of Finite Field in z of size 2^2 Defn: z |--> z)], -@@ -692,10 +692,10 @@ class AbstractLinearCode(AbstractLinearCodeNoMetric): +@@ -691,10 +691,10 @@ class AbstractLinearCode(AbstractLinearCodeNoMetric): sage: C_iso == aut_group_can_label.get_canonical_form() True sage: aut_group_can_label.get_autom_gens() @@ -92,7 +92,7 @@ index bde2823421..bffcc85f6e 100644 --- a/src/sage/combinat/root_system/hecke_algebra_representation.py +++ b/src/sage/combinat/root_system/hecke_algebra_representation.py -@@ -355,7 +355,7 @@ class HeckeAlgebraRepresentation(WithEqualityById, SageObject): +@@ -357,7 +357,7 @@ class HeckeAlgebraRepresentation(WithEqualityById, SageObject): sage: q1, q2 = K.gens() sage: KW = W.algebra(K) sage: x = KW.an_element(); x @@ -137,7 +137,7 @@ return Hom(phi) diff --git a/src/sage/groups/finitely_presented.py b/src/sage/groups/finitely_presented.py -index 2a61bbf91d..d26891a05f 100644 +index d953022d3d..ad339b8965 100644 --- a/src/sage/groups/finitely_presented.py +++ b/src/sage/groups/finitely_presented.py @@ -596,9 +596,9 @@ class RewritingSystem(): @@ -197,8 +197,22 @@ sage: FooGroup().gens() (f1,) """ +diff --git a/src/sage/groups/matrix_gps/finitely_generated.py b/src/sage/groups/matrix_gps/finitely_generated.py +index a6d3dc0251..63956ad5f1 100644 +--- a/src/sage/groups/matrix_gps/finitely_generated.py ++++ b/src/sage/groups/matrix_gps/finitely_generated.py +@@ -563,9 +563,6 @@ class FinitelyGeneratedMatrixGroup_gap(MatrixGroup_gap): + 21499084800 + sage: P = G.as_permutation_group() + sage: Psmaller = G.as_permutation_group(algorithm="smaller", seed=6) +- sage: P == Psmaller # see the note below +- True +- sage: Psmaller = G.as_permutation_group(algorithm="smaller") + sage: P == Psmaller + False + sage: P.cardinality() diff --git a/src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx b/src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx -index 2fcb0363a8..ca73c6b1ab 100644 +index f2ccca042a..47d6862333 100644 --- a/src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx +++ b/src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx @@ -427,7 +427,7 @@ cdef class LabelledBranching: @@ -211,10 +225,10 @@ sage: L.small_generating_set() [(1,2,3)] diff --git a/src/sage/groups/perm_gps/permgroup.py b/src/sage/groups/perm_gps/permgroup.py -index 4908934699..34ba0ccfd4 100644 +index 7723ec2526..aa60cc6874 100644 --- a/src/sage/groups/perm_gps/permgroup.py +++ b/src/sage/groups/perm_gps/permgroup.py -@@ -913,7 +913,7 @@ class PermutationGroup_generic(FiniteGroup): +@@ -926,7 +926,7 @@ class PermutationGroup_generic(FiniteGroup): sage: f = PG._coerce_map_from_(MG) sage: mg = MG.an_element() sage: p = f(mg); p @@ -223,7 +237,7 @@ sage: PG(p._gap_()) == p True -@@ -959,12 +959,12 @@ class PermutationGroup_generic(FiniteGroup): +@@ -972,12 +972,12 @@ class PermutationGroup_generic(FiniteGroup): sage: P = G.as_permutation_group(algorithm='smaller', seed=5) sage: P1 = G.as_permutation_group() sage: P == P1 @@ -239,8 +253,64 @@ Another check for :trac:`5583`:: +@@ -1302,7 +1302,7 @@ class PermutationGroup_generic(FiniteGroup): + sage: G.gens_small() # random + [('b','c'), ('a','c','b')] ## (on 64-bit Linux) + [('a','b'), ('a','c','b')] ## (on Solaris) +- sage: len(G.gens_small()) == 2 ++ sage: len(G.gens_small()) == 2 # random + True + """ + gens = self._libgap_().SmallGeneratingSet() +@@ -4370,17 +4370,23 @@ class PermutationGroup_generic(FiniteGroup): + + :: + +- sage: G = PermutationGroup([[(1,2,3,4,5)],[(1,2)]]) #S_5 on [1..5] +- sage: G.is_transitive([1,4,5]) ++ sage: G = PermutationGroup([[(1,2,3,4,5)],[(1,2)],[(6,7)]]) ++ sage: G.is_transitive([1,2,3,4,5]) + True +- sage: G.is_transitive([2..6]) ++ sage: G.is_transitive([1..7]) + False + sage: G.is_transitive(G.non_fixed_points()) +- True ++ False + sage: H = PermutationGroup([[(1,2,3)],[(4,5,6)]]) + sage: H.is_transitive(H.non_fixed_points()) + False + ++ If `G` does not act on the domain, it always returns ``False``:: ++ ++ sage: G = PermutationGroup([[(1,2,3,4,5)],[(1,2)]]) #S_5 on [1..5] ++ sage: G.is_transitive([1,4,5]) ++ False ++ + Note that this differs from the definition in GAP, where + ``IsTransitive`` returns whether the group is transitive on the + set of points moved by the group. +@@ -4436,12 +4442,16 @@ class PermutationGroup_generic(FiniteGroup): + sage: G = PermutationGroup([[(1,2,3,4)],[(2,4)]]) + sage: G.is_primitive([1..4]) + False +- sage: G.is_primitive([1,2,3]) +- True + sage: G = PermutationGroup([[(3,4,5,6)],[(3,4)]]) #S_4 on [3..6] + sage: G.is_primitive(G.non_fixed_points()) + True + ++ If `G` does not act on the domain, it always returns ``False``:: ++ ++ sage: G = PermutationGroup([[(1,2,3,4)],[(2,4)]]) ++ sage: G.is_primitive([1,2,3]) ++ False ++ + """ + #If the domain is not a subset of self.domain(), then the + #action isn't primitive. diff --git a/src/sage/interfaces/gap.py b/src/sage/interfaces/gap.py -index c34fe530c3..569caa27bf 100644 +index ba175d4e34..d866cd3d60 100644 --- a/src/sage/interfaces/gap.py +++ b/src/sage/interfaces/gap.py @@ -1512,6 +1512,8 @@ def gap_reset_workspace(max_workspace_size=None, verbose=False): Deleted: sagemath-ipywidgets-8.patch =================================================================== --- sagemath-ipywidgets-8.patch 2023-02-12 09:58:41 UTC (rev 1399980) +++ sagemath-ipywidgets-8.patch 2023-02-12 09:58:43 UTC (rev 1399981) @@ -1,489 +0,0 @@ -diff --git a/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py b/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py -index e65d605..d7c4d84 100644 ---- a/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py -+++ b/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py -@@ -1062,7 +1062,7 @@ class ClusterSeed(SageObject): - - sage: S = ClusterSeed(['A',4]) - sage: S.interact() -- VBox(children=... -+ ...VBox(children=... - """ - return cluster_interact(self, fig_size, circular, kind='seed') - -diff --git a/src/sage/combinat/cluster_algebra_quiver/interact.py b/src/sage/combinat/cluster_algebra_quiver/interact.py -index 4e54c64..1c88e61 100644 ---- a/src/sage/combinat/cluster_algebra_quiver/interact.py -+++ b/src/sage/combinat/cluster_algebra_quiver/interact.py -@@ -27,7 +27,7 @@ def cluster_interact(self, fig_size=1, circular=True, kind='seed'): - - sage: S = ClusterSeed(['A',4]) - sage: S.interact() # indirect doctest -- VBox(children=... -+ ...VBox(children=... - """ - if kind not in ['seed', 'quiver']: - raise ValueError('kind must be "seed" or "quiver"') -@@ -107,7 +107,7 @@ def cluster_interact(self, fig_size=1, circular=True, kind='seed'): - show_lastmutation.observe(refresh, 'value') - which_plot.observe(refresh, 'value') - -- mut_buttons.on_displayed(refresh) -+ mut_buttons.on_widget_constructed(refresh) - - if kind == 'seed': - top = widgets.HBox([show_seq, show_vars]) -diff --git a/src/sage/combinat/cluster_algebra_quiver/quiver.py b/src/sage/combinat/cluster_algebra_quiver/quiver.py -index 4f6e16b..14a176c 100644 ---- a/src/sage/combinat/cluster_algebra_quiver/quiver.py -+++ b/src/sage/combinat/cluster_algebra_quiver/quiver.py -@@ -699,7 +699,7 @@ class ClusterQuiver(SageObject): - - sage: S = ClusterQuiver(['A',4]) - sage: S.interact() -- VBox(children=... -+ ...VBox(children=... - """ - return cluster_interact(self, fig_size, circular, kind="quiver") - -diff --git a/src/sage/dynamics/complex_dynamics/mandel_julia.py b/src/sage/dynamics/complex_dynamics/mandel_julia.py -index 224a484..ce67274 100644 ---- a/src/sage/dynamics/complex_dynamics/mandel_julia.py -+++ b/src/sage/dynamics/complex_dynamics/mandel_julia.py -@@ -130,7 +130,7 @@ def mandelbrot_plot(f=None, **kwds): - ``interact`` to ``True``. (This is only implemented for ``z^2 + c``):: - - sage: mandelbrot_plot(interact=True) -- interactive(children=(FloatSlider(value=0.0, description='Real center', max=1.0, min=-1.0, step=1e-05), -+ ...interactive(children=(FloatSlider(value=0.0, description='Real center', max=1.0, min=-1.0, step=1e-05), - FloatSlider(value=0.0, description='Imag center', max=1.0, min=-1.0, step=1e-05), - FloatSlider(value=4.0, description='Width', max=4.0, min=1e-05, step=1e-05), - IntSlider(value=500, description='Iterations', max=1000), -@@ -144,7 +144,7 @@ def mandelbrot_plot(f=None, **kwds): - - sage: mandelbrot_plot(interact=True, x_center=-0.75, y_center=0.25, - ....: image_width=1/2, number_of_colors=75) -- interactive(children=(FloatSlider(value=-0.75, description='Real center', max=1.0, min=-1.0, step=1e-05), -+ ...interactive(children=(FloatSlider(value=-0.75, description='Real center', max=1.0, min=-1.0, step=1e-05), - FloatSlider(value=0.25, description='Imag center', max=1.0, min=-1.0, step=1e-05), - FloatSlider(value=0.5, description='Width', max=4.0, min=1e-05, step=1e-05), - IntSlider(value=500, description='Iterations', max=1000), -@@ -600,14 +600,14 @@ def julia_plot(f=None, **kwds): - the form ``f = z^2 + c``):: - - sage: julia_plot(interact=True) -- interactive(children=(FloatSlider(value=-1.0, description='Real c'... -+ ...interactive(children=(FloatSlider(value=-1.0, description='Real c'... - - :: - - sage: R.<z> = CC[] - sage: f = z^2 + 1/2 - sage: julia_plot(f,interact=True) -- interactive(children=(FloatSlider(value=0.5, description='Real c'... -+ ...interactive(children=(FloatSlider(value=0.5, description='Real c'... - - To return the Julia set of a random `c` value with (formal) cycle structure - `(2,3)`, set ``period = [2,3]``:: -diff --git a/src/sage/interacts/library.py b/src/sage/interacts/library.py -index 8166014..6a982db 100644 ---- a/src/sage/interacts/library.py -+++ b/src/sage/interacts/library.py -@@ -12,7 +12,7 @@ interactive mathlet. In the command line, it will simply return the underlying - HTML and Sage code which creates the mathlet:: - - sage: interacts.calculus.taylor_polynomial() -- Interactive function <function taylor_polynomial at ...> with 3 widgets -+ ...Interactive function <function taylor_polynomial at ...> with 3 widgets - title: HTMLText(value='<h2>Taylor polynomial</h2>') - f: EvalText(value='e^(-x)*sin(x)', description='$f(x)=$', layout=Layout(max_width='81em')) - order: SelectionSlider(description='order', options=(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), value=1) -@@ -101,7 +101,7 @@ def library_interact( - ....: def f(n): - ....: print(n) - sage: f() # an interact appears if using the notebook, else code -- Interactive function <function f at ...> with 1 widget -+ ...Interactive function <function f at ...> with 1 widget - n: TransformIntSlider(value=5, description='n', max=15, min=-5) - - TESTS: -@@ -117,7 +117,7 @@ def library_interact( - DeprecationWarning: Use decorator factory @library_interact(widgets) instead of @library_interact without any arguments. - See https://trac.sagemath.org/33382 for details. - sage: f() # an interact appears if using the notebook, else code -- Interactive function <function f at ...> with 1 widget -+ ...Interactive function <function f at ...> with 1 widget - n: TransformIntSlider(value=5, description='n', max=15, min=-5) - - .. NOTE:: -@@ -183,7 +183,7 @@ def demo(n: int, m: int): - creates the mathlet:: - - sage: interacts.demo() -- Interactive function <function demo at ...> with 2 widgets -+ ...Interactive function <function demo at ...> with 2 widgets - n: SelectionSlider(description='n', options=(0, 1, 2, 3, 4, 5, 6, 7, 8, 9), value=0) - m: SelectionSlider(description='m', options=(0, 1, 2, 3, 4, 5, 6, 7, 8, 9), value=0) - """ -@@ -213,7 +213,7 @@ def taylor_polynomial(title, f, order: int): - creates the mathlet:: - - sage: interacts.calculus.taylor_polynomial() -- Interactive function <function taylor_polynomial at ...> with 3 widgets -+ ...Interactive function <function taylor_polynomial at ...> with 3 widgets - title: HTMLText(value='<h2>Taylor polynomial</h2>') - f: EvalText(value='e^(-x)*sin(x)', description='$f(x)=$', layout=Layout(max_width='81em')) - order: SelectionSlider(description='order', options=(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), value=1) -@@ -259,7 +259,7 @@ def definite_integral(title, f, g, interval, x_range, selection): - creates the mathlet:: - - sage: interacts.calculus.definite_integral() -- Interactive function <function definite_integral at ...> with 6 widgets -+ ...Interactive function <function definite_integral at ...> with 6 widgets - title: HTMLText(value='<h2>Definite integral</h2>') - f: EvalText(value='3*x', description='$f(x)=$', layout=Layout(max_width='81em')) - g: EvalText(value='x^2', description='$g(x)=$', layout=Layout(max_width='81em')) -@@ -345,7 +345,7 @@ def function_derivative(title, function, x_range, y_range): - creates the mathlet:: - - sage: interacts.calculus.function_derivative() -- Interactive function <function function_derivative at ...> with 4 widgets -+ ...Interactive function <function function_derivative at ...> with 4 widgets - title: HTMLText(value='<h2>Derivative grapher</h2>') - function: EvalText(value='x^5-3*x^3+1', description='Function:', layout=Layout(max_width='81em')) - x_range: FloatRangeSlider(value=(-2.0, 2.0), description='Range (x)', max=15.0, min=-15.0) -@@ -393,7 +393,7 @@ def difference_quotient(title, f, interval, a, x0): - creates the mathlet:: - - sage: interacts.calculus.difference_quotient() -- Interactive function <function difference_quotient at ...> with 5 widgets -+ ...Interactive function <function difference_quotient at ...> with 5 widgets - title: HTMLText(value='<h2>Difference quotient</h2>') - f: EvalText(value='sin(x)', description='f(x)', layout=Layout(max_width='81em')) - interval: FloatRangeSlider(value=(0.0, 10.0), description='Range', max=10.0) -@@ -458,7 +458,7 @@ def quadratic_equation(A, B, C): - creates the mathlet:: - - sage: interacts.calculus.quadratic_equation() -- Interactive function <function quadratic_equation at ...> with 3 widgets -+ ...Interactive function <function quadratic_equation at ...> with 3 widgets - A: IntSlider(value=1, description='A', max=7, min=-7) - B: IntSlider(value=1, description='B', max=7, min=-7) - C: IntSlider(value=-2, description='C', max=7, min=-7) -@@ -520,7 +520,7 @@ def trigonometric_properties_triangle(a0, a1, a2): - creates the mathlet:: - - sage: interacts.geometry.trigonometric_properties_triangle() -- Interactive function <function trigonometric_properties_triangle at ...> with 3 widgets -+ ...Interactive function <function trigonometric_properties_triangle at ...> with 3 widgets - a0: IntSlider(value=30, description='A', max=360) - a1: IntSlider(value=180, description='B', max=360) - a2: IntSlider(value=300, description='C', max=360) -@@ -601,7 +601,7 @@ def unit_circle(function, x): - creates the mathlet:: - - sage: interacts.geometry.unit_circle() -- Interactive function <function unit_circle at ...> with 2 widgets -+ ...Interactive function <function unit_circle at ...> with 2 widgets - function: Dropdown(description='function', options=(('sin(x)', 0), ('cos(x)', 1), ('tan(x)', 2)), value=0) - x: TransformFloatSlider(value=0.0, description='x', max=6.283185307179586, step=0.015707963267948967) - """ -@@ -702,7 +702,7 @@ def special_points( - creates the mathlet:: - - sage: interacts.geometry.special_points() -- Interactive function <function special_points at ...> with 10 widgets -+ ...Interactive function <function special_points at ...> with 10 widgets - title: HTMLText(value='<h2>Special points in triangle</h2>') - a0: IntSlider(value=30, description='A', max=360) - a1: IntSlider(value=180, description='B', max=360) -@@ -875,7 +875,7 @@ def coin(n, interval): - creates the mathlet:: - - sage: interacts.statistics.coin() -- Interactive function <function coin at ...> with 2 widgets -+ ...Interactive function <function coin at ...> with 2 widgets - n: IntSlider(value=1000, description='Number of Tosses', max=10000, min=2, step=100) - interval: IntRangeSlider(value=(0, 0), description='Plotting range (y)', max=1) - """ -@@ -915,7 +915,7 @@ def bisection_method(title, f, interval, d, maxn): - creates the mathlet:: - - sage: interacts.calculus.secant_method() -- Interactive function <function secant_method at ...> with 5 widgets -+ ...Interactive function <function secant_method at ...> with 5 widgets - title: HTMLText(value='<h2>Secant method for numerical root finding</h2>') - f: EvalText(value='x^2-2', description='f(x)', layout=Layout(max_width='81em')) - interval: IntRangeSlider(value=(0, 4), description='range', max=5, min=-5) -@@ -995,7 +995,7 @@ def secant_method(title, f, interval, d, maxn): - creates the mathlet:: - - sage: interacts.calculus.secant_method() -- Interactive function <function secant_method at ...> with 5 widgets -+ ...Interactive function <function secant_method at ...> with 5 widgets - title: HTMLText(value='<h2>Secant method for numerical root finding</h2>') - f: EvalText(value='x^2-2', description='f(x)', layout=Layout(max_width='81em')) - interval: IntRangeSlider(value=(0, 4), description='range', max=5, min=-5) -@@ -1068,7 +1068,7 @@ def newton_method(title, f, c, d, maxn, interval, list_steps): - creates the mathlet:: - - sage: interacts.calculus.newton_method() -- Interactive function <function newton_method at ...> with 7 widgets -+ ...Interactive function <function newton_method at ...> with 7 widgets - title: HTMLText(value='<h2>Newton method</h2>') - f: EvalText(value='x^2 - 2', description='f', layout=Layout(max_width='81em')) - c: IntSlider(value=6, description='Start ($x$)', max=10, min=-10) -@@ -1152,7 +1152,7 @@ def trapezoid_integration( - creates the mathlet:: - - sage: interacts.calculus.trapezoid_integration() -- Interactive function <function trapezoid_integration at ...> with 7 widgets -+ ...Interactive function <function trapezoid_integration at ...> with 7 widgets - title: HTMLText(value='<h2>Trapezoid integration</h2>') - f: EvalText(value='x^2-5*x + 10', description='$f(x)=$', layout=Layout(max_width='81em')) - n: IntSlider(value=5, description='# divisions', min=1) -@@ -1284,7 +1284,7 @@ def simpson_integration( - creates the mathlet:: - - sage: interacts.calculus.simpson_integration() -- Interactive function <function simpson_integration at ...> with 7 widgets -+ ...Interactive function <function simpson_integration at ...> with 7 widgets - title: HTMLText(value='<h2>Simpson integration</h2>') - f: EvalText(value='x*sin(x)+x+1', description='$f(x)=$', layout=Layout(max_width='81em')) - n: IntSlider(value=6, description='# divisions', min=2, step=2) -@@ -1547,7 +1547,7 @@ def function_tool(f, g, xrange, yrange, a, action, do_plot): - creates the mathlet:: - - sage: interacts.calculus.function_tool() -- Interactive function <function function_tool at ...> with 7 widgets -+ ...Interactive function <function function_tool at ...> with 7 widgets - f: EvalText(value='sin(x)', description='f') - g: EvalText(value='cos(x)', description='g') - xrange: IntRangeSlider(value=(0, 1), description='x-range', max=3, min=-3) -@@ -1677,7 +1677,7 @@ def julia(expo, c_real, c_imag, iterations, zoom_x, zoom_y, plot_points, dpi): - creates the mathlet:: - - sage: interacts.fractals.julia() -- Interactive function <function julia at ...> with 8 widgets -+ ...Interactive function <function julia at ...> with 8 widgets - expo: FloatSlider(value=2.0, description='expo', max=10.0, min=-10.0) - c_real: FloatSlider(value=0.5, description='real part const.', max=2.0, min=-2.0, step=0.01) - c_imag: FloatSlider(value=0.5, description='imag part const.', max=2.0, min=-2.0, step=0.01) -@@ -1729,7 +1729,7 @@ def mandelbrot(expo, iterations, zoom_x, zoom_y, plot_points, dpi): - creates the mathlet:: - - sage: interacts.fractals.mandelbrot() -- Interactive function <function mandelbrot at ...> with 6 widgets -+ ...Interactive function <function mandelbrot at ...> with 6 widgets - expo: FloatSlider(value=2.0, description='expo', max=10.0, min=-10.0) - iterations: IntSlider(value=20, description='# iterations', min=1) - zoom_x: FloatRangeSlider(value=(-2.0, 1.0), description='Zoom X', max=2.0, min=-2.0, step=0.01) -@@ -1774,7 +1774,7 @@ def cellular_automaton(N, rule_number, size): - creates the mathlet:: - - sage: interacts.fractals.cellular_automaton() -- Interactive function <function cellular_automaton at ...> with 3 widgets -+ ...Interactive function <function cellular_automaton at ...> with 3 widgets - N: IntSlider(value=100, description='Number of iterations', max=500, min=1) - rule_number: IntSlider(value=110, description='Rule number', max=255) - size: IntSlider(value=6, description='size of graphic', max=11, min=1) -@@ -1833,7 +1833,7 @@ def polar_prime_spiral(interval, show_factors, highlight_primes, show_curves, n, - creates the mathlet:: - - sage: sage.interacts.algebra.polar_prime_spiral() -- Interactive function <function polar_prime_spiral at ...> with 6 widgets -+ ...Interactive function <function polar_prime_spiral at ...> with 6 widgets - interval: IntRangeSlider(value=(1, 1000), description='range', max=4000, min=1, step=10) - show_factors: Checkbox(value=True, description='show_factors') - highlight_primes: Checkbox(value=True, description='highlight_primes') -diff --git a/src/sage/plot/plot3d/plot3d.py b/src/sage/plot/plot3d/plot3d.py -index 44620a0..43e1ce9 100644 ---- a/src/sage/plot/plot3d/plot3d.py -+++ b/src/sage/plot/plot3d/plot3d.py -@@ -1300,7 +1300,7 @@ def plot3d(f, urange, vrange, adaptive=False, transformation=None, **kwds): - sage: @interact - ....: def _(which_plot=[A,B,C,D,E]): - ....: show(which_plot) -- Interactive function <function _ at ...> with 1 widget -+ ...Interactive function <function _ at ...> with 1 widget - which_plot: Dropdown(description='which_plot', options=(Graphics3d Object, Graphics3d Object, Graphics3d Object, Graphics3d Object, Graphics3d Object), value=Graphics3d Object) - - Now plot a function:: -@@ -1314,7 +1314,7 @@ def plot3d(f, urange, vrange, adaptive=False, transformation=None, **kwds): - sage: @interact - ....: def _(which_plot=[F, G, H, I, J]): - ....: show(which_plot) -- Interactive function <function _ at ...> with 1 widget -+ ...Interactive function <function _ at ...> with 1 widget - which_plot: Dropdown(description='which_plot', options=(Graphics3d Object, Graphics3d Object, Graphics3d Object, Graphics3d Object, Graphics3d Object), value=Graphics3d Object) - - TESTS: -diff --git a/src/sage/repl/display/formatter.py b/src/sage/repl/display/formatter.py -index adde08d..62bde3b 100644 ---- a/src/sage/repl/display/formatter.py -+++ b/src/sage/repl/display/formatter.py -@@ -169,8 +169,7 @@ class SageDisplayFormatter(DisplayFormatter): - sage: shell.run_cell('import ipywidgets') - sage: shell.run_cell('slider = ipywidgets.IntSlider()') - sage: shell.run_cell('get_ipython().display_formatter.format(slider)') -- IntSlider(value=0) -- ({}, {}) -+ ...IntSlider(value=0)..., {}) - - sage: shell.run_cell('%display default') - sage: shell.quit() -diff --git a/src/sage/repl/ipython_kernel/interact.py b/src/sage/repl/ipython_kernel/interact.py -index 9b94bc4..a2665a4 100644 ---- a/src/sage/repl/ipython_kernel/interact.py -+++ b/src/sage/repl/ipython_kernel/interact.py -@@ -18,7 +18,7 @@ EXAMPLES:: - sage: @interact - ....: def f(x=(0, 10)): - ....: pass -- Interactive function <function f at ...> with 1 widget -+ ...Interactive function <function f at ...> with 1 widget - x: IntSlider(value=5, description='x', max=10) - sage: f.widget.children - (IntSlider(value=5, description='x', max=10), Output()) -@@ -69,7 +69,7 @@ class sage_interactive(interactive): - sage: from sage.repl.ipython_kernel.interact import sage_interactive - sage: def myfunc(x=10, y="hello", z=None): pass - sage: sage_interactive(myfunc, x=(0,100), z=["one", "two", "three"]) -- Interactive function <function myfunc at ...> with 3 widgets -+ ...Interactive function <function myfunc at ...> with 3 widgets - x: IntSlider(value=10, description='x') - y: Text(value='hello', description='y') - z: Dropdown(description='z', options=('one', 'two', 'three'), value=None) -@@ -99,10 +99,10 @@ class sage_interactive(interactive): - - sage: def myfunc(auto_update=False): pass - sage: sage_interactive(myfunc) -- Manual interactive function <function myfunc ...> with 0 widgets -+ ...Manual interactive function <function myfunc ...> with 0 widgets - sage: def myfunc(auto_update=None): pass - sage: sage_interactive(myfunc) -- Interactive function <function myfunc ...> with 0 widgets -+ ...Interactive function <function myfunc ...> with 0 widgets - """ - # Use *args to avoid name clash with keyword arguments - if len(args) < 2: -@@ -126,7 +126,7 @@ class sage_interactive(interactive): - super(sage_interactive, self).__init__(f, options, **kwds) - if self.manual: - # In Sage, manual interacts are always run once -- self.on_displayed(self.update) -+ self.on_widget_constructed(self.update) - else: - # In automatic mode, clicking on a ToggleButtons button - # should also run the interact -@@ -143,7 +143,7 @@ class sage_interactive(interactive): - sage: from sage.repl.ipython_kernel.interact import sage_interactive - sage: def myfunc(): pass - sage: sage_interactive(myfunc) -- Interactive function <function myfunc ...> with 0 widgets -+ ...Interactive function <function myfunc ...> with 0 widgets - """ - s = "Manual interactive" if self.manual else "Interactive" - widgets = [w for w in self.children if isinstance(w, ValueWidget)] -@@ -164,7 +164,7 @@ class sage_interactive(interactive): - sage: from sage.repl.ipython_kernel.interact import sage_interactive - sage: def myfunc(x=[1,2,3], auto_update=False): pass - sage: sage_interactive(myfunc).signature().parameters -- mappingproxy({'x': <Parameter "x=[1, 2, 3]">}) -+ ...mappingproxy({'x': <Parameter "x=[1, 2, 3]">}) - """ - return self.__signature - -@@ -181,14 +181,14 @@ class sage_interactive(interactive): - - sage: from sage.repl.ipython_kernel.interact import sage_interactive - sage: sage_interactive.widget_from_single_value("sin(x)") -- Text(value='sin(x)') -+ ...Text(value='sin(x)') - sage: sage_interactive.widget_from_single_value(sin(x)) -- EvalText(value='sin(x)') -+ ...EvalText(value='sin(x)') - sage: from sage.plot.colors import Color - sage: sage_interactive.widget_from_single_value(matrix([[1, 2], [3, 4]])) -- Grid(value=[[1, 2], [3, 4]], children=(Label(value=''), VBox(children=(EvalText(value='1', layout=Layout(max_width='5em')), EvalText(value='3', layout=Layout(max_width='5em')))), VBox(children=(EvalText(value='2', layout=Layout(max_width='5em')), EvalText(value='4', layout=Layout(max_width='5em')))))) -+ ...Grid(value=[[1, 2], [3, 4]], children=(Label(value=''), VBox(children=(EvalText(value='1', layout=Layout(max_width='5em')), EvalText(value='3', layout=Layout(max_width='5em')))), VBox(children=(EvalText(value='2', layout=Layout(max_width='5em')), EvalText(value='4', layout=Layout(max_width='5em')))))) - sage: sage_interactive.widget_from_single_value(Color('cornflowerblue')) -- SageColorPicker(value='#6495ed') -+ ...SageColorPicker(value='#6495ed') - """ - # Support Sage matrices and colors - if isinstance(abbrev, Matrix): -@@ -219,15 +219,15 @@ class sage_interactive(interactive): - - sage: from sage.repl.ipython_kernel.interact import sage_interactive - sage: sage_interactive.widget_from_tuple( (0, 10) ) -- IntSlider(value=5, max=10) -+ ...IntSlider(value=5, max=10) - sage: sage_interactive.widget_from_tuple( ("number", (0, 10)) ) -- IntSlider(value=5, description='number', max=10) -+ ...IntSlider(value=5, description='number', max=10) - sage: sage_interactive.widget_from_tuple( (3, (0, 10)) ) -- IntSlider(value=3, max=10) -- sage: sage_interactive.widget_from_tuple((2, dict(one=1, two=2, three=3))) -- Dropdown(index=1, options={'one': 1, 'two': 2, 'three': 3}, value=2) -+ ...IntSlider(value=3, max=10) -+ sage: sage_interactive.widget_from_tuple((2, [('one', 1), ('two', 2), ('three', 3)])) -+ ...Dropdown(index=1, options=(('one', 1), ('two', 2), ('three', 3)), value=2) - sage: sage_interactive.widget_from_tuple( (sqrt(2), pi) ) -- FloatSlider(value=2.277903107981444, max=3.141592653589793, min=1.4142135623730951) -+ ...FloatSlider(value=2.277903107981444, max=3.141592653589793, min=1.4142135623730951) - - TESTS: - -@@ -235,7 +235,7 @@ class sage_interactive(interactive): - - sage: SCR = SR.subring(no_variables=True) - sage: sage_interactive.widget_from_tuple( (SCR(sqrt(2)), SCR(pi)) ) -- FloatSlider(value=2.277903107981444, max=3.141592653589793, min=1.4142135623730951) -+ ...FloatSlider(value=2.277903107981444, max=3.141592653589793, min=1.4142135623730951) - """ - # Support (description, abbrev) - if len(abbrev) == 2 and isinstance(abbrev[0], str): -@@ -269,17 +269,17 @@ class sage_interactive(interactive): - - sage: from sage.repl.ipython_kernel.interact import sage_interactive - sage: sage_interactive.widget_from_iterable([1..5]) -- Dropdown(options=(1, 2, 3, 4, 5), value=1) -+ ...Dropdown(options=(1, 2, 3, 4, 5), value=1) - sage: sage_interactive.widget_from_iterable(iter([1..5])) -- SelectionSlider(options=(1, 2, 3, 4, 5), value=1) -+ ...SelectionSlider(options=(1, 2, 3, 4, 5), value=1) - sage: sage_interactive.widget_from_iterable((1..5)) -- SelectionSlider(options=(1, 2, 3, 4, 5), value=1) -+ ...SelectionSlider(options=(1, 2, 3, 4, 5), value=1) - sage: sage_interactive.widget_from_iterable(x for x in [1..5]) -- SelectionSlider(options=(1, 2, 3, 4, 5), value=1) -+ ...SelectionSlider(options=(1, 2, 3, 4, 5), value=1) - sage: def gen(): - ....: yield 1; yield 2; yield 3; yield 4; yield 5 - sage: sage_interactive.widget_from_iterable(gen()) -- SelectionSlider(options=(1, 2, 3, 4, 5), value=1) -+ ...SelectionSlider(options=(1, 2, 3, 4, 5), value=1) - """ - if isinstance(abbrev, Iterator): - return SelectionSlider(options=list(abbrev)) -diff --git a/src/sage/repl/ipython_kernel/widgets_sagenb.py b/src/sage/repl/ipython_kernel/widgets_sagenb.py -index 2ce59d7..76f4f52 100644 ---- a/src/sage/repl/ipython_kernel/widgets_sagenb.py -+++ b/src/sage/repl/ipython_kernel/widgets_sagenb.py -@@ -470,15 +470,6 @@ def selector(values, label=None, default=None, nrows=None, ncols=None, width=Non - sage: selector([(1,"one"), (2,"two"), (3,"three")], buttons=True) - ToggleButtons(options=(('one', 1), ('two', 2), ('three', 3)), value=1) - -- A dict of ``label:value`` pairs is also allowed. Since a ``dict`` -- is not ordered, it is better to use an :class:`OrderedDict`:: -- -- sage: from collections import OrderedDict -- sage: selector(OrderedDict(one=1, two=2, three=3)) -- Dropdown(options=OrderedDict([('one', 1), ('two', 2), ('three', 3)]), value=1) -- sage: selector(OrderedDict(one=1, two=2, three=3), buttons=True) -- ToggleButtons(options=OrderedDict([('one', 1), ('two', 2), ('three', 3)]), value=1) -- - The values can be any kind of object: - - sage: selector([sin(x^2), GF(29), EllipticCurve('37a1')]) Modified: sagemath-linbox-1.7.patch =================================================================== --- sagemath-linbox-1.7.patch 2023-02-12 09:58:41 UTC (rev 1399980) +++ sagemath-linbox-1.7.patch 2023-02-12 09:58:43 UTC (rev 1399981) @@ -47,7 +47,7 @@ index 010365d..3d60726 100644 --- a/src/sage/matrix/matrix_modn_dense_template.pxi +++ b/src/sage/matrix/matrix_modn_dense_template.pxi -@@ -219,7 +219,7 @@ cdef inline linbox_echelonize_efd(celement modulus, celement* entries, Py_ssize_ +@@ -221,7 +221,7 @@ cdef inline linbox_echelonize_efd(celement modulus, celement* entries, Py_ssize_ return 0,[] cdef ModField *F = new ModField(<long>modulus) Added: sagemath-numpy-1.24.patch =================================================================== --- sagemath-numpy-1.24.patch (rev 0) +++ sagemath-numpy-1.24.patch 2023-02-12 09:58:43 UTC (rev 1399981) @@ -0,0 +1,58 @@ +diff --git a/src/sage/misc/persist.pyx b/src/sage/misc/persist.pyx +index 3ac5f1cc2b0..cb1f327c199 100644 +--- a/src/sage/misc/persist.pyx ++++ b/src/sage/misc/persist.pyx +@@ -157,7 +157,7 @@ def load(*filename, compress=True, verbose=True, **kwargs): + ....: _ = f.write(code) + sage: load(t) + sage: hello +- <fortran object> ++ <fortran ...> + """ + import sage.repl.load + if len(filename) != 1: +diff --git a/src/sage/plot/complex_plot.pyx b/src/sage/plot/complex_plot.pyx +index 6f0aeab87ae..b77c69b2f77 100644 +--- a/src/sage/plot/complex_plot.pyx ++++ b/src/sage/plot/complex_plot.pyx +@@ -461,6 +461,8 @@ def complex_to_rgb(z_values, contoured=False, tiled=False, + rgb[i, j, 2] = b + + sig_off() ++ nan_indices = np.isnan(rgb).any(-1) # Mask for undefined points ++ rgb[nan_indices] = 1 # Make nan_indices white + return rgb + + +diff --git a/src/sage/plot/histogram.py b/src/sage/plot/histogram.py +index 3bc2b76b58e..388c2d1391d 100644 +--- a/src/sage/plot/histogram.py ++++ b/src/sage/plot/histogram.py +@@ -87,13 +87,8 @@ class Histogram(GraphicPrimitive): + + TESTS:: + +- sage: h = histogram([10,3,5], normed=True)[0] +- doctest:warning...: +- DeprecationWarning: the 'normed' option is deprecated. Use 'density' instead. +- See https://trac.sagemath.org/25260 for details. ++ sage: h = histogram([10,3,5], density=True)[0] + sage: h.get_minmax_data() +- doctest:warning ... +- ...VisibleDeprecationWarning: Passing `normed=True` on non-uniform bins has always been broken, and computes neither the probability density function nor the probability mass function. The result is only correct if the bins are uniform, when density=True will produce the same result anyway. The argument will be removed in a future version of numpy. + {'xmax': 10.0, 'xmin': 3.0, 'ymax': 0.476190476190..., 'ymin': 0} + """ + import numpy +diff --git a/src/sage/repl/ipython_extension.py b/src/sage/repl/ipython_extension.py +index 798671aab42..cad6a47ca8b 100644 +--- a/src/sage/repl/ipython_extension.py ++++ b/src/sage/repl/ipython_extension.py +@@ -405,7 +405,7 @@ class SageMagics(Magics): + ....: C END FILE FIB1.F + ....: ''') + sage: fib +- <fortran object> ++ <fortran ...> + sage: from numpy import array + sage: a = array(range(10), dtype=float) + sage: fib(a, 10) Modified: sagemath-optional-packages.patch =================================================================== --- sagemath-optional-packages.patch 2023-02-12 09:58:41 UTC (rev 1399980) +++ sagemath-optional-packages.patch 2023-02-12 09:58:43 UTC (rev 1399981) @@ -2,16 +2,13 @@ index 6744236593..a038006449 100755 --- a/pkgs/sagemath-standard/setup.py +++ b/pkgs/sagemath-standard/setup.py -@@ -81,10 +81,9 @@ else: - from sage_setup.optional_extension import is_package_installed_and_updated - distributions = [''] - optional_packages_with_extensions = ['mcqd', 'bliss', 'tdlib', -- 'coxeter3', 'fes', 'sirocco', 'meataxe'] -+ 'coxeter3', 'sirocco', 'meataxe'] - distributions += ['sagemath-{}'.format(pkg) -- for pkg in optional_packages_with_extensions -- if is_package_installed_and_updated(pkg)] -+ for pkg in optional_packages_with_extensions] - log.warn('distributions = {0}'.format(distributions)) - from sage_setup.find import find_python_sources - python_packages, python_modules, cython_modules = find_python_sources( +@@ -81,8 +81,7 @@ else: + optional_packages_with_extensions = ['mcqd', 'bliss', 'tdlib', + 'coxeter3', 'sirocco', 'meataxe'] + distributions += ['sagemath-{}'.format(pkg) +- for pkg in optional_packages_with_extensions +- if is_package_installed_and_updated(pkg)] ++ for pkg in optional_packages_with_extensions] + log.warn('distributions = {0}'.format(distributions)) + from sage_setup.find import find_python_sources, find_extra_files + python_packages, python_modules, cython_modules = find_python_sources( Deleted: sagemath-pari-2.15.patch =================================================================== --- sagemath-pari-2.15.patch 2023-02-12 09:58:41 UTC (rev 1399980) +++ sagemath-pari-2.15.patch 2023-02-12 09:58:43 UTC (rev 1399981) @@ -1,1750 +0,0 @@ -diff --git a/build/pkgs/giac/patches/pari_2_15.patch b/build/pkgs/giac/patches/pari_2_15.patch -new file mode 100644 -index 0000000000..d2900a5ffc ---- /dev/null -+++ b/build/pkgs/giac/patches/pari_2_15.patch -@@ -0,0 +1,21 @@ -+ANYARG patch -+ -+diff --git a/src/pari.cc b/src/pari.cc -+index 76ce8e1..50d08ab 100644 -+--- a/src/pari.cc -++++ b/src/pari.cc -+@@ -40,6 +40,13 @@ using namespace std; -+ -+ #ifdef HAVE_LIBPARI -+ -++// Anyarg disappeared from PARI 2.15.0 -++#ifdef __cplusplus -++# define ANYARG ... -++#else -++# define ANYARG -++#endif -++ -+ #ifdef HAVE_PTHREAD_H -+ #include <pthread.h> -+ #endif -+ -diff --git a/build/pkgs/pari/checksums.ini b/build/pkgs/pari/checksums.ini -index b736feed31..bafd0f36f4 100644 ---- a/build/pkgs/pari/checksums.ini -+++ b/build/pkgs/pari/checksums.ini -@@ -1,5 +1,5 @@ - tarball=pari-VERSION.tar.gz --sha1=e01647aab7e96a8cb4922cf26a4f224337c6647f --md5=922f740fcdf8630b30d63dc76b58f756 --cksum=297133525 -+sha1=cba9b279f67d5efe2fbbccf3be6e9725f816cf07 -+md5=76d430f1bea1b07fa2ad9712deeaa736 -+cksum=1990743897 - upstream_url=https://pari.math.u-bordeaux.fr/pub/pari/unix/pari-VERSION.tar.gz -diff --git a/build/pkgs/pari/package-version.txt b/build/pkgs/pari/package-version.txt -index a1a4224dd5..68e69e405e 100644 ---- a/build/pkgs/pari/package-version.txt -+++ b/build/pkgs/pari/package-version.txt -@@ -1 +1 @@ --2.13.3 -+2.15.0 -diff --git a/src/doc/de/tutorial/tour_numtheory.rst b/src/doc/de/tutorial/tour_numtheory.rst -index a012234c99..e3149fe949 100644 ---- a/src/doc/de/tutorial/tour_numtheory.rst -+++ b/src/doc/de/tutorial/tour_numtheory.rst -@@ -157,7 +157,7 @@ implementiert. - Univariate Quotient Polynomial Ring in a over Rational Field with modulus - x^3 + x^2 - 2*x + 8 - sage: K.units() -- (3*a^2 + 13*a + 13,) -+ (-3*a^2 - 13*a - 13,) - sage: K.discriminant() - -503 - sage: K.class_group() -diff --git a/src/doc/en/tutorial/tour_numtheory.rst b/src/doc/en/tutorial/tour_numtheory.rst -index 3064d100e2..075e0ac0ad 100644 ---- a/src/doc/en/tutorial/tour_numtheory.rst -+++ b/src/doc/en/tutorial/tour_numtheory.rst -@@ -157,7 +157,7 @@ NumberField class. - Univariate Quotient Polynomial Ring in a over Rational Field with modulus - x^3 + x^2 - 2*x + 8 - sage: K.units() -- (3*a^2 + 13*a + 13,) -+ (-3*a^2 - 13*a - 13,) - sage: K.discriminant() - -503 - sage: K.class_group() -diff --git a/src/doc/es/tutorial/tour_numtheory.rst b/src/doc/es/tutorial/tour_numtheory.rst -index a1f7d1a87b..48e5376cfe 100644 ---- a/src/doc/es/tutorial/tour_numtheory.rst -+++ b/src/doc/es/tutorial/tour_numtheory.rst -@@ -140,7 +140,7 @@ Varios métodos relacionados están implementados en la clase ``NumberField``:: - Univariate Quotient Polynomial Ring in a over Rational Field with modulus - x^3 + x^2 - 2*x + 8 - sage: K.units() -- (3*a^2 + 13*a + 13,) -+ (-3*a^2 - 13*a - 13,) - sage: K.discriminant() - -503 - sage: K.class_group() -diff --git a/src/doc/fr/tutorial/tour_numtheory.rst b/src/doc/fr/tutorial/tour_numtheory.rst -index 871092f5fa..d1b2fee883 100644 ---- a/src/doc/fr/tutorial/tour_numtheory.rst -+++ b/src/doc/fr/tutorial/tour_numtheory.rst -@@ -159,7 +159,7 @@ dans la classe NumberField. - Univariate Quotient Polynomial Ring in a over Rational Field with modulus - x^3 + x^2 - 2*x + 8 - sage: K.units() -- (3*a^2 + 13*a + 13,) -+ (-3*a^2 - 13*a - 13,) - sage: K.discriminant() - -503 - sage: K.class_group() -diff --git a/src/doc/ja/tutorial/tour_numtheory.rst b/src/doc/ja/tutorial/tour_numtheory.rst -index 47af68c862..4d4ed52d50 100644 ---- a/src/doc/ja/tutorial/tour_numtheory.rst -+++ b/src/doc/ja/tutorial/tour_numtheory.rst -@@ -161,7 +161,7 @@ Sageには :math:`p` \-進数体も組込まれている. - Univariate Quotient Polynomial Ring in a over Rational Field with modulus - x^3 + x^2 - 2*x + 8 - sage: K.units() -- (3*a^2 + 13*a + 13,) -+ (-3*a^2 - 13*a - 13,) - sage: K.discriminant() - -503 - sage: K.class_group() -diff --git a/src/doc/pt/tutorial/tour_numtheory.rst b/src/doc/pt/tutorial/tour_numtheory.rst -index 6371b491ea..a3dc973a93 100644 ---- a/src/doc/pt/tutorial/tour_numtheory.rst -+++ b/src/doc/pt/tutorial/tour_numtheory.rst -@@ -157,7 +157,7 @@ NumberField. - Univariate Quotient Polynomial Ring in a over Rational Field with modulus - x^3 + x^2 - 2*x + 8 - sage: K.units() -- (3*a^2 + 13*a + 13,) -+ (-3*a^2 - 13*a - 13,) - sage: K.discriminant() - -503 - sage: K.class_group() -diff --git a/src/doc/ru/tutorial/tour_numtheory.rst b/src/doc/ru/tutorial/tour_numtheory.rst -index 652abfbc99..a985d49fbd 100644 ---- a/src/doc/ru/tutorial/tour_numtheory.rst -+++ b/src/doc/ru/tutorial/tour_numtheory.rst -@@ -150,7 +150,7 @@ Sage содержит стандартные функции теории чис - Univariate Quotient Polynomial Ring in a over Rational Field with modulus - x^3 + x^2 - 2*x + 8 - sage: K.units() -- (3*a^2 + 13*a + 13,) -+ (-3*a^2 - 13*a - 13,) - sage: K.discriminant() - -503 - sage: K.class_group() -diff --git a/src/sage/arith/misc.py b/src/sage/arith/misc.py -index e57076646f..fec75d07c1 100644 ---- a/src/sage/arith/misc.py -+++ b/src/sage/arith/misc.py -@@ -1465,13 +1465,13 @@ def divisors(n): - - sage: K.<a> = QuadraticField(7) - sage: divisors(K.ideal(7)) -- [Fractional ideal (1), Fractional ideal (-a), Fractional ideal (7)] -+ [Fractional ideal (1), Fractional ideal (a), Fractional ideal (7)] - sage: divisors(K.ideal(3)) - [Fractional ideal (1), Fractional ideal (3), -- Fractional ideal (-a + 2), Fractional ideal (-a - 2)] -+ Fractional ideal (a - 2), Fractional ideal (a + 2)] - sage: divisors(K.ideal(35)) -- [Fractional ideal (1), Fractional ideal (5), Fractional ideal (-a), -- Fractional ideal (7), Fractional ideal (-5*a), Fractional ideal (35)] -+ [Fractional ideal (1), Fractional ideal (5), Fractional ideal (a), -+ Fractional ideal (7), Fractional ideal (5*a), Fractional ideal (35)] - - TESTS:: - -@@ -2569,7 +2569,7 @@ def factor(n, proof=None, int_=False, algorithm='pari', verbose=0, **kwds): - - sage: K.<i> = QuadraticField(-1) - sage: factor(122 - 454*i) -- (-3*i - 2) * (-i - 2)^3 * (i + 1)^3 * (i + 4) -+ (-i) * (-i - 2)^3 * (i + 1)^3 * (-2*i + 3) * (i + 4) - - To access the data in a factorization:: - -diff --git a/src/sage/dynamics/arithmetic_dynamics/projective_ds.py b/src/sage/dynamics/arithmetic_dynamics/projective_ds.py -index cdfc11a9e5..b6e1280d6e 100644 ---- a/src/sage/dynamics/arithmetic_dynamics/projective_ds.py -+++ b/src/sage/dynamics/arithmetic_dynamics/projective_ds.py -@@ -7825,9 +7825,9 @@ class DynamicalSystem_projective_field(DynamicalSystem_projective, - sage: f = DynamicalSystem_projective([x^2 + QQbar(sqrt(3))*y^2, y^2, QQbar(sqrt(2))*z^2]) - sage: f.reduce_base_field() - Dynamical System of Projective Space of dimension 2 over Number Field in a with -- defining polynomial y^4 - 4*y^2 + 1 with a = 1.931851652578137? -+ defining polynomial y^4 - 4*y^2 + 1 with a = -0.5176380902050415? - Defn: Defined on coordinates by sending (x : y : z) to -- (x^2 + (a^2 - 2)*y^2 : y^2 : (a^3 - 3*a)*z^2) -+ (x^2 + (-a^2 + 2)*y^2 : y^2 : (a^3 - 3*a)*z^2) - - :: - -diff --git a/src/sage/ext_data/pari/simon/ellQ.gp b/src/sage/ext_data/pari/simon/ellQ.gp -index 420af8f6a2..65e8386779 100644 ---- a/src/sage/ext_data/pari/simon/ellQ.gp -+++ b/src/sage/ext_data/pari/simon/ellQ.gp -@@ -40,7 +40,7 @@ - gp > \r ellcommon.gp - gp > \r ellQ.gp - -- The main function is ellrank(), which takes as an argument -+ The main function is ellQ_ellrank(), which takes as an argument - any elliptic curve in the form [a1,a2,a3,a4,a6] - the result is a vector [r,s,v], where - r is a lower bound for the rank, -@@ -50,7 +50,7 @@ - Example: - - gp > ell = [1,2,3,4,5]; -- gp > ellrank(ell) -+ gp > ellQ_ellrank(ell) - %1 = [1, 1, [[1,2]] - In this example, the rank is exactly 1, and [1,2] has infinite order. - -@@ -92,7 +92,7 @@ - \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ - - Explications succintes : -- La fonction ellrank() accepte toutes les courbes sous la forme -+ La fonction ellQ_ellrank() accepte toutes les courbes sous la forme - [a1,a2,a3,a4,a6] - Les coefficients peuvent etre entiers ou non. - L'algorithme utilise est celui de la 2-descente. -@@ -100,7 +100,7 @@ - Il suffit de taper : - - gp > ell = [a1,a2,a3,a4,a6]; -- gp > ellrank(ell) -+ gp > ellQ_ellrank(ell) - - Retourne un vecteur [r,s,v] ou - r est le rang probable (c'est toujours une minoration du rang), -@@ -110,7 +110,7 @@ - Exemple : - - gp > ell = [1,2,3,4,5]; -- gp > ellrank(ell) -+ gp > ellQ_ellrank(ell) - %1 = [1, 1, [[1,2]] - Ici, le rang est exactement 1, et le point [1,2] est d'ordre infini. - -@@ -1571,12 +1571,12 @@ if( DEBUGLEVEL_ell >= 4, print(" end of ell2descent_gen")); - print("rank(E/Q) >= ",m1) - ); - } --{ellrank(ell,help=[]) = -+{ellQ_ellrank(ell,help=[]) = - \\ Algorithm of 2-descent on the elliptic curve ell. - \\ help is a list of known points on ell. - my(urst,urst1,den,eqell,tors2,bnf,rang,time1); - --if( DEBUGLEVEL_ell >= 3, print(" starting ellrank")); -+if( DEBUGLEVEL_ell >= 3, print(" starting ellQ_ellrank")); - if( #ell < 13, ell = ellinit(ell)); - - \\ kill the coefficients a1 and a3 -@@ -1630,7 +1630,7 @@ if( DEBUGLEVEL_ell >= 1, print(" Elliptic curve: Y^2 = ",eqell)); - )); - - rang[3] = ellchangepoint(rang[3],ellinverturst(urst)); --if( DEBUGLEVEL_ell >= 3, print(" end of ellrank")); -+if( DEBUGLEVEL_ell >= 3, print(" end of ellQ_ellrank")); - - return(rang); - } -@@ -2106,13 +2106,13 @@ if( DEBUGLEVEL_ell >= 3, print(" end of ell2descent_viaisog")); - { - \\ functions for elliptic curves - addhelp(ell2descent_complete, -- "ell2descent_complete(e1,e2,e3): Performs a complete 2-descent on the elliptic curve y^2 = (x-e1)*(x-e2)*(x-e3). See ?ellrank for the format of the output."); -+ "ell2descent_complete(e1,e2,e3): Performs a complete 2-descent on the elliptic curve y^2 = (x-e1)*(x-e2)*(x-e3). See ?ellQ_ellrank for the format of the output."); - addhelp(ell2descent_gen, -- "ell2descent_gen((E,bnf,k=1,help=[]): E is a vector of the form [0,A,0,B,C], (or the result of ellinit of such a vector) A,B,C integers such that x^3+A*x^2+B*x+C; bnf is the corresponding bnfinit(,1); Performs 2-descent on the elliptic curve Ek: k*y^2=x^3+A*x^2+B*x+C. See ?ellrank for the format of the output."); -+ "ell2descent_gen((E,bnf,k=1,help=[]): E is a vector of the form [0,A,0,B,C], (or the result of ellinit of such a vector) A,B,C integers such that x^3+A*x^2+B*x+C; bnf is the corresponding bnfinit(,1); Performs 2-descent on the elliptic curve Ek: k*y^2=x^3+A*x^2+B*x+C. See ?ellQ_ellrank for the format of the output."); - addhelp(ell2descent_viaisog, -- "ell2descent_viaisog(E,help=[]): E is an elliptic curve of the form [0,a,0,b,0], with a, b integers. Performs a 2-descent via isogeny on E. See ?ellrank for the format of the output."); -- addhelp(ellrank, -- "ellrank(E,help=[]): E is any elliptic curve defined over Q. Returns a vector [r,s,v], where r is a lower bound for the rank of E, s is the rank of its 2-Selmer group and v is a list of independant points in E(Q)/2E(Q). If help is a vector of nontrivial points on E, the result might be faster. This function might be used in conjunction with elltors2(E). See also ?default_ellQ"); -+ "ell2descent_viaisog(E,help=[]): E is an elliptic curve of the form [0,a,0,b,0], with a, b integers. Performs a 2-descent via isogeny on E. See ?ellQ_ellrank for the format of the output."); -+ addhelp(ellQ_ellrank, -+ "ellQ_ellrank(E,help=[]): E is any elliptic curve defined over Q. Returns a vector [r,s,v], where r is a lower bound for the rank of E, s is the rank of its 2-Selmer group and v is a list of independant points in E(Q)/2E(Q). If help is a vector of nontrivial points on E, the result might be faster. This function might be used in conjunction with elltors2(E). See also ?default_ellQ"); - addhelp(ellhalf, - "ellhalf(E,P): returns the vector of all points Q on the elliptic curve E such that 2Q = P"); - addhelp(ellredgen, -@@ -2143,7 +2143,7 @@ if( DEBUGLEVEL_ell >= 3, print(" end of ell2descent_viaisog")); - - \\ others - addhelp(default_ellQ, -- "default_ellQ(DEBUGLEVEL_ell, LIM1, LIM3, LIMTRIV, ELLREDGENFLAG, COMPLETE, MAXPROB, LIMBIGPRIME): set the value of the global variables used for ellrank() and other related functions. DEBUGLEVEL_ell: 0-5: choose the quantity of information printed during the computation (default=0: print nothing); LIM1 (resp LIM3): search limit for easy (resp hard) points on quartics; LIMTRIV: search limit for trivial points on elliptic curves; ELLREDGENFLAG: if != 0, try to reduce the generators at the end; COMPLETE: if != 0 and full 2-torsion, use complete 2-descent, otherwise via 2-isogeny; MAXPROB, LIMBIGPRIME: technical."); -+ "default_ellQ(DEBUGLEVEL_ell, LIM1, LIM3, LIMTRIV, ELLREDGENFLAG, COMPLETE, MAXPROB, LIMBIGPRIME): set the value of the global variables used for ellQ_ellrank() and other related functions. DEBUGLEVEL_ell: 0-5: choose the quantity of information printed during the computation (default=0: print nothing); LIM1 (resp LIM3): search limit for easy (resp hard) points on quartics; LIMTRIV: search limit for trivial points on elliptic curves; ELLREDGENFLAG: if != 0, try to reduce the generators at the end; COMPLETE: if != 0 and full 2-torsion, use complete 2-descent, otherwise via 2-isogeny; MAXPROB, LIMBIGPRIME: technical."); - /* addhelp(DEBUGLEVEL_ell, - "DEBUGLEVEL_ell: Choose a higher value of this global variable to have more details of the computations printed during the 2-descent algorithm. 0 = don't print anything; 1 = (default) just print the result; 2 = print more details including the Selmer group and the nontrivial quartics."); - */ -diff --git a/src/sage/ext_data/pari/simon/qfsolve.gp b/src/sage/ext_data/pari/simon/qfsolve.gp -index 501fb50828..2107288c1d 100644 ---- a/src/sage/ext_data/pari/simon/qfsolve.gp -+++ b/src/sage/ext_data/pari/simon/qfsolve.gp -@@ -434,146 +434,6 @@ my(cc); - return([U3~*G3*U3,red[2]*U1*U2*U3]); - } - --\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ --\\ QUADRATIC FORMS MINIMIZATION \\ --\\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ -- --\\ Minimization of the quadratic form G, with nonzero determinant. --\\ of dimension n>=2. --\\ G must by symmetric and have integral coefficients. --\\ Returns [G',U,factd] with U in GLn(Q) such that G'=U~*G*U*constant --\\ is integral and has minimal determinant. --\\ In dimension 3 or 4, may return a prime p --\\ if the reduction at p is impossible because of the local non solvability. --\\ If given, factdetG must be equal to factor(abs(det(G))). --{qfminimize(G,factdetG) = --my(factd,U,Ker,Ker2,sol,aux,di); --my(p); --my(n,lf,i,vp,dimKer,dimKer2,m); -- -- n = length(G); -- factd = matrix(0,2); -- if( !factdetG, factdetG = factor(matdet(G))); -- -- lf = length(factdetG[,1]); -- i = 1; U = matid(n); -- -- while(i <= lf, -- vp = factdetG[i,2]; -- if( vp == 0, i++; next); -- p = factdetG[i,1]; -- if( p == -1, i++; next); --if( DEBUGLEVEL_qfsolve >= 4, print(" p = ",p,"^",vp)); -- --\\ The case vp = 1 can be minimized only if n is odd. -- if( vp == 1 && n%2 == 0, -- factd = concat(factd~, Mat([p,1])~)~; -- i++; next -- ); -- Ker = kermodp(G,p); dimKer = Ker[1]; Ker = Ker[2]; -- --\\ Rem: we must have dimKer <= vp --if( DEBUGLEVEL_qfsolve >= 4, print(" dimKer = ",dimKer)); --\\ trivial case: dimKer = n -- if( dimKer == n, --if( DEBUGLEVEL_qfsolve >= 4, print(" case 0: dimKer = n")); -- G /= p; -- factdetG[i,2] -= n; -- next -- ); -- G = Ker~*G*Ker; -- U = U*Ker; -- --\\ 1st case: dimKer < vp --\\ then the kernel mod p contains a kernel mod p^2 -- if( dimKer < vp, --if( DEBUGLEVEL_qfsolve >= 4, print(" case 1: dimker < vp")); -- if( dimKer == 1, --\\ G[,1] /= p; G[1,] /= p; -- G[,1] /= p; G[1,] = G[1,]/p; -- U[,1] /= p; -- factdetG[i,2] -= 2 -- , -- Ker2 = kermodp(matrix(dimKer,dimKer,j,k,G[j,k]/p),p); -- dimKer2 = Ker2[1]; Ker2 = Ker2[2]; -- for( j = 1, dimKer2, Ker2[,j] /= p); -- Ker2 = matdiagonalblock([Ker2,matid(n-dimKer)]); -- G = Ker2~*G*Ker2; -- U = U*Ker2; -- factdetG[i,2] -= 2*dimKer2 --); -- --if( DEBUGLEVEL_qfsolve >= 4, print(" end of case 1")); -- next -- ); -- --\\ Now, we have vp = dimKer --\\ 2nd case: the dimension of the kernel is >=2 --\\ and contains an element of norm 0 mod p^2 -- --\\ search for an element of norm p^2... in the kernel -- if( dimKer > 2 || -- (dimKer == 2 && issquare( di = Mod((G[1,2]^2-G[1,1]*G[2,2])/p^2,p))), -- if( dimKer > 2, --if( DEBUGLEVEL_qfsolve >= 4, print(" case 2.1")); -- dimKer = 3; -- sol = qfsolvemodp(matrix(3,3,j,k,G[j,k]/p),p) -- , --if( DEBUGLEVEL_qfsolve >= 4, print(" case 2.2")); -- if( G[1,1]%p^2 == 0, -- sol = [1,0]~ -- , sol = [-G[1,2]/p+sqrt(di),Mod(G[1,1]/p,p)]~ -- ) -- ); -- sol = centerlift(sol); -- sol /= content(sol); --if( DEBUGLEVEL_qfsolve >= 4, print(" sol = ",sol)); -- Ker = vectorv(n, j, if( j<= dimKer, sol[j], 0)); \\ fill with 0's -- Ker = completebasis(Ker,1); -- Ker[,n] /= p; -- G = Ker~*G*Ker; -- U = U*Ker; -- factdetG[i,2] -= 2; --if( DEBUGLEVEL_qfsolve >= 4, print(" end of case 2")); -- next -- ); -- --\\ Now, we have vp = dimKer <= 2 --\\ and the kernel contains no vector with norm p^2... -- --\\ In some cases, exchanging the kernel and the image --\\ makes the minimization easy. -- -- m = (n-1)\2-1; -- if( ( vp == 1 && issquare(Mod(-(-1)^m*matdet(G)/G[1,1],p))) -- || ( vp == 2 && n%2 == 1 && n >= 5) -- || ( vp == 2 && n%2 == 0 && !issquare(Mod((-1)^m*matdet(G)/p^2,p))) -- , --if( DEBUGLEVEL_qfsolve >= 4, print(" case 3")); -- Ker = matid(n); -- for( j = dimKer+1, n, Ker[j,j] = p); -- G = Ker~*G*Ker/p; -- U = U*Ker; -- factdetG[i,2] -= 2*dimKer-n; --if( DEBUGLEVEL_qfsolve >= 4, print(" end of case 3")); -- next -- ); -- --\\ Minimization was not possible se far. --\\ If n == 3 or 4, this proves the local non-solubility at p. -- if( n == 3 || n == 4, --if( DEBUGLEVEL_qfsolve >= 1, print(" no local solution at ",p)); -- return(p)); -- --if( DEBUGLEVEL_qfsolve >= 4, print(" prime ",p," finished")); -- factd = concat(factd~,Mat([p,vp])~)~; -- i++ -- ); --\\ apply LLL to avoid coefficients explosion -- aux = qflll(U/content(U)); --return([aux~*G*aux,U*aux,factd]); --} -- - \\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ - \\ CLASS GROUP COMPUTATIONS \\ - \\ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ -diff --git a/src/sage/geometry/polyhedron/backend_field.py b/src/sage/geometry/polyhedron/backend_field.py -index 6b921d23a6..2f32c58b1e 100644 ---- a/src/sage/geometry/polyhedron/backend_field.py -+++ b/src/sage/geometry/polyhedron/backend_field.py -@@ -265,7 +265,7 @@ class Polyhedron_field(Polyhedron_base): - An inequality (-0.1419794359520263?, -1.698172434277148?) x + 1.200789243901438? >= 0, - An inequality (0.3001973109753594?, 0.600394621950719?) x - 0.4245431085692869? >= 0) - sage: p.Vrepresentation() # optional - sage.rings.number_field -- (A vertex at (0.?e-15, 0.707106781186548?), -+ (A vertex at (0.?e-16, 0.7071067811865475?), - A vertex at (1.414213562373095?, 0), - A vertex at (4.000000000000000?, 0.372677996249965?)) - """ -@@ -308,7 +308,7 @@ class Polyhedron_field(Polyhedron_base): - An inequality (-0.1419794359520263?, -1.698172434277148?) x + 1.200789243901438? >= 0, - An inequality (0.3001973109753594?, 0.600394621950719?) x - 0.4245431085692869? >= 0) - sage: p.Vrepresentation() # optional - sage.rings.number_field -- (A vertex at (0.?e-15, 0.707106781186548?), -+ (A vertex at (0.?e-16, 0.7071067811865475?), - A vertex at (1.414213562373095?, 0), - A vertex at (4.000000000000000?, 0.372677996249965?)) - """ -diff --git a/src/sage/geometry/polyhedron/backend_normaliz.py b/src/sage/geometry/polyhedron/backend_normaliz.py -index 86b89632a5..ca8a43b248 100644 ---- a/src/sage/geometry/polyhedron/backend_normaliz.py -+++ b/src/sage/geometry/polyhedron/backend_normaliz.py -@@ -53,7 +53,7 @@ def _number_field_elements_from_algebraics_list_of_lists_of_lists(listss, **kwds - 1.732050807568878? - sage: from sage.geometry.polyhedron.backend_normaliz import _number_field_elements_from_algebraics_list_of_lists_of_lists - sage: K, results, hom = _number_field_elements_from_algebraics_list_of_lists_of_lists([[[rt2], [1]], [[rt3]], [[1], []]]); results # optional - sage.rings.number_field -- [[[-a^3 + 3*a], [1]], [[-a^2 + 2]], [[1], []]] -+ [[[-a^3 + 3*a], [1]], [[a^2 - 2]], [[1], []]] - """ - from sage.rings.qqbar import number_field_elements_from_algebraics - numbers = [] -diff --git a/src/sage/groups/matrix_gps/isometries.py b/src/sage/groups/matrix_gps/isometries.py -index f9111a2c92..cca45e7175 100644 ---- a/src/sage/groups/matrix_gps/isometries.py -+++ b/src/sage/groups/matrix_gps/isometries.py -@@ -11,11 +11,11 @@ EXAMPLES:: - sage: L = IntegralLattice("D4") - sage: O = L.orthogonal_group() - sage: O -- Group of isometries with 5 generators ( -- [-1 0 0 0] [0 0 0 1] [-1 -1 -1 -1] [ 1 1 0 0] [ 1 0 0 0] -- [ 0 -1 0 0] [0 1 0 0] [ 0 0 1 0] [ 0 0 1 0] [-1 -1 -1 -1] -- [ 0 0 -1 0] [0 0 1 0] [ 0 1 0 1] [ 0 1 0 1] [ 0 0 1 0] -- [ 0 0 0 -1], [1 0 0 0], [ 0 -1 -1 0], [ 0 -1 -1 0], [ 0 0 0 1] -+ Group of isometries with 3 generators ( -+ [0 0 0 1] [ 1 1 0 0] [ 1 0 0 0] -+ [0 1 0 0] [ 0 0 1 0] [-1 -1 -1 -1] -+ [0 0 1 0] [ 0 1 0 1] [ 0 0 1 0] -+ [1 0 0 0], [ 0 -1 -1 0], [ 0 0 0 1] - ) - - Basic functionality is provided by GAP:: -diff --git a/src/sage/interfaces/genus2reduction.py b/src/sage/interfaces/genus2reduction.py -index 56ae04b235..7a4794daf2 100644 ---- a/src/sage/interfaces/genus2reduction.py -+++ b/src/sage/interfaces/genus2reduction.py -@@ -143,31 +143,31 @@ class ReductionData(SageObject): - sur un corps de valuation discrète", Trans. AMS 348 (1996), - 4577-4610, Section 7.2, Proposition 4). - """ -- def __init__(self, pari_result, P, Q, minimal_equation, minimal_disc, -- local_data, conductor, prime_to_2_conductor_only): -+ def __init__(self, pari_result, P, Q, Pmin, Qmin, minimal_disc, -+ local_data, conductor): - self.pari_result = pari_result - self.P = P - self.Q = Q -- self.minimal_equation = minimal_equation -+ self.Pmin = Pmin -+ self.Qmin = Qmin - self.minimal_disc = minimal_disc - self.local_data = local_data - self.conductor = conductor -- self.prime_to_2_conductor_only = prime_to_2_conductor_only - - def _repr_(self): -- if self.prime_to_2_conductor_only: -- ex = ' (away from 2)' -- else: -- ex = '' - if self.Q == 0: - yterm = '' - else: - yterm = '+ (%s)*y '%self.Q -+ - 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 -- s += 'Conductor%s: %s\n'%(ex, self.conductor) -+ if self.Qmin: -+ s += 'A Minimal Equation:\n\ty^2 + (%s)y = %s\n'%(self.Qmin, self.Pmin) -+ else: -+ s += 'A Minimal Equation:\n\ty^2 = %s\n'%self.Pmin -+ s += 'Minimal Discriminant: %s\n'%self.minimal_disc -+ s += 'Conductor: %s\n'%self.conductor - s += 'Local Data:\n%s'%self._local_data_str() - return s - -@@ -242,17 +242,7 @@ class Genus2reduction(SageObject): - sage: factor(R.conductor) - 5^4 * 2267 - -- This means that only the odd part of the conductor is known. -- -- :: -- -- sage: R.prime_to_2_conductor_only -- True -- -- The discriminant is always minimal away from 2, but possibly not at -- 2. -- -- :: -+ The discriminant is always minimal:: - - sage: factor(R.minimal_disc) - 2^3 * 5^5 * 2267 -@@ -264,10 +254,10 @@ class Genus2reduction(SageObject): - sage: R - 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 -+ A Minimal Equation: -+ y^2 ... -+ Minimal Discriminant: 56675000 -+ Conductor: 1416875 - Local Data: - p=2 - (potential) stable reduction: (II), j=1 -@@ -293,10 +283,10 @@ class Genus2reduction(SageObject): - sage: genus2reduction(0, x^6 + 3*x^3 + 63) - Reduction data about this proper smooth genus 2 curve: - y^2 = x^6 + 3*x^3 + 63 -- A Minimal Equation (away from 2): -- y^2 = x^6 + 3*x^3 + 63 -- Minimal Discriminant (away from 2): 10628388316852992 -- Conductor (away from 2): 2893401 -+ A Minimal Equation: -+ y^2 ... -+ Minimal Discriminant: -10628388316852992 -+ Conductor: 2893401 - Local Data: - p=2 - (potential) stable reduction: (V), j1+j2=0, j1*j2=0 -@@ -327,9 +317,9 @@ class Genus2reduction(SageObject): - sage: genus2reduction(x^3-x^2-1, x^2 - x) - Reduction data about this proper smooth genus 2 curve: - y^2 + (x^3 - x^2 - 1)*y = x^2 - x -- A Minimal Equation (away from 2): -- y^2 = x^6 + 58*x^5 + 1401*x^4 + 18038*x^3 + 130546*x^2 + 503516*x + 808561 -- Minimal Discriminant (away from 2): 169 -+ A Minimal Equation: -+ y^2 ... -+ Minimal Discriminant: -169 - Conductor: 169 - Local Data: - p=13 -@@ -370,10 +360,10 @@ class Genus2reduction(SageObject): - 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 -+ A Minimal Equation: -+ y^2 ... -+ Minimal Discriminant: 56675000 -+ Conductor: 1416875 - Local Data: - p=2 - (potential) stable reduction: (II), j=1 -@@ -389,9 +379,9 @@ class Genus2reduction(SageObject): - 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 -+ A Minimal Equation: -+ y^2 ... -+ Minimal Discriminant: 48838125 - Conductor: 32025 - Local Data: - p=3 -@@ -412,9 +402,9 @@ class Genus2reduction(SageObject): - 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 -- A Minimal Equation (away from 2): -- y^2 = x^6 + 18*x^3 + 36*x^2 - 27 -- Minimal Discriminant (away from 2): 1520984142 -+ A Minimal Equation: -+ y^2 ... -+ Minimal Discriminant: 1520984142 - Conductor: 954 - Local Data: - p=2 -@@ -436,18 +426,10 @@ class Genus2reduction(SageObject): - raise ValueError("Q (=%s) must have degree at most 3" % Q) - - res = pari.genus2red([P, Q]) -- - conductor = ZZ(res[0]) -- minimal_equation = R(res[2]) -- -- 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) -+ Pmin = R(res[2][0]) -+ Qmin = R(res[2][1]) -+ minimal_disc = ZZ(pari.hyperelldisc(res[2])) - - local_data = {} - for red in res[3]: -@@ -468,9 +450,7 @@ class Genus2reduction(SageObject): - - 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, prime_to_2_conductor_only) -+ return ReductionData(res, P, Q, Pmin, Qmin, minimal_disc, local_data, conductor) - - def __reduce__(self): - return _reduce_load_genus2reduction, tuple([]) -diff --git a/src/sage/lfunctions/dokchitser.py b/src/sage/lfunctions/dokchitser.py -index fec450d7bc..236402c293 100644 ---- a/src/sage/lfunctions/dokchitser.py -+++ b/src/sage/lfunctions/dokchitser.py -@@ -337,6 +337,7 @@ class Dokchitser(SageObject): - # After init_coeffs is called, future calls to this method should - # return the full output for further parsing - raise RuntimeError("unable to create L-series, due to precision or other limits in PARI") -+ t = t.replace(" *** _^_: Warning: normalizing a series with 0 leading term.\n", "") - return t - - def __check_init(self): -diff --git a/src/sage/lfunctions/pari.py b/src/sage/lfunctions/pari.py -index d2b20f1891..6c31efe239 100644 ---- a/src/sage/lfunctions/pari.py -+++ b/src/sage/lfunctions/pari.py -@@ -339,7 +339,7 @@ def lfun_eta_quotient(scalings, exponents): - 0.0374412812685155 - - sage: lfun_eta_quotient([6],[4]) -- [[Vecsmall([7]), [Vecsmall([6]), Vecsmall([4])]], 0, [0, 1], 2, 36, 1] -+ [[Vecsmall([7]), [Vecsmall([6]), Vecsmall([4]), 0]], 0, [0, 1], 2, 36, 1] - - sage: lfun_eta_quotient([2,1,4], [5,-2,-2]) - Traceback (most recent call last): -diff --git a/src/sage/libs/pari/tests.py b/src/sage/libs/pari/tests.py -index e5a2aa2517..0efcb15de0 100644 ---- a/src/sage/libs/pari/tests.py -+++ b/src/sage/libs/pari/tests.py -@@ -356,7 +356,7 @@ Constructors:: - [2, 4]~*x + [1, 3]~ - - sage: pari(3).Qfb(7, 1) -- Qfb(3, 7, 1, 0.E-19) -+ Qfb(3, 7, 1) - sage: pari(3).Qfb(7, 2) - Traceback (most recent call last): - ... -@@ -512,7 +512,7 @@ Basic functions:: - sage: pari('sqrt(-2)').frac() - Traceback (most recent call last): - ... -- PariError: incorrect type in gfloor (t_COMPLEX) -+ PariError: incorrect type in gfrac (t_COMPLEX) - - sage: pari('1+2*I').imag() - 2 -diff --git a/src/sage/modular/cusps_nf.py b/src/sage/modular/cusps_nf.py -index 25d93cac92..157ebabe29 100644 ---- a/src/sage/modular/cusps_nf.py -+++ b/src/sage/modular/cusps_nf.py -@@ -1220,7 +1220,7 @@ def units_mod_ideal(I): - sage: I = k.ideal(5, a + 1) - sage: units_mod_ideal(I) - [1, -- 2*a^2 + 4*a - 1, -+ -2*a^2 - 4*a + 1, - ...] - - :: -diff --git a/src/sage/modular/modform_hecketriangle/hecke_triangle_group_element.py b/src/sage/modular/modform_hecketriangle/hecke_triangle_group_element.py -index a881336596..090d1bfaf0 100644 ---- a/src/sage/modular/modform_hecketriangle/hecke_triangle_group_element.py -+++ b/src/sage/modular/modform_hecketriangle/hecke_triangle_group_element.py -@@ -43,7 +43,7 @@ def coerce_AA(p): - sage: AA(p)._exact_field() - Number Field in a with defining polynomial y^8 ... with a in ... - sage: coerce_AA(p)._exact_field() -- Number Field in a with defining polynomial y^4 - 1910*y^2 - 3924*y + 681058 with a in 39.710518724...? -+ Number Field in a with defining polynomial y^4 - 1910*y^2 - 3924*y + 681058 with a in ...? - """ - el = AA(p) - el.simplify() -diff --git a/src/sage/modular/modsym/p1list_nf.py b/src/sage/modular/modsym/p1list_nf.py -index 222caacca8..f9d969732c 100644 ---- a/src/sage/modular/modsym/p1list_nf.py -+++ b/src/sage/modular/modsym/p1list_nf.py -@@ -58,7 +58,7 @@ Lift an MSymbol to a matrix in `SL(2, R)`: - - sage: alpha = MSymbol(N, a + 2, 3*a^2) - sage: alpha.lift_to_sl2_Ok() -- [-3*a^2 + a + 12, 25*a^2 - 50*a + 100, a + 2, a^2 - 3*a + 3] -+ [-1, 4*a^2 - 13*a + 23, a + 2, 5*a^2 + 3*a - 3] - sage: Ok = k.ring_of_integers() - sage: M = Matrix(Ok, 2, alpha.lift_to_sl2_Ok()) - sage: det(M) -@@ -945,11 +945,11 @@ class P1NFList(SageObject): - sage: N = k.ideal(5, a + 1) - sage: P = P1NFList(N) - sage: u = k.unit_group().gens_values(); u -- [-1, 2*a^2 + 4*a - 1] -+ [-1, -2*a^2 - 4*a + 1] - sage: P.apply_J_epsilon(4, -1) - 2 - sage: P.apply_J_epsilon(4, u[0], u[1]) -- 1 -+ 5 - - :: - -diff --git a/src/sage/modules/free_quadratic_module_integer_symmetric.py b/src/sage/modules/free_quadratic_module_integer_symmetric.py -index a206f0c721..aeb19ab669 100644 ---- a/src/sage/modules/free_quadratic_module_integer_symmetric.py -+++ b/src/sage/modules/free_quadratic_module_integer_symmetric.py -@@ -1168,11 +1168,11 @@ class FreeQuadraticModule_integer_symmetric(FreeQuadraticModule_submodule_with_b - sage: A4 = IntegralLattice("A4") - sage: Aut = A4.orthogonal_group() - sage: Aut -- Group of isometries with 5 generators ( -- [-1 0 0 0] [0 0 0 1] [-1 -1 -1 0] [ 1 0 0 0] [ 1 0 0 0] -- [ 0 -1 0 0] [0 0 1 0] [ 0 0 0 -1] [-1 -1 -1 -1] [ 0 1 0 0] -- [ 0 0 -1 0] [0 1 0 0] [ 0 0 1 1] [ 0 0 0 1] [ 0 0 1 1] -- [ 0 0 0 -1], [1 0 0 0], [ 0 1 0 0], [ 0 0 1 0], [ 0 0 0 -1] -+ Group of isometries with 4 generators ( -+ [0 0 0 1] [-1 -1 -1 0] [ 1 0 0 0] [ 1 0 0 0] -+ [0 0 1 0] [ 0 0 0 -1] [-1 -1 -1 -1] [ 0 1 0 0] -+ [0 1 0 0] [ 0 0 1 1] [ 0 0 0 1] [ 0 0 1 1] -+ [1 0 0 0], [ 0 1 0 0], [ 0 0 1 0], [ 0 0 0 -1] - ) - - The group acts from the right on the lattice and its discriminant group:: -@@ -1180,19 +1180,19 @@ class FreeQuadraticModule_integer_symmetric(FreeQuadraticModule_submodule_with_b - sage: x = A4.an_element() - sage: g = Aut.an_element() - sage: g -- [ 1 1 1 0] -- [ 0 0 -1 0] -- [ 0 0 1 1] -- [ 0 -1 -1 -1] -+ [-1 -1 -1 0] -+ [ 0 0 1 0] -+ [ 0 0 -1 -1] -+ [ 0 1 1 1] - sage: x*g -- (1, 1, 1, 0) -+ (-1, -1, -1, 0) - sage: (x*g).parent()==A4 - True - sage: (g*x).parent() - Vector space of dimension 4 over Rational Field - sage: y = A4.discriminant_group().an_element() - sage: y*g -- (1) -+ (4) - - If the group is finite we can compute the usual things:: - -@@ -1208,10 +1208,10 @@ class FreeQuadraticModule_integer_symmetric(FreeQuadraticModule_submodule_with_b - - sage: A2 = IntegralLattice(matrix.identity(3),Matrix(ZZ,2,3,[1,-1,0,0,1,-1])) - sage: A2.orthogonal_group() -- Group of isometries with 3 generators ( -- [-1/3 2/3 2/3] [ 2/3 2/3 -1/3] [1 0 0] -- [ 2/3 -1/3 2/3] [ 2/3 -1/3 2/3] [0 0 1] -- [ 2/3 2/3 -1/3], [-1/3 2/3 2/3], [0 1 0] -+ Group of isometries with 2 generators ( -+ [ 2/3 2/3 -1/3] [1 0 0] -+ [ 2/3 -1/3 2/3] [0 0 1] -+ [-1/3 2/3 2/3], [0 1 0] - ) - - It can be negative definite as well:: -diff --git a/src/sage/quadratic_forms/binary_qf.py b/src/sage/quadratic_forms/binary_qf.py -index cfa3ada73e..5ac823bc6c 100755 ---- a/src/sage/quadratic_forms/binary_qf.py -+++ b/src/sage/quadratic_forms/binary_qf.py -@@ -141,7 +141,7 @@ class BinaryQF(SageObject): - and a.degree() == 2 and a.parent().ngens() == 2): - x, y = a.parent().gens() - a, b, c = [a.monomial_coefficient(mon) for mon in [x**2, x*y, y**2]] -- elif isinstance(a, pari_gen) and a.type() in ('t_QFI', 't_QFR'): -+ elif isinstance(a, pari_gen) and a.type() in ('t_QFI', 't_QFR', 't_QFB'): - # a has 3 or 4 components - a, b, c = a[0], a[1], a[2] - try: -diff --git a/src/sage/quadratic_forms/genera/genus.py b/src/sage/quadratic_forms/genera/genus.py -index 8290b6c4fa..0fc43f33c6 100644 ---- a/src/sage/quadratic_forms/genera/genus.py -+++ b/src/sage/quadratic_forms/genera/genus.py -@@ -3088,8 +3088,8 @@ class GenusSymbol_global_ring(): - sage: G = Genus(matrix(ZZ, 3, [6,3,0, 3,6,0, 0,0,2])) - sage: G.representatives() - ( -- [2 0 0] [ 2 -1 0] -- [0 6 3] [-1 2 0] -+ [2 0 0] [ 2 1 0] -+ [0 6 3] [ 1 2 0] - [0 3 6], [ 0 0 18] - ) - -diff --git a/src/sage/quadratic_forms/qfsolve.py b/src/sage/quadratic_forms/qfsolve.py -index ddde95e04f..d5e15d9f83 100644 ---- a/src/sage/quadratic_forms/qfsolve.py -+++ b/src/sage/quadratic_forms/qfsolve.py -@@ -70,7 +70,7 @@ def qfsolve(G): - - sage: M = Matrix(QQ, [[3, 0, 0, 0], [0, 5, 0, 0], [0, 0, -7, 0], [0, 0, 0, -11]]) - sage: qfsolve(M) -- (3, -4, -3, -2) -+ (3, 4, -3, -2) - """ - ret = G.__pari__().qfsolve() - if ret.type() == 't_COL': -diff --git a/src/sage/quadratic_forms/quadratic_form__automorphisms.py b/src/sage/quadratic_forms/quadratic_form__automorphisms.py -index c36c667e3b..3d72cf3be1 100644 ---- a/src/sage/quadratic_forms/quadratic_form__automorphisms.py -+++ b/src/sage/quadratic_forms/quadratic_form__automorphisms.py -@@ -300,9 +300,9 @@ def automorphism_group(self): - sage: Q = DiagonalQuadraticForm(ZZ, [1,1,1]) - sage: Q.automorphism_group() - Matrix group over Rational Field with 3 generators ( -- [-1 0 0] [0 0 1] [ 0 0 1] -- [ 0 -1 0] [0 1 0] [-1 0 0] -- [ 0 0 -1], [1 0 0], [ 0 1 0] -+ [ 0 0 1] [1 0 0] [ 1 0 0] -+ [-1 0 0] [0 0 1] [ 0 -1 0] -+ [ 0 1 0], [0 1 0], [ 0 0 1] - ) - - :: -diff --git a/src/sage/rings/finite_rings/finite_field_prime_modn.py b/src/sage/rings/finite_rings/finite_field_prime_modn.py -index 9129ecb56a..d5a4cb8f22 100644 ---- a/src/sage/rings/finite_rings/finite_field_prime_modn.py -+++ b/src/sage/rings/finite_rings/finite_field_prime_modn.py -@@ -111,7 +111,7 @@ class FiniteField_prime_modn(FiniteField_generic, integer_mod_ring.IntegerModRin - sage: RF13 = K.residue_field(pp) - sage: RF13.hom([GF(13)(1)]) - Ring morphism: -- From: Residue field of Fractional ideal (w + 18) -+ From: Residue field of Fractional ideal (-w - 18) - To: Finite Field of size 13 - Defn: 1 |--> 1 - -diff --git a/src/sage/rings/finite_rings/residue_field.pyx b/src/sage/rings/finite_rings/residue_field.pyx -index 7596f2a302..1e1869f1b1 100644 ---- a/src/sage/rings/finite_rings/residue_field.pyx -+++ b/src/sage/rings/finite_rings/residue_field.pyx -@@ -20,13 +20,13 @@ monogenic (i.e., 2 is an essential discriminant divisor):: - - sage: K.<a> = NumberField(x^3 + x^2 - 2*x + 8) - sage: F = K.factor(2); F -- (Fractional ideal (1/2*a^2 - 1/2*a + 1)) * (Fractional ideal (-a^2 + 2*a - 3)) * (Fractional ideal (-3/2*a^2 + 5/2*a - 4)) -+ (Fractional ideal (-1/2*a^2 + 1/2*a - 1)) * (Fractional ideal (-a^2 + 2*a - 3)) * (Fractional ideal (3/2*a^2 - 5/2*a + 4)) - sage: F[0][0].residue_field() -- Residue field of Fractional ideal (1/2*a^2 - 1/2*a + 1) -+ Residue field of Fractional ideal (-1/2*a^2 + 1/2*a - 1) - sage: F[1][0].residue_field() - Residue field of Fractional ideal (-a^2 + 2*a - 3) - sage: F[2][0].residue_field() -- Residue field of Fractional ideal (-3/2*a^2 + 5/2*a - 4) -+ Residue field of Fractional ideal (3/2*a^2 - 5/2*a + 4) - - We can also form residue fields from `\ZZ`:: - -@@ -258,9 +258,9 @@ class ResidueFieldFactory(UniqueFactory): - the index of ``ZZ[a]`` in the maximal order for all ``a``:: - - sage: K.<a> = NumberField(x^3 + x^2 - 2*x + 8); P = K.ideal(2).factor()[0][0]; P -- Fractional ideal (1/2*a^2 - 1/2*a + 1) -+ Fractional ideal (-1/2*a^2 + 1/2*a - 1) - sage: F = K.residue_field(P); F -- Residue field of Fractional ideal (1/2*a^2 - 1/2*a + 1) -+ Residue field of Fractional ideal (-1/2*a^2 + 1/2*a - 1) - sage: F(a) - 0 - sage: B = K.maximal_order().basis(); B -@@ -270,7 +270,7 @@ class ResidueFieldFactory(UniqueFactory): - sage: F(B[2]) - 0 - sage: F -- Residue field of Fractional ideal (1/2*a^2 - 1/2*a + 1) -+ Residue field of Fractional ideal (-1/2*a^2 + 1/2*a - 1) - sage: F.degree() - 1 - -@@ -730,15 +730,15 @@ class ResidueField_generic(Field): - EXAMPLES:: - - sage: I = QQ[3^(1/3)].factor(5)[1][0]; I -- Fractional ideal (-a + 2) -+ Fractional ideal (a - 2) - sage: k = I.residue_field(); k -- Residue field of Fractional ideal (-a + 2) -+ Residue field of Fractional ideal (a - 2) - sage: f = k.lift_map(); f - Lifting map: -- From: Residue field of Fractional ideal (-a + 2) -+ From: Residue field of Fractional ideal (a - 2) - To: Maximal Order in Number Field in a with defining polynomial x^3 - 3 with a = 1.442249570307409? - sage: f.domain() -- Residue field of Fractional ideal (-a + 2) -+ Residue field of Fractional ideal (a - 2) - sage: f.codomain() - Maximal Order in Number Field in a with defining polynomial x^3 - 3 with a = 1.442249570307409? - sage: f(k.0) -@@ -768,7 +768,7 @@ class ResidueField_generic(Field): - - sage: K.<a> = NumberField(x^3-11) - sage: F = K.ideal(37).factor(); F -- (Fractional ideal (37, a + 9)) * (Fractional ideal (37, a + 12)) * (Fractional ideal (2*a - 5)) -+ (Fractional ideal (37, a + 9)) * (Fractional ideal (37, a + 12)) * (Fractional ideal (-2*a + 5)) - sage: k = K.residue_field(F[0][0]) - sage: l = K.residue_field(F[1][0]) - sage: k == l -@@ -846,7 +846,7 @@ cdef class ReductionMap(Map): - sage: F.reduction_map() - Partially defined reduction map: - From: Number Field in a with defining polynomial x^3 + x^2 - 2*x + 8 -- To: Residue field of Fractional ideal (1/2*a^2 - 1/2*a + 1) -+ To: Residue field of Fractional ideal (-1/2*a^2 + 1/2*a - 1) - - sage: K.<theta_5> = CyclotomicField(5) - sage: F = K.factor(7)[0][0].residue_field() -diff --git a/src/sage/rings/number_field/S_unit_solver.py b/src/sage/rings/number_field/S_unit_solver.py -index e99dff850f..759cbfb334 100644 ---- a/src/sage/rings/number_field/S_unit_solver.py -+++ b/src/sage/rings/number_field/S_unit_solver.py -@@ -1781,20 +1781,20 @@ def sieve_ordering(SUK, q): - sage: SUK = K.S_unit_group(S=3) - sage: sieve_data = list(sieve_ordering(SUK, 19)) - sage: sieve_data[0] -- (Fractional ideal (xi - 3), -- Fractional ideal (-2*xi^2 + 3), -+ (Fractional ideal (-2*xi^2 + 3), -+ Fractional ideal (-xi + 3), - Fractional ideal (2*xi + 1)) - - sage: sieve_data[1] -- (Residue field of Fractional ideal (xi - 3), -- Residue field of Fractional ideal (-2*xi^2 + 3), -+ (Residue field of Fractional ideal (-2*xi^2 + 3), -+ Residue field of Fractional ideal (-xi + 3), - Residue field of Fractional ideal (2*xi + 1)) - - sage: sieve_data[2] -- ([18, 7, 16, 4], [18, 9, 12, 8], [18, 3, 10, 10]) -+ ([18, 12, 16, 8], [18, 16, 10, 4], [18, 10, 12, 10]) - - sage: sieve_data[3] -- (486, 648, 11664) -+ (648, 2916, 3888) - """ - - K = SUK.number_field() -diff --git a/src/sage/rings/number_field/bdd_height.py b/src/sage/rings/number_field/bdd_height.py -index beb047ae02..b7c8c33d0b 100644 ---- a/src/sage/rings/number_field/bdd_height.py -+++ b/src/sage/rings/number_field/bdd_height.py -@@ -248,7 +248,7 @@ def bdd_norm_pr_ideal_gens(K, norm_list): - sage: from sage.rings.number_field.bdd_height import bdd_norm_pr_ideal_gens - sage: K.<g> = QuadraticField(123) - sage: bdd_norm_pr_ideal_gens(K, range(5)) -- {0: [0], 1: [1], 2: [-g - 11], 3: [], 4: [2]} -+ {0: [0], 1: [1], 2: [g + 11], 3: [], 4: [2]} - - :: - -diff --git a/src/sage/rings/number_field/class_group.py b/src/sage/rings/number_field/class_group.py -index 018ff5f5c6..73c0462cd1 100644 ---- a/src/sage/rings/number_field/class_group.py -+++ b/src/sage/rings/number_field/class_group.py -@@ -221,11 +221,11 @@ class FractionalIdealClass(AbelianGroupWithValuesElement): - Class group of order 76 with structure C38 x C2 - of Number Field in a with defining polynomial x^2 + 20072 - sage: I = (G.0)^11; I -- Fractional ideal class (41, 1/2*a + 5) -+ Fractional ideal class (33, 1/2*a + 8) - sage: J = G(I.ideal()^5); J -- Fractional ideal class (115856201, 1/2*a + 40407883) -+ Fractional ideal class (39135393, 1/2*a + 13654253) - sage: J.reduce() -- Fractional ideal class (57, 1/2*a + 44) -+ Fractional ideal class (73, 1/2*a + 47) - sage: J == I^5 - True - """ -diff --git a/src/sage/rings/number_field/galois_group.py b/src/sage/rings/number_field/galois_group.py -index 79acd053bb..e060148e4d 100644 ---- a/src/sage/rings/number_field/galois_group.py -+++ b/src/sage/rings/number_field/galois_group.py -@@ -944,7 +944,7 @@ class GaloisGroup_v2(GaloisGroup_perm): - sage: K.<b> = NumberField(x^4 - 2*x^2 + 2, 'a').galois_closure() - sage: G = K.galois_group() - sage: [G.artin_symbol(P) for P in K.primes_above(7)] -- [(1,5)(2,6)(3,7)(4,8), (1,5)(2,6)(3,7)(4,8), (1,4)(2,3)(5,8)(6,7), (1,4)(2,3)(5,8)(6,7)] -+ [(1,4)(2,3)(5,8)(6,7), (1,4)(2,3)(5,8)(6,7), (1,5)(2,6)(3,7)(4,8), (1,5)(2,6)(3,7)(4,8)] - sage: G.artin_symbol(17) - Traceback (most recent call last): - ... -diff --git a/src/sage/rings/number_field/number_field.py b/src/sage/rings/number_field/number_field.py -index 58463d570d..ff65634e99 100644 ---- a/src/sage/rings/number_field/number_field.py -+++ b/src/sage/rings/number_field/number_field.py -@@ -3643,7 +3643,7 @@ class NumberField_generic(WithEqualityById, number_field_base.NumberField): - sage: L.<b> = K.extension(x^2 - 3, x^2 + 1) - sage: M.<c> = L.extension(x^2 + 1) - sage: L.ideal(K.ideal(2, a)) -- Fractional ideal (-a) -+ Fractional ideal (a) - sage: M.ideal(K.ideal(2, a)) == M.ideal(a*(b - c)/2) - True - -@@ -4227,7 +4227,8 @@ class NumberField_generic(WithEqualityById, number_field_base.NumberField): - (y^2 + 6, Mod(1/6*y, y^2 + 6), Mod(6*y, y^2 + 1/6)) - """ - f = self.absolute_polynomial()._pari_with_name('y') -- if f.pollead() == f.content().denominator() == 1: -+ f = f * f.content().denominator() -+ if f.pollead() == 1: - g = f - alpha = beta = g.variable().Mod(g) - else: -@@ -4821,7 +4822,7 @@ class NumberField_generic(WithEqualityById, number_field_base.NumberField): - - sage: K.<a> = NumberField(2*x^2 - 1/3) - sage: K._S_class_group_and_units(tuple(K.primes_above(2) + K.primes_above(3))) -- ([-6*a + 2, 6*a + 3, -1, 12*a + 5], []) -+ ([6*a + 2, 6*a + 3, -1, -12*a + 5], []) - """ - K_pari = self.pari_bnf(proof=proof) - S_pari = [p.pari_prime() for p in sorted(set(S))] -@@ -5166,7 +5167,7 @@ class NumberField_generic(WithEqualityById, number_field_base.NumberField): - - sage: [K.ideal(g).factor() for g in gens] - [(Fractional ideal (2, a + 1)) * (Fractional ideal (3, a + 1)), -- Fractional ideal (-a), -+ Fractional ideal (a), - (Fractional ideal (2, a + 1))^2, - 1] - -@@ -5751,7 +5752,7 @@ class NumberField_generic(WithEqualityById, number_field_base.NumberField): - sage: K.elements_of_norm(3) - [] - sage: K.elements_of_norm(50) -- [-7*a + 1, 5*a - 5, 7*a + 1] -+ [-a - 7, 5*a - 5, 7*a + 1] - - TESTS: - -@@ -5863,7 +5864,7 @@ class NumberField_generic(WithEqualityById, number_field_base.NumberField): - sage: K.factor(1+a) - Fractional ideal (a + 1) - sage: K.factor(1+a/5) -- (Fractional ideal (a + 1)) * (Fractional ideal (-a - 2))^-1 * (Fractional ideal (2*a + 1))^-1 * (Fractional ideal (-3*a - 2)) -+ (Fractional ideal (a + 1)) * (Fractional ideal (-a - 2))^-1 * (Fractional ideal (2*a + 1))^-1 * (Fractional ideal (-2*a + 3)) - - An example over a relative number field:: - -@@ -6460,9 +6461,9 @@ class NumberField_generic(WithEqualityById, number_field_base.NumberField): - sage: new_basis = k.reduced_basis(prec=120) - sage: [c.minpoly() for c in new_basis] - [x - 1, -- x^2 - x + 1, -+ x^2 + x + 1, -+ x^6 + 3*x^5 - 102*x^4 - 103*x^3 + 10572*x^2 - 59919*x + 127657, - x^6 + 3*x^5 - 102*x^4 - 103*x^3 + 10572*x^2 - 59919*x + 127657, -- x^6 - 3*x^5 - 102*x^4 + 315*x^3 + 10254*x^2 - 80955*x + 198147, - x^3 - 171*x + 848, - x^6 + 171*x^4 + 1696*x^3 + 29241*x^2 + 145008*x + 719104] - sage: R = k.order(new_basis) -@@ -7058,7 +7059,7 @@ class NumberField_generic(WithEqualityById, number_field_base.NumberField): - -a^16 - a^15 - a^14 - a^13 - a^12 - a^11 - a^10 - a^9 - a^8 - a^7 - a^6 - a^5 - a^4 - a^3 - a^2 + 2, - -2*a^16 + 3*a^15 - 3*a^14 + 3*a^13 - 3*a^12 + a^11 - a^9 + 3*a^8 - 4*a^7 + 5*a^6 - 6*a^5 + 4*a^4 - 3*a^3 + 2*a^2 + 2*a - 4, - a^15 - a^12 + a^10 - a^9 - 2*a^8 + 3*a^7 + a^6 - 3*a^5 + a^4 + 4*a^3 - 3*a^2 - 2*a + 2, -- -a^14 - a^13 + a^12 + 2*a^10 + a^8 - 2*a^7 - 2*a^6 + 2*a^3 - a^2 + 2*a - 2) -+ 2*a^16 + a^15 - a^11 - 3*a^10 - 4*a^9 - 4*a^8 - 4*a^7 - 5*a^6 - 7*a^5 - 8*a^4 - 6*a^3 - 5*a^2 - 6*a - 7) - - TESTS: - -@@ -7067,7 +7068,7 @@ class NumberField_generic(WithEqualityById, number_field_base.NumberField): - - sage: K.<a> = NumberField(1/2*x^2 - 1/6) - sage: K.units() -- (-3*a + 2,) -+ (3*a - 2,) - """ - proof = proof_flag(proof) - -@@ -7146,7 +7147,7 @@ class NumberField_generic(WithEqualityById, number_field_base.NumberField): - sage: U.gens() - (u0, u1, u2, u3, u4, u5, u6, u7, u8) - sage: U.gens_values() # result not independently verified -- [-1, -a^9 - a + 1, -a^16 + a^15 - a^14 + a^12 - a^11 + a^10 + a^8 - a^7 + 2*a^6 - a^4 + 3*a^3 - 2*a^2 + 2*a - 1, 2*a^16 - a^14 - a^13 + 3*a^12 - 2*a^10 + a^9 + 3*a^8 - 3*a^6 + 3*a^5 + 3*a^4 - 2*a^3 - 2*a^2 + 3*a + 4, a^15 + a^14 + 2*a^11 + a^10 - a^9 + a^8 + 2*a^7 - a^5 + 2*a^3 - a^2 - 3*a + 1, -a^16 - a^15 - a^14 - a^13 - a^12 - a^11 - a^10 - a^9 - a^8 - a^7 - a^6 - a^5 - a^4 - a^3 - a^2 + 2, -2*a^16 + 3*a^15 - 3*a^14 + 3*a^13 - 3*a^12 + a^11 - a^9 + 3*a^8 - 4*a^7 + 5*a^6 - 6*a^5 + 4*a^4 - 3*a^3 + 2*a^2 + 2*a - 4, a^15 - a^12 + a^10 - a^9 - 2*a^8 + 3*a^7 + a^6 - 3*a^5 + a^4 + 4*a^3 - 3*a^2 - 2*a + 2, -a^14 - a^13 + a^12 + 2*a^10 + a^8 - 2*a^7 - 2*a^6 + 2*a^3 - a^2 + 2*a - 2] -+ [-1, -a^9 - a + 1, -a^16 + a^15 - a^14 + a^12 - a^11 + a^10 + a^8 - a^7 + 2*a^6 - a^4 + 3*a^3 - 2*a^2 + 2*a - 1, 2*a^16 - a^14 - a^13 + 3*a^12 - 2*a^10 + a^9 + 3*a^8 - 3*a^6 + 3*a^5 + 3*a^4 - 2*a^3 - 2*a^2 + 3*a + 4, a^15 + a^14 + 2*a^11 + a^10 - a^9 + a^8 + 2*a^7 - a^5 + 2*a^3 - a^2 - 3*a + 1, -a^16 - a^15 - a^14 - a^13 - a^12 - a^11 - a^10 - a^9 - a^8 - a^7 - a^6 - a^5 - a^4 - a^3 - a^2 + 2, -2*a^16 + 3*a^15 - 3*a^14 + 3*a^13 - 3*a^12 + a^11 - a^9 + 3*a^8 - 4*a^7 + 5*a^6 - 6*a^5 + 4*a^4 - 3*a^3 + 2*a^2 + 2*a - 4, a^15 - a^12 + a^10 - a^9 - 2*a^8 + 3*a^7 + a^6 - 3*a^5 + a^4 + 4*a^3 - 3*a^2 - 2*a + 2, 2*a^16 + a^15 - a^11 - 3*a^10 - 4*a^9 - 4*a^8 - 4*a^7 - 5*a^6 - 7*a^5 - 8*a^4 - 6*a^3 - 5*a^2 - 6*a - 7] - """ - proof = proof_flag(proof) - -diff --git a/src/sage/rings/number_field/number_field_element.pyx b/src/sage/rings/number_field/number_field_element.pyx -index 784c239dc1..aa740069dc 100644 ---- a/src/sage/rings/number_field/number_field_element.pyx -+++ b/src/sage/rings/number_field/number_field_element.pyx -@@ -4446,7 +4446,7 @@ cdef class NumberFieldElement(FieldElement): - sage: f = Qi.embeddings(K)[0] - sage: a = f(2+3*i) * (2-zeta)^2 - sage: a.descend_mod_power(Qi,2) -- [-3*i - 2, -2*i + 3] -+ [-2*i + 3, 3*i + 2] - - An absolute example:: - -@@ -5124,7 +5124,7 @@ cdef class NumberFieldElement_relative(NumberFieldElement): - EXAMPLES:: - - sage: K.<a, b, c> = NumberField([x^2 - 2, x^2 - 3, x^2 - 5]) -- sage: P = K.prime_factors(5)[0] -+ sage: P = K.prime_factors(5)[1] - sage: (2*a + b - c).valuation(P) - 1 - """ -diff --git a/src/sage/rings/number_field/number_field_ideal.py b/src/sage/rings/number_field/number_field_ideal.py -index 5f587556a4..33481fead0 100644 ---- a/src/sage/rings/number_field/number_field_ideal.py -+++ b/src/sage/rings/number_field/number_field_ideal.py -@@ -3355,7 +3355,7 @@ def quotient_char_p(I, p): - [] - - sage: I = K.factor(13)[0][0]; I -- Fractional ideal (-3*i - 2) -+ Fractional ideal (-2*i + 3) - sage: I.residue_class_degree() - 1 - sage: quotient_char_p(I, 13)[0] -diff --git a/src/sage/rings/number_field/number_field_ideal_rel.py b/src/sage/rings/number_field/number_field_ideal_rel.py -index bae36d4b9c..f64bd5b761 100644 ---- a/src/sage/rings/number_field/number_field_ideal_rel.py -+++ b/src/sage/rings/number_field/number_field_ideal_rel.py -@@ -272,7 +272,7 @@ class NumberFieldFractionalIdeal_rel(NumberFieldFractionalIdeal): - sage: L.<b> = K.extension(5*x^2 + 1) - sage: P = L.primes_above(2)[0] - sage: P.gens_reduced() -- (2, 15*a*b + 3*a + 1) -+ (2, -15*a*b + 3*a + 1) - """ - try: - # Compute the single generator, if it exists -@@ -401,7 +401,7 @@ class NumberFieldFractionalIdeal_rel(NumberFieldFractionalIdeal): - sage: L.<b> = K.extension(5*x^2 + 1) - sage: P = L.primes_above(2)[0] - sage: P.relative_norm() -- Fractional ideal (-6*a + 2) -+ Fractional ideal (6*a + 2) - """ - L = self.number_field() - K = L.base_field() -@@ -518,7 +518,7 @@ class NumberFieldFractionalIdeal_rel(NumberFieldFractionalIdeal): - sage: L.<b> = K.extension(5*x^2 + 1) - sage: P = L.primes_above(2)[0] - sage: P.ideal_below() -- Fractional ideal (-6*a + 2) -+ Fractional ideal (6*a + 2) - """ - L = self.number_field() - K = L.base_field() -diff --git a/src/sage/rings/number_field/number_field_rel.py b/src/sage/rings/number_field/number_field_rel.py -index d33980c4b1..50e846b205 100644 ---- a/src/sage/rings/number_field/number_field_rel.py -+++ b/src/sage/rings/number_field/number_field_rel.py -@@ -213,14 +213,14 @@ class NumberField_relative(NumberField_generic): - sage: l.<b> = k.extension(5*x^2 + 3); l - Number Field in b with defining polynomial 5*x^2 + 3 over its base field - sage: l.pari_rnf() -- [x^2 + (-1/2*y^2 + y - 3/2)*x + (-1/4*y^3 + 1/4*y^2 - 3/4*y - 13/4), ..., y^4 + 6*y^2 + 1, x^2 + (-1/2*y^2 + y - 3/2)*x + (-1/4*y^3 + 1/4*y^2 - 3/4*y - 13/4)], [0, 0]] -+ [x^2 + (-y^3 + 1/2*y^2 - 6*y + 3/2)*x + (-3/4*y^3 - 1/4*y^2 - 17/4*y - 19/4), ..., y^4 + 6*y^2 + 1, x^2 + (-y^3 + 1/2*y^2 - 6*y + 3/2)*x + (-3/4*y^3 - 1/4*y^2 - 17/4*y - 19/4)], [0, 0]] - sage: b - b - - sage: l.<b> = k.extension(x^2 + 3/5); l - Number Field in b with defining polynomial x^2 + 3/5 over its base field - sage: l.pari_rnf() -- [x^2 + (-1/2*y^2 + y - 3/2)*x + (-1/4*y^3 + 1/4*y^2 - 3/4*y - 13/4), ..., y^4 + 6*y^2 + 1, x^2 + (-1/2*y^2 + y - 3/2)*x + (-1/4*y^3 + 1/4*y^2 - 3/4*y - 13/4)], [0, 0]] -+ [x^2 + (-y^3 + 1/2*y^2 - 6*y + 3/2)*x + (-3/4*y^3 - 1/4*y^2 - 17/4*y - 19/4), ..., y^4 + 6*y^2 + 1, x^2 + (-y^3 + 1/2*y^2 - 6*y + 3/2)*x + (-3/4*y^3 - 1/4*y^2 - 17/4*y - 19/4)], [0, 0]] - sage: b - b - -diff --git a/src/sage/rings/number_field/order.py b/src/sage/rings/number_field/order.py -index 6eca89ed8d..78ef4c3b33 100644 ---- a/src/sage/rings/number_field/order.py -+++ b/src/sage/rings/number_field/order.py -@@ -520,7 +520,7 @@ class Order(IntegralDomain, sage.rings.abc.Order): - sage: k.<a> = NumberField(x^2 + 5077); G = k.class_group(); G - Class group of order 22 with structure C22 of Number Field in a with defining polynomial x^2 + 5077 - sage: G.0 ^ -9 -- Fractional ideal class (11, a + 7) -+ Fractional ideal class (43, a + 13) - sage: Ok = k.maximal_order(); Ok - Maximal Order in Number Field in a with defining polynomial x^2 + 5077 - sage: Ok * (11, a + 7) -diff --git a/src/sage/rings/number_field/selmer_group.py b/src/sage/rings/number_field/selmer_group.py -index c534aaa9f6..6bc67565d2 100644 ---- a/src/sage/rings/number_field/selmer_group.py -+++ b/src/sage/rings/number_field/selmer_group.py -@@ -491,7 +491,7 @@ def pSelmerGroup(K, S, p, proof=None, debug=False): - - sage: [K.ideal(g).factor() for g in gens] - [(Fractional ideal (2, a + 1)) * (Fractional ideal (3, a + 1)), -- Fractional ideal (-a), -+ Fractional ideal (a), - (Fractional ideal (2, a + 1))^2, - 1] - -diff --git a/src/sage/rings/polynomial/polynomial_quotient_ring.py b/src/sage/rings/polynomial/polynomial_quotient_ring.py -index bb5d8356be..8a7e5fa66f 100644 ---- a/src/sage/rings/polynomial/polynomial_quotient_ring.py -+++ b/src/sage/rings/polynomial/polynomial_quotient_ring.py -@@ -1791,7 +1791,7 @@ class PolynomialQuotientRing_generic(CommutativeRing): - sage: D.selmer_generators([K.ideal(2, -a+1), K.ideal(3, a+1)], 3) - [2, a + 1] - sage: D.selmer_generators([K.ideal(2, -a+1), K.ideal(3, a+1), K.ideal(a)], 3) -- [2, a + 1, a] -+ [2, a + 1, -a] - - """ - fields, isos, iso_classes = self._S_decomposition(tuple(S)) -diff --git a/src/sage/rings/qqbar.py b/src/sage/rings/qqbar.py -index 704b77ce5f..83ee4549e4 100644 ---- a/src/sage/rings/qqbar.py -+++ b/src/sage/rings/qqbar.py -@@ -312,8 +312,8 @@ and we get a way to produce the number directly:: - True - sage: sage_input(n) - R.<y> = QQ[] -- v = AA.polynomial_root(AA.common_polynomial(y^4 - 4*y^2 + 1), RIF(RR(0.51763809020504148), RR(0.51763809020504159))) -- -109*v^3 - 89*v^2 + 327*v + 178 -+ v = AA.polynomial_root(AA.common_polynomial(y^4 - 4*y^2 + 1), RIF(-RR(1.9318516525781366), -RR(1.9318516525781364))) -+ -109*v^3 + 89*v^2 + 327*v - 178 - - We can also see that some computations (basically, those which are - easy to perform exactly) are performed directly, instead of storing -@@ -362,7 +362,7 @@ algorithms in :trac:`10255`:: - # Verified - R1.<x> = QQbar[] - R2.<y> = QQ[] -- v = AA.polynomial_root(AA.common_polynomial(y^4 - 4*y^2 + 1), RIF(RR(0.51763809020504148), RR(0.51763809020504159))) -+ v = AA.polynomial_root(AA.common_polynomial(y^4 - 4*y^2 + 1), RIF(-RR(1.9318516525781366), -RR(1.9318516525781364))) - AA.polynomial_root(AA.common_polynomial(x^4 + QQbar(v^3 - 3*v - 1)*x^3 + QQbar(-v^3 + 3*v - 3)*x^2 + QQbar(-3*v^3 + 9*v + 3)*x + QQbar(3*v^3 - 9*v)), RIF(RR(0.99999999999999989), RR(1.0000000000000002))) - sage: one - 1 -@@ -2310,7 +2310,7 @@ def do_polred(poly, threshold=32): - cost = 2 * bitsize.nbits() + 5 * poly.degree().nbits() - if cost > threshold: - return parent.gen(), parent.gen(), poly -- new_poly, elt_back = poly.__pari__().polredbest(flag=1) -+ new_poly, elt_back = poly.numerator().__pari__().polredbest(flag=1) - elt_fwd = elt_back.modreverse() - return parent(elt_fwd.lift()), parent(elt_back.lift()), parent(new_poly) - -@@ -2542,10 +2542,10 @@ def number_field_elements_from_algebraics(numbers, minimal=False, same_field=Fal - Defn: a |--> 1.414213562373095?) - - sage: number_field_elements_from_algebraics((rt2,rt3)) -- (Number Field in a with defining polynomial y^4 - 4*y^2 + 1, [-a^3 + 3*a, -a^2 + 2], Ring morphism: -+ (Number Field in a with defining polynomial y^4 - 4*y^2 + 1, [-a^3 + 3*a, a^2 - 2], Ring morphism: - From: Number Field in a with defining polynomial y^4 - 4*y^2 + 1 - To: Algebraic Real Field -- Defn: a |--> 0.5176380902050415?) -+ Defn: a |--> -1.931851652578137?) - - ``rt3a`` is a real number in ``QQbar``. Ordinarily, we'd get a homomorphism - to ``AA`` (because all elements are real), but if we specify ``same_field=True``, -@@ -2570,7 +2570,7 @@ def number_field_elements_from_algebraics(numbers, minimal=False, same_field=Fal - (Number Field in a with defining polynomial y^4 - 4*y^2 + 1, -a^3 + 3*a, Ring morphism: - From: Number Field in a with defining polynomial y^4 - 4*y^2 + 1 - To: Algebraic Real Field -- Defn: a |--> 0.5176380902050415?) -+ Defn: a |--> -1.931851652578137?) - - We can specify ``minimal=True`` if we want the smallest number field:: - -@@ -2618,7 +2618,7 @@ def number_field_elements_from_algebraics(numbers, minimal=False, same_field=Fal - sage: nfI^2 - -1 - sage: sum = nfrt2 + nfrt3 + nfI + nfz3; sum -- 2*a^6 + a^5 - a^4 - a^3 - 2*a^2 - a -+ a^5 + a^4 - a^3 + 2*a^2 - a - 1 - sage: hom(sum) - 2.646264369941973? + 1.866025403784439?*I - sage: hom(sum) == rt2 + rt3 + qqI + z3 -@@ -2658,7 +2658,7 @@ def number_field_elements_from_algebraics(numbers, minimal=False, same_field=Fal - sage: nf, nums, hom = number_field_elements_from_algebraics(elems, embedded=True) - sage: nf - Number Field in a with defining polynomial y^24 - 6*y^23 ...- 9*y^2 + 1 -- with a = 0.2598678911433438? + 0.0572892247058457?*I -+ with a = 0.2598679? + 0.0572892?*I - sage: list(map(QQbar, nums)) == elems == list(map(hom, nums)) - True - -@@ -2725,7 +2725,7 @@ def number_field_elements_from_algebraics(numbers, minimal=False, same_field=Fal - sqrt(2), AA.polynomial_root(x^3-3, RIF(0,3)), 11/9, 1] - sage: res = number_field_elements_from_algebraics(my_nums, embedded=True) - sage: res[0] -- Number Field in a with defining polynomial y^24 - 107010*y^22 - 24*y^21 + ... + 250678447193040618624307096815048024318853254384 with a = -95.5053039433554? -+ Number Field in a with defining polynomial y^24 - 107010*y^22 - 24*y^21 + ... + 250678447193040618624307096815048024318853254384 with a = 93.32530798172420? - """ - gen = qq_generator - -@@ -3129,7 +3129,7 @@ class AlgebraicGenerator(SageObject): - sage: root = ANRoot(x^2 - x - 1, RIF(1, 2)) - sage: gen = AlgebraicGenerator(nf, root) - sage: gen.pari_field() -- [y^2 - y - 1, [2, 0], ...] -+ [[y^2 - y - 1, [2, 0], ...] - """ - if self.is_trivial(): - raise ValueError("No PARI field attached to trivial generator") -@@ -3213,7 +3213,7 @@ class AlgebraicGenerator(SageObject): - sage: qq_generator.union(gen3) is gen3 - True - sage: gen2.union(gen3) -- Number Field in a with defining polynomial y^4 - 4*y^2 + 1 with a in 0.5176380902050415? -+ Number Field in a with defining polynomial y^4 - 4*y^2 + 1 with a in -1.931851652578137? - """ - if self._trivial: - return other -@@ -3306,13 +3306,13 @@ class AlgebraicGenerator(SageObject): - Number Field in a with defining polynomial y^2 - 3 with a in 1.732050807568878? - sage: gen2_3 = gen2.union(gen3) - sage: gen2_3 -- Number Field in a with defining polynomial y^4 - 4*y^2 + 1 with a in 0.5176380902050415? -+ Number Field in a with defining polynomial y^4 - 4*y^2 + 1 with a in -1.931851652578137? - sage: qq_generator.super_poly(gen2) is None - True - sage: gen2.super_poly(gen2_3) - -a^3 + 3*a - sage: gen3.super_poly(gen2_3) -- -a^2 + 2 -+ a^2 - 2 - - """ - if checked is None: -@@ -3360,13 +3360,13 @@ class AlgebraicGenerator(SageObject): - sage: sqrt3 = ANExtensionElement(gen3, nf3.gen()) - sage: gen2_3 = gen2.union(gen3) - sage: gen2_3 -- Number Field in a with defining polynomial y^4 - 4*y^2 + 1 with a in 0.5176380902050415? -+ Number Field in a with defining polynomial y^4 - 4*y^2 + 1 with a in -1.931851652578137? - sage: gen2_3(sqrt2) - -a^3 + 3*a - sage: gen2_3(ANRational(1/7)) - 1/7 - sage: gen2_3(sqrt3) -- -a^2 + 2 -+ a^2 - 2 - """ - if self._trivial: - return elt._value -@@ -4336,10 +4336,10 @@ class AlgebraicNumber_base(sage.structure.element.FieldElement): - sage: rt3 = AA(sqrt(3)) - sage: rt3b = rt2 + rt3 - rt2 - sage: rt3b.as_number_field_element() -- (Number Field in a with defining polynomial y^4 - 4*y^2 + 1, -a^2 + 2, Ring morphism: -+ (Number Field in a with defining polynomial y^4 - 4*y^2 + 1, a^2 - 2, Ring morphism: - From: Number Field in a with defining polynomial y^4 - 4*y^2 + 1 - To: Algebraic Real Field -- Defn: a |--> 0.5176380902050415?) -+ Defn: a |--> -1.931851652578137?) - sage: rt3b.as_number_field_element(minimal=True) - (Number Field in a with defining polynomial y^2 - 3, a, Ring morphism: - From: Number Field in a with defining polynomial y^2 - 3 -@@ -4401,7 +4401,7 @@ class AlgebraicNumber_base(sage.structure.element.FieldElement): - sage: rt2b = rt3 + rt2 - rt3 - sage: rt2b.exactify() - sage: rt2b._exact_value() -- a^3 - 3*a where a^4 - 4*a^2 + 1 = 0 and a in 1.931851652578137? -+ a^3 - 3*a where a^4 - 4*a^2 + 1 = 0 and a in -0.5176380902050415? - sage: rt2b.simplify() - sage: rt2b._exact_value() - a where a^2 - 2 = 0 and a in 1.414213562373095? -@@ -4422,7 +4422,7 @@ class AlgebraicNumber_base(sage.structure.element.FieldElement): - sage: QQbar(2)._exact_field() - Trivial generator - sage: (sqrt(QQbar(2)) + sqrt(QQbar(19)))._exact_field() -- Number Field in a with defining polynomial y^4 - 20*y^2 + 81 with a in 2.375100220297941? -+ Number Field in a with defining polynomial y^4 - 20*y^2 + 81 with a in -3.789313782671036? - sage: (QQbar(7)^(3/5))._exact_field() - Number Field in a with defining polynomial y^5 - 2*y^4 - 18*y^3 + 38*y^2 + 82*y - 181 with a in 2.554256611698490? - """ -@@ -4442,7 +4442,7 @@ class AlgebraicNumber_base(sage.structure.element.FieldElement): - sage: QQbar(2)._exact_value() - 2 - sage: (sqrt(QQbar(2)) + sqrt(QQbar(19)))._exact_value() -- -1/9*a^3 - a^2 + 11/9*a + 10 where a^4 - 20*a^2 + 81 = 0 and a in 2.375100220297941? -+ -1/9*a^3 + a^2 + 11/9*a - 10 where a^4 - 20*a^2 + 81 = 0 and a in -3.789313782671036? - sage: (QQbar(7)^(3/5))._exact_value() - 2*a^4 + 2*a^3 - 34*a^2 - 17*a + 150 where a^5 - 2*a^4 - 18*a^3 + 38*a^2 + 82*a - 181 = 0 and a in 2.554256611698490? - """ -@@ -6857,7 +6857,7 @@ class AlgebraicPolynomialTracker(SageObject): - sage: p = sqrt(AA(2)) * x^2 - sqrt(AA(3)) - sage: cp = AA.common_polynomial(p) - sage: cp.generator() -- Number Field in a with defining polynomial y^4 - 4*y^2 + 1 with a in 1.931851652578137? -+ Number Field in a with defining polynomial y^4 - 4*y^2 + 1 with a in -0.5176380902050415? - """ - self.exactify() - return self._gen -@@ -7706,7 +7706,7 @@ class ANExtensionElement(ANDescr): - - sage: rt2b.exactify() - sage: rt2b._descr -- a^3 - 3*a where a^4 - 4*a^2 + 1 = 0 and a in 1.931851652578137? -+ a^3 - 3*a where a^4 - 4*a^2 + 1 = 0 and a in -0.5176380902050415? - sage: rt2b._descr.is_simple() - False - """ -@@ -7791,7 +7791,7 @@ class ANExtensionElement(ANDescr): - sage: rt2b = rt3 + rt2 - rt3 - sage: rt2b.exactify() - sage: rt2b._descr -- a^3 - 3*a where a^4 - 4*a^2 + 1 = 0 and a in 1.931851652578137? -+ a^3 - 3*a where a^4 - 4*a^2 + 1 = 0 and a in -0.5176380902050415? - sage: rt2b._descr.simplify(rt2b) - a where a^2 - 2 = 0 and a in 1.414213562373095? - """ -@@ -7830,9 +7830,9 @@ class ANExtensionElement(ANDescr): - sage: type(b) - <class 'sage.rings.qqbar.ANExtensionElement'> - sage: b.neg(a) -- 1/3*a^3 - 2/3*a^2 + 4/3*a - 2 where a^4 - 2*a^3 + a^2 - 6*a + 9 = 0 and a in -0.7247448713915890? - 1.573132184970987?*I -+ -1/3*a^3 + 1/3*a^2 - a - 1 where a^4 - 2*a^3 + a^2 + 6*a + 3 = 0 and a in 1.724744871391589? + 1.573132184970987?*I - sage: b.neg("ham spam and eggs") -- 1/3*a^3 - 2/3*a^2 + 4/3*a - 2 where a^4 - 2*a^3 + a^2 - 6*a + 9 = 0 and a in -0.7247448713915890? - 1.573132184970987?*I -+ -1/3*a^3 + 1/3*a^2 - a - 1 where a^4 - 2*a^3 + a^2 + 6*a + 3 = 0 and a in 1.724744871391589? + 1.573132184970987?*I - """ - return ANExtensionElement(self._generator, -self._value) - -@@ -7848,9 +7848,9 @@ class ANExtensionElement(ANDescr): - sage: type(b) - <class 'sage.rings.qqbar.ANExtensionElement'> - sage: b.invert(a) -- 7/3*a^3 - 2/3*a^2 + 4/3*a - 12 where a^4 - 2*a^3 + a^2 - 6*a + 9 = 0 and a in -0.7247448713915890? - 1.573132184970987?*I -+ -7/3*a^3 + 19/3*a^2 - 7*a - 9 where a^4 - 2*a^3 + a^2 + 6*a + 3 = 0 and a in 1.724744871391589? + 1.573132184970987?*I - sage: b.invert("ham spam and eggs") -- 7/3*a^3 - 2/3*a^2 + 4/3*a - 12 where a^4 - 2*a^3 + a^2 - 6*a + 9 = 0 and a in -0.7247448713915890? - 1.573132184970987?*I -+ -7/3*a^3 + 19/3*a^2 - 7*a - 9 where a^4 - 2*a^3 + a^2 + 6*a + 3 = 0 and a in 1.724744871391589? + 1.573132184970987?*I - """ - return ANExtensionElement(self._generator, ~self._value) - -@@ -7866,9 +7866,9 @@ class ANExtensionElement(ANDescr): - sage: type(b) - <class 'sage.rings.qqbar.ANExtensionElement'> - sage: b.conjugate(a) -- -1/3*a^3 + 2/3*a^2 - 4/3*a + 2 where a^4 - 2*a^3 + a^2 - 6*a + 9 = 0 and a in -0.7247448713915890? + 1.573132184970987?*I -+ 1/3*a^3 - 1/3*a^2 + a + 1 where a^4 - 2*a^3 + a^2 + 6*a + 3 = 0 and a in 1.724744871391589? - 1.573132184970987?*I - sage: b.conjugate("ham spam and eggs") -- -1/3*a^3 + 2/3*a^2 - 4/3*a + 2 where a^4 - 2*a^3 + a^2 - 6*a + 9 = 0 and a in -0.7247448713915890? + 1.573132184970987?*I -+ 1/3*a^3 - 1/3*a^2 + a + 1 where a^4 - 2*a^3 + a^2 + 6*a + 3 = 0 and a in 1.724744871391589? - 1.573132184970987?*I - """ - if self._exactly_real: - return self -@@ -8501,7 +8501,7 @@ def an_binop_expr(a, b, op): - sage: x = an_binop_expr(a, b, operator.add); x - <sage.rings.qqbar.ANBinaryExpr object at ...> - sage: x.exactify() -- -6/7*a^7 + 2/7*a^6 + 71/7*a^5 - 26/7*a^4 - 125/7*a^3 + 72/7*a^2 + 43/7*a - 47/7 where a^8 - 12*a^6 + 23*a^4 - 12*a^2 + 1 = 0 and a in 3.12580...? -+ 6/7*a^7 - 2/7*a^6 - 71/7*a^5 + 26/7*a^4 + 125/7*a^3 - 72/7*a^2 - 43/7*a + 47/7 where a^8 - 12*a^6 + 23*a^4 - 12*a^2 + 1 = 0 and a in -0.3199179336182997? - - sage: a = QQbar(sqrt(2)) + QQbar(sqrt(3)) - sage: b = QQbar(sqrt(3)) + QQbar(sqrt(5)) -@@ -8510,7 +8510,7 @@ def an_binop_expr(a, b, op): - sage: x = an_binop_expr(a, b, operator.mul); x - <sage.rings.qqbar.ANBinaryExpr object at ...> - sage: x.exactify() -- 2*a^7 - a^6 - 24*a^5 + 12*a^4 + 46*a^3 - 22*a^2 - 22*a + 9 where a^8 - 12*a^6 + 23*a^4 - 12*a^2 + 1 = 0 and a in 3.1258...? -+ 2*a^7 - a^6 - 24*a^5 + 12*a^4 + 46*a^3 - 22*a^2 - 22*a + 9 where a^8 - 12*a^6 + 23*a^4 - 12*a^2 + 1 = 0 and a in -0.3199179336182997? - """ - return ANBinaryExpr(a, b, op) - -diff --git a/src/sage/schemes/affine/affine_morphism.py b/src/sage/schemes/affine/affine_morphism.py -index 1c4f2dff18..32c2e47e49 100644 ---- a/src/sage/schemes/affine/affine_morphism.py -+++ b/src/sage/schemes/affine/affine_morphism.py -@@ -1148,9 +1148,9 @@ class SchemeMorphism_polynomial_affine_space_field(SchemeMorphism_polynomial_aff - sage: H = End(A) - sage: f = H([(QQbar(sqrt(2))*x^2 + 1/QQbar(sqrt(3))) / (5*x)]) - sage: f.reduce_base_field() -- Scheme endomorphism of Affine Space of dimension 1 over Number Field in a with defining polynomial y^4 - 4*y^2 + 1 with a = 1.931851652578137? -+ Scheme endomorphism of Affine Space of dimension 1 over Number Field in a with defining polynomial y^4 - 4*y^2 + 1 with a = ...? - Defn: Defined on coordinates by sending (x) to -- (((a^3 - 3*a)*x^2 + (1/3*a^2 - 2/3))/(5*x)) -+ (((a^3 - 3*a)*x^2 + (-1/3*a^2 + 2/3))/(5*x)) - - :: - -diff --git a/src/sage/schemes/elliptic_curves/ell_field.py b/src/sage/schemes/elliptic_curves/ell_field.py -index 68b8375dae..48f358ea6a 100644 ---- a/src/sage/schemes/elliptic_curves/ell_field.py -+++ b/src/sage/schemes/elliptic_curves/ell_field.py -@@ -845,7 +845,7 @@ class EllipticCurve_field(ell_generic.EllipticCurve_generic, ProjectivePlaneCurv - sage: E = E.base_extend(G).quadratic_twist(c); E - Elliptic Curve defined by y^2 = x^3 + 5*a0*x^2 + (-200*a0^2)*x + (-42000*a0^2+42000*a0+126000) over Number Field in a0 with defining polynomial x^3 - 3*x^2 + 3*x + 9 - sage: K.<b> = E.division_field(3, simplify_all=True); K -- Number Field in b with defining polynomial x^12 - 10*x^10 + 55*x^8 - 60*x^6 + 75*x^4 + 1350*x^2 + 2025 -+ Number Field in b with defining polynomial x^12 + 5*x^10 + 40*x^8 + 315*x^6 + 750*x^4 + 675*x^2 + 2025 - - Some higher-degree examples:: - -diff --git a/src/sage/schemes/elliptic_curves/ell_generic.py b/src/sage/schemes/elliptic_curves/ell_generic.py -index 926ae310ea..3bae819fb0 100644 ---- a/src/sage/schemes/elliptic_curves/ell_generic.py -+++ b/src/sage/schemes/elliptic_curves/ell_generic.py -@@ -3324,8 +3324,8 @@ class EllipticCurve_generic(WithEqualityById, plane_curve.ProjectivePlaneCurve): - sage: K.<a> = QuadraticField(2) - sage: E = EllipticCurve([1,a]) - sage: E.pari_curve() -- [Mod(0, y^2 - 2), Mod(0, y^2 - 2), Mod(0, y^2 - 2), Mod(1, y^2 - 2), -- Mod(y, y^2 - 2), Mod(0, y^2 - 2), Mod(2, y^2 - 2), Mod(4*y, y^2 - 2), -+ [0, 0, 0, Mod(1, y^2 - 2), -+ Mod(y, y^2 - 2), 0, Mod(2, y^2 - 2), Mod(4*y, y^2 - 2), - Mod(-1, y^2 - 2), Mod(-48, y^2 - 2), Mod(-864*y, y^2 - 2), - Mod(-928, y^2 - 2), Mod(3456/29, y^2 - 2), Vecsmall([5]), - [[y^2 - 2, [2, 0], 8, 1, [[1, -1.41421356237310; -diff --git a/src/sage/schemes/elliptic_curves/ell_number_field.py b/src/sage/schemes/elliptic_curves/ell_number_field.py -index edbd196090..c44c803aa8 100644 ---- a/src/sage/schemes/elliptic_curves/ell_number_field.py -+++ b/src/sage/schemes/elliptic_curves/ell_number_field.py -@@ -218,7 +218,7 @@ class EllipticCurve_number_field(EllipticCurve_field): - sage: E == loads(dumps(E)) - True - sage: E.simon_two_descent() -- (2, 2, [(0 : 0 : 1)]) -+ (2, 2, [(0 : 0 : 1), (1/18*a + 7/18 : -5/54*a - 17/54 : 1)]) - sage: E.simon_two_descent(lim1=5, lim3=5, limtriv=10, maxprob=7, limbigprime=10) - (2, 2, [(-1 : 0 : 1), (-2 : -1/2*a - 1/2 : 1)]) - -@@ -274,7 +274,7 @@ class EllipticCurve_number_field(EllipticCurve_field): - sage: E.simon_two_descent() # long time (4s on sage.math, 2013) - (3, - 3, -- [(5/8*zeta43_0^2 + 17/8*zeta43_0 - 9/4 : -27/16*zeta43_0^2 - 103/16*zeta43_0 + 39/8 : 1), -+ [(1/8*zeta43_0^2 - 3/8*zeta43_0 - 1/4 : -5/16*zeta43_0^2 + 7/16*zeta43_0 + 1/8 : 1), - (0 : 0 : 1)]) - """ - verbose = int(verbose) -@@ -865,7 +865,7 @@ class EllipticCurve_number_field(EllipticCurve_field): - Conductor exponent: 1 - Kodaira Symbol: I1 - Tamagawa Number: 1, -- Local data at Fractional ideal (-3*i - 2): -+ Local data at Fractional ideal (-2*i + 3): - Reduction type: bad split multiplicative - Local minimal model: Elliptic Curve defined by y^2 + (i+1)*x*y + y = x^3 over Number Field in i with defining polynomial x^2 + 1 - Minimal discriminant valuation: 2 -@@ -2645,12 +2645,12 @@ class EllipticCurve_number_field(EllipticCurve_field): - [-92, -23, -23] - - sage: C.matrix() # long time -- [1 2 2 4 2 4] -- [2 1 2 2 4 4] -- [2 2 1 4 4 2] -- [4 2 4 1 3 3] -- [2 4 4 3 1 3] -- [4 4 2 3 3 1] -+ [1 2 2 4 4 2] -+ [2 1 2 4 2 4] -+ [2 2 1 2 4 4] -+ [4 4 2 1 3 3] -+ [4 2 4 3 1 3] -+ [2 4 4 3 3 1] - - The graph of this isogeny class has a shape which does not - occur over `\QQ`: a triangular prism. Note that for curves -@@ -2677,12 +2677,12 @@ class EllipticCurve_number_field(EllipticCurve_field): - - sage: G = C.graph() # long time - sage: G.adjacency_matrix() # long time -- [0 1 1 0 1 0] -- [1 0 1 1 0 0] -- [1 1 0 0 0 1] -- [0 1 0 0 1 1] -- [1 0 0 1 0 1] -- [0 0 1 1 1 0] -+ [0 1 1 0 0 1] -+ [1 0 1 0 1 0] -+ [1 1 0 1 0 0] -+ [0 0 1 0 1 1] -+ [0 1 0 1 0 1] -+ [1 0 0 1 1 0] - - To display the graph without any edge labels:: - -@@ -3316,7 +3316,7 @@ class EllipticCurve_number_field(EllipticCurve_field): - sage: points = [E.lift_x(x) for x in xi] - sage: newpoints, U = E.lll_reduce(points) # long time (35s on sage.math, 2011) - sage: [P[0] for P in newpoints] # long time -- [6823803569166584943, 5949539878899294213, 2005024558054813068, 5864879778877955778, 23955263915878682727/4, 5922188321411938518, 5286988283823825378, 175620639884534615751/25, -11451575907286171572, 3502708072571012181, 1500143935183238709184/225, 27180522378120223419/4, -5811874164190604461581/625, 26807786527159569093, 7404442636649562303, 475656155255883588, 265757454726766017891/49, 7272142121019825303, 50628679173833693415/4, 6951643522366348968, 6842515151518070703, 111593750389650846885/16, 2607467890531740394315/9, -1829928525835506297] -+ [6823803569166584943, 5949539878899294213, 2005024558054813068, 5864879778877955778, 23955263915878682727/4, 5922188321411938518, 5286988283823825378, 11465667352242779838, -11451575907286171572, 3502708072571012181, 1500143935183238709184/225, 27180522378120223419/4, -5811874164190604461581/625, 26807786527159569093, 7041412654828066743, 475656155255883588, 265757454726766017891/49, 7272142121019825303, 50628679173833693415/4, 6951643522366348968, 6842515151518070703, 111593750389650846885/16, 2607467890531740394315/9, -1829928525835506297] - - An example to show the explicit use of the height pairing matrix:: - -diff --git a/src/sage/schemes/elliptic_curves/ell_rational_field.py b/src/sage/schemes/elliptic_curves/ell_rational_field.py -index 3808822812..a75290ea35 100644 ---- a/src/sage/schemes/elliptic_curves/ell_rational_field.py -+++ b/src/sage/schemes/elliptic_curves/ell_rational_field.py -@@ -1827,7 +1827,7 @@ class EllipticCurve_rational_field(EllipticCurve_number_field): - sage: E = EllipticCurve('389a1') - sage: E._known_points = [] # clear cached points - sage: E.simon_two_descent() -- (2, 2, [(1 : 0 : 1), (-11/9 : 28/27 : 1)]) -+ (2, 2, [(5/4 : 5/8 : 1), (-3/4 : 7/8 : 1)]) - sage: E = EllipticCurve('5077a1') - sage: E.simon_two_descent() - (3, 3, [(1 : 0 : 1), (2 : 0 : 1), (0 : 2 : 1)]) -diff --git a/src/sage/schemes/elliptic_curves/gal_reps_number_field.py b/src/sage/schemes/elliptic_curves/gal_reps_number_field.py -index 81ad295160..d484a4a18b 100644 ---- a/src/sage/schemes/elliptic_curves/gal_reps_number_field.py -+++ b/src/sage/schemes/elliptic_curves/gal_reps_number_field.py -@@ -780,12 +780,12 @@ def deg_one_primes_iter(K, principal_only=False): - [Fractional ideal (2, a + 1), - Fractional ideal (3, a + 1), - Fractional ideal (3, a + 2), -- Fractional ideal (-a), -+ Fractional ideal (a), - Fractional ideal (7, a + 3), - Fractional ideal (7, a + 4)] - sage: it = deg_one_primes_iter(K, True) - sage: [next(it) for _ in range(6)] -- [Fractional ideal (-a), -+ [Fractional ideal (a), - Fractional ideal (-2*a + 3), - Fractional ideal (2*a + 3), - Fractional ideal (a + 6), -diff --git a/src/sage/schemes/elliptic_curves/gp_simon.py b/src/sage/schemes/elliptic_curves/gp_simon.py -index 28b97f34af..9f7d1b6020 100644 ---- a/src/sage/schemes/elliptic_curves/gp_simon.py -+++ b/src/sage/schemes/elliptic_curves/gp_simon.py -@@ -56,7 +56,7 @@ def simon_two_descent(E, verbose=0, lim1=None, lim3=None, limtriv=None, - sage: import sage.schemes.elliptic_curves.gp_simon - sage: E=EllipticCurve('389a1') - sage: sage.schemes.elliptic_curves.gp_simon.simon_two_descent(E) -- (2, 2, [(1 : 0 : 1), (-11/9 : 28/27 : 1)]) -+ (2, 2, [(5/4 : 5/8 : 1), (-3/4 : 7/8 : 1)]) - - TESTS:: - -@@ -117,7 +117,7 @@ def simon_two_descent(E, verbose=0, lim1=None, lim3=None, limtriv=None, - # The block below mimics the defaults in Simon's scripts, and needs to be changed - # when these are updated. - if K is QQ: -- cmd = 'ellrank(%s, %s);' % (list(E.ainvs()), [P.__pari__() for P in known_points]) -+ cmd = 'ellQ_ellrank(%s, %s);' % (list(E.ainvs()), [P.__pari__() for P in known_points]) - if lim1 is None: - lim1 = 5 - if lim3 is None: -@@ -144,7 +144,7 @@ def simon_two_descent(E, verbose=0, lim1=None, lim3=None, limtriv=None, - if verbose > 0: - print(s) - v = gp.eval('ans') -- if v=='ans': # then the call to ellrank() or bnfellrank() failed -+ if v=='ans': # then the call to ellQ_ellrank() or bnfellrank() failed - raise RuntimeError("An error occurred while running Simon's 2-descent program") - if verbose >= 2: - print("v = %s" % v) -diff --git a/src/sage/schemes/elliptic_curves/isogeny_small_degree.py b/src/sage/schemes/elliptic_curves/isogeny_small_degree.py -index a936deb74f..dc19254d8c 100644 ---- a/src/sage/schemes/elliptic_curves/isogeny_small_degree.py -+++ b/src/sage/schemes/elliptic_curves/isogeny_small_degree.py -@@ -1208,14 +1208,14 @@ def isogenies_13_0(E, minimal_models=True): - sage: [phi.codomain().ainvs() for phi in isogenies_13_0(E)] # long time (4s) - [(0, - 0, -- 20360599/165164973653422080*a^11 - 3643073/41291243413355520*a^10 - 101/8789110986240*a^9 + 5557619461/573489491852160*a^8 - 82824971/11947697746920*a^7 - 19487/21127670640*a^6 - 475752603733/29409717530880*a^5 + 87205112531/7352429382720*a^4 + 8349/521670880*a^3 + 5858744881/12764634345*a^2 - 1858703809/2836585410*a + 58759402/48906645, -+ 20360599/165164973653422080*a^11 - 3643073/41291243413355520*a^10 + 1887439/1146978983704320*a^9 + 5557619461/573489491852160*a^8 - 82824971/11947697746920*a^7 + 1030632647/7965131831280*a^6 - 475752603733/29409717530880*a^5 + 87205112531/7352429382720*a^4 - 43618899433/204234149520*a^3 + 5858744881/12764634345*a^2 - 1858703809/2836585410*a + 2535050171/1418292705, - -139861295/2650795873449984*a^11 - 3455957/5664093746688*a^10 - 345310571/50976843720192*a^9 - 500530795/118001953056*a^8 - 12860048113/265504394376*a^7 - 25007420461/44250732396*a^6 + 458134176455/1416023436672*a^5 + 16701880631/9077073312*a^4 + 155941666417/9077073312*a^3 + 3499310115/378211388*a^2 - 736774863/94552847*a - 21954102381/94552847, -- 579363345221/13763747804451840*a^11 + 371192377511/860234237778240*a^10 + 8855090365657/1146978983704320*a^9 + 5367261541663/1633873196160*a^8 + 614883554332193/15930263662560*a^7 + 30485197378483/68078049840*a^6 - 131000897588387/2450809794240*a^5 - 203628705777949/306351224280*a^4 - 1587619388190379/204234149520*a^3 + 14435069706551/11346341640*a^2 + 7537273048614/472764235*a + 89198980034806/472764235), -+ 8342795944891/198197968384106496*a^11 + 8908625263589/20645621706677760*a^10 + 53130542636623/6881873902225920*a^9 + 376780111042213/114697898370432*a^8 + 614884052146333/15930263662560*a^7 + 3566768133324359/7965131831280*a^6 - 1885593809102545/35291661037056*a^5 - 2443732172026523/3676214691360*a^4 - 9525729503937541/1225404897120*a^3 + 51990274442321/40846829904*a^2 + 67834019370596/4254878115*a + 267603083706812/1418292705), - (0, - 0, -- 20360599/165164973653422080*a^11 - 3643073/41291243413355520*a^10 - 101/8789110986240*a^9 + 5557619461/573489491852160*a^8 - 82824971/11947697746920*a^7 - 19487/21127670640*a^6 - 475752603733/29409717530880*a^5 + 87205112531/7352429382720*a^4 + 8349/521670880*a^3 + 5858744881/12764634345*a^2 - 1858703809/2836585410*a + 58759402/48906645, -+ 20360599/165164973653422080*a^11 - 3643073/41291243413355520*a^10 + 1887439/1146978983704320*a^9 + 5557619461/573489491852160*a^8 - 82824971/11947697746920*a^7 + 1030632647/7965131831280*a^6 - 475752603733/29409717530880*a^5 + 87205112531/7352429382720*a^4 - 43618899433/204234149520*a^3 + 5858744881/12764634345*a^2 - 1858703809/2836585410*a + 2535050171/1418292705, - -6465569317/1325397936724992*a^11 - 112132307/1960647835392*a^10 - 17075412917/25488421860096*a^9 - 207832519229/531008788752*a^8 - 1218275067617/265504394376*a^7 - 9513766502551/177002929584*a^6 + 4297077855437/708011718336*a^5 + 354485975837/4538536656*a^4 + 4199379308059/4538536656*a^3 - 30841577919/189105694*a^2 - 181916484042/94552847*a - 2135779171614/94552847, -- -132601797212627/3440936951112960*a^11 - 6212467020502021/13763747804451840*a^10 - 1515926454902497/286744745926080*a^9 - 15154913741799637/4901619588480*a^8 - 576888119803859263/15930263662560*a^7 - 86626751639648671/204234149520*a^6 + 16436657569218427/306351224280*a^5 + 1540027900265659087/2450809794240*a^4 + 375782662805915809/51058537380*a^3 - 14831920924677883/11346341640*a^2 - 7237947774817724/472764235*a - 84773764066089509/472764235)] -+ -1316873026840277/34172063514501120*a^11 - 18637401045099413/41291243413355520*a^10 - 36382234917217247/6881873902225920*a^9 - 61142238484016213/19775499719040*a^8 - 576888119306045123/15930263662560*a^7 - 3378443313906256321/7965131831280*a^6 + 326466167429333279/6084769144320*a^5 + 4620083325391594991/7352429382720*a^4 + 9018783894167184149/1225404897120*a^3 - 9206015742300283/7042556880*a^2 - 65141531411426446/4254878115*a - 254321286054666133/1418292705)] - """ - if E.j_invariant()!=0: - raise ValueError("j-invariant must be 0.") Modified: sagemath-singular-4.3.1.p3.patch =================================================================== --- sagemath-singular-4.3.1.p3.patch 2023-02-12 09:58:41 UTC (rev 1399980) +++ sagemath-singular-4.3.1.p3.patch 2023-02-12 09:58:43 UTC (rev 1399981) @@ -87,7 +87,7 @@ pLength, kNF, p_Neg, p_Minus_mm_Mult_qq, p_Plus_mm_Mult_qq, pDiff, singclap_resultant, p_Normalize, prCopyR, prCopyR_NoSort) -@@ -1587,7 +1587,7 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_base): +@@ -1590,7 +1590,7 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_base): 9/4 sage: P.monomial_quotient(x,y) # Note the wrong result @@ -96,7 +96,7 @@ sage: P.monomial_quotient(x,P(1)) x -@@ -2247,7 +2247,7 @@ cdef class MPolynomial_libsingular(MPolynomial): +@@ -2250,7 +2250,7 @@ cdef class MPolynomial_libsingular(MPolynomial): 9/4*x^2 - 1/4*y^2 - y - 1 sage: P.<x,y> = PolynomialRing(QQ,order='lex') @@ -105,7 +105,7 @@ Traceback (most recent call last): ... OverflowError: exponent overflow (...) -@@ -2371,7 +2371,7 @@ cdef class MPolynomial_libsingular(MPolynomial): +@@ -2374,7 +2374,7 @@ cdef class MPolynomial_libsingular(MPolynomial): ValueError: not a 2nd power sage: P.<x,y> = PolynomialRing(QQ,order='lex') @@ -114,7 +114,7 @@ Traceback (most recent call last): .... OverflowError: exponent overflow (...) -@@ -3452,16 +3452,16 @@ cdef class MPolynomial_libsingular(MPolynomial): +@@ -3455,16 +3455,16 @@ cdef class MPolynomial_libsingular(MPolynomial): We are catching overflows:: sage: R.<x,y> = QQ[] @@ -134,7 +134,7 @@ sage: try: ....: f = x^n ....: f.subs(x = x^n) -@@ -4567,7 +4567,7 @@ cdef class MPolynomial_libsingular(MPolynomial): +@@ -4570,7 +4570,7 @@ cdef class MPolynomial_libsingular(MPolynomial): l = [] for i from 0 <= i < IDELEMS(res): for j from 1 <= j <= IDELEMS(_I): @@ -143,7 +143,7 @@ id_Delete(&fI, r) id_Delete(&_I, r) -@@ -4635,7 +4635,7 @@ cdef class MPolynomial_libsingular(MPolynomial): +@@ -4638,7 +4638,7 @@ cdef class MPolynomial_libsingular(MPolynomial): sage: f = 3*x sage: f.reduce([2*x,y]) @@ -186,7 +186,7 @@ index b5d83ef71b..f1dc37cad0 100644 --- a/src/sage/structure/element.pyx +++ b/src/sage/structure/element.pyx -@@ -2705,10 +2705,10 @@ cdef class RingElement(ModuleElement): +@@ -2704,10 +2704,10 @@ cdef class RingElement(ModuleElement): with Singular 4:: sage: K.<x,y> = ZZ[] Modified: sagemath-tachyon-0.99.patch =================================================================== --- sagemath-tachyon-0.99.patch 2023-02-12 09:58:41 UTC (rev 1399980) +++ sagemath-tachyon-0.99.patch 2023-02-12 09:58:43 UTC (rev 1399981) @@ -1,6 +1,6 @@ --- a/src/sage/interfaces/tachyon.py +++ b/src/sage/interfaces/tachyon.py -@@ -140,14 +140,14 @@ written in the sequence they are listed in the examples in this section. +@@ -74,14 +74,14 @@ written in the sequence they are listed in the examples in this section. The ``PROJECTION`` keyword must be followed by one of the supported camera projection mode identifiers ``PERSPECTIVE``, ``PERSPECTIVE_DOF``, ``ORTHOGRAPHIC``, or ``FISHEYE``. The ``FISHEYE`` projection mode Modified: test-optional.patch =================================================================== --- test-optional.patch 2023-02-12 09:58:41 UTC (rev 1399980) +++ test-optional.patch 2023-02-12 09:58:43 UTC (rev 1399981) @@ -2,7 +2,7 @@ index 2d93841e50..937e20cd2e 100644 --- a/src/sage/doctest/control.py +++ b/src/sage/doctest/control.py -@@ -400,11 +400,6 @@ class DocTestController(SageObject): +@@ -414,10 +414,6 @@ class DocTestController(SageObject): # that the package is actually installed). if 'optional' in options.optional: options.optional.discard('optional') @@ -10,7 +10,7 @@ - for pkg in list_packages('optional', local=True).values(): - if pkg.is_installed() and pkg.installed_version == pkg.remote_version: - options.optional.add(pkg.name) -- + from sage.features import package_systems options.optional.update(system.name
