Skip to content

Commit

Permalink
sagemathgh-36102: sage.schemes: Update # needs
Browse files Browse the repository at this point in the history
    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

<!-- Why is this change required? What problem does it solve? -->
- Part of: sagemath#29705
- Cherry-picked from: sagemath#35095
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->
- Depends on sagemath#35376 (merged here)

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36102
Reported by: Matthias Köppe
Reviewer(s): David Coudert, Enrique Manuel Artal Bartolo, Kwankyu Lee, Matthias Köppe
  • Loading branch information
Release Manager committed Sep 3, 2023
2 parents 1842e9d + 3e2de54 commit 025f479
Show file tree
Hide file tree
Showing 113 changed files with 6,340 additions and 5,716 deletions.
9 changes: 5 additions & 4 deletions src/sage/modular/abvar/homspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,15 @@
::
sage: T = E.image_of_hecke_algebra() # long time
sage: T.gens() # long time
sage: # long time
sage: T = E.image_of_hecke_algebra()
sage: T.gens()
(Abelian variety endomorphism of Abelian variety J0(33) of dimension 3,
Abelian variety endomorphism of Abelian variety J0(33) of dimension 3,
Abelian variety endomorphism of Abelian variety J0(33) of dimension 3)
sage: T.index_in(E) # long time
sage: T.index_in(E)
+Infinity
sage: T.index_in_saturation() # long time
sage: T.index_in_saturation()
1
AUTHORS:
Expand Down
13 changes: 8 additions & 5 deletions src/sage/modular/cusps_nf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# sage.doctest: needs sage.rings.number_field
r"""
The set `\mathbb{P}^1(K)` of cusps of a number field `K`
Expand Down Expand Up @@ -62,7 +63,7 @@
sage: Gamma0_NFCusps(N)
[Cusp [0: 1] of Number Field in a with defining polynomial x^2 + 5,
Cusp [1: 3] of Number Field in a with defining polynomial x^2 + 5,
Cusp [1: 3] of Number Field in a with defining polynomial x^2 + 5,
...]
"""
# ****************************************************************************
Expand Down Expand Up @@ -859,7 +860,7 @@ def ABmatrix(self):
sage: M = alpha.ABmatrix()
sage: M # random
[-a^2 - a - 1, -3*a - 7, 8, -2*a^2 - 3*a + 4]
sage: M[0] == alpha.numerator() and M[2]==alpha.denominator()
sage: M[0] == alpha.numerator() and M[2] == alpha.denominator()
True
An AB-matrix associated to a cusp alpha will send Infinity to alpha:
Expand All @@ -870,7 +871,7 @@ def ABmatrix(self):
sage: M = alpha.ABmatrix()
sage: (k.ideal(M[1], M[3])*alpha.ideal()).is_principal()
True
sage: M[0] == alpha.numerator() and M[2]==alpha.denominator()
sage: M[0] == alpha.numerator() and M[2] == alpha.denominator()
True
sage: NFCusp(k, oo).apply(M) == alpha
True
Expand Down Expand Up @@ -1249,7 +1250,8 @@ def units_mod_ideal(I):
sage: from sage.modular.cusps_nf import units_mod_ideal
sage: k.<a> = NumberField(x^3 + 11)
sage: k.unit_group()
Unit group with structure C2 x Z of Number Field in a with defining polynomial x^3 + 11
Unit group with structure C2 x Z of
Number Field in a with defining polynomial x^3 + 11
sage: I = k.ideal(5, a + 1)
sage: units_mod_ideal(I)
[1,
Expand All @@ -1261,7 +1263,8 @@ def units_mod_ideal(I):
sage: from sage.modular.cusps_nf import units_mod_ideal
sage: k.<a> = NumberField(x^4 - x^3 -21*x^2 + 17*x + 133)
sage: k.unit_group()
Unit group with structure C6 x Z of Number Field in a with defining polynomial x^4 - x^3 - 21*x^2 + 17*x + 133
Unit group with structure C6 x Z of
Number Field in a with defining polynomial x^4 - x^3 - 21*x^2 + 17*x + 133
sage: I = k.ideal(3)
sage: U = units_mod_ideal(I)
sage: all(U[j].is_unit() and (U[j] not in I) for j in range(len(U)))
Expand Down
11 changes: 6 additions & 5 deletions src/sage/modular/modform/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -2315,13 +2315,14 @@ def minimal_twist(self, p=None):
sage: f.twist(chi, level=11) == g
True
sage: f = Newforms(575, 2, names='a')[4] # long time
sage: g, chi = f.minimal_twist(5) # long time
sage: g # long time
sage: # long time
sage: f = Newforms(575, 2, names='a')[4]
sage: g, chi = f.minimal_twist(5)
sage: g
q + a*q^2 - a*q^3 - 2*q^4 + (1/2*a + 2)*q^5 + O(q^6)
sage: chi # long time
sage: chi
Dirichlet character modulo 5 of conductor 5 mapping 2 |--> 1/2*a
sage: f.twist(chi, level=g.level()) == g # long time
sage: f.twist(chi, level=g.level()) == g
True
"""
if p is None:
Expand Down
1 change: 1 addition & 0 deletions src/sage/modular/modform_hecketriangle/analytic_type.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# sage.doctest: needs sage.graphs
r"""
Analytic types of modular forms
Expand Down
24 changes: 16 additions & 8 deletions src/sage/modular/overconvergent/weightspace.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
# sage.doctest: needs sage.rings.padics
r"""
The space of `p`-adic weights
Expand All @@ -17,7 +17,8 @@
sage: W = pAdicWeightSpace(17)
sage: W
Space of 17-adic weight-characters defined over 17-adic Field with capped relative precision 20
Space of 17-adic weight-characters
defined over 17-adic Field with capped relative precision 20
sage: R.<x> = QQ[]
sage: L = Qp(17).extension(x^2 - 17, names='a'); L.rename('L')
sage: W.base_extend(L)
Expand Down Expand Up @@ -101,7 +102,8 @@ def WeightSpace_constructor(p, base_ring=None):
EXAMPLES::
sage: pAdicWeightSpace(3) # indirect doctest
Space of 3-adic weight-characters defined over 3-adic Field with capped relative precision 20
Space of 3-adic weight-characters
defined over 3-adic Field with capped relative precision 20
sage: pAdicWeightSpace(3, QQ)
Space of 3-adic weight-characters defined over Rational Field
sage: pAdicWeightSpace(10)
Expand Down Expand Up @@ -248,11 +250,13 @@ def base_extend(self, R):
sage: W = pAdicWeightSpace(3, QQ)
sage: W.base_extend(Qp(3))
Space of 3-adic weight-characters defined over 3-adic Field with capped relative precision 20
Space of 3-adic weight-characters
defined over 3-adic Field with capped relative precision 20
sage: W.base_extend(IntegerModRing(12))
Traceback (most recent call last):
...
TypeError: No coercion map from 'Rational Field' to 'Ring of integers modulo 12' is defined
TypeError: No coercion map from 'Rational Field'
to 'Ring of integers modulo 12' is defined
"""
if R.has_coerce_map_from(self.base_ring()):
return WeightSpace_constructor(self.prime(), R)
Expand Down Expand Up @@ -356,7 +360,9 @@ def pAdicEisensteinSeries(self, ring, prec=20):
sage: kappa = pAdicWeightSpace(3)(3, DirichletGroup(3,QQ).0)
sage: kappa.pAdicEisensteinSeries(QQ[['q']], 20)
1 - 9*q + 27*q^2 - 9*q^3 - 117*q^4 + 216*q^5 + 27*q^6 - 450*q^7 + 459*q^8 - 9*q^9 - 648*q^10 + 1080*q^11 - 117*q^12 - 1530*q^13 + 1350*q^14 + 216*q^15 - 1845*q^16 + 2592*q^17 + 27*q^18 - 3258*q^19 + O(q^20)
1 - 9*q + 27*q^2 - 9*q^3 - 117*q^4 + 216*q^5 + 27*q^6 - 450*q^7 + 459*q^8
- 9*q^9 - 648*q^10 + 1080*q^11 - 117*q^12 - 1530*q^13 + 1350*q^14 + 216*q^15
- 1845*q^16 + 2592*q^17 + 27*q^18 - 3258*q^19 + O(q^20)
"""
if not self.is_even():
raise ValueError("Eisenstein series not defined for odd weight-characters")
Expand Down Expand Up @@ -570,7 +576,8 @@ def chi(self):
sage: kappa = pAdicWeightSpace(29)(13, DirichletGroup(29, Qp(29)).0^14)
sage: kappa.chi()
Dirichlet character modulo 29 of conductor 29 mapping 2 |--> 28 + 28*29 + 28*29^2 + ... + O(29^20)
Dirichlet character modulo 29 of conductor 29
mapping 2 |--> 28 + 28*29 + 28*29^2 + ... + O(29^20)
"""
return self._chi

Expand Down Expand Up @@ -667,7 +674,8 @@ def Lvalue(self):
sage: pAdicWeightSpace(7)(5, DirichletGroup(7, Qp(7)).0^4).Lvalue()
0
sage: pAdicWeightSpace(7)(6, DirichletGroup(7, Qp(7)).0^4).Lvalue()
1 + 2*7 + 7^2 + 3*7^3 + 3*7^5 + 4*7^6 + 2*7^7 + 5*7^8 + 2*7^9 + 3*7^10 + 6*7^11 + 2*7^12 + 3*7^13 + 5*7^14 + 6*7^15 + 5*7^16 + 3*7^17 + 6*7^18 + O(7^19)
1 + 2*7 + 7^2 + 3*7^3 + 3*7^5 + 4*7^6 + 2*7^7 + 5*7^8 + 2*7^9 + 3*7^10 + 6*7^11
+ 2*7^12 + 3*7^13 + 5*7^14 + 6*7^15 + 5*7^16 + 3*7^17 + 6*7^18 + O(7^19)
"""
if self._k > 0:
return -self._chi.bernoulli(self._k) / self._k
Expand Down
2 changes: 1 addition & 1 deletion src/sage/modular/pollack_stevens/padic_lseries.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
# sage.doctest: needs sage.ring.padics
r"""
`p`-adic `L`-series attached to overconvergent eigensymbols
Expand Down
39 changes: 20 additions & 19 deletions src/sage/schemes/affine/affine_homset.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ def points(self, **kwds):
EXAMPLES: The bug reported at #11526 is fixed::
sage: A2 = AffineSpace(ZZ, 2)
sage: F = GF(3) # optional - sage.rings.finite_rings
sage: A2(F).points() # optional - sage.rings.finite_rings
sage: F = GF(3)
sage: A2(F).points()
[(0, 0), (0, 1), (0, 2), (1, 0), (1, 1), (1, 2), (2, 0), (2, 1), (2, 2)]
::
Expand All @@ -228,23 +228,23 @@ def points(self, **kwds):
::
sage: u = QQ['u'].0
sage: K.<v> = NumberField(u^2 + 3) # optional - sage.rings.number_field
sage: A.<x,y> = AffineSpace(K, 2) # optional - sage.rings.number_field
sage: len(A(K).points(bound=2)) # optional - sage.rings.number_field
sage: K.<v> = NumberField(u^2 + 3) # needs sage.rings.number_field
sage: A.<x,y> = AffineSpace(K, 2) # needs sage.rings.number_field
sage: len(A(K).points(bound=2)) # needs sage.rings.number_field
1849
::
sage: A.<x,y> = AffineSpace(QQ, 2)
sage: E = A.subscheme([x^2 + y^2 - 1, y^2 - x^3 + x^2 + x - 1])
sage: E(A.base_ring()).points()
sage: E(A.base_ring()).points() # needs sage.libs.singular
[(-1, 0), (0, -1), (0, 1), (1, 0)]
::
sage: A.<x,y> = AffineSpace(CC, 2)
sage: A.<x,y> = AffineSpace(CC, 2) # needs sage.rings.real_mpfr
sage: E = A.subscheme([y^3 - x^3 - x^2, x*y])
sage: E(A.base_ring()).points()
sage: E(A.base_ring()).points() # needs sage.libs.singular sage.rings.real_mpfr
verbose 0 (...: affine_homset.py, points)
Warning: computations in the numerical fields are inexact;points
may be computed partially or incorrectly.
Expand All @@ -253,9 +253,9 @@ def points(self, **kwds):
::
sage: A.<x1,x2> = AffineSpace(CDF, 2)
sage: E = A.subscheme([x1^2 + x2^2 + x1*x2, x1 + x2])
sage: E(A.base_ring()).points()
sage: A.<x1,x2> = AffineSpace(CDF, 2) # needs sage.rings.complex_double
sage: E = A.subscheme([x1^2 + x2^2 + x1*x2, x1 + x2]) # needs sage.libs.singular sage.rings.complex_double
sage: E(A.base_ring()).points() # needs sage.libs.singular sage.rings.complex_double
verbose 0 (...: affine_homset.py, points)
Warning: computations in the numerical fields are inexact;points
may be computed partially or incorrectly.
Expand Down Expand Up @@ -393,28 +393,29 @@ def numerical_points(self, F=None, **kwds):
EXAMPLES::
sage: K.<v> = QuadraticField(3) # optional - sage.rings.number_field
sage: A.<x,y> = AffineSpace(K, 2) # optional - sage.rings.number_field
sage: X = A.subscheme([x^3 - v^2*y, y - v*x^2 + 3]) # optional - sage.rings.number_field
sage: L = X(K).numerical_points(F=RR); L # abs tol 1e-14 # optional - sage.rings.number_field
sage: # needs sage.rings.number_field
sage: K.<v> = QuadraticField(3)
sage: A.<x,y> = AffineSpace(K, 2)
sage: X = A.subscheme([x^3 - v^2*y, y - v*x^2 + 3])
sage: L = X(K).numerical_points(F=RR); L # abs tol 1e-14
[(-1.18738247880014, -0.558021142104134),
(1.57693558184861, 1.30713548084184),
(4.80659931965815, 37.0162574656220)]
sage: L[0].codomain() # optional - sage.rings.number_field
sage: L[0].codomain()
Affine Space of dimension 2 over Real Field with 53 bits of precision
::
sage: A.<x,y> = AffineSpace(QQ, 2)
sage: X = A.subscheme([y^2 - x^2 - 3*x, x^2 - 10*y])
sage: len(X(QQ).numerical_points(F=ComplexField(100)))
sage: len(X(QQ).numerical_points(F=ComplexField(100))) # needs sage.libs.singular
4
::
sage: A.<x1, x2> = AffineSpace(QQ, 2)
sage: E = A.subscheme([30*x1^100 + 1000*x2^2 + 2000*x1*x2 + 1, x1 + x2])
sage: len(E(A.base_ring()).numerical_points(F=CDF, zero_tolerance=1e-9))
sage: len(E(A.base_ring()).numerical_points(F=CDF, zero_tolerance=1e-9)) # needs sage.libs.singular
100
TESTS::
Expand All @@ -430,7 +431,7 @@ def numerical_points(self, F=None, **kwds):
sage: A.<x,y> = AffineSpace(QQ, 2)
sage: X = A.subscheme([y^2 - x^2 - 3*x, x^2 - 10*y])
sage: X(QQ).numerical_points(F=CC, zero_tolerance=-1)
sage: X(QQ).numerical_points(F=CC, zero_tolerance=-1) # needs sage.libs.singular
Traceback (most recent call last):
...
ValueError: tolerance must be positive
Expand Down
Loading

0 comments on commit 025f479

Please sign in to comment.