passagemath-schemes 10.5.44__cp313-cp313-musllinux_1_2_aarch64.whl → 10.6.42__cp313-cp313-musllinux_1_2_aarch64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. passagemath_schemes/__init__.py +3 -0
  2. {passagemath_schemes-10.5.44.dist-info → passagemath_schemes-10.6.42.dist-info}/METADATA +41 -41
  3. {passagemath_schemes-10.5.44.dist-info → passagemath_schemes-10.6.42.dist-info}/METADATA.bak +42 -42
  4. {passagemath_schemes-10.5.44.dist-info → passagemath_schemes-10.6.42.dist-info}/RECORD +158 -139
  5. passagemath_schemes-10.6.42.dist-info/top_level.txt +3 -0
  6. passagemath_schemes.libs/{libflint-7dd7ad94.so.19.0.0 → libflint-edf7fb90.so.22.0.0} +0 -0
  7. passagemath_schemes.libs/{libgcc_s-69c45f16.so.1 → libgcc_s-2d945d6c.so.1} +0 -0
  8. passagemath_schemes.libs/{libgmp-8e78bd9b.so.10.5.0 → libgmp-28992bcb.so.10.5.0} +0 -0
  9. passagemath_schemes.libs/{libgmpxx-e6de26f1.so.4.7.0 → libgmpxx-fecb01a9.so.4.7.0} +0 -0
  10. passagemath_schemes.libs/{libmpfr-5ff10580.so.6.2.1 → libmpfr-1fc8ea36.so.6.2.2} +0 -0
  11. passagemath_schemes.libs/{libstdc++-1f1a71be.so.6.0.33 → libstdc++-85f2cd6d.so.6.0.33} +0 -0
  12. sage/all__sagemath_schemes.py +3 -2
  13. sage/databases/all__sagemath_schemes.py +0 -10
  14. sage/dynamics/arithmetic_dynamics/berkovich_ds.py +4 -4
  15. sage/dynamics/arithmetic_dynamics/generic_ds.py +3 -3
  16. sage/dynamics/arithmetic_dynamics/projective_ds.py +7 -7
  17. sage/dynamics/arithmetic_dynamics/projective_ds_helper.cpython-313-aarch64-linux-musl.so +0 -0
  18. sage/dynamics/arithmetic_dynamics/wehlerK3.py +18 -18
  19. sage/lfunctions/zero_sums.cpython-313-aarch64-linux-musl.so +0 -0
  20. sage/modular/abvar/abvar.py +12 -11
  21. sage/modular/abvar/constructor.py +3 -3
  22. sage/modular/abvar/cuspidal_subgroup.py +5 -6
  23. sage/modular/abvar/finite_subgroup.py +20 -18
  24. sage/modular/abvar/homology.py +1 -2
  25. sage/modular/abvar/homspace.py +1 -1
  26. sage/modular/abvar/lseries.py +3 -3
  27. sage/modular/abvar/morphism.py +1 -1
  28. sage/modular/abvar/torsion_point.py +1 -1
  29. sage/modular/abvar/torsion_subgroup.py +1 -1
  30. sage/modular/arithgroup/arithgroup_element.cpython-313-aarch64-linux-musl.so +0 -0
  31. sage/modular/arithgroup/arithgroup_perm.py +16 -16
  32. sage/modular/arithgroup/congroup.cpython-313-aarch64-linux-musl.so +0 -0
  33. sage/modular/arithgroup/congroup_gamma0.py +2 -2
  34. sage/modular/arithgroup/congroup_gamma1.py +4 -4
  35. sage/modular/arithgroup/congroup_gammaH.py +2 -2
  36. sage/modular/arithgroup/congroup_generic.py +2 -3
  37. sage/modular/arithgroup/congroup_sl2z.py +3 -3
  38. sage/modular/arithgroup/farey_symbol.cpython-313-aarch64-linux-musl.so +0 -0
  39. sage/modular/arithgroup/farey_symbol.pyx +1 -2
  40. sage/modular/btquotients/btquotient.py +4 -5
  41. sage/modular/btquotients/pautomorphicform.py +2 -2
  42. sage/modular/cusps.py +6 -4
  43. sage/modular/cusps_nf.py +7 -8
  44. sage/modular/dirichlet.py +34 -43
  45. sage/modular/drinfeld_modform/element.py +4 -4
  46. sage/modular/drinfeld_modform/ring.py +12 -12
  47. sage/modular/drinfeld_modform/tutorial.py +1 -1
  48. sage/modular/hecke/algebra.py +7 -5
  49. sage/modular/hecke/ambient_module.py +2 -2
  50. sage/modular/hecke/element.py +7 -2
  51. sage/modular/hecke/module.py +9 -9
  52. sage/modular/hecke/submodule.py +6 -8
  53. sage/modular/hypergeometric_misc.cpython-313-aarch64-linux-musl.so +0 -0
  54. sage/modular/hypergeometric_misc.pyx +3 -2
  55. sage/modular/hypergeometric_motive.py +2 -2
  56. sage/modular/local_comp/local_comp.py +19 -11
  57. sage/modular/local_comp/type_space.py +10 -8
  58. sage/modular/modform/ambient.py +4 -3
  59. sage/modular/modform/cuspidal_submodule.py +2 -2
  60. sage/modular/modform/element.py +72 -72
  61. sage/modular/modform/half_integral.py +1 -1
  62. sage/modular/modform/l_series_gross_zagier.py +3 -0
  63. sage/modular/modform/l_series_gross_zagier_coeffs.cpython-313-aarch64-linux-musl.so +0 -0
  64. sage/modular/modform/l_series_gross_zagier_coeffs.pyx +5 -2
  65. sage/modular/modform/ring.py +10 -12
  66. sage/modular/modform/space.py +18 -21
  67. sage/modular/modform/weight1.py +1 -2
  68. sage/modular/modform_hecketriangle/abstract_ring.py +7 -14
  69. sage/modular/modform_hecketriangle/abstract_space.py +63 -66
  70. sage/modular/modform_hecketriangle/graded_ring_element.py +11 -12
  71. sage/modular/modform_hecketriangle/hecke_triangle_group_element.py +82 -84
  72. sage/modular/modform_hecketriangle/hecke_triangle_groups.py +2 -2
  73. sage/modular/modform_hecketriangle/readme.py +9 -11
  74. sage/modular/modform_hecketriangle/series_constructor.py +10 -18
  75. sage/modular/modform_hecketriangle/space.py +29 -30
  76. sage/modular/modform_hecketriangle/subspace.py +9 -7
  77. sage/modular/modsym/ambient.py +13 -20
  78. sage/modular/modsym/boundary.py +2 -2
  79. sage/modular/modsym/manin_symbol.cpython-313-aarch64-linux-musl.so +0 -0
  80. sage/modular/modsym/manin_symbol_list.py +3 -7
  81. sage/modular/modsym/relation_matrix_pyx.cpython-313-aarch64-linux-musl.so +0 -0
  82. sage/modular/modsym/space.py +10 -22
  83. sage/modular/modsym/subspace.py +5 -7
  84. sage/modular/multiple_zeta.py +11 -13
  85. sage/modular/multiple_zeta_F_algebra.py +4 -6
  86. sage/modular/overconvergent/genus0.py +5 -4
  87. sage/modular/overconvergent/hecke_series.py +2 -2
  88. sage/modular/pollack_stevens/distributions.py +2 -2
  89. sage/modular/pollack_stevens/fund_domain.py +26 -29
  90. sage/modular/pollack_stevens/manin_map.py +15 -10
  91. sage/modular/pollack_stevens/modsym.py +18 -18
  92. sage/modular/quasimodform/element.py +10 -10
  93. sage/modular/quasimodform/ring.py +22 -22
  94. sage/modular/ssmod/ssmod.py +5 -12
  95. sage/rings/polynomial/binary_form_reduce.py +1 -1
  96. sage/schemes/curves/affine_curve.py +4 -4
  97. sage/schemes/curves/plane_curve_arrangement.py +28 -24
  98. sage/schemes/elliptic_curves/BSD.py +1 -1
  99. sage/schemes/elliptic_curves/addition_formulas_ring.py +4 -0
  100. sage/schemes/elliptic_curves/cm.py +1 -1
  101. sage/schemes/elliptic_curves/constructor.py +3 -3
  102. sage/schemes/elliptic_curves/ell_egros.py +1 -1
  103. sage/schemes/elliptic_curves/ell_field.py +57 -46
  104. sage/schemes/elliptic_curves/ell_finite_field.py +138 -26
  105. sage/schemes/elliptic_curves/ell_local_data.py +9 -9
  106. sage/schemes/elliptic_curves/ell_number_field.py +25 -24
  107. sage/schemes/elliptic_curves/ell_point.py +21 -22
  108. sage/schemes/elliptic_curves/ell_rational_field.py +38 -28
  109. sage/schemes/elliptic_curves/formal_group.py +1 -1
  110. sage/schemes/elliptic_curves/heegner.py +11 -8
  111. sage/schemes/elliptic_curves/height.py +26 -23
  112. sage/schemes/elliptic_curves/hom.py +2 -1
  113. sage/schemes/elliptic_curves/hom_composite.py +11 -11
  114. sage/schemes/elliptic_curves/hom_frobenius.py +8 -8
  115. sage/schemes/elliptic_curves/hom_sum.py +7 -1
  116. sage/schemes/elliptic_curves/hom_velusqrt.py +13 -7
  117. sage/schemes/elliptic_curves/homset.py +2 -2
  118. sage/schemes/elliptic_curves/isogeny_small_degree.py +1 -1
  119. sage/schemes/elliptic_curves/mod_poly.py +12 -5
  120. sage/schemes/elliptic_curves/mod_sym_num.cpython-313-aarch64-linux-musl.so +0 -0
  121. sage/schemes/elliptic_curves/padic_lseries.py +25 -13
  122. sage/schemes/elliptic_curves/padics.py +71 -63
  123. sage/schemes/elliptic_curves/period_lattice.py +78 -27
  124. sage/schemes/elliptic_curves/period_lattice_region.cpython-313-aarch64-linux-musl.so +0 -0
  125. sage/schemes/elliptic_curves/sha_tate.py +1 -1
  126. sage/schemes/elliptic_curves/weierstrass_morphism.py +2 -2
  127. sage/schemes/hyperelliptic_curves/hyperelliptic_generic.py +1 -1
  128. sage/schemes/hyperelliptic_curves/jacobian_endomorphism_utils.py +1 -1
  129. sage/schemes/hyperelliptic_curves/monsky_washnitzer.py +10 -20
  130. sage/schemes/jacobians/abstract_jacobian.py +1 -1
  131. sage/schemes/plane_conics/con_field.py +42 -42
  132. sage/schemes/plane_conics/con_rational_field.py +1 -1
  133. sage/schemes/riemann_surfaces/riemann_surface.py +8 -8
  134. sage_wheels/share/cremona/cremona_mini.db +0 -0
  135. sage_wheels/share/ellcurves/rank0 +30427 -0
  136. sage_wheels/share/ellcurves/rank1 +31871 -0
  137. sage_wheels/share/ellcurves/rank10 +6 -0
  138. sage_wheels/share/ellcurves/rank11 +6 -0
  139. sage_wheels/share/ellcurves/rank12 +1 -0
  140. sage_wheels/share/ellcurves/rank14 +1 -0
  141. sage_wheels/share/ellcurves/rank15 +1 -0
  142. sage_wheels/share/ellcurves/rank17 +1 -0
  143. sage_wheels/share/ellcurves/rank19 +1 -0
  144. sage_wheels/share/ellcurves/rank2 +2388 -0
  145. sage_wheels/share/ellcurves/rank20 +1 -0
  146. sage_wheels/share/ellcurves/rank21 +1 -0
  147. sage_wheels/share/ellcurves/rank22 +1 -0
  148. sage_wheels/share/ellcurves/rank23 +1 -0
  149. sage_wheels/share/ellcurves/rank24 +1 -0
  150. sage_wheels/share/ellcurves/rank28 +1 -0
  151. sage_wheels/share/ellcurves/rank3 +836 -0
  152. sage_wheels/share/ellcurves/rank4 +10 -0
  153. sage_wheels/share/ellcurves/rank5 +5 -0
  154. sage_wheels/share/ellcurves/rank6 +5 -0
  155. sage_wheels/share/ellcurves/rank7 +5 -0
  156. sage_wheels/share/ellcurves/rank8 +6 -0
  157. sage_wheels/share/ellcurves/rank9 +7 -0
  158. passagemath_schemes-10.5.44.dist-info/top_level.txt +0 -2
  159. sage/databases/db_modular_polynomials.py +0 -250
  160. sage/databases/stein_watkins.py +0 -363
  161. sage/modular/modsym/p1list.cpython-313-aarch64-linux-musl.so +0 -0
  162. sage/modular/modsym/p1list.pxd +0 -29
  163. sage/modular/modsym/p1list.pyx +0 -1372
  164. {passagemath_schemes-10.5.44.dist-info → passagemath_schemes-10.6.42.dist-info}/WHEEL +0 -0
