passagemath-flint 10.5.43__cp310-cp310-macosx_14_0_arm64.whl → 10.6.1rc1__cp310-cp310-macosx_14_0_arm64.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.
- {passagemath_flint-10.5.43.dist-info → passagemath_flint-10.6.1rc1.dist-info}/METADATA +5 -6
- {passagemath_flint-10.5.43.dist-info → passagemath_flint-10.6.1rc1.dist-info}/RECORD +102 -102
- passagemath_flint.dylibs/{libflint.19.0.dylib → libflint.20.0.dylib} +0 -0
- passagemath_flint.dylibs/libgf2x.3.dylib +0 -0
- passagemath_flint.dylibs/libmpfi.0.dylib +0 -0
- sage/combinat/posets/hasse_cython_flint.cpython-310-darwin.so +0 -0
- sage/data_structures/bounded_integer_sequences.cpython-310-darwin.so +0 -0
- sage/data_structures/bounded_integer_sequences.pyx +22 -20
- sage/graphs/chrompoly.cpython-310-darwin.so +0 -0
- sage/graphs/chrompoly.pyx +4 -3
- sage/graphs/matchpoly.cpython-310-darwin.so +0 -0
- sage/libs/arb/arith.cpython-310-darwin.so +0 -0
- sage/libs/flint/arith.cpython-310-darwin.so +0 -0
- sage/libs/flint/arith_sage.cpython-310-darwin.so +0 -0
- sage/libs/flint/flint.pxd +2 -2
- sage/libs/flint/flint_sage.cpython-310-darwin.so +0 -0
- sage/libs/flint/flint_wrap.h +4 -0
- sage/libs/flint/fmpq_poly_sage.cpython-310-darwin.so +0 -0
- sage/libs/flint/fmpz_factor_sage.cpython-310-darwin.so +0 -0
- sage/libs/flint/fmpz_poly.cpython-310-darwin.so +0 -0
- sage/libs/flint/fmpz_poly_sage.cpython-310-darwin.so +0 -0
- sage/libs/flint/nmod_poly_linkage.pxi +5 -4
- sage/libs/flint/qsieve.cpython-310-darwin.so +0 -0
- sage/libs/flint/qsieve_sage.cpython-310-darwin.so +0 -0
- sage/libs/flint/types.pxd +2 -2
- sage/libs/flint/ulong_extras.cpython-310-darwin.so +0 -0
- sage/libs/flint/ulong_extras_sage.cpython-310-darwin.so +0 -0
- sage/matrix/change_ring.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_complex_ball_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_cyclo_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_cyclo_dense.pyx +3 -3
- sage/matrix/matrix_integer_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_integer_dense.pyx +50 -33
- sage/matrix/matrix_integer_sparse.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_integer_sparse.pyx +1 -1
- sage/matrix/matrix_rational_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_rational_dense.pyx +64 -28
- sage/matrix/matrix_rational_sparse.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_rational_sparse.pyx +3 -3
- sage/matrix/misc_flint.cpython-310-darwin.so +0 -0
- sage/modular/modform/eis_series_cython.cpython-310-darwin.so +0 -0
- sage/modular/modsym/apply.cpython-310-darwin.so +0 -0
- sage/modular/modsym/heilbronn.cpython-310-darwin.so +0 -0
- sage/modular/pollack_stevens/dist.cpython-310-darwin.so +0 -0
- sage/modular/pollack_stevens/dist.pyx +2 -2
- sage/quivers/algebra.py +2 -1
- sage/quivers/algebra_elements.cpython-310-darwin.so +0 -0
- sage/quivers/algebra_elements.pyx +5 -5
- sage/quivers/ar_quiver.py +21 -21
- sage/quivers/homspace.py +2 -1
- sage/quivers/morphism.py +31 -29
- sage/quivers/path_semigroup.py +14 -11
- sage/quivers/paths.cpython-310-darwin.so +0 -0
- sage/quivers/paths.pyx +2 -2
- sage/quivers/representation.py +22 -24
- sage/rings/complex_arb.cpython-310-darwin.so +0 -0
- sage/rings/complex_arb.pyx +37 -36
- sage/rings/complex_interval.cpython-310-darwin.so +0 -0
- sage/rings/convert/mpfi.cpython-310-darwin.so +0 -0
- sage/rings/factorint_flint.cpython-310-darwin.so +0 -0
- sage/rings/fraction_field_FpT.cpython-310-darwin.so +0 -0
- sage/rings/fraction_field_FpT.pyx +29 -0
- sage/rings/number_field/S_unit_solver.py +1 -1
- sage/rings/number_field/galois_group.py +1 -1
- sage/rings/number_field/morphism.py +3 -4
- sage/rings/number_field/number_field.py +97 -75
- sage/rings/number_field/number_field_element.cpython-310-darwin.so +0 -0
- sage/rings/number_field/number_field_element.pyx +72 -0
- sage/rings/number_field/number_field_element_quadratic.cpython-310-darwin.so +0 -0
- sage/rings/number_field/number_field_element_quadratic.pyx +35 -17
- sage/rings/number_field/number_field_morphisms.cpython-310-darwin.so +0 -0
- sage/rings/number_field/number_field_morphisms.pyx +2 -2
- sage/rings/number_field/number_field_rel.py +1 -1
- sage/rings/number_field/order.py +44 -47
- sage/rings/number_field/order_ideal.py +2 -5
- sage/rings/polynomial/evaluation_flint.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/hilbert.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/hilbert.pyx +3 -6
- sage/rings/polynomial/polynomial_complex_arb.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/polynomial_integer_dense_flint.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/polynomial_integer_dense_flint.pyx +3 -5
- sage/rings/polynomial/polynomial_number_field.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/polynomial_rational_flint.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/polynomial_rational_flint.pxd +3 -3
- sage/rings/polynomial/polynomial_rational_flint.pyx +24 -11
- sage/rings/polynomial/polynomial_zmod_flint.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/polynomial_zmod_flint.pyx +3 -4
- sage/rings/polynomial/real_roots.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/real_roots.pyx +1 -1
- sage/rings/polynomial/refine_root.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/weil/weil_polynomials.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/weil/weil_polynomials.pyx +1 -1
- sage/rings/qqbar.py +1 -1
- sage/rings/real_arb.cpython-310-darwin.so +0 -0
- sage/rings/real_arb.pyx +21 -10
- sage/rings/real_interval_absolute.cpython-310-darwin.so +0 -0
- sage/rings/real_mpfi.cpython-310-darwin.so +0 -0
- sage/rings/real_mpfi.pyx +14 -11
- sage/schemes/elliptic_curves/descent_two_isogeny.cpython-310-darwin.so +0 -0
- sage/schemes/elliptic_curves/descent_two_isogeny.pyx +11 -0
- {passagemath_flint-10.5.43.dist-info → passagemath_flint-10.6.1rc1.dist-info}/WHEEL +0 -0
- {passagemath_flint-10.5.43.dist-info → passagemath_flint-10.6.1rc1.dist-info}/top_level.txt +0 -0
@@ -325,13 +325,13 @@ cdef class PathAlgebraElement(RingElement):
|
|
325
325
|
sage: len(X^5)
|
326
326
|
17
|
327
327
|
"""
|
328
|
-
cdef size_t
|
328
|
+
cdef size_t ell = 0
|
329
329
|
cdef path_homog_poly_t *H = self.data
|
330
330
|
while H != NULL:
|
331
331
|
sig_check()
|
332
|
-
|
332
|
+
ell += H.poly.nterms
|
333
333
|
H = H.nxt
|
334
|
-
return
|
334
|
+
return ell
|
335
335
|
|
336
336
|
cpdef ssize_t degree(self) except -2:
|
337
337
|
"""
|
@@ -372,9 +372,9 @@ cdef class PathAlgebraElement(RingElement):
|
|
372
372
|
return -1
|
373
373
|
return deg
|
374
374
|
|
375
|
-
def is_homogeneous(self):
|
375
|
+
def is_homogeneous(self) -> bool:
|
376
376
|
"""
|
377
|
-
|
377
|
+
Tell whether this element is homogeneous.
|
378
378
|
|
379
379
|
EXAMPLES::
|
380
380
|
|
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.
|
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
|
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
|
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
|
445
|
+
Return the digraph of ``self``.
|
446
446
|
|
447
447
|
INPUT:
|
448
448
|
|
449
|
-
- ``with_translations`` -- boolean (default: ``False``); if ``True``,
|
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
|
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
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
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
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
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 =
|
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 =
|
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 =
|
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 =
|
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 =
|
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
|
###########################################################################
|
sage/quivers/path_semigroup.py
CHANGED
@@ -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
|
-
|
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
|
-
|
1137
|
-
if isinstance(
|
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],
|
1140
|
+
paths.append(self([(path[0], path[1], ell)]
|
1141
|
+
+ list(b), check=False))
|
1140
1142
|
else:
|
1141
|
-
for a in
|
1143
|
+
for a in ell:
|
1142
1144
|
for b in _v_to_e(path[1:]):
|
1143
|
-
paths.append(self([(path[0], path[1], a)]
|
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
|
Binary file
|
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
|
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,
|
768
|
+
biseq_inititem(out._path, i, biseq_getitem(self._path, ell - i))
|
769
769
|
return out
|
770
770
|
|
771
771
|
|
sage/quivers/representation.py
CHANGED
@@ -450,11 +450,12 @@ the ``*`` operator::
|
|
450
450
|
# https://www.gnu.org/licenses/
|
451
451
|
# ****************************************************************************
|
452
452
|
from __future__ import annotations
|
453
|
-
|
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 =
|
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 =
|
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
|
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 =
|
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
|
-
|
2771
|
-
action_mats[e][v] = Matrix(k,
|
2768
|
+
ell = len(self._bases[v])
|
2769
|
+
action_mats[e][v] = Matrix(k, ell, ell)
|
2772
2770
|
|
2773
|
-
for j in range(
|
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
|
-
|
2789
|
-
action_mats[e][v] = Matrix(k,
|
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(
|
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
|
|
Binary file
|