From 998535fc3ce539f5c14ba051483312d00f6c99e0 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 9 Feb 2024 23:14:02 -0800 Subject: [PATCH 1/3] ./sage -fixdoctests --only-tags src/sage/rings/finite_rings/integer_mod_ring.py --- src/sage/rings/finite_rings/integer_mod_ring.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/sage/rings/finite_rings/integer_mod_ring.py b/src/sage/rings/finite_rings/integer_mod_ring.py index eb35543a20e..7e300b6ab0c 100644 --- a/src/sage/rings/finite_rings/integer_mod_ring.py +++ b/src/sage/rings/finite_rings/integer_mod_ring.py @@ -616,14 +616,14 @@ def multiplicative_subgroups(self): EXAMPLES:: - sage: # needs sage.groups - sage: Integers(5).multiplicative_subgroups() # optional - gap_package_polycyclic + sage: # optional - gap_package_polycyclic, needs sage.groups + sage: Integers(5).multiplicative_subgroups() ((2,), (4,), ()) - sage: Integers(15).multiplicative_subgroups() # optional - gap_package_polycyclic + sage: Integers(15).multiplicative_subgroups() ((11, 7), (11, 4), (2,), (11,), (14,), (7,), (4,), ()) - sage: Integers(2).multiplicative_subgroups() # optional - gap_package_polycyclic + sage: Integers(2).multiplicative_subgroups() ((),) - sage: len(Integers(341).multiplicative_subgroups()) # optional - gap_package_polycyclic + sage: len(Integers(341).multiplicative_subgroups()) 80 TESTS:: @@ -632,7 +632,7 @@ def multiplicative_subgroups(self): ((),) sage: IntegerModRing(2).multiplicative_subgroups() # needs sage.groups ((),) - sage: IntegerModRing(3).multiplicative_subgroups() # needs sage.groups # optional - gap_package_polycyclic + sage: IntegerModRing(3).multiplicative_subgroups() # optional - gap_package_polycyclic, needs sage.groups ((2,), ()) """ return tuple(tuple(g.value() for g in H.gens()) From 577b3bd282db0f3aa429cacf8818828702deb9bb Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 9 Feb 2024 23:17:55 -0800 Subject: [PATCH 2/3] Fix some doctest dataflow warnings --- src/sage/rings/generic.py | 2 +- src/sage/rings/polynomial/polynomial_rational_flint.pyx | 4 ++-- src/sage/schemes/curves/affine_curve.py | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/sage/rings/generic.py b/src/sage/rings/generic.py index e0145c8e828..bfcb1d2bc50 100644 --- a/src/sage/rings/generic.py +++ b/src/sage/rings/generic.py @@ -36,7 +36,7 @@ class ProductTree: Similarly, the :meth:`interpolation` method can be used to implement the inverse Fast Fourier Transform:: - sage: tree.interpolation(zs).padded_list(len(ys)) == ys + sage: tree.interpolation(zs).padded_list(len(ys)) == ys # needs sage.rings.finite_rings True This class encodes the tree as *layers*: Layer `0` is just a tuple diff --git a/src/sage/rings/polynomial/polynomial_rational_flint.pyx b/src/sage/rings/polynomial/polynomial_rational_flint.pyx index 8dd23a143a1..1ef3cbaf681 100644 --- a/src/sage/rings/polynomial/polynomial_rational_flint.pyx +++ b/src/sage/rings/polynomial/polynomial_rational_flint.pyx @@ -2127,11 +2127,11 @@ cdef class Polynomial_rational_flint(Polynomial): :: - sage: # needs sage.libs.pari + sage: # needs sage.groups sage.libs.pari sage: f = x^4 - 17*x^3 - 2*x + 1 sage: G = f.galois_group(pari_group=True); G PARI group [24, -1, 5, "S4"] of degree 4 - sage: PermutationGroup(G) # needs sage.groups + sage: PermutationGroup(G) Transitive group number 5 of degree 4 You can use KASH or GAP to compute Galois groups as well. The advantage is diff --git a/src/sage/schemes/curves/affine_curve.py b/src/sage/schemes/curves/affine_curve.py index d5d97e5e044..d5ea150f98d 100644 --- a/src/sage/schemes/curves/affine_curve.py +++ b/src/sage/schemes/curves/affine_curve.py @@ -1801,6 +1801,7 @@ def fundamental_group(self, simplified=True, puiseux=False): to the algebraic field:: sage: # needs sage.rings.number_field + sage: x = polygen(ZZ) sage: a = QQ[x](x^2 + 5).roots(QQbar)[0][0] sage: F = NumberField(a.minpoly(), 'a', embedding=a) sage: F.inject_variables() From 9bfc29aaf1f1a21b779f92eec927d5a8f000c722 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 10 Feb 2024 11:55:53 -0800 Subject: [PATCH 3/3] src/sage/geometry/polyhedron/backend_field.py: Fix # needs --- src/sage/geometry/polyhedron/backend_field.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/geometry/polyhedron/backend_field.py b/src/sage/geometry/polyhedron/backend_field.py index ca89b53b8b0..feda80cb697 100644 --- a/src/sage/geometry/polyhedron/backend_field.py +++ b/src/sage/geometry/polyhedron/backend_field.py @@ -90,7 +90,7 @@ def _is_zero(self, x): sage: p = Polyhedron([(sqrt(3),sqrt(2))], base_ring=AA) # needs sage.rings.number_field sage.symbolic sage: p._is_zero(0) # needs sage.rings.number_field sage.symbolic True - sage: p._is_zero(1/100000) # needs sage.rings.number_field + sage: p._is_zero(1/100000) # needs sage.rings.number_field sage.symbolic False """ return x == 0