passagemath-flint 10.5.42__cp311-cp311-musllinux_1_2_aarch64.whl → 10.6.1rc1__cp311-cp311-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 (100) hide show
  1. {passagemath_flint-10.5.42.dist-info → passagemath_flint-10.6.1rc1.dist-info}/METADATA +5 -6
  2. {passagemath_flint-10.5.42.dist-info → passagemath_flint-10.6.1rc1.dist-info}/RECORD +100 -100
  3. passagemath_flint.libs/{libflint-7dd7ad94.so.19.0.0 → libflint-4ce13791.so.20.0.1} +0 -0
  4. sage/combinat/posets/hasse_cython_flint.cpython-311-aarch64-linux-musl.so +0 -0
  5. sage/data_structures/bounded_integer_sequences.cpython-311-aarch64-linux-musl.so +0 -0
  6. sage/data_structures/bounded_integer_sequences.pyx +22 -20
  7. sage/graphs/chrompoly.cpython-311-aarch64-linux-musl.so +0 -0
  8. sage/graphs/chrompoly.pyx +4 -3
  9. sage/graphs/matchpoly.cpython-311-aarch64-linux-musl.so +0 -0
  10. sage/libs/arb/arith.cpython-311-aarch64-linux-musl.so +0 -0
  11. sage/libs/flint/arith.cpython-311-aarch64-linux-musl.so +0 -0
  12. sage/libs/flint/arith_sage.cpython-311-aarch64-linux-musl.so +0 -0
  13. sage/libs/flint/flint.pxd +2 -2
  14. sage/libs/flint/flint_sage.cpython-311-aarch64-linux-musl.so +0 -0
  15. sage/libs/flint/flint_wrap.h +4 -0
  16. sage/libs/flint/fmpq_poly_sage.cpython-311-aarch64-linux-musl.so +0 -0
  17. sage/libs/flint/fmpz_factor_sage.cpython-311-aarch64-linux-musl.so +0 -0
  18. sage/libs/flint/fmpz_poly.cpython-311-aarch64-linux-musl.so +0 -0
  19. sage/libs/flint/fmpz_poly_sage.cpython-311-aarch64-linux-musl.so +0 -0
  20. sage/libs/flint/nmod_poly_linkage.pxi +5 -4
  21. sage/libs/flint/qsieve.cpython-311-aarch64-linux-musl.so +0 -0
  22. sage/libs/flint/qsieve_sage.cpython-311-aarch64-linux-musl.so +0 -0
  23. sage/libs/flint/types.pxd +2 -2
  24. sage/libs/flint/ulong_extras.cpython-311-aarch64-linux-musl.so +0 -0
  25. sage/libs/flint/ulong_extras_sage.cpython-311-aarch64-linux-musl.so +0 -0
  26. sage/matrix/change_ring.cpython-311-aarch64-linux-musl.so +0 -0
  27. sage/matrix/matrix_complex_ball_dense.cpython-311-aarch64-linux-musl.so +0 -0
  28. sage/matrix/matrix_cyclo_dense.cpython-311-aarch64-linux-musl.so +0 -0
  29. sage/matrix/matrix_cyclo_dense.pyx +3 -3
  30. sage/matrix/matrix_integer_dense.cpython-311-aarch64-linux-musl.so +0 -0
  31. sage/matrix/matrix_integer_dense.pyx +50 -33
  32. sage/matrix/matrix_integer_sparse.cpython-311-aarch64-linux-musl.so +0 -0
  33. sage/matrix/matrix_integer_sparse.pyx +1 -1
  34. sage/matrix/matrix_rational_dense.cpython-311-aarch64-linux-musl.so +0 -0
  35. sage/matrix/matrix_rational_dense.pyx +64 -28
  36. sage/matrix/matrix_rational_sparse.cpython-311-aarch64-linux-musl.so +0 -0
  37. sage/matrix/matrix_rational_sparse.pyx +3 -3
  38. sage/matrix/misc_flint.cpython-311-aarch64-linux-musl.so +0 -0
  39. sage/modular/modform/eis_series_cython.cpython-311-aarch64-linux-musl.so +0 -0
  40. sage/modular/modsym/apply.cpython-311-aarch64-linux-musl.so +0 -0
  41. sage/modular/modsym/heilbronn.cpython-311-aarch64-linux-musl.so +0 -0
  42. sage/modular/pollack_stevens/dist.cpython-311-aarch64-linux-musl.so +0 -0
  43. sage/modular/pollack_stevens/dist.pyx +2 -2
  44. sage/quivers/algebra.py +2 -1
  45. sage/quivers/algebra_elements.cpython-311-aarch64-linux-musl.so +0 -0
  46. sage/quivers/algebra_elements.pyx +5 -5
  47. sage/quivers/ar_quiver.py +21 -21
  48. sage/quivers/homspace.py +2 -1
  49. sage/quivers/morphism.py +31 -29
  50. sage/quivers/path_semigroup.py +14 -11
  51. sage/quivers/paths.cpython-311-aarch64-linux-musl.so +0 -0
  52. sage/quivers/paths.pyx +2 -2
  53. sage/quivers/representation.py +22 -24
  54. sage/rings/complex_arb.cpython-311-aarch64-linux-musl.so +0 -0
  55. sage/rings/complex_arb.pyx +37 -36
  56. sage/rings/complex_interval.cpython-311-aarch64-linux-musl.so +0 -0
  57. sage/rings/convert/mpfi.cpython-311-aarch64-linux-musl.so +0 -0
  58. sage/rings/factorint_flint.cpython-311-aarch64-linux-musl.so +0 -0
  59. sage/rings/fraction_field_FpT.cpython-311-aarch64-linux-musl.so +0 -0
  60. sage/rings/fraction_field_FpT.pyx +29 -0
  61. sage/rings/number_field/S_unit_solver.py +1 -1
  62. sage/rings/number_field/galois_group.py +1 -1
  63. sage/rings/number_field/morphism.py +3 -4
  64. sage/rings/number_field/number_field.py +98 -76
  65. sage/rings/number_field/number_field_element.cpython-311-aarch64-linux-musl.so +0 -0
  66. sage/rings/number_field/number_field_element.pyx +72 -0
  67. sage/rings/number_field/number_field_element_quadratic.cpython-311-aarch64-linux-musl.so +0 -0
  68. sage/rings/number_field/number_field_element_quadratic.pyx +35 -17
  69. sage/rings/number_field/number_field_morphisms.cpython-311-aarch64-linux-musl.so +0 -0
  70. sage/rings/number_field/number_field_morphisms.pyx +2 -2
  71. sage/rings/number_field/number_field_rel.py +1 -1
  72. sage/rings/number_field/order.py +44 -47
  73. sage/rings/number_field/order_ideal.py +2 -5
  74. sage/rings/polynomial/evaluation_flint.cpython-311-aarch64-linux-musl.so +0 -0
  75. sage/rings/polynomial/hilbert.cpython-311-aarch64-linux-musl.so +0 -0
  76. sage/rings/polynomial/hilbert.pyx +3 -6
  77. sage/rings/polynomial/polynomial_complex_arb.cpython-311-aarch64-linux-musl.so +0 -0
  78. sage/rings/polynomial/polynomial_integer_dense_flint.cpython-311-aarch64-linux-musl.so +0 -0
  79. sage/rings/polynomial/polynomial_integer_dense_flint.pyx +3 -5
  80. sage/rings/polynomial/polynomial_number_field.cpython-311-aarch64-linux-musl.so +0 -0
  81. sage/rings/polynomial/polynomial_rational_flint.cpython-311-aarch64-linux-musl.so +0 -0
  82. sage/rings/polynomial/polynomial_rational_flint.pxd +3 -3
  83. sage/rings/polynomial/polynomial_rational_flint.pyx +24 -11
  84. sage/rings/polynomial/polynomial_zmod_flint.cpython-311-aarch64-linux-musl.so +0 -0
  85. sage/rings/polynomial/polynomial_zmod_flint.pyx +3 -4
  86. sage/rings/polynomial/real_roots.cpython-311-aarch64-linux-musl.so +0 -0
  87. sage/rings/polynomial/real_roots.pyx +1 -1
  88. sage/rings/polynomial/refine_root.cpython-311-aarch64-linux-musl.so +0 -0
  89. sage/rings/polynomial/weil/weil_polynomials.cpython-311-aarch64-linux-musl.so +0 -0
  90. sage/rings/polynomial/weil/weil_polynomials.pyx +1 -1
  91. sage/rings/qqbar.py +1 -1
  92. sage/rings/real_arb.cpython-311-aarch64-linux-musl.so +0 -0
  93. sage/rings/real_arb.pyx +21 -10
  94. sage/rings/real_interval_absolute.cpython-311-aarch64-linux-musl.so +0 -0
  95. sage/rings/real_mpfi.cpython-311-aarch64-linux-musl.so +0 -0
  96. sage/rings/real_mpfi.pyx +14 -11
  97. sage/schemes/elliptic_curves/descent_two_isogeny.cpython-311-aarch64-linux-musl.so +0 -0
  98. sage/schemes/elliptic_curves/descent_two_isogeny.pyx +11 -0
  99. {passagemath_flint-10.5.42.dist-info → passagemath_flint-10.6.1rc1.dist-info}/WHEEL +0 -0
  100. {passagemath_flint-10.5.42.dist-info → passagemath_flint-10.6.1rc1.dist-info}/top_level.txt +0 -0