@@ -109,15 +109,16 @@ AUTHORS:
109
109
 
110
110
  import sage.rings.abc
111
111
 
112
+ from sage.categories.morphism import IdentityMorphism
112
113
  from sage.misc.cachefunc import cached_method
113
114
  from sage.misc.lazy_import import lazy_import
114
115
  from sage.modules.free_module import FreeModule_generic_pid
115
- from sage.rings.complex_mpfr import ComplexField, ComplexNumber, ComplexField_class
116
+ from sage.rings.complex_mpfr import ComplexField, ComplexNumber
116
117
  from sage.rings.infinity import Infinity
117
118
  from sage.rings.integer_ring import ZZ
118
119
  from sage.rings.qqbar import AA, QQbar
119
120
  from sage.rings.rational_field import QQ
120
- from sage.rings.real_mpfr import RealField, RealField_class, RealNumber
121
+ from sage.rings.real_mpfr import RealField, RealNumber
121
122
  from sage.schemes.elliptic_curves.constructor import EllipticCurve
122
123
  from sage.structure.richcmp import richcmp_method, richcmp, richcmp_not_equal
123
124
 
@@ -234,14 +235,14 @@ class PeriodLattice_ell(PeriodLattice):
234
235
  # the given embedding:
235
236
 
236
237
  K = E.base_field()
