Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sage.rings.padics: Update # needs #36259

Merged
merged 49 commits into from
Nov 5, 2023
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
f76c2cd
src/sage/rings/number_field/galois_group.py: Add file level # needs
mkoeppe Sep 2, 2023
682b174
sage.rings.number_field: Update # needs
mkoeppe Sep 2, 2023
b25e987
src/sage/rings/universal_cyclotomic_field.py: Update distribution, # …
mkoeppe Sep 3, 2023
7a65270
src/sage/algebras: Add file-level tags; src/sage/rings/finite_rings: …
mkoeppe Sep 3, 2023
9ead00b
./sage -fixdoctests --distribution sagemath-categories --only-tags sr…
mkoeppe Sep 3, 2023
be756b6
sage.rings: Block tags, update # needs
mkoeppe Sep 3, 2023
14990f0
sage.rings: More block tags, update # needs
mkoeppe Sep 3, 2023
571b0f7
sage.rings: Update # needs
mkoeppe Sep 3, 2023
36f7707
src/sage/rings/polynomial/polynomial_element.pyx: Update # needs
mkoeppe Sep 3, 2023
35c2232
Fix # needs for sagemath-pari
mkoeppe Sep 3, 2023
d7cf4a7
sage.rings: Update # needs
mkoeppe Sep 4, 2023
5ffeedf
sage.rings: Update # needs
mkoeppe Sep 4, 2023
e91b7c6
src/sage/rings/number_field/number_field.py: Use lazy_import
mkoeppe Sep 5, 2023
ae8b9b2
sage.rings: Update # needs
mkoeppe Sep 5, 2023
c719121
src/sage/rings/real_arb.pyx: Update # needs
mkoeppe Sep 5, 2023
7e08b6f
Add # needs
mkoeppe Sep 7, 2023
bfd4c03
sage.rings: Update # needs
mkoeppe Sep 9, 2023
ee95b2a
sage.rings: Update # needs
mkoeppe Sep 9, 2023
94a8772
sage.rings: Update # needs
mkoeppe Sep 10, 2023
0cb16f3
./sage -fixdoctests --long --fixed-point --distribution sagemath-flin…
mkoeppe Sep 12, 2023
962347d
sage.rings.polynomial: Update # needs
mkoeppe Sep 12, 2023
fb7fbab
sage.rings.number_field: Update # needs
mkoeppe Sep 12, 2023
e2fcede
sage.rings.padics: Fix up import, update # needs
mkoeppe Sep 12, 2023
bb87f79
sage.rings: Update # needs
mkoeppe Sep 12, 2023
613b069
sage.rings.{padics,valuation}: Update # needs
mkoeppe Sep 12, 2023
85e8033
sage.rings: Update # needs
mkoeppe Sep 12, 2023
3b8f490
sage.rings: Remove 'sage_setup: distribution' directives
mkoeppe Sep 12, 2023
c1aabef
src/sage/rings/valuation/limit_valuation.py: Restore lost '# random'
mkoeppe Sep 13, 2023
34c9fff
src/sage/rings/polynomial/polynomial_ring_constructor.py: Fix # needs
mkoeppe Sep 14, 2023
ef8ce33
Merge tag '10.2.beta4' into needs_for_sage_rings_padics
mkoeppe Sep 24, 2023
d05991b
sage.rings.{padics,valuations}: Update # needs
mkoeppe Sep 23, 2023
adc3087
sage.rings.valuation: Update # needs
mkoeppe Sep 24, 2023
4e97c42
sage.features.sagemath: Split UCF from sage.rings.number_field, add s…
mkoeppe Sep 2, 2023
3df2d39
Mark uses of UCF as # needs sage.libs.gap sage.rings.number_field
mkoeppe Sep 25, 2023
d19e66e
Merge tag '10.2.beta8' into needs_for_sage_rings_padics
mkoeppe Oct 21, 2023
c5f0b67
Merge branch 'develop' into needs_for_sage_rings_padics
mkoeppe Oct 31, 2023
754eff4
sage.rings: More block tags, fix tags
mkoeppe Nov 3, 2023
0f5b767
sage.rings.function_field: More block tags, fix tags
mkoeppe Nov 3, 2023
7053a64
sage.rings.padics: More block tags, fix tags
mkoeppe Nov 3, 2023
45b833b
sage.rings.number_field: More block tags, fix tags
mkoeppe Nov 3, 2023
73e41c6
sage.rings.polynomial: More block tags, fix tags
mkoeppe Nov 3, 2023
473f84d
sage.rings.valuation: More block tags, fix tags, doctest cosmetics
mkoeppe Nov 3, 2023
7b88728
sage.rings: Fix remaining doctests warnings
mkoeppe Nov 3, 2023
37e66cb
src/sage/rings/number_field/number_field_rel.py: Use more block tags
mkoeppe Nov 4, 2023
a1bdea9
src/sage/rings/padics/padic_ZZ_pX_element.pyx: Use more block tags
mkoeppe Nov 4, 2023
a1f134f
src/sage/rings/padics/padic_generic_element.pyx: Use more block tags
mkoeppe Nov 4, 2023
b28f626
git grep -l '#indirec' src/sage/rings/padics | xargs sed -E -i.bak 's…
mkoeppe Nov 4, 2023
957f80d
src/sage/rings/valuation/augmented_valuation.py: Remove redundant tag…
mkoeppe Nov 4, 2023
5e4ea11
src/sage/rings/valuation/augmented_valuation.py: Remove stray charact…
mkoeppe Nov 4, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 28 additions & 9 deletions src/sage/features/sagemath.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,16 +389,28 @@ def __init__(self):
"""
JoinFeature.__init__(self, 'sage.libs.gap',
[PythonModule('sage.libs.gap.libgap'),
PythonModule('sage.interfaces.gap')])
PythonModule('sage.interfaces.gap'),
PythonModule('sage.groups.matrix_gps.finitely_generated_gap'),
PythonModule('sage.groups.matrix_gps.group_element_gap'),
PythonModule('sage.groups.matrix_gps.heisenberg'),
PythonModule('sage.groups.matrix_gps.isometries'),
PythonModule('sage.groups.matrix_gps.linear_gap'),
PythonModule('sage.groups.matrix_gps.matrix_group_gap'),
PythonModule('sage.groups.matrix_gps.named_group_gap'),
PythonModule('sage.groups.matrix_gps.orthogonal_gap'),
PythonModule('sage.groups.matrix_gps.symplectic_gap'),
PythonModule('sage.groups.matrix_gps.unitary_gap'),
PythonModule('sage.matrix.matrix_gap'),
PythonModule('sage.rings.universal_cyclotomic_field')])


class sage__libs__linbox(JoinFeature):
r"""
A :class:`sage.features.Feature` describing the presence of :mod:`sage.libs.linbox`
and other modules depending on Givaro, FFLAS-FFPACK, LinBox.