sage/quivers/ar_quiver.py CHANGED
@@ -14,18 +14,18 @@ Auslander-Reiten Quivers
14
14
  # https://www.gnu.org/licenses/
15
15
  # ****************************************************************************
16
16
 
17
- from sage.structure.unique_representation import UniqueRepresentation
18
- from sage.structure.parent import Parent
19
- from sage.structure.element import Element
20
- from sage.structure.richcmp import richcmp
21
- from sage.structure.global_options import GlobalOptions
22
17
  from sage.categories.sets_cat import Sets
23
- from sage.sets.family import Family
24
- from sage.combinat.root_system.cartan_type import CartanType
25
18
  from sage.combinat.free_module import CombinatorialFreeModule
26
- from sage.rings.integer_ring import ZZ
27
- from sage.misc.cachefunc import cached_method
19
+ from sage.combinat.root_system.cartan_type import CartanType
28
20
  from sage.graphs.digraph import DiGraph
21
+ from sage.misc.cachefunc import cached_method
22
+ from sage.rings.integer_ring import ZZ
23
+ from sage.sets.family import Family
24
+ from sage.structure.element import Element
25
+ from sage.structure.global_options import GlobalOptions
26
+ from sage.structure.parent import Parent
27
+ from sage.structure.richcmp import richcmp
28
+ from sage.structure.unique_representation import UniqueRepresentation
29
29
 
30
30
 
31
31
  class AuslanderReitenQuiver(UniqueRepresentation, Parent):