237
- self.is_approximate = isinstance(K, (RealField_class, ComplexField_class))
238
+ self._is_exact = K.is_exact()
238
239
  if embedding is None:
239
240
  if K in (AA, QQbar):
240
241
  embedding = K.hom(QQbar)
241
242
  real = K == AA
242
- elif self.is_approximate:
243
- embedding = K.hom(K)
244
- real = isinstance(K, RealField_class)
243
+ elif not self._is_exact:
244
+ embedding = IdentityMorphism(K)
245
+ real = isinstance(K, (sage.rings.abc.RealField, sage.rings.abc.RealDoubleField))
245
246
  else:
246
247
  embs = K.embeddings(AA)
247
248
  real = len(embs) > 0
@@ -274,24 +275,24 @@ class PeriodLattice_ell(PeriodLattice):
274
275
  # The ei are used both for period computation and elliptic
275
276
  # logarithms.
276
277
 
277
- if self.is_approximate:
278
- self.f2 = self.E.two_division_polynomial()
279
- else:
278
+ if self._is_exact:
280
279
  self.Ebar = self.E.change_ring(self.embedding)
281
280
  self.f2 = self.Ebar.two_division_polynomial()
281
+ else:
282
+ self.f2 = self.E.two_division_polynomial()
282
283
  if self.real_flag == 1: # positive discriminant
283
- self._ei = self.f2.roots(K if self.is_approximate else AA,multiplicities=False)
284
+ self._ei = self.f2.roots(AA if self._is_exact else K, multiplicities=False)
284
285
  self._ei.sort() # e1 < e2 < e3
285
286
  e1, e2, e3 = self._ei
286
287
  elif self.real_flag == -1: # negative discriminant
287
- self._ei = self.f2.roots(ComplexField(K.precision()) if self.is_approximate else QQbar, multiplicities=False)
288
+ self._ei = self.f2.roots(QQbar if self._is_exact else ComplexField(K.precision()), multiplicities=False)
288
289
  self._ei = sorted(self._ei, key=lambda z: z.imag())
289
290
  e1, e3, e2 = self._ei # so e3 is real
290
- if not self.is_approximate:
291
+ if self._is_exact:
291
292
  e3 = AA(e3)
292
293
  self._ei = [e1, e2, e3]
293
294
  else:
294
- self._ei = self.f2.roots(ComplexField(K.precision()) if self.is_approximate else QQbar, multiplicities=False)
295
+ self._ei = self.f2.roots(QQbar if self._is_exact else ComplexField(K.precision()), multiplicities=False)
295
296
  e1, e2, e3 = self._ei
296
297
 
297
298
  # The quantities sqrt(e_i-e_j) are cached (as elements of
@@ -354,7 +355,7 @@ class PeriodLattice_ell(PeriodLattice):
354
355
  Defn: a |--> 1.259921049894873?
355
356
  """
356
357
  K = self.E.base_field()
357
- if K in (QQ, AA, QQbar) or isinstance(K, (RealField_class, ComplexField_class)):
358
+ if K in (QQ, AA, QQbar) or isinstance(self.embedding, IdentityMorphism):
358
359
  return "Period lattice associated to %s" % (self.E)
359
360
  return "Period lattice associated to %s with respect to the embedding %s" % (self.E, self.embedding)
360
361
 
@@ -667,7 +668,7 @@ class PeriodLattice_ell(PeriodLattice):
667
668
  r"""
668
669
  Internal function to compute the default precision to be used if nothing is passed in.