In addition to the modularization purposes that this tag serves,
it also provides attribution to the upstream project.
In addition to the modularization purposes that this tag serves, it also provides attribution
to the upstream project.

TESTS::

Expand All @@ -415,7 +427,9 @@ def __init__(self):
True
"""
JoinFeature.__init__(self, 'sage.libs.linbox',
[PythonModule('sage.rings.finite_rings.element_givaro')],
[PythonModule('sage.rings.finite_rings.element_givaro'),
PythonModule('sage.matrix.matrix_modn_dense_float'),
PythonModule('sage.matrix.matrix_modn_dense_double')],
spkg='sagemath_linbox', type='standard')


Expand All @@ -442,7 +456,8 @@ def __init__(self):
True
"""
JoinFeature.__init__(self, 'sage.libs.m4ri',
[PythonModule('sage.matrix.matrix_gf2e_dense')],
[PythonModule('sage.matrix.matrix_gf2e_dense'),
PythonModule('sage.matrix.matrix_mod2_dense')],
spkg='sagemath_m4ri', type='standard')


Expand Down Expand Up @@ -708,7 +723,8 @@ def __init__(self):
"""
JoinFeature.__init__(self, 'sage.rings.finite_rings',
[PythonModule('sage.rings.finite_rings.element_pari_ffelt'),
PythonModule('sage.rings.algebraic_closure_finite_field')],
PythonModule('sage.rings.algebraic_closure_finite_field'),
sage__libs__pari()],
type='standard')


Expand Down Expand Up @@ -784,16 +800,19 @@ class sage__rings__number_field(JoinFeature):
sage: CC(zeta)
0.913545457642601 + 0.406736643075800*I

Doctests that make use of the algebraic field ``QQbar``, the algebraic real field ``AA``,
or the universal cyclotomic field should be marked likewise::
Doctests that make use of the algebraic field ``QQbar`` or the algebraic real field ``AA``
should be marked likewise::

sage: # needs sage.rings.number_field
sage: AA(-1)^(1/3)
-1
sage: QQbar(-1)^(1/3)
0.500000000000000? + 0.866025403784439?*I

sage: # needs sage.rings.number_field
Use of the universal cyclotomic field should be marked
``# needs sage.libs.gap sage.rings.number_field``.

sage: # needs sage.libs.gap sage.rings.number_field
sage: UCF = UniversalCyclotomicField(); UCF
Universal Cyclotomic Field
sage: E = UCF.gen
Expand Down
6 changes: 3 additions & 3 deletions src/sage/rings/abc.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ class UniversalCyclotomicField(Field):
EXAMPLES::

sage: import sage.rings.abc
sage: K = UniversalCyclotomicField() # needs sage.rings.number_field
sage: isinstance(K, sage.rings.abc.UniversalCyclotomicField) # needs sage.rings.number_field
sage: K = UniversalCyclotomicField() # needs sage.libs.gap sage.rings.number_field
sage: isinstance(K, sage.rings.abc.UniversalCyclotomicField) # needs sage.libs.gap sage.rings.number_field
True

By design, there is a unique direct subclass::

sage: sage.rings.abc.UniversalCyclotomicField.__subclasses__() # needs sage.rings.number_field
sage: sage.rings.abc.UniversalCyclotomicField.__subclasses__() # needs sage.libs.gap sage.rings.number_field
[<class 'sage.rings.universal_cyclotomic_field.UniversalCyclotomicField'>]

sage: len(sage.rings.abc.NumberField_cyclotomic.__subclasses__()) <= 1
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/complex_arb.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -4014,7 +4014,7 @@ cdef class ComplexBall(RingElement):
[2.2882956833435e+50 +/- ...e+36],
[1.2807602335816e+51 +/- ...e+37])
sage: ai, aip, bi, bip = CBF(1,2).airy()
sage: (ai * bip - bi * aip) * CBF(pi)
sage: (ai * bip - bi * aip) * CBF(pi) # needs sage.symbolic
[1.0000000000000 +/- ...e-15] + [+/- ...e-16]*I

"""
Expand Down
4 changes: 2 additions & 2 deletions src/sage/rings/complex_double.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -796,11 +796,11 @@ cdef class ComplexDoubleElement(FieldElement):