@@ -194,7 +194,7 @@ class AuslanderReitenQuiver(UniqueRepresentation, Parent):
194
194
  cat = Sets().Enumerated().Finite() if self._is_finite else Sets().Infinite()
195
195
  super().__init__(self, category=cat)
196
196
 
197
- def _repr_(self):
197
+ def _repr_(self) -> str:
198
198
  """
199
199
  Return a string representation of ``self``.
200
200
 
@@ -363,7 +363,7 @@ class AuslanderReitenQuiver(UniqueRepresentation, Parent):
363
363
 
364
364
  def digraph_preprojectives(self, max_depth, with_translations=False):
365
365
  r"""
366
- Return the diagraph of preprojectives of ``self`` up to ``max_depth``.
366
+ Return the digraph of preprojectives of ``self`` up to ``max_depth``.
367
367
 
368
368
  EXAMPLES::
369
369
 
@@ -402,7 +402,7 @@ class AuslanderReitenQuiver(UniqueRepresentation, Parent):
402
402
 
403
403
  def digraph_postinjectives(self, max_depth, with_translations=False):
404
404
  """
405
- Return the diagraph of postinjectives of ``self`` up to ``max_depth``.
405
+ Return the digraph of postinjectives of ``self`` up to ``max_depth``.
406
406
 
407
407
  EXAMPLES::
408
408
 
@@ -442,12 +442,12 @@ class AuslanderReitenQuiver(UniqueRepresentation, Parent):
442
442
  @cached_method
443
443
  def digraph(self, with_translations=False):
444
444
  r"""
445
- Return the diagraph of ``self``.
445
+ Return the digraph of ``self``.
446
446
 
447
447
  INPUT:
448
448
 
449
- - ``with_translations`` -- boolean (default: ``False``); if ``True``, then
450
- include the arrows corresponding to the translations
449
+ - ``with_translations`` -- boolean (default: ``False``); if ``True``,
450
+ then include the arrows corresponding to the translations
451
451
 
452
452
  EXAMPLES::
453
453
 
@@ -602,7 +602,7 @@ class AuslanderReitenQuiver(UniqueRepresentation, Parent):
602
602
  elif k > 1:
603
603
  if k > self._max_level:
604
604
  return {}
605
- prev = self._dim_vecs_level(k-1)
605
+ prev = self._dim_vecs_level(k - 1)
606
606
  if k > self._max_level: # this might get set on the recursive call
607
607
  return {}
608
608
  ret = {}
@@ -626,7 +626,7 @@ class AuslanderReitenQuiver(UniqueRepresentation, Parent):
626
626
  for v in Q.vertex_iterator()}
627
627
 
628
628
  elif k < -1:
629
- prev = self._dim_vecs_level(k+1)
629
+ prev = self._dim_vecs_level(k + 1)
630
630
  ret = {}
631
631
  for v in self._top_sort:
632
632
  if v not in prev: # assumption: this vertex will never reappear
@@ -699,7 +699,7 @@ class AuslanderReitenQuiver(UniqueRepresentation, Parent):
699
699
  self._level = ZZ(level)
700
700
  Element.__init__(self, parent)
701
701
 
702
- def _repr_(self):
702
+ def _repr_(self) -> str:
703
703
  r"""
704
704
  Return a string representation of ``self``.
705
705
 
@@ -712,7 +712,7 @@ class AuslanderReitenQuiver(UniqueRepresentation, Parent):
712
712
  """
713
713
  return f"<{self._vertex}, {self._level}>"
714
714
 
715
- def _latex_(self):
715
+ def _latex_(self) -> str:
716
716
  r"""
717
717
  Return a latex representation of ``self``.
718
718
 
@@ -741,7 +741,7 @@ class AuslanderReitenQuiver(UniqueRepresentation, Parent):
741
741
  return dim_vec
742
742
  return r"\begin{{gathered}} {} \\ {} \end{{gathered}}".format(node, dim_vec)
743
743
 
744
- def _richcmp_(self, other, op):
744
+ def _richcmp_(self, other, op) -> bool:
745
745
  r"""
746
746
  Rich comparison of ``self`` to ``other`` by ``op``.
747
747
 
@@ -754,7 +754,7 @@ class AuslanderReitenQuiver(UniqueRepresentation, Parent):
754
754
  """
755
755
  return richcmp((self._level, self._vertex), (other._level, other._vertex), op)
756
756
 
757
- def __hash__(self):
757
+ def __hash__(self) -> int:
758
758
  r"""
759
759
  Return the hash of ``self``.
760
760
 
sage/quivers/homspace.py CHANGED
@@ -20,9 +20,10 @@ Quiver Homspace
20
20
  # https://www.gnu.org/licenses/
21
21
  # ****************************************************************************
22
22
  from __future__ import annotations
23
+
23
24
  from sage.categories.homset import Homset
24
- from sage.quivers.morphism import QuiverRepHom
25
25
  from sage.misc.cachefunc import cached_method
26
+ from sage.quivers.morphism import QuiverRepHom
26
27
 
27
28
 
28
29
  class QuiverHomSpace(Homset):
sage/quivers/morphism.py CHANGED
@@ -175,7 +175,10 @@ class QuiverRepHom(CallMorphism):
175
175
  # this is the case it will be loaded directly into _vector and then
176
176
  # _assert_valid_hom is called.
177
177
 
178
- from sage.quivers.representation import QuiverRepElement, QuiverRep_with_path_basis
178
+ from sage.quivers.representation import (
179
+ QuiverRep_with_path_basis,
180
+ QuiverRepElement,
181
+ )
179
182
 
180
183
  self._domain = domain
