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
@@ -275,7 +275,7 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
275
275
  sage: (-G.I()).word_S_T()[1]
276
276
  [-1 0]
277
277
  [ 0 -1]
278
- sage: (L, sgn) = (-G.V(2)).word_S_T()
278
+ sage: L, sgn = (-G.V(2)).word_S_T()
279
279
  sage: L
280
280
  (
281
281
  [ 1 lam] [ 0 -1] [ 1 lam]
@@ -285,7 +285,7 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
285
285
  True
286
286
  sage: -G.V(2) == sgn * prod(L)
287
287
  True
288
- sage: (L, sgn) = G.U().word_S_T()
288
+ sage: L, sgn = G.U().word_S_T()
289
289
  sage: L
290
290
  (
291
291
  [ 1 lam] [ 0 -1]
@@ -297,7 +297,7 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
297
297
  True
298
298
 
299
299
  sage: G = HeckeTriangleGroup(n=infinity)
300
- sage: (L, sgn) = (-G.V(2)*G.V(3)).word_S_T()
300
+ sage: L, sgn = (-G.V(2)*G.V(3)).word_S_T()
301
301
  sage: L
302
302
  (
303
303
  [1 2] [ 0 -1] [1 4] [ 0 -1] [1 2] [ 0 -1] [1 2]
@@ -308,7 +308,7 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
308
308
  """
309
309
  Tf = self.parent().T
310
310
  S = self.parent().S()
311
- (L, sgn) = self._word_S_T_data()
311
+ L, sgn = self._word_S_T_data()
312
312
 
313
313
  M = [S if v[0] == 0 else Tf(v[1]) for v in L]
314
314
  if sgn > 0:
@@ -453,8 +453,8 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
453
453
  """
454
454
  if method == "default":
455
455
  return MatrixGroupElement_generic._repr_(self)
456
- elif method == "basic":
457
- (L, sgn) = self._word_S_T_data()
456
+ if method == "basic":
457
+ L, sgn = self._word_S_T_data()
458
458
 
459
459
  if not L:
460
460
  return "-1" if sgn < 0 else "1"
@@ -475,12 +475,12 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
475
475
 
476
476
  return "-" + Lstr if sgn < 0 else Lstr
477
477
 
478
- elif method == "block":
478
+ if method == "block":
479
479
  if self.parent().n() == infinity:
480
480
  from warnings import warn
481
481
  warn("The case n=infinity here is not verified at all and probably wrong!")
482
482
 
483
- (L, R, sgn) = self._block_decomposition_data()
483
+ L, R, sgn = self._block_decomposition_data()
484
484
 
485
485
  repr_str = self.string_repr(method='conj')
486
486
  repr_str = repr_str[1:-1]
@@ -496,12 +496,12 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
496
496
 
497
497
  return repr_str
498
498
 
499
- elif method == "conj":
499
+ if method == "conj":
500
500
  if self.parent().n() == infinity:
501
501
  from warnings import warn
502
502
  warn("The case n=infinity here is not verified at all and probably wrong!")
503
503
 
504
- (L, R, sgn) = self._block_decomposition_data()
504
+ L, R, sgn = self._block_decomposition_data()
505
505
 
506
506
  if self.is_elliptic():
507
507
  L = [L]
@@ -541,13 +541,11 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
541
541
  repr_str += "1"
542
542
 
543
543
  if sgn < 0:
544
- repr_str = "-{}".format(repr_str)
544
+ repr_str = f"-{repr_str}"
545
545
 
546
- repr_str = "[{}]".format(repr_str)
546
+ return f"[{repr_str}]"
547
547
 
548
- return repr_str
549
- else:
550
- raise NotImplementedError
548
+ raise NotImplementedError
551
549
 
552
550
  # We cache this method since the calculation is rather long and the
553
551
  # result is being reused:
@@ -722,58 +720,58 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
722
720
  sage: G = HeckeTriangleGroup(n=7)
723
721
  sage: G.element_repr_method("basic")
724
722
 
725
- sage: (L, R) = G.T()._primitive_block_decomposition_data()
723
+ sage: L, R = G.T()._primitive_block_decomposition_data()
726
724
  sage: L
727
725
  ((1, 1),)
728
726
  sage: R
729
727
  T^(-1)
730
- sage: (L, R) = G.V(2).acton(G.T(-3))._primitive_block_decomposition_data()
728
+ sage: L, R = G.V(2).acton(G.T(-3))._primitive_block_decomposition_data()
731
729
  sage: L
732
730
  ((6, 1),)
733
731
  sage: R
734
732
  T
735
- sage: (L, R) = (-G.V(2))._primitive_block_decomposition_data()
733
+ sage: L, R = (-G.V(2))._primitive_block_decomposition_data()
736
734
  sage: L
737
735
  ((2, 1),)
738
736
  sage: R
739
737
  T*S*T
740
- sage: (L, R) = (-G.V(2)^3*G.V(6)^2*G.V(3))._primitive_block_decomposition_data()
738
+ sage: L, R = (-G.V(2)^3*G.V(6)^2*G.V(3))._primitive_block_decomposition_data()
741
739
  sage: L
742
740
  ((2, 3), (6, 2), (3, 1))
743
741
  sage: R
744
742
  1
745
- sage: (L, R) = (G.U()^4*G.S()*G.V(2)).acton(-G.V(2)^3*G.V(6)^2*G.V(3))._primitive_block_decomposition_data()
743
+ sage: L, R = (G.U()^4*G.S()*G.V(2)).acton(-G.V(2)^3*G.V(6)^2*G.V(3))._primitive_block_decomposition_data()
746
744
  sage: L
747
745
  ((2, 3), (6, 2), (3, 1))
748
746
  sage: R
749
747
  T*S*T*S*T*S*T^2*S*T
750
- sage: (L, R) = (G.V(1)^5*G.V(2)*G.V(3)^3)._primitive_block_decomposition_data()
748
+ sage: L, R = (G.V(1)^5*G.V(2)*G.V(3)^3)._primitive_block_decomposition_data()
751
749
  sage: L
752
750
  ((3, 3), (1, 5), (2, 1))
753
751
  sage: R
754
752
  T^6*S*T
755
753
 
756
754
  sage: G.element_repr_method("default")
757
- sage: (L, R) = G.I()._primitive_block_decomposition_data()
755
+ sage: L, R = G.I()._primitive_block_decomposition_data()
758
756
  sage: L
759
757
  ((6, 0),)
760
758
  sage: R
761
759
  [1 0]
762
760
  [0 1]
763
761
 
764
- sage: (L, R) = G.U()._primitive_block_decomposition_data()
762
+ sage: L, R = G.U()._primitive_block_decomposition_data()
765
763
  sage: L
766
764
  (1, 1)
767
765
  sage: R
768
766
  [1 0]
769
767
  [0 1]
770
- sage: (L, R) = (-G.S())._primitive_block_decomposition_data()
768
+ sage: L, R = (-G.S())._primitive_block_decomposition_data()
771
769
  sage: L
772
770
  (0, 1)
773
771
  sage: R
774
772
  [-1 0]
775
773
  [ 0 -1]
776
- sage: (L, R) = (G.V(2)*G.V(3)).acton(G.U()^6)._primitive_block_decomposition_data()
774
+ sage: L, R = (G.V(2)*G.V(3)).acton(G.U()^6)._primitive_block_decomposition_data()
777
775
  sage: L
778
776
  (1, 1)
779
777
  sage: R
@@ -800,7 +798,7 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
800
798
  embp = emb(p)
801
799
  embp.simplify()
802
800
  embp.exactify()
803
- (R, embw) = G.get_FD(embp)
801
+ R, embw = G.get_FD(embp)
804
802
  w = R.inverse().acton(p)
805
803
  # we should have: embw == emb(w)
806
804
  embw = emb(w)
@@ -827,7 +825,7 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
827
825
  # The parabolic case is much simpler but the same algorithm
828
826
  # as in the hyperbolic case still works
829
827
 
830
- (preperiod, period) = self.continued_fraction()
828
+ preperiod, period = self.continued_fraction()
831
829
 
832
830
  number_of_ones = []
833
831
  list_larger = []
@@ -1047,7 +1045,7 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
1047
1045
  if self.parent().n() == infinity:
1048
1046
  raise NotImplementedError
1049
1047
 
1050
- (data, R) = self._primitive_block_decomposition_data()
1048
+ data, R = self._primitive_block_decomposition_data()
1051
1049
  if data[0] == 0:
1052
1050
  P = G.S()
1053
1051
  else:
@@ -1056,15 +1054,15 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
1056
1054
  return (P, R)
1057
1055
 
1058
1056
  if method == "cf":
1059
- (preperiod, period) = self.continued_fraction()
1057
+ preperiod, period = self.continued_fraction()
1060
1058
 
1061
- P = prod((G.T()**r*G.S() for r in period), G.I())
1062
- R = prod((G.T()**r*G.S() for r in preperiod), G.I())
1059
+ P = prod((G.T()**r * G.S() for r in period), G.I())
1060
+ R = prod((G.T()**r * G.S() for r in preperiod), G.I())
1063
1061
 
1064
1062
  return (P, R)
1065
1063
 
1066
1064
  elif method == "block":
1067
- (data_list, R) = self._primitive_block_decomposition_data()
1065
+ data_list, R = self._primitive_block_decomposition_data()
1068
1066
  P = prod((G.V(v[0])**v[1] for v in data_list), G.I())
1069
1067
 
1070
1068
  return (P, R)
@@ -1160,9 +1158,9 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
1160
1158
  from warnings import warn
1161
1159
  warn("The case n=infinity here is not verified at all and probably wrong!")
1162
1160
 
1163
- (P, R) = self.primitive_representative(method=method)
1161
+ P, R = self.primitive_representative(method=method)
1164
1162
 
1165
- return R*P*R.inverse()
1163
+ return R * P * R.inverse()
1166
1164
 
1167
1165
  def reduce(self, primitive=True):
1168
1166
  r"""
@@ -1218,7 +1216,7 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
1218
1216
  from warnings import warn
1219
1217
  warn("The case n=infinity here is not verified at all and probably wrong!")
1220
1218
 
1221
- (P, R) = self.primitive_representative(method='cf')
1219
+ P, R = self.primitive_representative(method='cf')
1222
1220
 
1223
1221
  if primitive:
1224
1222
  return P
@@ -1359,7 +1357,7 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
1359
1357
  if self.parent().n() == infinity:
1360
1358
  raise NotImplementedError
1361
1359
 
1362
- (data, R) = self._primitive_block_decomposition_data()
1360
+ data, R = self._primitive_block_decomposition_data()
1363
1361
  if data[0] == 0:
1364
1362
  return one
1365
1363
  else:
@@ -1373,7 +1371,7 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
1373
1371
  if U_power == Uj:
1374
1372
  # L = [one, ZZ(j)]
1375
1373
  break
1376
- elif U_power == -Uj:
1374
+ if U_power == -Uj:
1377
1375
  # L = [one, ZZ(-j)]
1378
1376
  break
1379
1377
  else:
@@ -1568,64 +1566,64 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
1568
1566
  sage: G = HeckeTriangleGroup(n=7)
1569
1567
  sage: G.element_repr_method("basic")
1570
1568
 
1571
- sage: (L, R, sgn) = G.T()._block_decomposition_data()
1569
+ sage: L, R, sgn = G.T()._block_decomposition_data()
1572
1570
  sage: (L, sgn)
1573
1571
  (((1, 1),), 1)
1574
1572
  sage: R
1575
1573
  T^(-1)
1576
- sage: (L, R, sgn) = G.V(2).acton(G.T(-3))._block_decomposition_data()
1574
+ sage: L, R, sgn = G.V(2).acton(G.T(-3))._block_decomposition_data()
1577
1575
  sage: (L, sgn)
1578
1576
  (((6, 3),), 1)
1579
1577
  sage: R
1580
1578
  T
1581
- sage: (L, R, sgn) = (-G.V(2)^2)._block_decomposition_data()
1579
+ sage: L, R, sgn = (-G.V(2)^2)._block_decomposition_data()
1582
1580
  sage: (L, sgn)
1583
1581
  (((2, 2),), -1)
1584
1582
  sage: R
1585
1583
  T*S*T
1586
1584
  sage: el = (-G.V(2)*G.V(6)*G.V(3)*G.V(2)*G.V(6)*G.V(3))
1587
- sage: (L, R, sgn) = el._block_decomposition_data()
1585
+ sage: L, R, sgn = el._block_decomposition_data()
1588
1586
  sage: (L, sgn)
1589
1587
  (((6, 1), (3, 1), (2, 1), (6, 1), (3, 1), (2, 1)), -1)
1590
1588
  sage: R
1591
1589
  T*S*T
1592
- sage: (L, R, sgn) = (G.U()^4*G.S()*G.V(2)).acton(el)._block_decomposition_data()
1590
+ sage: L, R, sgn = (G.U()^4*G.S()*G.V(2)).acton(el)._block_decomposition_data()
1593
1591
  sage: (L, sgn)
1594
1592
  (((2, 1), (6, 1), (3, 1), (2, 1), (6, 1), (3, 1)), -1)
1595
1593
  sage: R
1596
1594
  T*S*T*S*T*S*T^2*S*T
1597
- sage: (L, R, sgn) = (G.V(1)^5*G.V(2)*G.V(3)^3)._block_decomposition_data()
1595
+ sage: L, R, sgn = (G.V(1)^5*G.V(2)*G.V(3)^3)._block_decomposition_data()
1598
1596
  sage: (L, sgn)
1599
1597
  (((3, 3), (1, 5), (2, 1)), 1)
1600
1598
  sage: R
1601
1599
  T^6*S*T
1602
1600
 
1603
1601
  sage: G.element_repr_method("default")
1604
- sage: (L, R, sgn) = (-G.I())._block_decomposition_data()
1602
+ sage: L, R, sgn = (-G.I())._block_decomposition_data()
1605
1603
  sage: (L, sgn)
1606
1604
  (((6, 0),), -1)
1607
1605
  sage: R
1608
1606
  [1 0]
1609
1607
  [0 1]
1610
- sage: (L, R, sgn) = G.U()._block_decomposition_data()
1608
+ sage: L, R, sgn = G.U()._block_decomposition_data()
1611
1609
  sage: (L, sgn)
1612
1610
  ((1, 1), 1)
1613
1611
  sage: R
1614
1612
  [1 0]
1615
1613
  [0 1]
1616
- sage: (L, R, sgn) = (-G.S())._block_decomposition_data()
1614
+ sage: L, R, sgn = (-G.S())._block_decomposition_data()
1617
1615
  sage: (L, sgn)
1618
1616
  ((0, 1), -1)
1619
1617
  sage: R
1620
1618
  [-1 0]
1621
1619
  [ 0 -1]
1622
- sage: (L, R, sgn) = (G.V(2)*G.V(3)).acton(G.U()^6)._block_decomposition_data()
1620
+ sage: L, R, sgn = (G.V(2)*G.V(3)).acton(G.U()^6)._block_decomposition_data()
1623
1621
  sage: (L, sgn)
1624
1622
  ((1, -1), -1)
1625
1623
  sage: R
1626
1624
  [-2*lam^2 - 2*lam + 2 -2*lam^2 - 2*lam + 1]
1627
1625
  [ -2*lam^2 + 1 -2*lam^2 - lam + 2]
1628
- sage: (L, R, sgn) = (G.U()^(-6))._block_decomposition_data()
1626
+ sage: L, R, sgn = (G.U()^(-6))._block_decomposition_data()
1629
1627
  sage: (L, sgn)
1630
1628
  ((1, 1), -1)
1631
1629
  sage: R
@@ -1633,13 +1631,13 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
1633
1631
  [0 1]
1634
1632
 
1635
1633
  sage: G = HeckeTriangleGroup(n=8)
1636
- sage: (L, R, sgn) = (G.U()^4)._block_decomposition_data()
1634
+ sage: L, R, sgn = (G.U()^4)._block_decomposition_data()
1637
1635
  sage: (L, sgn)
1638
1636
  ((1, 4), 1)
1639
1637
  sage: R
1640
1638
  [1 0]
1641
1639
  [0 1]
1642
- sage: (L, R, sgn) = (G.U()^(-4))._block_decomposition_data()
1640
+ sage: L, R, sgn = (G.U()^(-4))._block_decomposition_data()
1643
1641
  sage: (L, sgn)
1644
1642
  ((1, 4), -1)
1645
1643
  sage: R
@@ -1650,7 +1648,7 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
1650
1648
  from warnings import warn
1651
1649
  warn("The case n=infinity here is not verified at all and probably wrong!")
1652
1650
 
1653
- (L, R) = self._primitive_block_decomposition_data()
1651
+ L, R = self._primitive_block_decomposition_data()
1654
1652
  if self.sign() == self.parent().I():
1655
1653
  sgn = ZZ(1)
1656
1654
  else:
@@ -1675,7 +1673,7 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
1675
1673
  # abs(self.primitive_power()) == self.primitive_power(method="block")
1676
1674
  L2 = ((L[0][0], abs(self.primitive_power())),)
1677
1675
  else:
1678
- L2 = L*abs(self.primitive_power())
1676
+ L2 = L * abs(self.primitive_power())
1679
1677
 
1680
1678
  return (L2, R, sgn)
1681
1679
 
@@ -1760,7 +1758,7 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
1760
1758
  warn("The case n=infinity here is not verified at all and probably wrong!")
1761
1759
 
1762
1760
  G = self.parent()
1763
- (L, R, sgn) = self._block_decomposition_data()
1761
+ L, R, sgn = self._block_decomposition_data()
1764
1762
  if sgn > 0:
1765
1763
  sgn = G.I()
1766
1764
  else:
@@ -1843,9 +1841,9 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
1843
1841
 
1844
1842
  if primitive:
1845
1843
  ignore_sign = True
1846
- (L, R) = self._primitive_block_decomposition_data()
1844
+ L, R = self._primitive_block_decomposition_data()
1847
1845
  else:
1848
- (L, R, sgn) = self._block_decomposition_data()
1846
+ L, R, sgn = self._block_decomposition_data()
1849
1847
 
1850
1848
  if not self.is_elliptic():
1851
1849
  L = tuple(cyclic_representative(L))
@@ -1911,9 +1909,8 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
1911
1909
  cur_period = rotate(period, k)
1912
1910
  if cur_period in period_set:
1913
1911
  continue
1914
- else:
1915
- period_set.add(cur_period)
1916
- L.append(prod((G.T()**r*G.S() for r in cur_period), G.I()))
1912
+ period_set.add(cur_period)
1913
+ L.append(prod((G.T()**r * G.S() for r in cur_period), G.I()))
1917
1914
 
1918
1915
  return L
1919
1916
 
@@ -2196,12 +2193,13 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
2196
2193
  sage: AA(G.V(3).discriminant())
2197
2194
  16.19566935808922?
2198
2195
  """
2199
-
2200
2196
  return self.trace()**2 - 4
2201
2197
 
2202
- def is_translation(self, exclude_one=False):
2198
+ def is_translation(self, exclude_one=False) -> bool:
2203
2199
  r"""
2204
- Return whether ``self`` is a translation. If ``exclude_one = True``,
2200
+ Return whether ``self`` is a translation.
2201
+
2202
+ If ``exclude_one = True``,
2205
2203
  then the identity map is not considered as a translation.
2206
2204
 
2207
2205
  EXAMPLES::
@@ -2218,12 +2216,9 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
2218
2216
 
2219
2217
  if not (c.is_zero() and a == d and (a.is_one() or (-a).is_one())):
2220
2218
  return False
2221
- elif exclude_one and b.is_zero():
2222
- return False
2223
- else:
2224
- return True
2219
+ return not (exclude_one and b.is_zero())
2225
2220
 
2226
- def is_reflection(self):
2221
+ def is_reflection(self) -> bool:
2227
2222
  r"""
2228
2223
  Return whether ``self`` is the usual reflection on the unit circle.
2229
2224
 
@@ -2237,7 +2232,7 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
2237
2232
  """
2238
2233
  return self == self.parent().S() or self == -self.parent().S()
2239
2234
 
2240
- def is_hyperbolic(self):
2235
+ def is_hyperbolic(self) -> bool:
2241
2236
  r"""
2242
2237
  Return whether ``self`` is a hyperbolic matrix.
2243
2238
 
@@ -2252,7 +2247,7 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
2252
2247
  """
2253
2248
  return coerce_AA(self.discriminant()) > 0
2254
2249
 
2255
- def is_parabolic(self, exclude_one=False):
2250
+ def is_parabolic(self, exclude_one=False) -> bool:
2256
2251
  r"""
2257
2252
  Return whether ``self`` is a parabolic matrix.
2258
2253
 
@@ -2277,7 +2272,7 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
2277
2272
 
2278
2273
  return self.discriminant() == 0
2279
2274
 
2280
- def is_identity(self):
2275
+ def is_identity(self) -> bool:
2281
2276
  r"""
2282
2277
  Return whether ``self`` is the identity or minus the identity.
2283
2278
 
@@ -2295,7 +2290,7 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
2295
2290
  else:
2296
2291
  return False
2297
2292
 
2298
- def is_elliptic(self):
2293
+ def is_elliptic(self) -> bool:
2299
2294
  r"""
2300
2295
  Return whether ``self`` is an elliptic matrix.
2301
2296
 
@@ -2310,7 +2305,7 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
2310
2305
  """
2311
2306
  return coerce_AA(self.discriminant()) < 0
2312
2307
 
2313
- def is_primitive(self):
2308
+ def is_primitive(self) -> bool:
2314
2309
  r"""
2315
2310
  Return whether ``self`` is primitive. We call an element
2316
2311
  primitive if (up to a sign and taking inverses) it generates
@@ -2369,9 +2364,12 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
2369
2364
  else:
2370
2365
  return abs(pow) <= 1
2371
2366
 
2372
- def is_reduced(self, require_primitive=True, require_hyperbolic=True):
2367
+ def is_reduced(self, require_primitive=True,
2368
+ require_hyperbolic=True) -> bool:
2373
2369
  r"""
2374
- Return whether ``self`` is reduced. We call an element
2370
+ Return whether ``self`` is reduced.
2371
+
2372
+ We call an element
2375
2373
  reduced if the associated lambda-CF is purely periodic.
2376
2374
 
2377
2375
  I.e. (in the hyperbolic case) if the associated hyperbolic
@@ -2435,9 +2433,11 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
2435
2433
  else:
2436
2434
  return self.continued_fraction()[0] == ()
2437
2435
 
2438
- def is_simple(self):
2436
+ def is_simple(self) -> bool:
2439
2437
  r"""
2440
- Return whether ``self`` is simple. We call an element
2438
+ Return whether ``self`` is simple.
2439
+
2440
+ We call an element
2441
2441
  simple if it is hyperbolic, primitive, has positive sign
2442
2442
  and if the associated hyperbolic fixed points satisfy:
2443
2443
  ``alpha' < 0 < alpha`` where ``alpha`` is the attracting
@@ -2464,7 +2464,7 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
2464
2464
  sage: R = el.simple_elements()
2465
2465
  sage: [v.is_simple() for v in R]
2466
2466
  [True]
2467
- sage: (fp1, fp2) = R[0].fixed_points(embedded=True)
2467
+ sage: fp1, fp2 = R[0].fixed_points(embedded=True)
2468
2468
  sage: (fp1, fp2)
2469
2469
  (1.272019649514069?, -1.272019649514069?)
2470
2470
  sage: fp2 < 0 < fp1
@@ -2476,7 +2476,7 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
2476
2476
  sage: R = el.simple_elements()
2477
2477
  sage: [v.is_simple() for v in R]
2478
2478
  [True, True]
2479
- sage: (fp1, fp2) = R[1].fixed_points(embedded=True)
2479
+ sage: fp1, fp2 = R[1].fixed_points(embedded=True)
2480
2480
  sage: fp2 < 0 < fp1
2481
2481
  True
2482
2482
 
@@ -2488,7 +2488,7 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
2488
2488
  True
2489
2489
  sage: [v.is_simple() for v in R]
2490
2490
  [True, True, True, True]
2491
- sage: (fp1, fp2) = R[2].fixed_points(embedded=True)
2491
+ sage: fp1, fp2 = R[2].fixed_points(embedded=True)
2492
2492
  sage: fp2 < 0 < fp1
2493
2493
  True
2494
2494
  """
@@ -2499,7 +2499,7 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
2499
2499
  a, b, c, d = self._matrix.list()
2500
2500
  return (coerce_AA(a) > 0 and coerce_AA(b) > 0 and coerce_AA(c) > 0 and coerce_AA(d) > 0)
2501
2501
 
2502
- def is_hecke_symmetric(self):
2502
+ def is_hecke_symmetric(self) -> bool:
2503
2503
  r"""
2504
2504
  Return whether the conjugacy class of the primitive part of
2505
2505
  ``self``, denoted by ``[gamma]`` is `Hecke-symmetric`:
@@ -2588,12 +2588,10 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
2588
2588
  sage: S = G.S()
2589
2589
  sage: U = G.U()
2590
2590
 
2591
- sage: def is_rpf(f, k=None):
2591
+ sage: def is_rpf(f, k=None) -> bool:
2592
2592
  ....: if not f + S.slash(f, k=k) == 0:
2593
2593
  ....: return False
2594
- ....: if not sum([(U^m).slash(f, k=k) for m in range(G.n())]) == 0:
2595
- ....: return False
2596
- ....: return True
2594
+ ....: return sum((U^m).slash(f, k=k) for m in range(G.n())) == 0
2597
2595
 
2598
2596
  sage: z = PolynomialRing(G.base_ring(), 'z').gen()
2599
2597
  sage: [is_rpf(1 - z^(-k), k=k) for k in range(-6, 6, 2)] # long time
@@ -2835,7 +2833,7 @@ class HeckeTriangleGroupElement(MatrixGroupElement_generic):
2835
2833
  if self.is_identity():
2836
2834
  return ZZ.zero()
2837
2835
 
2838
- (L, R, sgn) = self._block_decomposition_data()
2836
+ L, R, sgn = self._block_decomposition_data()
2839
2837
  n = self.parent().n()
2840
2838
 
2841
2839
  if self.is_elliptic():
@@ -997,14 +997,14 @@ class HeckeTriangleGroup(FinitelyGeneratedMatrixGroup_generic,
997
997
  if max_block_length <= self._max_block_length:
998
998
  return
999
999
 
1000
- def is_cycle(seq):
1000
+ def is_cycle(seq) -> bool:
1001
1001
  length = len(seq)
1002
1002
  for n in divisors(length):
1003
1003
  if n < length and is_cycle_of_length(seq, n):
1004
1004
  return True
1005
1005
  return False
1006
1006
 
1007
- def is_cycle_of_length(seq, n):
1007
+ def is_cycle_of_length(seq, n) -> bool:
1008
1008
  for j in range(n, len(seq)):
1009
1009
  if seq[j] != seq[j % n]:
1010
1010
  return False
@@ -404,12 +404,10 @@ Hecke triangle groups and elements:
404
404
  sage: S = G.S()
405
405
  sage: U = G.U()
406
406
 
407
- sage: def is_rpf(f, k=None):
407
+ sage: def is_rpf(f, k=None) -> bool:
408
408
  ....: if not f + S.slash(f, k=k) == 0:
409
409
  ....: return False
410
- ....: if not sum([(U^m).slash(f, k=k) for m in range(G.n())]) == 0:
411
- ....: return False
412
- ....: return True
410
+ ....: return sum((U^m).slash(f, k=k) for m in range(G.n())) == 0
413
411
 
414
412
  sage: z = PolynomialRing(G.base_ring(), 'z').gen()
415
413
  sage: [is_rpf(1 - z^(-k), k=k) for k in range(-6, 6, 2)] # long time
@@ -1016,12 +1014,12 @@ Modular forms ring and spaces for Hecke triangle groups:
1016
1014
  sage: QF = QuasiWeakModularForms(n=8, k=10/3, ep=-1)
1017
1015
  sage: QF.default_prec(1)
1018
1016
  sage: QF.quasi_part_gens(min_exp=-1)
1019
- [q^-1 + O(q),
1017
+ (q^-1 + O(q),
1020
1018
  1 + O(q),
1021
1019
  q^-1 - 9/(128*d) + O(q),
1022
1020
  1 + O(q),
1023
1021
  q^-1 - 19/(64*d) + O(q),
1024
- q^-1 + 1/(64*d) + O(q)]
1022
+ q^-1 + 1/(64*d) + O(q))
1025
1023
  sage: QF.default_prec(QF.required_laurent_prec(min_exp=-1))
1026
1024
  sage: QF.q_basis(min_exp=-1) # long time
1027
1025
  [q^-1 + O(q^5),
@@ -1043,9 +1041,9 @@ Modular forms ring and spaces for Hecke triangle groups:
1043
1041
  3
1044
1042
  sage: MF.default_prec(2)
1045
1043
  sage: MF.gens()
1046
- [1 - 37/(200*d)*q + O(q^2),
1044
+ (1 - 37/(200*d)*q + O(q^2),
1047
1045
  1 + 33/(200*d)*q + O(q^2),
1048
- 1 - 27/(200*d)*q + O(q^2)]
1046
+ 1 - 27/(200*d)*q + O(q^2))
1049
1047
 
1050
1048
 
1051
1049
  - **Coordinate vectors for (quasi) holomorphic modular forms and (quasi) cusp forms:**
@@ -1136,7 +1134,7 @@ Modular forms ring and spaces for Hecke triangle groups:
1136
1134
  sage: MF.dimension()
1137
1135
  2
1138
1136
  sage: MF.gens()
1139
- [1 + 240*q^2 + 2160*q^4 + O(q^5), q - 8*q^2 + 28*q^3 - 64*q^4 + O(q^5)]
1137
+ (1 + 240*q^2 + 2160*q^4 + O(q^5), q - 8*q^2 + 28*q^3 - 64*q^4 + O(q^5))
1140
1138
  sage: E4(i)
1141
1139
  1.941017189...
1142
1140
  sage: E4.order_at(-1)
@@ -1144,8 +1142,8 @@ Modular forms ring and spaces for Hecke triangle groups:
1144
1142
 
1145
1143
  sage: MF = (E2/E4).reduced_parent()
1146
1144
  sage: MF.quasi_part_gens(order_1=-1)
1147
- [1 - 40*q + 552*q^2 - 4896*q^3 + 33320*q^4 + O(q^5),
1148
- 1 - 24*q + 264*q^2 - 2016*q^3 + 12264*q^4 + O(q^5)]
1145
+ (1 - 40*q + 552*q^2 - 4896*q^3 + 33320*q^4 + O(q^5),
1146
+ 1 - 24*q + 264*q^2 - 2016*q^3 + 12264*q^4 + O(q^5))
1149
1147
  sage: prec = MF.required_laurent_prec(order_1=-1)
1150
1148
  sage: qexp = (E2/E4).q_expansion(prec=prec)
1151
1149
  sage: qexp