EXAMPLES::

sage: CDF(1.2) > CDF(i)
sage: CDF(1.2) > CDF(i) # needs sage.symbolic
True
sage: CDF(1) < CDF(2)
True
sage: CDF(1 + i) > CDF(-1 - i)
sage: CDF(1 + i) > CDF(-1 - i) # needs sage.symbolic
True

::
Expand Down
12 changes: 6 additions & 6 deletions src/sage/rings/complex_interval_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,19 +484,19 @@ def _coerce_map_from_(self, S):
Coercion map:
From: Set of Python objects of class 'int'
To: Complex Interval Field with 53 bits of precision
sage: CIF.coerce_map_from(GaussianIntegers())
sage: CIF.coerce_map_from(GaussianIntegers()) # needs sage.rings.number_field
Conversion via _complex_mpfi_ method map:
From: Gaussian Integers in Number Field in I with defining polynomial x^2 + 1 with I = 1*I
To: Complex Interval Field with 53 bits of precision
sage: CIF.coerce_map_from(QQbar)
sage: CIF.coerce_map_from(QQbar) # needs sage.rings.number_field
Conversion via _complex_mpfi_ method map:
From: Algebraic Field
To: Complex Interval Field with 53 bits of precision
sage: CIF.coerce_map_from(AA)
sage: CIF.coerce_map_from(AA) # needs sage.rings.number_field
Conversion via _complex_mpfi_ method map:
From: Algebraic Real Field
To: Complex Interval Field with 53 bits of precision
sage: CIF.coerce_map_from(UniversalCyclotomicField())
sage: CIF.coerce_map_from(UniversalCyclotomicField()) # needs sage.libs.gap sage.rings.number_field
Conversion via _complex_mpfi_ method map:
From: Universal Cyclotomic Field
To: Complex Interval Field with 53 bits of precision
Expand Down Expand Up @@ -532,9 +532,9 @@ def _repr_(self):