181
184
  self._codomain = codomain
@@ -212,25 +215,24 @@ class QuiverRepHom(CallMorphism):
212
215
  # If data is not a list create one, then create a dict from it
213
216
  if isinstance(data, list):
214
217
  im_list = data
215
- else:
216
- # If data is a QuiverRepHom, create a list from it
217
- if isinstance(data, QuiverRepHom):
218
- f = data._domain.coerce_map_from(domain)
219
- g = self._codomain.coerce_map_from(data._codomain)
220
- im_list = [g(data(f(x))) for x in domain.gens()]
218
+ # If data is a QuiverRepHom, create a list from it
219
+ elif isinstance(data, QuiverRepHom):
220
+ f = data._domain.coerce_map_from(domain)
221
+ g = self._codomain.coerce_map_from(data._codomain)
222
+ im_list = [g(data(f(x))) for x in domain.gens()]
221
223
 
222
- # The only case left is that data is a QuiverRepElement
223
- else:
224
- if not isinstance(data, QuiverRepElement):
225
- raise TypeError("input data must be dictionary, list, "
226
- "QuiverRepElement or vector")
227
- if not isinstance(domain, QuiverRep_with_path_basis):
228
- raise TypeError("if data is a QuiverRepElement then domain "
229
- "must be a QuiverRep_with_path_basis.")
230
- if data not in codomain:
231
- raise ValueError("if data is a QuiverRepElement then it must "
232
- "be an element of codomain")
233
- im_list = [codomain.right_edge_action(data, p) for v in domain._quiver for p in domain._bases[v]]
224
+ # The only case left is that data is a QuiverRepElement
225
+ else:
226
+ if not isinstance(data, QuiverRepElement):
227
+ raise TypeError("input data must be dictionary, list, "
228
+ "QuiverRepElement or vector")
229
+ if not isinstance(domain, QuiverRep_with_path_basis):
230
+ raise TypeError("if data is a QuiverRepElement then domain "
231
+ "must be a QuiverRep_with_path_basis.")
232
+ if data not in codomain:
233
+ raise ValueError("if data is a QuiverRepElement then it must "
234
+ "be an element of codomain")
235
+ im_list = [codomain.right_edge_action(data, p) for v in domain._quiver for p in domain._bases[v]]
234
236
 
235
237
  # WARNING: This code assumes that the function QuiverRep.gens() returns
236
238
  # the generators ordered first by vertex and then by the order of the
@@ -339,7 +341,7 @@ class QuiverRepHom(CallMorphism):
339
341
  if not isinstance(x, QuiverRepElement):
340
342
  raise ValueError("QuiverRepHom can only be called on QuiverRepElement")
341
343
 
342
- elements = dict((v, self.get_map(v)(x._elems[v])) for v in self._quiver)
344
+ elements = {v: self.get_map(v)(x._elems[v]) for v in self._quiver}
343
345
  return self._codomain(elements)
344
346
 
345
347
  def __add__(left, right):
@@ -792,7 +794,7 @@ class QuiverRepHom(CallMorphism):
792
794
  # #
793
795
  ###########################################################################
794
796
 
795
- def is_injective(self):
797
+ def is_injective(self) -> bool:
796
798
  """
797
799
  Test whether the homomorphism is injective.
798
800
 
@@ -814,7 +816,7 @@ class QuiverRepHom(CallMorphism):
814
816
  # vertex
815
817
  return not any(self.get_matrix(v).nullity() for v in self._quiver)
816
818
 
817
- def is_surjective(self):
819
+ def is_surjective(self) -> bool:
818
820
  """
819
821
  Test whether the homomorphism is surjective.
820
822
 
@@ -841,7 +843,7 @@ class QuiverRepHom(CallMorphism):
841
843
 
842
844
  return True
843
845
 
844
- def is_isomorphism(self):
846
+ def is_isomorphism(self) -> bool:
845
847
  """
846
848
  Test whether the homomorphism is an isomorphism.
847
849
 
@@ -862,7 +864,7 @@ class QuiverRepHom(CallMorphism):
862
864
  # It's an iso if and only if it's an iso at every vertex
863
865
  return all(self.get_matrix(v).is_invertible() for v in self._quiver)
864
866
 
865
- def is_zero(self):
867
+ def is_zero(self) -> bool:
866
868
  """
867
869
  Test whether the homomorphism is the zero homomorphism.
868
870
 
@@ -883,7 +885,7 @@ class QuiverRepHom(CallMorphism):
883
885
  # The homomorphism is zero if and only if it is zero at every vertex
884
886
  return all(self.get_matrix(v).is_zero() for v in self._quiver)
885
887
 
886
- def is_endomorphism(self):
888
+ def is_endomorphism(self) -> bool:
887
889
  """
888
890
  Test whether the homomorphism is an endomorphism.
889
891
 
@@ -954,7 +956,7 @@ class QuiverRepHom(CallMorphism):
954
956
  sage: g.kernel().dimension_vector()
955
957
  (0, 1, 0)
956
958
  """
957
- spaces = dict((v, self.get_map(v).kernel()) for v in self._quiver)
959
+ spaces = {v: self.get_map(v).kernel() for v in self._quiver}
958
960
  return self._domain._submodule(spaces)
959
961
 
960
962
  def image(self):
@@ -981,7 +983,7 @@ class QuiverRepHom(CallMorphism):
981
983
  sage: g.image().dimension_vector()
982
984
  (0, 1, 1)