669
670
  """
670
- return self.E.base_field().precision() if self.is_approximate else RealField().precision()
671
+ return RealField().precision() if self._is_exact else self.E.base_field().precision()
671
672
 
672
673
  @cached_method
673
674
  def _compute_periods_real(self, prec=None, algorithm='sage'):
@@ -715,7 +716,7 @@ class PeriodLattice_ell(PeriodLattice):
715
716
 
716
717
  if algorithm == 'pari':
717
718
  ainvs = self.E.a_invariants()
718
- if self.E.base_field() is not QQ and not self.is_approximate:
719
+ if self.E.base_field() is not QQ and self._is_exact:
719
720
  ainvs = [C(self.embedding(ai)).real() for ai in ainvs]
720
721
 
721
722
  # The precision for omega() is determined by ellinit()
@@ -727,7 +728,7 @@ class PeriodLattice_ell(PeriodLattice):
727
728
  raise ValueError("invalid value of 'algorithm' parameter")
728
729
 
729
730
  pi = R.pi()
730
- # Up to now everything has been exact in AA or QQbar (unless self.is_approximate),
731
+ # Up to now everything has been exact in AA or QQbar (if self._is_exact),
731
732
  # but now we must go transcendental. Only now is the desired precision used!
732
733
  if self.real_flag == 1: # positive discriminant
733
734
  a, b, c = (R(x) for x in self._abc)
@@ -799,7 +800,7 @@ class PeriodLattice_ell(PeriodLattice):
799
800
  prec = self._compute_default_prec()
800
801
  C = ComplexField(prec)
801
802
 
802
- # Up to now everything has been exact in AA or QQbar (unless self.is_approximate),
803
+ # Up to now everything has been exact in AA or QQbar (if self._is_exact),
803
804
  # but now we must go transcendental. Only now is the desired precision used!
804
805
  pi = C.pi()
805
806
  a, b, c = (C(x) for x in self._abc)
@@ -1188,6 +1189,38 @@ class PeriodLattice_ell(PeriodLattice):
1188
1189
  """
1189
1190
  return self.E
1190
1191
 
1192
+ @property
1193
+ def is_approximate(self):
1194
+ """
1195
+ ``self.is_approximate`` is deprecated, use ``not self.curve().is_exact()`` instead.
1196
+
1197
+ TESTS::
1198
+
1199
+ sage: E = EllipticCurve(ComplexField(100), [I, 3*I+4])
1200
+ sage: L = E.period_lattice()
1201
+ sage: L.is_approximate
1202
+ doctest:...: DeprecationWarning: The attribute is_approximate for period lattice is deprecated,
1203
+ use self.curve().is_exact() instead.
1204
+ See https://github.com/sagemath/sage/issues/39212 for details.
1205
+ True
1206
+ sage: L.curve() is E
1207
+ True
1208
+ sage: E.is_exact()
1209
+ False
1210
+ sage: E = EllipticCurve(QQ, [0, 2])
1211
+ sage: L = E.period_lattice()
1212
+ sage: L.is_approximate
1213
+ False
1214
+ sage: L.curve() is E
1215
+ True
1216
+ sage: E.is_exact()
1217
+ True
1218
+ """
1219
+ from sage.misc.superseded import deprecation
1220
+ deprecation(39212, "The attribute is_approximate for period lattice is "
1221
+ "deprecated, use self.curve().is_exact() instead.")
1222
+ return not self._is_exact
1223
+
1191
1224
  def ei(self):
1192
1225
  r"""
1193
1226
  Return the x-coordinates of the 2-division points of the elliptic curve associated
@@ -1785,10 +1818,19 @@ class PeriodLattice_ell(PeriodLattice):
1785
1818
  sage: L.real_flag
1786
1819
  -1
1787
1820
  sage: P = E(3, 6)
1788
- sage: L.elliptic_logarithm(P)
1821
+ sage: L.elliptic_logarithm(P) # abs tol 1e-26
1789
1822
  2.4593388737550379526023682666
1790
- sage: L.elliptic_exponential(_)
1823
+ sage: L.elliptic_exponential(_) # abs tol 1e-26
1791
1824
  (3.0000000000000000000000000000 : 5.9999999999999999999999999999 : 1.0000000000000000000000000000)
1825
+ sage: E = EllipticCurve(RDF, [1, 6])
1826
+ sage: L = E.period_lattice()
1827
+ sage: L.real_flag
1828
+ -1
1829
+ sage: P = E(3, 6)
1830
+ sage: L.elliptic_logarithm(P) # abs tol 1e-13
1831
+ 2.45933887375504
1832
+ sage: L.elliptic_exponential(_) # abs tol 1e-13
1833
+ (3.00000000000000 : 6.00000000000001 : 1.00000000000000)
1792
1834
 
1793
1835
  Real approximate field, positive discriminant::
1794
1836
 
@@ -1797,9 +1839,9 @@ class PeriodLattice_ell(PeriodLattice):
1797
1839
  sage: L.real_flag
1798
1840
  1
1799
1841
  sage: P = E.lift_x(4)
1800
- sage: L.elliptic_logarithm(P)
1842
+ sage: L.elliptic_logarithm(P) # abs tol 1e-26
1801
1843
  0.51188849089267627141925354967
1802
- sage: L.elliptic_exponential(_)
1844
+ sage: L.elliptic_exponential(_) # abs tol 1e-26
1803
1845
  (4.0000000000000000000000000000 : -7.1414284285428499979993998114 : 1.0000000000000000000000000000)
1804
1846
 
1805
1847
  Complex approximate field::
@@ -1809,10 +1851,19 @@ class PeriodLattice_ell(PeriodLattice):
1809
1851
  sage: L.real_flag
1810
1852
  0
1811
1853
  sage: P = E.lift_x(4)
1812
- sage: L.elliptic_logarithm(P)
1854
+ sage: L.elliptic_logarithm(P) # abs tol 1e-26
1813
1855
  -1.1447032790074574712147458157 - 0.72429843602171875396186134806*I
1814
- sage: L.elliptic_exponential(_)
1856
+ sage: L.elliptic_exponential(_) # abs tol 1e-26
1815
1857
  (4.0000000000000000000000000000 + 1.2025589033682610849950210280e-30*I : -8.2570982991257407680322611854 - 0.42387771989714340809597881586*I : 1.0000000000000000000000000000)
1858
+ sage: E = EllipticCurve(CDF, [I, 3*I+4])
1859
+ sage: L = E.period_lattice()
1860
+ sage: L.real_flag
1861
+ 0
1862
+ sage: P = E.lift_x(4)
1863
+ sage: L.elliptic_logarithm(P) # abs tol 1e-13
1864
+ -1.14470327900746 - 0.724298436021719*I
1865
+ sage: L.elliptic_exponential(_) # abs tol 1e-13
1866
+ (4.00000000000000 - 0*I : -8.25709829912574 - 0.423877719897148*I : 1.00000000000000)
1816
1867
  """