EXAMPLES::

sage: ComplexIntervalField() # indirect doctest
sage: ComplexIntervalField() # indirect doctest
Complex Interval Field with 53 bits of precision
sage: ComplexIntervalField(100) # indirect doctest
sage: ComplexIntervalField(100) # indirect doctest
Complex Interval Field with 100 bits of precision
"""
return "Complex Interval Field with %s bits of precision" % self._prec
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/continued_fraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@

Nevertheless, the tail is preserved under invertible integer homographies::

sage: # needs sage.rings.number_field
sage: # needs sage.modular sage.rings.number_field
sage: apply_homography = lambda m,z: (m[0,0]*z + m[0,1]) / (m[1,0]*z + m[1,1])
sage: m1 = SL2Z([60,13,83,18])
sage: m2 = SL2Z([27,80,28,83])
Expand Down
29 changes: 13 additions & 16 deletions src/sage/rings/derivation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1580,16 +1580,15 @@ def __init__(self, parent, arg=None):

TESTS::

sage: # needs sage.rings.finite_rings
sage: # needs sage.libs.singular
sage: from sage.rings.derivation import RingDerivationWithoutTwist_wrapper
sage: R.<x,y> = GF(5)[]
sage: S = R.quo([x^5, y^5])
sage: M = S.derivation_module()
sage: der = M.random_element()
sage: isinstance(der, RingDerivationWithoutTwist_wrapper)
True

sage: TestSuite(der).run() # needs sage.rings.finite_rings
sage: TestSuite(der).run()

"""
if isinstance(arg, list) and len(arg) == 1 and isinstance(arg[0], RingDerivation):
Expand Down Expand Up @@ -1620,7 +1619,7 @@ def _add_(self, other):

EXAMPLES::

sage: # needs sage.rings.finite_rings
sage: # needs sage.libs.singular
sage: R.<X,Y> = GF(5)[]
sage: S.<x,y> = R.quo([X^5, Y^5])
sage: Dx = S.derivation(x)
Expand All @@ -1637,7 +1636,7 @@ def _sub_(self, other):

EXAMPLES::

sage: # needs sage.rings.finite_rings
sage: # needs sage.libs.singular
sage: R.<X,Y> = GF(5)[]
sage: S.<x,y> = R.quo([X^5, Y^5])
sage: Dx = S.derivation(x)
Expand All @@ -1654,7 +1653,7 @@ def _neg_(self):

EXAMPLES::

sage: # needs sage.rings.finite_rings
sage: # needs sage.libs.singular
sage: R.<X,Y> = GF(5)[]
sage: S.<x,y> = R.quo([X^5, Y^5])
sage: Dx = S.derivation(x)
Expand All @@ -1670,7 +1669,7 @@ def _lmul_(self, factor):

EXAMPLES::

sage: # needs sage.rings.finite_rings
sage: # needs sage.libs.singular
sage: R.<X,Y> = GF(5)[]
sage: S.<x,y> = R.quo([X^5, Y^5])
sage: Dx = S.derivation(x)
Expand All @@ -1688,7 +1687,7 @@ def _rmul_(self, factor):