983
985
  """
984
- spaces = dict((v, self.get_map(v).image()) for v in self._quiver)
986
+ spaces = {v: self.get_map(v).image() for v in self._quiver}
985
987
  return self._codomain._submodule(spaces)
986
988
 
987
989
  def cokernel(self):
@@ -1053,7 +1055,7 @@ class QuiverRepHom(CallMorphism):
1053
1055
  """
1054
1056
  # The effect of the functor D is that it just transposes the matrix of
1055
1057
  # a hom
1056
- maps = dict((v, self.get_matrix(v).transpose()) for v in self._quiver)
1058
+ maps = {v: self.get_matrix(v).transpose() for v in self._quiver}
1057
1059
  return self._codomain.linear_dual().hom(maps, self._domain.linear_dual())
1058
1060
 
1059
1061
  def algebraic_dual(self):
@@ -1234,7 +1236,7 @@ class QuiverRepHom(CallMorphism):
1234
1236
  ValueError: element is not in the image
1235
1237
  """
1236
1238
  # Lift at each vertex
1237
- elems = dict((v, self.get_map(v).lift(x._elems[v])) for v in self._quiver)
1239
+ elems = {v: self.get_map(v).lift(x._elems[v]) for v in self._quiver}
1238
1240
  return self._domain(elems)
1239
1241
 
1240
1242
  ###########################################################################
@@ -20,16 +20,17 @@ Path Semigroups
20
20
  # https://www.gnu.org/licenses/
21
21
  # ****************************************************************************
22
22
 
23
+ from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets
24
+ from sage.categories.infinite_enumerated_sets import InfiniteEnumeratedSets
25
+ from sage.categories.monoids import Monoids
26
+ from sage.categories.semigroups import Semigroups
27
+ from sage.misc.cachefunc import cached_method
28
+ from sage.misc.lazy_attribute import lazy_attribute
23
29
  from sage.rings.integer import Integer
24
30
  from sage.rings.integer_ring import ZZ
25
31
  from sage.structure.parent import Parent
26
32
  from sage.structure.unique_representation import UniqueRepresentation
27
- from sage.categories.semigroups import Semigroups
28
- from sage.categories.monoids import Monoids
29
- from sage.categories.infinite_enumerated_sets import InfiniteEnumeratedSets
30
- from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets
31
- from sage.misc.cachefunc import cached_method
32
- from sage.misc.lazy_attribute import lazy_attribute
33
+
33
34
  from .paths import QuiverPath
34
35
  from .representation import QuiverRep
35
36
 
@@ -1133,14 +1134,16 @@ class PathSemigroup(UniqueRepresentation, Parent):
1133
1134
  if len(path) == 1:
1134
1135
  return [self.element_class(self, path[0], path[0], [])]
1135
1136
  paths = []
1136
- l = Q.edge_label(path[0], path[1])
1137
- if isinstance(l, str):
1137
+ ell = Q.edge_label(path[0], path[1])
1138
+ if isinstance(ell, str):
1138
1139
  for b in _v_to_e(path[1:]):
1139
- paths.append(self([(path[0], path[1], l)] + list(b), check=False))
1140
+ paths.append(self([(path[0], path[1], ell)]
1141
+ + list(b), check=False))
1140
1142
  else:
1141
- for a in l:
1143
+ for a in ell:
1142
1144
  for b in _v_to_e(path[1:]):
1143
- paths.append(self([(path[0], path[1], a)] + list(b), check=False))
1145
+ paths.append(self([(path[0], path[1], a)]
1146
+ + list(b), check=False))
1144
1147
  return paths
1145
1148
 
1146
1149
  # For each vertex path we append the resulting edge paths
sage/quivers/paths.pyx CHANGED
@@ -762,10 +762,10 @@ cdef class QuiverPath(MonoidElement):
762
762
  out._end = self._start
763
763
  sig_check()
764
764
  biseq_init(out._path, self._path.length, self._path.itembitsize)
765
- cdef mp_size_t l = self._path.length - 1
765
+ cdef mp_size_t ell = self._path.length - 1
766
766
  for i in range(self._path.length):
767
767
  sig_check()
768
- biseq_inititem(out._path, i, biseq_getitem(self._path, l-i))
768
+ biseq_inititem(out._path, i, biseq_getitem(self._path, ell - i))
769
769
  return out
770
770
 
771
771
 
@@ -450,11 +450,12 @@ the ``*`` operator::
450
450
  # https://www.gnu.org/licenses/
451
451
  # ****************************************************************************
452
452
  from __future__ import annotations
453
- from sage.structure.factory import UniqueFactory
454
- from sage.modules.module import Module
455
- from sage.structure.element import ModuleElement
453
+
456
454
  from sage.misc.cachefunc import cached_method
457
455
  from sage.misc.fast_methods import WithEqualityById
456
+ from sage.modules.module import Module
457
+ from sage.structure.element import ModuleElement
458
+ from sage.structure.factory import UniqueFactory
458
459
 
459
460
 
460
461
  class QuiverRepFactory(UniqueFactory):
@@ -708,8 +709,8 @@ class QuiverRepFactory(UniqueFactory):
708
709
  #
709
710
  # Note that the first space is assigned to key[3] and the first
710
711
  # vertex is 1 so the space assigned to vertex v is key[2 + v]
711
- from sage.matrix.constructor import Matrix
712
712
  from sage.categories.morphism import Morphism
713
+ from sage.matrix.constructor import Matrix
713
714
  for x in P._sorted_edges:
714
715
  if x in maps:
715
716
  e = maps[x]
@@ -1199,7 +1200,7 @@ class QuiverRepElement(ModuleElement):
1199
1200
  # #
1200
1201
  ###########################################################################
1201
1202
 
1202
- def is_zero(self):
1203
+ def is_zero(self) -> bool:
1203
1204
  """