1817
1868
  if P.curve() is not self.E:
1818
1869
  raise ValueError("Point is on the wrong curve")
@@ -2030,10 +2081,10 @@ class PeriodLattice_ell(PeriodLattice):
2030
2081
 
2031
2082
  if to_curve:
2032
2083
  K = x.parent()
2033
- if self.is_approximate:
2034
- v = self.embedding
2035
- else:
2084
+ if self._is_exact:
2036
2085
  v = refine_embedding(self.embedding, Infinity)
2086
+ else:
2087
+ v = self.embedding
2037
2088
  a1, a2, a3, a4, a6 = (K(v(a)) for a in self.E.ainvs())
2038
2089
  b2 = K(v(self.E.b2()))
2039
2090
  x = x - b2 / 12
@@ -331,7 +331,7 @@ class Sha(SageObject):
331
331
  Traceback (most recent call last):
332
332
  ...
333
333
  RuntimeError: Unable to compute the rank, hence generators, with certainty
334
- (lower bound=0, generators found=[]). This could be because Sha(E/Q)[2] is
334
+ (lower bound=0, generators found=()). This could be because Sha(E/Q)[2] is
335
335
  nontrivial. Try increasing descent_second_limit then trying this command again.
336
336
 
337
337
  You can increase the ``descent_second_limit`` (in the above example,
@@ -630,7 +630,7 @@ class WeierstrassIsomorphism(EllipticCurveHom, baseWI):
630
630
  EXAMPLES::
631
631
 
632
632
  sage: # needs database_cremona_mini_ellcurve
633
- sage: from sage.schemes.elliptic_curves.weierstrass_morphism import *
633
+ sage: from sage.schemes.elliptic_curves.weierstrass_morphism import WeierstrassIsomorphism
634
634
  sage: E = EllipticCurve('37a1')
635
635
  sage: w = WeierstrassIsomorphism(E,(2,3,4,5))
636
636
  sage: P = E(0,-1)
@@ -736,7 +736,7 @@ class WeierstrassIsomorphism(EllipticCurveHom, baseWI):
736
736
  sage: phi = E1.isogeny(E1(0,0))
737
737
  sage: E2 = phi.codomain()
738
738
  sage: psi = E2.isogeny(E2(0,0))
739
- sage: w1._composition_impl(psi, phi)
739
+ sage: w1._composition_impl(psi, phi) # needs database_cremona_mini_ellcurve
740
740
  NotImplemented
741
741
  """
742
742
  if isinstance(left, WeierstrassIsomorphism) and isinstance(right, WeierstrassIsomorphism):
@@ -631,7 +631,7 @@ class HyperellipticCurve_generic(plane_curve.ProjectivePlaneCurve):
631
631
  from .constructor import HyperellipticCurve
632
632
  return HyperellipticCurve(fnew, 0, names=self._names, PP=self._PP)
633
633
 
634
- def has_odd_degree_model(self):
634
+ def has_odd_degree_model(self) -> bool:
635
635
  r"""
636
636
  Return ``True`` if an odd degree model of ``self`` exists over the
637
637
  field of definition; ``False`` otherwise.
@@ -63,7 +63,7 @@ the LMFDB label of the curve is 169.a.169.1::
63
63
  sage: A.geometric_endomorphism_algebra_is_field() # needs sage.groups
64
64
  False
65
65
 
66
- .. WARNING:
66
+ .. WARNING::
67
67
 
68
68
  There is a very small chance that the algorithms return ``False`` for the
69
69
  two methods described above when in fact one or both of them are ``True``.
@@ -569,15 +569,10 @@ class SpecialCubicQuotientRing(UniqueRepresentation, Parent):
569
569
  """
570
570
  return self._poly_ring
571
571
 
572
- def gens(self):
572
+ def gens(self) -> tuple:
573
573
  """
574
- Return a list [x, T] where x and T are the generators of the ring
575
- (as element *of this ring*).
576
-
577
- .. NOTE::
578
-
579
- I have no idea if this is compatible with the usual Sage
580
- 'gens' interface.
574
+ Return (x, T) where x and T are the generators of the ring
575
+ (as elements *of this ring*).
581
576
 
582
577
  EXAMPLES::
583
578
 
@@ -2545,7 +2540,7 @@ class SpecialHyperellipticQuotientRing(UniqueRepresentation, Parent):
2545
2540
  """
2546
2541
  return self.element_class(self, self._poly_ring.zero(), check=False)
2547
2542
 
2548
- def gens(self):
2543
+ def gens(self) -> tuple:
2549
2544
  """
2550
2545
  Return the generators of ``self``.
2551
2546
 
@@ -2686,7 +2681,7 @@ class SpecialHyperellipticQuotientRing(UniqueRepresentation, Parent):
2686
2681
  mat_2[i] = self._precomputed_diff_coeffs[i][2]
2687
2682
  return mat_1.transpose(), mat_2.transpose()
2688
2683
 
2689
- def _precompute_monomial_diffs(self):
2684
+ def _precompute_monomial_diffs(self) -> list:
2690
2685
  r"""
2691
2686
  Precompute coefficients of the basis representation of `d(x^iy^j)`
2692
2687
  for small `i`, `j`.
@@ -3818,6 +3813,7 @@ class MonskyWashnitzerDifferentialRing(UniqueRepresentation, Module):
3818
3813
  F.append(F_i)
3819
3814
  return F
3820
3815
 
3816
+ @cached_method
3821
3817
  def helper_matrix(self):
3822
3818
  r"""
3823
3819
  We use this to solve for the linear combination of
@@ -3835,22 +3831,16 @@ class MonskyWashnitzerDifferentialRing(UniqueRepresentation, Module):
3835
3831
  [-100/2101 -125/2101 -625/8404 -64/2101 -80/2101]
3836
3832
  [ -80/2101 -100/2101 -125/2101 -625/8404 -64/2101]
3837
3833
  """
3838
- try:
3839
- return self._helper_matrix
3840
- except AttributeError:
3841
- pass
3842
-
3843
3834
  # The smallest y term of (1/j) d(x^i y^j) is constant for all j.
3844
3835
  x, y = self.base_ring().gens()
3845
3836
  n = self.degree()
3846
3837
  L = [(y * x**i).diff().extract_pow_y(0) for i in range(n)]
3847
3838
  A = matrix(L).transpose()
3848
3839
  if A.base_ring() not in IntegralDomains():
3849
- # must be using integer_mod or something to approximate
3850
- self._helper_matrix = (~A.change_ring(QQ)).change_ring(A.base_ring())
3851
- else:
3852
- self._helper_matrix = ~A
3853
- return self._helper_matrix
3840
+ # must be using integer_mod or something to approximate ?
3841
+ return (~A.change_ring(QQ)).change_ring(A.base_ring())
3842
+
3843
+ return ~A
3854
3844
 
3855
3845
  def _element_constructor_(self, val=0, offset=0):
3856
3846
  r"""
@@ -21,7 +21,7 @@ AUTHORS:
21
21
 
22
22
  from sage.categories.schemes import Jacobians
23
23
  from sage.categories.fields import Fields
24
- from sage.schemes.generic.scheme import Scheme, is_Scheme
24
+ from sage.schemes.generic.scheme import Scheme
25
25
  from sage.structure.richcmp import richcmp_method, richcmp
26
26
 
27
27
  _Fields = Fields()
@@ -71,8 +71,8 @@ class ProjectiveConic_field(ProjectivePlaneCurve_field):
71
71
  Projective Conic Curve over Rational Field defined by x^2 + y^2 + z^2
72
72
  """
73
73
  super().__init__(A, f)
74
- self._coefficients = [f[(2,0,0)], f[(1,1,0)], f[(1,0,1)],
75
- f[(0,2,0)], f[(0,1,1)], f[(0,0,2)]]
74
+ self._coefficients = [f[(2, 0, 0)], f[(1, 1, 0)], f[(1, 0, 1)],
75
+ f[(0, 2, 0)], f[(0, 1, 1)], f[(0, 0, 2)]]
76
76
  self._parametrization = None
77
77
  self._diagonal_matrix = None
78
78
 
@@ -117,13 +117,13 @@ class ProjectiveConic_field(ProjectivePlaneCurve_field):
117
117
  return self
118
118
  if not S.has_coerce_map_from(B):
119
119
  raise ValueError("No natural map from the base ring of self "
120
- "(= %s) to S (= %s)" % (self, S))
120
+ "(= %s) to S (= %s)" % (self, S))
121
121
  from .constructor import Conic
122
122
  con = Conic([S(c) for c in self.coefficients()],
123
123
  self.variable_names())
124
124
  if self._rational_point is not None:
125
125
  pt = [S(c) for c in Sequence(self._rational_point)]
126
- if not pt == [0,0,0]:
126
+ if not pt == [0, 0, 0]:
127
127
  # The following line stores the point in the cache
128
128
  # if (and only if) there is no point in the cache.
129
129
  pt = con.point(pt)
@@ -285,26 +285,26 @@ class ProjectiveConic_field(ProjectivePlaneCurve_field):
285
285
  """
286
286
  A = self.symmetric_matrix()
287
287
  B = self.base_ring()
288
- basis = [vector(B,{2:0,i:1}) for i in range(3)]
288
+ basis = [vector(B, {2: 0, i: 1}) for i in range(3)]
289
289
  for i in range(3):
290
290
  zerovalue = (basis[i]*A*basis[i].column() == 0)
291
291
  if zerovalue:
292
- for j in range(i+1,3):
292
+ for j in range(i+1, 3):
293
293
  if basis[j]*A*basis[j].column() != 0:
294
294
  b = basis[i]
295
295
  basis[i] = basis[j]
296
296
  basis[j] = b
297
297
  zerovalue = False
298
298
  if zerovalue:
299
- for j in range(i+1,3):
299
+ for j in range(i+1, 3):
300
300
  if basis[i]*A*basis[j].column() != 0:
301
301
  basis[i] = basis[i]+basis[j]
302
302
  zerovalue = False
303
303
  if not zerovalue:
304
304
  l = (basis[i]*A*basis[i].column())
305
- for j in range(i+1,3):
305
+ for j in range(i+1, 3):
306
306
  basis[j] = basis[j] - \
307
- (basis[i]*A*basis[j].column())/l * basis[i]
307
+ (basis[i]*A*basis[j].column())/l * basis[i]
308
308
  T = matrix(basis).transpose()
309
309
  return T.transpose()*A*T, T
310
310
 
@@ -378,7 +378,7 @@ class ProjectiveConic_field(ProjectivePlaneCurve_field):
378
378
  con = Conic(D, names=names)
379
379
  return con, con.hom(T, self), self.hom(T.inverse(), con)
380
380
 
381
- def gens(self):
381
+ def gens(self) -> tuple:
382
382
  r"""
383
383
  Return the generators of the coordinate ring of ``self``.
384
384
 
@@ -538,24 +538,24 @@ class ProjectiveConic_field(ProjectivePlaneCurve_field):
538
538
 
539
539
  if isinstance(B, sage.rings.abc.ComplexField):
540
540
  if point:
541
- [_,_,_,d,e,f] = self._coefficients
541
+ _, _, _, d, e, f = self._coefficients
542
542
  if d == 0:
543
- return True, self.point([0,1,0])
543
+ return True, self.point([0, 1, 0])
544
544
  return True, self.point([0, ((e**2-4*d*f).sqrt()-e)/(2*d), 1],
545
545
  check=False)
546
546
  return True
547
547
  if isinstance(B, sage.rings.abc.RealField):
548
548
  D, T = self.diagonal_matrix()
549
- [a, b, c] = [D[0,0], D[1,1], D[2,2]]
549
+ a, b, c = [D[0, 0], D[1, 1], D[2, 2]]
550
550
  if a == 0:
551
- ret = True, self.point(T*vector([1,0,0]), check=False)
551
+ ret = True, self.point(T*vector([1, 0, 0]), check=False)
552
552
  elif a*c <= 0:
553
- ret = True, self.point(T*vector([(-c/a).sqrt(),0,1]),
553
+ ret = True, self.point(T*vector([(-c/a).sqrt(), 0, 1]),
554
554
  check=False)
555
555
  elif b == 0:
556
- ret = True, self.point(T*vector([0,1,0]), check=False)
556
+ ret = True, self.point(T*vector([0, 1, 0]), check=False)
557
557
  elif b*c <= 0:
558
- ret = True, self.point(T*vector([0,(-c/b).sqrt(),0,1]),
558
+ ret = True, self.point(T*vector([0, (-c/b).sqrt(), 0, 1]),
559
559
  check=False)
560
560
  else:
561
561
  ret = False, None
@@ -618,16 +618,16 @@ class ProjectiveConic_field(ProjectivePlaneCurve_field):
618
618
  return ret[0]
619
619
  B = self.base_ring()
620
620
  if B.characteristic() == 2:
621
- [a,b,c,d,e,f] = self.coefficients()
621
+ a, b, c, d, e, f = self.coefficients()
622
622
  if b == 0 and c == 0 and e == 0:
623
623
  for i in range(3):
624
624
  if [a, d, f][i] == 0:
625
- return True, self.point(vector(B, {2:0, i:1}))
625
+ return True, self.point(vector(B, {2: 0, i: 1}))
626
626
  if hasattr(a/f, 'is_square') and hasattr(a/f, 'sqrt'):
627
627
  if (a/f).is_square():
628
- return True, self.point([1,0,(a/f).sqrt()])
628
+ return True, self.point([1, 0, (a/f).sqrt()])
629
629
  if (d/f).is_square():
630
- return True, self.point([0,1,(d/f).sqrt()])
630
+ return True, self.point([0, 1, (d/f).sqrt()])
631
631
  raise NotImplementedError("Sorry, find singular point on conics not implemented over all fields of characteristic 2.")
632
632
  pt = [e, c, b]
633
633
  if self.defining_polynomial()(pt) == 0:
@@ -761,7 +761,7 @@ class ProjectiveConic_field(ProjectivePlaneCurve_field):
761
761
  True
762
762
  """
763
763
  if self.base_ring().characteristic() == 2:
764
- [a,b,c,d,e,f] = self.coefficients()
764
+ a, b, c, d, e, f = self.coefficients()
765
765
  if b == 0 and c == 0 and e == 0:
766
766
  return False
767
767
  return self.defining_polynomial()([e, c, b]) != 0
@@ -804,7 +804,7 @@ class ProjectiveConic_field(ProjectivePlaneCurve_field):
804
804
  kmn = magma(self.base_ring())._ref()
805
805
  coeffs = self.coefficients()
806
806
  magma_coeffs = [coeffs[i]._magma_init_(magma) for i in [0, 3, 5, 1, 4, 2]]
807
- return 'Conic([%s|%s])' % (kmn,','.join(magma_coeffs))
807
+ return 'Conic([%s|%s])' % (kmn, ','.join(magma_coeffs))
808
808
 
809
809
  def matrix(self):
810
810
  r"""
@@ -869,7 +869,7 @@ class ProjectiveConic_field(ProjectivePlaneCurve_field):
869
869
  sage: set(f(p) for p in f.domain())
870
870
  {(0 : 0 : 1), (0 : 1 : 1), (1 : 0 : 1)}
871
871
 
872
- Verfication of the example ::
872
+ Verification of the example ::
873
873
 
874
874
  sage: # needs sage.libs.pari
875
875
  sage: h = g*f; h
@@ -946,28 +946,28 @@ class ProjectiveConic_field(ProjectivePlaneCurve_field):
946
946
  point = Sequence(point)
947
947
  B = self.base_ring()
948
948
  Q = PolynomialRing(B, 'x,y')
949
- [x, y] = Q.gens()
949
+ x, y = Q.gens()
950
950
  gens = self.ambient_space().gens()
951
951
  P = PolynomialRing(B, 4, ['X', 'Y', 'T0', 'T1'])
952
- [X, Y, T0, T1] = P.gens()
953
- c3 = [j for j in range(2,-1,-1) if point[j] != 0][0]
954
- c1 = [j for j in range(3) if j != c3][0]
955
- c2 = [j for j in range(3) if j != c3 and j != c1][0]
956
- L = [0,0,0]
957
- L[c1] = Y*T1*point[c1] + Y*T0
958
- L[c2] = Y*T1*point[c2] + X*T0
959
- L[c3] = Y*T1*point[c3]
952
+ X, Y, T0, T1 = P.gens()
953
+ c3 = next(j for j in range(2, -1, -1) if point[j] != 0)
954
+ c1 = next(j for j in range(3) if j != c3)
955
+ c2 = next(j for j in range(3) if j != c3 and j != c1)
956
+ L = [0, 0, 0]
957
+ L[c1] = Y * T1 * point[c1] + Y * T0
958
+ L[c2] = Y * T1 * point[c2] + X * T0
959
+ L[c3] = Y * T1 * point[c3]
960
960
  bezout = P(self.defining_polynomial()(L) / T0)
961
- t = [bezout([x,y,0,-1]),bezout([x,y,1,0])]
962
- par = (tuple([Q(p([x,y,t[0],t[1]])/y) for p in L]),
963
- tuple([gens[m]*point[c3]-gens[c3]*point[m]
964
- for m in [c2,c1]]))
961
+ t = [bezout([x, y, 0, -1]), bezout([x, y, 1, 0])]
962
+ par = (tuple([Q(p([x, y, t[0], t[1]]) / y) for p in L]),
963
+ tuple([gens[m] * point[c3] - gens[c3] * point[m]
964
+ for m in [c2, c1]]))
965
965
  if self._parametrization is None:
966
966
  self._parametrization = par
967
967
  if not morphism:
968
968
  return par
969
969
  P1 = ProjectiveSpace(self.base_ring(), 1, 'x,y')
970
- return P1.hom(par[0],self), self.Hom(P1)(par[1], check=False)
970
+ return P1.hom(par[0], self), self.Hom(P1)(par[1], check=False)
971
971
 
972
972
  def point(self, v, check=True):
973
973
  r"""
@@ -1266,10 +1266,10 @@ class ProjectiveConic_field(ProjectivePlaneCurve_field):
1266
1266
  x^2 + 2*x*y + y^2 + 3*x*z + z^2
1267
1267
  """
1268
1268
  from sage.matrix.constructor import matrix
1269
- [a,b,c,d,e,f] = self.coefficients()
1270
- return matrix([[ a, b, c ],
1271
- [ 0, d, e ],
1272
- [ 0, 0, f ]])
1269
+ a, b, c, d, e, f = self.coefficients()
1270
+ return matrix([[a, b, c],
1271
+ [0, d, e],
1272
+ [0, 0, f]])
1273
1273
 
1274
1274
  def variable_names(self):
1275
1275
  r"""
@@ -387,7 +387,7 @@ class ProjectiveConic_rational_field(ProjectiveConic_number_field):
387
387
  point = self.rational_point()
388
388
  point = Sequence(point)
389
389
  Q = PolynomialRing(QQ, 'x,y')
390
- [x, y] = Q.gens()
390
+ x, y = Q.gens()
391
391
  gens = self.ambient_space().gens()
392
392
  M = self.symmetric_matrix()
393
393
  M *= lcm([t.denominator() for t in M.list()])
@@ -115,7 +115,7 @@ The initial version of this code was developed alongside [BSZ2019]_.
115
115
 
116
116
  from scipy.spatial import Voronoi
117
117
  from sage.arith.functions import lcm
118
- from sage.arith.misc import GCD, algdep
118
+ from sage.arith.misc import GCD, algebraic_dependency
119
119
  from sage.ext.fast_callable import fast_callable
120
120
  from sage.graphs.graph import Graph
121
121
  from sage.groups.matrix_gps.finitely_generated import MatrixGroup
@@ -618,7 +618,7 @@ class RiemannSurface:
618
618
  sage: f = Y^2+X*Y+phi*Y-(X^3-X^2-2*phi*X+phi)
619
619
  sage: S = RiemannSurface(f,prec=prec, differentials=[1])
620
620
  sage: tau = S.riemann_matrix()[0, 0]
621
- sage: tau.algdep(6).degree() == 2
621
+ sage: tau.algebraic_dependency(6).degree() == 2
622
622
  True
623
623
  """
624
624
 
@@ -2294,7 +2294,7 @@ class RiemannSurface:
2294
2294
  sage: m = S.matrix_of_integral_values(B)
2295
2295
  sage: parent(m)
2296
2296
  Full MatrixSpace of 1 by 2 dense matrices over Complex Field with 53 bits of precision
2297
- sage: (m[0,0]/m[0,1]).algdep(3).degree() # curve is CM, so the period is quadratic
2297
+ sage: (m[0,0]/m[0,1]).algebraic_dependency(3).degree() # curve is CM, so the period is quadratic
2298
2298
  2
2299
2299
 
2300
2300
  .. NOTE::
@@ -2414,7 +2414,7 @@ class RiemannSurface:
2414
2414
 
2415
2415
  sage: x = polygen(QQ)
2416
2416
  sage: K.<a> = NumberField(x^2 - x + 2)
2417
- sage: all(len(m.algdep(6).roots(K)) > 0 for m in M.list())
2417
+ sage: all(len(m.algebraic_dependency(6).roots(K)) > 0 for m in M.list())
2418
2418
  True
2419
2419
  """
2420
2420
  PeriodMatrix = self.period_matrix()
@@ -2691,7 +2691,7 @@ class RiemannSurface:
2691
2691
  d = 1
2692
2692
  while True:
2693
2693
  d += 1
2694
- dep = algdep(alpha, d, height_bound=10**d)
2694
+ dep = algebraic_dependency(alpha, d, height_bound=10**d)
2695
2695
  if dep and dep(alpha) < epscomp:
2696
2696
  return dep
2697
2697
 
@@ -2974,7 +2974,7 @@ class RiemannSurface:
2974
2974
  mp_list = [reparameterize_differential_minpoly(mp, z_start) for mp in mp_list]
2975
2975
 
2976
2976
  # Depending on whether we have reparameterized about infinity or not,
2977
- # we initialise some values we will need in the calculation, inclduing
2977
+ # we initialise some values we will need in the calculation, including
2978
2978
  # the function `initalize', which at a given value of zbar, calculates
2979
2979
  # the starting value for the i-th differential so it can be iterated
2980
2980
  # from via homotopy continuation.
@@ -3871,8 +3871,8 @@ class RiemannSurface:
3871
3871
  ys = []
3872
3872
  for gi in gis:
3873
3873
  # This test is a bit clunky, it surely can be made more efficient.
3874
- if len(ys):
3875
- ers = min([gi(y, r).abs() for y in ys])
3874
+ if ys:
3875
+ ers = min(gi(y, r).abs() for y in ys)
3876
3876
  else:
3877
3877
  ers = 1
3878
3878
 
Binary file