EXAMPLES::

sage: # needs sage.rings.finite_rings
sage: # needs sage.libs.singular
sage: R.<X,Y> = GF(5)[]
sage: S.<x,y> = R.quo([X^5, Y^5])
sage: Dx = S.derivation(x)
Expand All @@ -1707,21 +1706,19 @@ def list(self):

EXAMPLES::

sage: # needs sage.rings.finite_rings
sage: # needs sage.libs.singular
sage: R.<X,Y> = GF(5)[]
sage: S.<x,y> = R.quo([X^5, Y^5])
sage: M = S.derivation_module()
sage: M.basis()
Family (d/dx, d/dy)

sage: S.derivation(x).list() # needs sage.rings.finite_rings
sage: S.derivation(x).list()
[1, 0]
sage: S.derivation(y).list() # needs sage.rings.finite_rings
sage: S.derivation(y).list()
[0, 1]

sage: f = x*S.derivation(x) + y*S.derivation(y); f # needs sage.rings.finite_rings
sage: f = x*S.derivation(x) + y*S.derivation(y); f
x*d/dx + y*d/dy
sage: f.list() # needs sage.rings.finite_rings
sage: f.list()
[x, y]

"""
Expand Down Expand Up @@ -2000,7 +1997,7 @@ def _call_(self, x):

EXAMPLES::

sage: # needs sage.rings.finite_rings
sage: # needs sage.libs.singular
sage: R.<X,Y> = GF(5)[]
sage: S.<x,y> = R.quo([X^5, Y^5])
sage: f = x^3*S.derivation(); f
Expand Down
15 changes: 11 additions & 4 deletions src/sage/rings/factorint.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ cpdef aurifeuillian(n, m, F=None, bint check=True) noexcept:
EXAMPLES::

sage: from sage.rings.factorint import aurifeuillian

sage: # needs sage.libs.pari sage.rings.real_interval_field
sage: aurifeuillian(2, 2)
[5, 13]
sage: aurifeuillian(2, 2^5)
Expand All @@ -58,6 +60,8 @@ cpdef aurifeuillian(n, m, F=None, bint check=True) noexcept:
[1471, 2851]
sage: aurifeuillian(15, 1)
[19231, 142111]

sage: # needs sage.libs.pari
sage: aurifeuillian(12, 3)
Traceback (most recent call last):
...
Expand All @@ -76,15 +80,17 @@ cpdef aurifeuillian(n, m, F=None, bint check=True) noexcept:
There is no need to set `F`. It's only for increasing speed
of :meth:`factor_aurifeuillian()`.
"""
from sage.arith.misc import euler_phi
from sage.rings.real_mpfi import RealIntervalField
if check:
if not n.is_squarefree():
raise ValueError("n has to be square-free")
if n < 2:
raise ValueError("n has to be greater than 1")
if m < 1:
raise ValueError("m has to be positive")

from sage.arith.misc import euler_phi
from sage.rings.real_mpfi import RealIntervalField

x = m**2*n
cdef Py_ssize_t y = euler_phi(2*n)//2
if F is None:
Expand Down Expand Up @@ -129,7 +135,7 @@ cpdef factor_aurifeuillian(n, check=True) noexcept:

EXAMPLES::

sage: # needs sage.libs.pari
sage: # needs sage.libs.pari sage.rings.real_interval_field
sage: from sage.rings.factorint import factor_aurifeuillian as fa
sage: fa(2^6 + 1)
[5, 13]
Expand All @@ -148,7 +154,8 @@ cpdef factor_aurifeuillian(n, check=True) noexcept:

TESTS::

sage: for n in [2,3,5,6,30,31,33]: # needs sage.libs.pari
sage: # needs sage.libs.pari sage.rings.real_interval_field
sage: for n in [2,3,5,6,30,31,33]:
....: for m in [8,96,109201283]:
....: s = -1 if n % 4 == 1 else 1
....: y = (m^2*n)^n + s
Expand Down
Loading