1204
1205
  Test whether ``self`` is zero.
1205
1206
 
@@ -1777,7 +1778,7 @@ class QuiverRep_generic(WithEqualityById, Module):
1777
1778
  """
1778
1779
  return tuple(self._spaces[x].dimension() for x in self._quiver)
1779
1780
 
1780
- def is_zero(self):
1781
+ def is_zero(self) -> bool:
1781
1782
  """
1782
1783
  Test whether the representation is zero.
1783
1784
 
@@ -1799,7 +1800,7 @@ class QuiverRep_generic(WithEqualityById, Module):
1799
1800
  """
1800
1801
  return self.dimension() == 0
1801
1802
 
1802
- def is_simple(self):
1803
+ def is_simple(self) -> bool:
1803
1804
  """
1804
1805
  Test whether the representation is simple.
1805
1806
 
@@ -1817,7 +1818,7 @@ class QuiverRep_generic(WithEqualityById, Module):
1817
1818
  # dimension 1.
1818
1819
  return self.dimension() == 1
1819
1820
 
1820
- def is_semisimple(self):
1821
+ def is_semisimple(self) -> bool:
1821
1822
  """
1822
1823
  Test whether the representation is semisimple.
1823
1824
 
@@ -2014,11 +2015,7 @@ class QuiverRep_generic(WithEqualityById, Module):
2014
2015
  gens = self.gens()
2015
2016
  if len(gens) != len(coordinates):
2016
2017
  raise ValueError("the coordinates do not match the dimension of the module")
2017
-
2018
- result = self() # this must not be self.zero(), which is cached
2019
- for ci, gi in zip(coordinates, gens):
2020
- result += ci * gi
2021
- return result
2018
+ return self.sum(ci * gi for ci, gi in zip(coordinates, gens))
2022
2019
 
2023
2020
  ###########################################################################
2024
2021
  # #
@@ -2471,10 +2468,11 @@ class QuiverRep_generic(WithEqualityById, Module):
2471
2468
  raise ValueError("cannot direct sum modules with different base rings")
2472
2469
 
2473
2470
  # Get the dimensions of all spaces at each vertex
2474
- dims = dict((v, [x._spaces[v].dimension() for x in mods]) for v in self._quiver)
2471
+ dims = {v: [x._spaces[v].dimension() for x in mods]
2472
+ for v in self._quiver}
2475
2473
 
2476
2474
  # Create spaces of the correct dimensions
2477
- spaces = dict((v, self.base_ring()**sum(dims[v])) for v in self._quiver)
2475
+ spaces = {v: self.base_ring()**sum(dims[v]) for v in self._quiver}
2478
2476
 
2479
2477
  # Take block sums of matrices to form the maps
2480
2478
  from sage.matrix.constructor import block_diagonal_matrix
@@ -2488,7 +2486,7 @@ class QuiverRep_generic(WithEqualityById, Module):
2488
2486
  return result
2489
2487
 
2490
2488
  # Create the inclusions and projections
2491
- from sage.matrix.constructor import block_matrix, Matrix
2489
+ from sage.matrix.constructor import Matrix, block_matrix
2492
2490
  from sage.rings.integer import Integer
2493
2491
  iota = []
2494
2492
  pi = []
@@ -2756,7 +2754,7 @@ class QuiverRep_with_path_basis(QuiverRep_generic):
2756
2754
  maps[e][i, j] = k.one()
2757
2755
 
2758
2756
  # Create the spaces and then the representation
2759
- spaces = dict((v, len(self._bases[v])) for v in Q)
2757
+ spaces = {v: len(self._bases[v]) for v in Q}
2760
2758
  super().__init__(k, P, spaces, maps)
2761
2759
 
2762
2760
  # Try and create the matrices for the left edge action of edges. If it
@@ -2767,10 +2765,10 @@ class QuiverRep_with_path_basis(QuiverRep_generic):
2767
2765
  action_mats[e] = {}
2768
2766
  for v in self._quiver:
2769
2767
  # Start with the zero matrix and fill in
2770
- l = len(self._bases[v])
2771
- action_mats[e][v] = Matrix(k, l, l)
2768
+ ell = len(self._bases[v])
2769
+ action_mats[e][v] = Matrix(k, ell, ell)
2772
2770
 
2773
- for j in range(l):
2771
+ for j in range(ell):
2774
2772
  if e[1] == self._bases[v][j].initial_vertex():
2775
2773
  try:
2776
2774
  action_mats[e][v][self._bases[v].index(P([e], check=False) * self._bases[v][j]), j] = k.one()
@@ -2785,12 +2783,12 @@ class QuiverRep_with_path_basis(QuiverRep_generic):
2785
2783
  action_mats[e] = {}
2786
2784
  for v in self._quiver:
2787
2785
  # Start with the zero matrix and fill in
2788
- l = len(self._bases[v])
2789
- action_mats[e][v] = Matrix(k, l, l)
2786
+ ell = len(self._bases[v])
2787
+ action_mats[e][v] = Matrix(k, ell, ell)
2790
2788
 
2791
2789
  # Paths not beginning at vert are sent to zero, paths beginning
2792
2790
  # at vert are fixed
2793
- for i in range(l):
2791
+ for i in range(ell):
2794
2792
  if self._bases[v][i].initial_vertex() == vert:
2795
2793
  action_mats[e][v][i, i] = k.one()
2796
2794
 
@@ -2859,7 +2857,7 @@ class QuiverRep_with_path_basis(QuiverRep_generic):
2859
2857
  for v in self._quiver}
2860
2858
  return self(elems)
2861
2859
 
2862
- def is_left_module(self):
2860
+ def is_left_module(self) -> bool:
2863
2861
  """
2864
2862
  Test whether the basis is closed under left multiplication.
2865
2863
 
@@ -494,7 +494,7 @@ class ComplexBallField(UniqueRepresentation, sage.rings.abc.ComplexBallField):
494
494
  else:
495
495
  raise ValueError("only one generator")
496
496
 
497
- def gens(self):
497
+ def gens(self) -> tuple:
498
498
  r"""
499
499
  Return the tuple of generators of this complex ball field, i.e.
500
500
  ``(i,)``.
@@ -790,27 +790,28 @@ class ComplexBallField(UniqueRepresentation, sage.rings.abc.ComplexBallField):
790
790
  ...
791
791
  ValueError: polynomial with interval coefficients, use multiplicities=False
792
792
 
793
- sage: (x^4 - 1/3).roots(multiplicities=False) # indirect doctest
794
- [[-0.759835685651593 +/- ...e-16] + [+/- ...e-16]*I,
795
- [0.759835685651593 +/- ...e-16] + [+/- ...e-16]*I,
796
- [+/- ...e-16] + [0.759835685651593 +/- ...e-16]*I,
797
- [+/- ...e-16] + [-0.759835685651593 +/- ...e-16]*I]
793
+ sage: set((x^4 - 1/3).roots(multiplicities=False)) # indirect doctest
794
+ {[+/- 1.27e-16] + [-0.759835685651593 +/- 5.90e-16]*I,
795
+ [+/- 1.27e-16] + [0.759835685651593 +/- 5.90e-16]*I,
796
+ [-0.759835685651593 +/- 5.90e-16] + [+/- 1.27e-16]*I,
797
+ [0.759835685651593 +/- 5.90e-16] + [+/- 1.27e-16]*I}
798
798
 
799
- sage: (x^4 - 1/3).roots(RBF, multiplicities=False)
800
- [[-0.759835685651593 +/- ...e-16], [0.759835685651593 +/- ...e-16]]
799
+ sage: set((x^4 - 1/3).roots(RBF, multiplicities=False))
800
+ {[-0.759835685651593 +/- 5.90e-16], [0.759835685651593 +/- 5.90e-16]}
801
801
 
802
- sage: (x^4 - 3).roots(RealBallField(100), multiplicities=False)
803
- [[-1.316074012952492460819218901797 +/- ...e-34],
804
- [1.316074012952492460819218901797 +/- ...e-34]]
802
+ sage: set((x^4 - 3).roots(RealBallField(100), multiplicities=False))
803
+ {[-1.316074012952492460819218901797 +/- 9.7e-34],
804
+ [1.316074012952492460819218901797 +/- 9.7e-34]}
805
805
 
806
- sage: (x^4 - 3).roots(ComplexIntervalField(100), multiplicities=False)
806
+ sage: sorted((x^4 - 3).roots(ComplexIntervalField(100),
807
+ ....: multiplicities=False), key=repr)
807
808
  [-1.31607401295249246081921890180? + 0.?e-37*I,
808
- 1.31607401295249246081921890180? + 0.?e-37*I,
809
809
  0.?e-37 + 1.31607401295249246081921890180?*I,
810
- 0.?e-37 - 1.31607401295249246081921890180?*I]
810
+ 0.?e-37 - 1.31607401295249246081921890180?*I,
811
+ 1.31607401295249246081921890180? + 0.?e-37*I]
811
812
 
812
- sage: (x^2 - i/3).roots(ComplexBallField(2), multiplicities=False)
813
- [[+/- 0.409] + [+/- 0.409]*I, [+/- 0.409] + [+/- 0.409]*I]
813
+ sage: set((x^2 - i/3).roots(ComplexBallField(2), multiplicities=False))
814
+ {[+/- 0.409] + [+/- 0.409]*I, [+/- 0.409] + [+/- 0.409]*I}
814
815
 
815
816
  sage: ((x - 1)^2).roots(multiplicities=False)
816
817
  Traceback (most recent call last):
@@ -820,8 +821,8 @@ class ComplexBallField(UniqueRepresentation, sage.rings.abc.ComplexBallField):
820
821
  sage: ((x - 1)^2).roots(multiplicities=False, proof=False)
821
822
  doctest:...
822
823
  UserWarning: roots may have been lost...
823
- [[1.00000000000 +/- ...e-12] + [+/- ...e-11]*I,
824
- [1.0000000000 +/- ...e-12] + [+/- ...e-12]*I]
824
+ [[1.000000000... +/- ...] + [+/- ...]*I,
825
+ [1.000000000... +/- ...] + [+/- ...]*I]
825
826
 
826
827
  sage: pol = x^7 - 2*(1000*x - 1)^2 # Mignotte polynomial
827
828
  sage: pol.roots(multiplicities=False)
@@ -846,7 +847,7 @@ class ComplexBallField(UniqueRepresentation, sage.rings.abc.ComplexBallField):
846
847
  sage: ((x - 1)^2 + 2^(-70)*i/3).roots(RBF, multiplicities=False)
847
848
  Traceback (most recent call last):
848
849
  ...
849
- ValueError: unable to determine which roots are real
850
+ ValueError: ...
850
851
 
851
852
  TESTS::
852
853
 
@@ -4264,14 +4265,14 @@ cdef class ComplexBall(RingElement):
4264
4265
 
4265
4266
  EXAMPLES::
4266
4267
 
4267
- sage: CBF(1, 1).Ei()
4268
- [1.76462598556385 +/- ...e-15] + [2.38776985151052 +/- ...e-15]*I
4268
+ sage: CBF(1, 1).Ei() # abs tol 6e-15
4269
+ [1.76462598556385 +/- 6.03e-15] + [2.38776985151052 +/- 4.23e-15]*I
4269
4270
  sage: CBF(0).Ei()
4270
- nan
4271
+ nan...
4271
4272
 
4272
4273
  TESTS:
4273
4274
 
4274
- sage: CBF(Ei(I)) # abs tol 1e-16 # needs sage.symbolic
4275
+ sage: CBF(Ei(I)) # abs tol 2e-15 # needs sage.symbolic
4275
4276
  [0.337403922900968 +/- 3.76e-16] + [2.51687939716208 +/- 2.01e-15]*I
4276
4277
  """
4277
4278
  cdef ComplexBall result = self._new()
@@ -4286,14 +4287,14 @@ cdef class ComplexBall(RingElement):
4286
4287
 
4287
4288
  EXAMPLES::
4288
4289
 
4289
- sage: CBF(1, 1).Si()
4290
- [1.10422265823558 +/- ...e-15] + [0.88245380500792 +/- ...e-15]*I
4290
+ sage: CBF(1, 1).Si() # abs tol 3e-15
4291
+ [1.10422265823558 +/- 2.48e-15] + [0.88245380500792 +/- 3.36e-15]*I
4291
4292
  sage: CBF(0).Si()
4292
4293
  0
4293
4294
 
4294
4295
  TESTS:
4295
4296
 
4296
- sage: CBF(Si(I)) # needs sage.symbolic
4297
+ sage: CBF(Si(I)) # abs tol 3e-15 # needs sage.symbolic
4297
4298
  [1.05725087537573 +/- 2.77e-15]*I
4298
4299
  """
4299
4300
  cdef ComplexBall result = self._new()
@@ -4310,14 +4311,14 @@ cdef class ComplexBall(RingElement):
4310
4311
 
4311
4312
  EXAMPLES::
4312
4313
 
4313
- sage: CBF(1, 1).Ci()
4314
- [0.882172180555936 +/- ...e-16] + [0.287249133519956 +/- ...e-16]*I
4314
+ sage: CBF(1, 1).Ci() # abs tol 5e-16
4315
+ [0.882172180555936 +/- 5.89e-16] + [0.287249133519956 +/- 3.37e-16]*I
4315
4316
  sage: CBF(0).Ci()
4316
4317
  nan + nan*I
4317
4318
 
4318
4319
  TESTS:
4319
4320
 
4320
- sage: CBF(Ci(I)) # abs tol 1e-17 # needs sage.symbolic
4321
+ sage: CBF(Ci(I)) # abs tol 5e-16 # needs sage.symbolic
4321
4322
  [0.837866940980208 +/- 4.72e-16] + [1.570796326794897 +/- 5.54e-16]*I
4322
4323
  """
4323
4324
  cdef ComplexBall result = self._new()
@@ -4334,8 +4335,8 @@ cdef class ComplexBall(RingElement):
4334
4335
 
4335
4336
  EXAMPLES::
4336
4337
 
4337
- sage: CBF(1, 1).Shi()
4338
- [0.88245380500792 +/- ...e-15] + [1.10422265823558 +/- ...e-15]*I
4338
+ sage: CBF(1, 1).Shi() # abs tol 3e-15
4339
+ [0.88245380500792 +/- 3.36e-15] + [1.10422265823558 +/- 2.48e-15]*I
4339
4340
  sage: CBF(0).Shi()
4340
4341
  0
4341
4342
 
@@ -4358,14 +4359,14 @@ cdef class ComplexBall(RingElement):
4358
4359
 
4359
4360
  EXAMPLES::
4360
4361
 
4361
- sage: CBF(1, 1).Chi()
4362
- [0.882172180555936 +/- ...e-16] + [1.28354719327494 +/- ...e-15]*I
4362
+ sage: CBF(1, 1).Chi() # abs tol 1e-15
4363
+ [0.882172180555936 +/- 5.89e-16] + [1.28354719327494 +/- 1.01e-15]*I
4363
4364
  sage: CBF(0).Chi()
4364
4365
  nan + nan*I
4365
4366
 
4366
4367
  TESTS:
4367
4368
 
4368
- sage: CBF(Chi(I)) # abs tol 1e-16 # needs sage.symbolic
4369
+ sage: CBF(Chi(I)) # abs tol 5e-16 # needs sage.symbolic
4369
4370
  [0.337403922900968 +/- 3.25e-16] + [1.570796326794897 +/- 5.54e-16]*I
4370
4371
  """
4371
4372
  cdef ComplexBall result = self._new()
@@ -4384,8 +4385,8 @@ cdef class ComplexBall(RingElement):
4384
4385
 
4385
4386
  EXAMPLES::
4386
4387
 
4387
- sage: CBF(1, 1).li()
4388
- [0.61391166922120 +/- ...e-15] + [2.05958421419258 +/- ...e-15]*I
4388
+ sage: CBF(1, 1).li() # abs tol 6e-15
4389
+ [0.61391166922120 +/- 6.23e-15] + [2.05958421419258 +/- 5.59e-15]*I
4389
4390
  sage: CBF(0).li()
4390
4391
  0
4391
4392
  sage: CBF(0).li(offset=True)