passagemath-flint 10.6.1rc10__cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_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.
- passagemath_flint-10.6.1rc10.dist-info/METADATA +122 -0
- passagemath_flint-10.6.1rc10.dist-info/RECORD +360 -0
- passagemath_flint-10.6.1rc10.dist-info/WHEEL +6 -0
- passagemath_flint-10.6.1rc10.dist-info/top_level.txt +2 -0
- passagemath_flint.libs/libflint-3701249d.so.21.0.0 +0 -0
- passagemath_flint.libs/libgf2x-fbd36f80.so.3.0.0 +0 -0
- passagemath_flint.libs/libgfortran-8a9a71bc.so.5.0.0 +0 -0
- passagemath_flint.libs/libgmp-93ebf16a.so.10.5.0 +0 -0
- passagemath_flint.libs/libgsl-e3525837.so.28.0.0 +0 -0
- passagemath_flint.libs/libmpfi-ad12a86d.so.0.0.0 +0 -0
- passagemath_flint.libs/libmpfr-e0f11cf3.so.6.2.1 +0 -0
- passagemath_flint.libs/libntl-1004113e.so.44.0.1 +0 -0
- passagemath_flint.libs/libopenblasp-r0-4c5b64b1.3.29.so +0 -0
- sage/all__sagemath_flint.py +29 -0
- sage/combinat/all__sagemath_flint.py +1 -0
- sage/combinat/posets/all__sagemath_flint.py +1 -0
- sage/combinat/posets/hasse_cython_flint.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/combinat/posets/hasse_cython_flint.pyx +194 -0
- sage/data_structures/all__sagemath_flint.py +1 -0
- sage/data_structures/bounded_integer_sequences.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/data_structures/bounded_integer_sequences.pxd +62 -0
- sage/data_structures/bounded_integer_sequences.pyx +1418 -0
- sage/graphs/all__sagemath_flint.py +1 -0
- sage/graphs/chrompoly.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/graphs/chrompoly.pyx +555 -0
- sage/graphs/matchpoly.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/graphs/matchpoly.pyx +412 -0
- sage/libs/all__sagemath_flint.py +17 -0
- sage/libs/arb/__init__.py +1 -0
- sage/libs/arb/acb.pxd +154 -0
- sage/libs/arb/acb_calc.pxd +9 -0
- sage/libs/arb/acb_elliptic.pxd +25 -0
- sage/libs/arb/acb_hypgeom.pxd +74 -0
- sage/libs/arb/acb_mat.pxd +62 -0
- sage/libs/arb/acb_modular.pxd +17 -0
- sage/libs/arb/acb_poly.pxd +216 -0
- sage/libs/arb/arb.pxd +240 -0
- sage/libs/arb/arb_fmpz_poly.pxd +21 -0
- sage/libs/arb/arb_hypgeom.pxd +83 -0
- sage/libs/arb/arb_wrap.h +34 -0
- sage/libs/arb/arf.pxd +131 -0
- sage/libs/arb/arith.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/libs/arb/arith.pyx +87 -0
- sage/libs/arb/bernoulli.pxd +6 -0
- sage/libs/arb/mag.pxd +77 -0
- sage/libs/arb/types.pxd +37 -0
- sage/libs/flint/__init__.py +1 -0
- sage/libs/flint/acb.pxd +270 -0
- sage/libs/flint/acb_calc.pxd +22 -0
- sage/libs/flint/acb_dft.pxd +51 -0
- sage/libs/flint/acb_dirichlet.pxd +112 -0
- sage/libs/flint/acb_elliptic.pxd +42 -0
- sage/libs/flint/acb_hypgeom.pxd +169 -0
- sage/libs/flint/acb_macros.pxd +9 -0
- sage/libs/flint/acb_mat.pxd +136 -0
- sage/libs/flint/acb_mat_macros.pxd +10 -0
- sage/libs/flint/acb_modular.pxd +62 -0
- sage/libs/flint/acb_poly.pxd +251 -0
- sage/libs/flint/acb_poly_macros.pxd +8 -0
- sage/libs/flint/acb_theta.pxd +124 -0
- sage/libs/flint/acf.pxd +32 -0
- sage/libs/flint/aprcl.pxd +84 -0
- sage/libs/flint/arb.pxd +382 -0
- sage/libs/flint/arb_calc.pxd +31 -0
- sage/libs/flint/arb_fmpz_poly.pxd +34 -0
- sage/libs/flint/arb_fpwrap.pxd +215 -0
- sage/libs/flint/arb_hypgeom.pxd +147 -0
- sage/libs/flint/arb_macros.pxd +9 -0
- sage/libs/flint/arb_mat.pxd +140 -0
- sage/libs/flint/arb_mat_macros.pxd +10 -0
- sage/libs/flint/arb_poly.pxd +237 -0
- sage/libs/flint/arf.pxd +167 -0
- sage/libs/flint/arith.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/libs/flint/arith.pxd +76 -0
- sage/libs/flint/arith.pyx +77 -0
- sage/libs/flint/arith_sage.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/libs/flint/arith_sage.pyx +308 -0
- sage/libs/flint/bernoulli.pxd +28 -0
- sage/libs/flint/bool_mat.pxd +52 -0
- sage/libs/flint/ca.pxd +203 -0
- sage/libs/flint/ca_ext.pxd +34 -0
- sage/libs/flint/ca_field.pxd +32 -0
- sage/libs/flint/ca_mat.pxd +117 -0
- sage/libs/flint/ca_poly.pxd +104 -0
- sage/libs/flint/ca_vec.pxd +46 -0
- sage/libs/flint/calcium.pxd +27 -0
- sage/libs/flint/d_mat.pxd +39 -0
- sage/libs/flint/d_vec.pxd +32 -0
- sage/libs/flint/dirichlet.pxd +57 -0
- sage/libs/flint/dlog.pxd +53 -0
- sage/libs/flint/double_extras.pxd +24 -0
- sage/libs/flint/double_interval.pxd +36 -0
- sage/libs/flint/fexpr.pxd +104 -0
- sage/libs/flint/fexpr_builtin.pxd +20 -0
- sage/libs/flint/fft.pxd +66 -0
- sage/libs/flint/flint.pxd +36 -0
- sage/libs/flint/flint_ntl_wrap.h +35 -0
- sage/libs/flint/flint_sage.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/libs/flint/flint_sage.pyx +163 -0
- sage/libs/flint/flint_wrap.h +190 -0
- sage/libs/flint/fmpq.pxd +137 -0
- sage/libs/flint/fmpq_mat.pxd +105 -0
- sage/libs/flint/fmpq_mat_macros.pxd +10 -0
- sage/libs/flint/fmpq_mpoly.pxd +165 -0
- sage/libs/flint/fmpq_mpoly_factor.pxd +30 -0
- sage/libs/flint/fmpq_poly.pxd +241 -0
- sage/libs/flint/fmpq_poly_macros.pxd +9 -0
- sage/libs/flint/fmpq_poly_sage.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/libs/flint/fmpq_poly_sage.pxd +31 -0
- sage/libs/flint/fmpq_poly_sage.pyx +48 -0
- sage/libs/flint/fmpq_vec.pxd +27 -0
- sage/libs/flint/fmpz.pxd +256 -0
- sage/libs/flint/fmpz_extras.pxd +32 -0
- sage/libs/flint/fmpz_factor.pxd +42 -0
- sage/libs/flint/fmpz_factor_sage.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/libs/flint/fmpz_factor_sage.pxd +4 -0
- sage/libs/flint/fmpz_factor_sage.pyx +29 -0
- sage/libs/flint/fmpz_lll.pxd +49 -0
- sage/libs/flint/fmpz_macros.pxd +8 -0
- sage/libs/flint/fmpz_mat.pxd +184 -0
- sage/libs/flint/fmpz_mat_macros.pxd +10 -0
- sage/libs/flint/fmpz_mod.pxd +46 -0
- sage/libs/flint/fmpz_mod_mat.pxd +71 -0
- sage/libs/flint/fmpz_mod_mpoly.pxd +161 -0
- sage/libs/flint/fmpz_mod_mpoly_factor.pxd +28 -0
- sage/libs/flint/fmpz_mod_poly.pxd +249 -0
- sage/libs/flint/fmpz_mod_poly_factor.pxd +46 -0
- sage/libs/flint/fmpz_mod_vec.pxd +27 -0
- sage/libs/flint/fmpz_mpoly.pxd +224 -0
- sage/libs/flint/fmpz_mpoly_factor.pxd +29 -0
- sage/libs/flint/fmpz_mpoly_q.pxd +57 -0
- sage/libs/flint/fmpz_poly.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/libs/flint/fmpz_poly.pxd +407 -0
- sage/libs/flint/fmpz_poly.pyx +19 -0
- sage/libs/flint/fmpz_poly_factor.pxd +33 -0
- sage/libs/flint/fmpz_poly_macros.pxd +8 -0
- sage/libs/flint/fmpz_poly_mat.pxd +71 -0
- sage/libs/flint/fmpz_poly_q.pxd +55 -0
- sage/libs/flint/fmpz_poly_sage.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/libs/flint/fmpz_poly_sage.pxd +20 -0
- sage/libs/flint/fmpz_poly_sage.pyx +500 -0
- sage/libs/flint/fmpz_vec.pxd +80 -0
- sage/libs/flint/fmpzi.pxd +52 -0
- sage/libs/flint/fq.pxd +97 -0
- sage/libs/flint/fq_default.pxd +84 -0
- sage/libs/flint/fq_default_mat.pxd +70 -0
- sage/libs/flint/fq_default_poly.pxd +97 -0
- sage/libs/flint/fq_default_poly_factor.pxd +39 -0
- sage/libs/flint/fq_embed.pxd +28 -0
- sage/libs/flint/fq_mat.pxd +83 -0
- sage/libs/flint/fq_nmod.pxd +95 -0
- sage/libs/flint/fq_nmod_embed.pxd +28 -0
- sage/libs/flint/fq_nmod_mat.pxd +83 -0
- sage/libs/flint/fq_nmod_mpoly.pxd +130 -0
- sage/libs/flint/fq_nmod_mpoly_factor.pxd +28 -0
- sage/libs/flint/fq_nmod_poly.pxd +202 -0
- sage/libs/flint/fq_nmod_poly_factor.pxd +47 -0
- sage/libs/flint/fq_nmod_vec.pxd +33 -0
- sage/libs/flint/fq_poly.pxd +204 -0
- sage/libs/flint/fq_poly_factor.pxd +47 -0
- sage/libs/flint/fq_vec.pxd +33 -0
- sage/libs/flint/fq_zech.pxd +99 -0
- sage/libs/flint/fq_zech_embed.pxd +28 -0
- sage/libs/flint/fq_zech_mat.pxd +78 -0
- sage/libs/flint/fq_zech_poly.pxd +198 -0
- sage/libs/flint/fq_zech_poly_factor.pxd +47 -0
- sage/libs/flint/fq_zech_vec.pxd +33 -0
- sage/libs/flint/gr.pxd +174 -0
- sage/libs/flint/gr_generic.pxd +215 -0
- sage/libs/flint/gr_mat.pxd +161 -0
- sage/libs/flint/gr_mpoly.pxd +68 -0
- sage/libs/flint/gr_poly.pxd +276 -0
- sage/libs/flint/gr_special.pxd +237 -0
- sage/libs/flint/gr_vec.pxd +120 -0
- sage/libs/flint/hypgeom.pxd +24 -0
- sage/libs/flint/long_extras.pxd +23 -0
- sage/libs/flint/mag.pxd +131 -0
- sage/libs/flint/mag_macros.pxd +8 -0
- sage/libs/flint/mpf_mat.pxd +36 -0
- sage/libs/flint/mpf_vec.pxd +34 -0
- sage/libs/flint/mpfr_mat.pxd +27 -0
- sage/libs/flint/mpfr_vec.pxd +25 -0
- sage/libs/flint/mpn_extras.pxd +41 -0
- sage/libs/flint/mpoly.pxd +72 -0
- sage/libs/flint/nf.pxd +19 -0
- sage/libs/flint/nf_elem.pxd +74 -0
- sage/libs/flint/nmod.pxd +35 -0
- sage/libs/flint/nmod_mat.pxd +104 -0
- sage/libs/flint/nmod_mpoly.pxd +144 -0
- sage/libs/flint/nmod_mpoly_factor.pxd +28 -0
- sage/libs/flint/nmod_poly.pxd +339 -0
- sage/libs/flint/nmod_poly_factor.pxd +44 -0
- sage/libs/flint/nmod_poly_linkage.pxi +710 -0
- sage/libs/flint/nmod_poly_mat.pxd +76 -0
- sage/libs/flint/nmod_vec.pxd +40 -0
- sage/libs/flint/ntl_interface.pxd +17 -0
- sage/libs/flint/padic.pxd +93 -0
- sage/libs/flint/padic_mat.pxd +64 -0
- sage/libs/flint/padic_poly.pxd +88 -0
- sage/libs/flint/partitions.pxd +23 -0
- sage/libs/flint/perm.pxd +26 -0
- sage/libs/flint/profiler.pxd +24 -0
- sage/libs/flint/qadic.pxd +77 -0
- sage/libs/flint/qfb.pxd +44 -0
- sage/libs/flint/qqbar.pxd +172 -0
- sage/libs/flint/qsieve.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/libs/flint/qsieve.pxd +41 -0
- sage/libs/flint/qsieve.pyx +21 -0
- sage/libs/flint/qsieve_sage.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/libs/flint/qsieve_sage.pyx +67 -0
- sage/libs/flint/thread_pool.pxd +25 -0
- sage/libs/flint/types.pxd +2076 -0
- sage/libs/flint/ulong_extras.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/libs/flint/ulong_extras.pxd +141 -0
- sage/libs/flint/ulong_extras.pyx +21 -0
- sage/libs/flint/ulong_extras_sage.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/libs/flint/ulong_extras_sage.pyx +21 -0
- sage/matrix/all__sagemath_flint.py +1 -0
- sage/matrix/change_ring.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/matrix/change_ring.pyx +43 -0
- sage/matrix/matrix_complex_ball_dense.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/matrix/matrix_complex_ball_dense.pxd +14 -0
- sage/matrix/matrix_complex_ball_dense.pyx +973 -0
- sage/matrix/matrix_cyclo_dense.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/matrix/matrix_cyclo_dense.pxd +16 -0
- sage/matrix/matrix_cyclo_dense.pyx +1761 -0
- sage/matrix/matrix_integer_dense.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/matrix/matrix_integer_dense.pxd +32 -0
- sage/matrix/matrix_integer_dense.pyx +5801 -0
- sage/matrix/matrix_integer_dense_hnf.py +1294 -0
- sage/matrix/matrix_integer_dense_saturation.py +346 -0
- sage/matrix/matrix_integer_sparse.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/matrix/matrix_integer_sparse.pxd +9 -0
- sage/matrix/matrix_integer_sparse.pyx +1090 -0
- sage/matrix/matrix_rational_dense.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/matrix/matrix_rational_dense.pxd +23 -0
- sage/matrix/matrix_rational_dense.pyx +2995 -0
- sage/matrix/matrix_rational_sparse.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/matrix/matrix_rational_sparse.pxd +11 -0
- sage/matrix/matrix_rational_sparse.pyx +789 -0
- sage/matrix/misc_flint.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/matrix/misc_flint.pyx +109 -0
- sage/modular/all__sagemath_flint.py +1 -0
- sage/modular/modform/all__sagemath_flint.py +1 -0
- sage/modular/modform/eis_series_cython.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/modular/modform/eis_series_cython.pyx +226 -0
- sage/modular/modsym/all__sagemath_flint.py +1 -0
- sage/modular/modsym/apply.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/modular/modsym/apply.pxd +6 -0
- sage/modular/modsym/apply.pyx +113 -0
- sage/modular/modsym/heilbronn.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/modular/modsym/heilbronn.pyx +966 -0
- sage/modular/pollack_stevens/all__sagemath_flint.py +1 -0
- sage/modular/pollack_stevens/dist.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/modular/pollack_stevens/dist.pxd +38 -0
- sage/modular/pollack_stevens/dist.pyx +1439 -0
- sage/quivers/algebra.py +691 -0
- sage/quivers/algebra_elements.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/quivers/algebra_elements.pxd +97 -0
- sage/quivers/algebra_elements.pxi +1324 -0
- sage/quivers/algebra_elements.pyx +1424 -0
- sage/quivers/all.py +1 -0
- sage/quivers/ar_quiver.py +917 -0
- sage/quivers/homspace.py +640 -0
- sage/quivers/morphism.py +1282 -0
- sage/quivers/path_semigroup.py +1155 -0
- sage/quivers/paths.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/quivers/paths.pxd +13 -0
- sage/quivers/paths.pyx +809 -0
- sage/quivers/representation.py +2975 -0
- sage/rings/all__sagemath_flint.py +37 -0
- sage/rings/cif.py +4 -0
- sage/rings/complex_arb.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/rings/complex_arb.pxd +29 -0
- sage/rings/complex_arb.pyx +5176 -0
- sage/rings/complex_interval.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/rings/complex_interval.pxd +30 -0
- sage/rings/complex_interval.pyx +2475 -0
- sage/rings/complex_interval_field.py +711 -0
- sage/rings/convert/all.py +1 -0
- sage/rings/convert/mpfi.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/rings/convert/mpfi.pxd +6 -0
- sage/rings/convert/mpfi.pyx +576 -0
- sage/rings/factorint_flint.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/rings/factorint_flint.pyx +99 -0
- sage/rings/fraction_field_FpT.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/rings/fraction_field_FpT.pxd +28 -0
- sage/rings/fraction_field_FpT.pyx +2043 -0
- sage/rings/imaginary_unit.py +5 -0
- sage/rings/monomials.py +73 -0
- sage/rings/number_field/S_unit_solver.py +2870 -0
- sage/rings/number_field/all__sagemath_flint.py +7 -0
- sage/rings/number_field/bdd_height.py +664 -0
- sage/rings/number_field/class_group.py +762 -0
- sage/rings/number_field/galois_group.py +1307 -0
- sage/rings/number_field/homset.py +612 -0
- sage/rings/number_field/maps.py +687 -0
- sage/rings/number_field/morphism.py +272 -0
- sage/rings/number_field/number_field.py +12820 -0
- sage/rings/number_field/number_field_element.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/rings/number_field/number_field_element.pxd +59 -0
- sage/rings/number_field/number_field_element.pyx +5735 -0
- sage/rings/number_field/number_field_element_quadratic.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/rings/number_field/number_field_element_quadratic.pxd +34 -0
- sage/rings/number_field/number_field_element_quadratic.pyx +3185 -0
- sage/rings/number_field/number_field_ideal_rel.py +925 -0
- sage/rings/number_field/number_field_morphisms.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/rings/number_field/number_field_morphisms.pyx +781 -0
- sage/rings/number_field/number_field_rel.py +2734 -0
- sage/rings/number_field/order.py +2981 -0
- sage/rings/number_field/order_ideal.py +804 -0
- sage/rings/number_field/selmer_group.py +715 -0
- sage/rings/number_field/small_primes_of_degree_one.py +242 -0
- sage/rings/number_field/splitting_field.py +606 -0
- sage/rings/number_field/structure.py +380 -0
- sage/rings/number_field/unit_group.py +721 -0
- sage/rings/padics/all__sagemath_flint.py +3 -0
- sage/rings/polynomial/all__sagemath_flint.py +1 -0
- sage/rings/polynomial/complex_roots.py +312 -0
- sage/rings/polynomial/evaluation_flint.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/rings/polynomial/evaluation_flint.pxd +7 -0
- sage/rings/polynomial/evaluation_flint.pyx +68 -0
- sage/rings/polynomial/hilbert.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/rings/polynomial/hilbert.pyx +602 -0
- sage/rings/polynomial/polynomial_complex_arb.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/rings/polynomial/polynomial_complex_arb.pxd +7 -0
- sage/rings/polynomial/polynomial_complex_arb.pyx +963 -0
- sage/rings/polynomial/polynomial_integer_dense_flint.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/rings/polynomial/polynomial_integer_dense_flint.pxd +13 -0
- sage/rings/polynomial/polynomial_integer_dense_flint.pyx +1881 -0
- sage/rings/polynomial/polynomial_number_field.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/rings/polynomial/polynomial_number_field.pyx +345 -0
- sage/rings/polynomial/polynomial_rational_flint.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/rings/polynomial/polynomial_rational_flint.pxd +20 -0
- sage/rings/polynomial/polynomial_rational_flint.pyx +2598 -0
- sage/rings/polynomial/polynomial_zmod_flint.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/rings/polynomial/polynomial_zmod_flint.pxd +20 -0
- sage/rings/polynomial/polynomial_zmod_flint.pyx +1063 -0
- sage/rings/polynomial/real_roots.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/rings/polynomial/real_roots.pxd +81 -0
- sage/rings/polynomial/real_roots.pyx +4704 -0
- sage/rings/polynomial/refine_root.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/rings/polynomial/refine_root.pyx +142 -0
- sage/rings/polynomial/weil/all.py +4 -0
- sage/rings/polynomial/weil/power_sums.h +46 -0
- sage/rings/polynomial/weil/weil_polynomials.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/rings/polynomial/weil/weil_polynomials.pyx +596 -0
- sage/rings/qqbar.py +9025 -0
- sage/rings/real_arb.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/rings/real_arb.pxd +21 -0
- sage/rings/real_arb.pyx +4065 -0
- sage/rings/real_interval_absolute.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/rings/real_interval_absolute.pyx +1073 -0
- sage/rings/real_mpfi.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/rings/real_mpfi.pyx +5428 -0
- sage/schemes/all__sagemath_flint.py +1 -0
- sage/schemes/elliptic_curves/all__sagemath_flint.py +1 -0
- sage/schemes/elliptic_curves/descent_two_isogeny.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/schemes/elliptic_curves/descent_two_isogeny.pyx +1387 -0
- sage/schemes/elliptic_curves/descent_two_isogeny_pari.pxd +5 -0
sage/quivers/paths.pyx
ADDED
@@ -0,0 +1,809 @@
|
|
1
|
+
# sage_setup: distribution = sagemath-flint
|
2
|
+
# sage.doctest: needs sage.graphs
|
3
|
+
"""
|
4
|
+
Quiver Paths
|
5
|
+
"""
|
6
|
+
# ****************************************************************************
|
7
|
+
# Copyright (C) 2012 Jim Stark <jstarx@gmail.com>
|
8
|
+
# 2013/14 Simon King <simon.king@uni-jena.de>
|
9
|
+
#
|
10
|
+
# Distributed under the terms of the GNU General Public License (GPL)
|
11
|
+
#
|
12
|
+
# This code is distributed in the hope that it will be useful,
|
13
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty
|
14
|
+
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
15
|
+
#
|
16
|
+
# See the GNU General Public License for more details; the full text
|
17
|
+
# is available at:
|
18
|
+
#
|
19
|
+
# https://www.gnu.org/licenses/
|
20
|
+
# ****************************************************************************
|
21
|
+
|
22
|
+
cimport cython
|
23
|
+
from cysignals.signals cimport sig_check, sig_on, sig_off
|
24
|
+
|
25
|
+
from sage.data_structures.bounded_integer_sequences cimport *
|
26
|
+
from cpython.slice cimport PySlice_GetIndicesEx
|
27
|
+
from sage.structure.richcmp cimport rich_to_bool
|
28
|
+
from sage.data_structures.bitset_base cimport *
|
29
|
+
|
30
|
+
|
31
|
+
cdef class QuiverPath(MonoidElement):
|
32
|
+
r"""
|
33
|
+
Class for paths in a quiver.
|
34
|
+
|
35
|
+
A path is given by two vertices, ``start`` and ``end``, and a finite
|
36
|
+
(possibly empty) list of edges `e_1, e_2, \ldots, e_n` such that the
|
37
|
+
initial vertex of `e_1` is ``start``, the final vertex of `e_i` is
|
38
|
+
the initial vertex of `e_{i+1}`, and the final vertex of `e_n` is
|
39
|
+
``end``. In the case where no edges are specified, we must have
|
40
|
+
``start = end`` and the path is called the trivial path at the given
|
41
|
+
vertex.
|
42
|
+
|
43
|
+
.. NOTE::
|
44
|
+
|
45
|
+
Do *not* use this constructor directly! Instead, pass the input to the
|
46
|
+
path semigroup that shall be the parent of this path.
|
47
|
+
|
48
|
+
EXAMPLES:
|
49
|
+
|
50
|
+
Specify a path by giving a list of edges::
|
51
|
+
|
52
|
+
sage: Q = DiGraph({1:{2:['a','d'], 3:['e']}, 2:{3:['b']}, 3:{1:['f'], 4:['c']}})
|
53
|
+
sage: F = Q.path_semigroup()
|
54
|
+
sage: p = F([(1, 2, 'a'), (2, 3, 'b')])
|
55
|
+
sage: p
|
56
|
+
a*b
|
57
|
+
|
58
|
+
Paths are not *unique*, but different representations of "the same" path
|
59
|
+
yield *equal* paths::
|
60
|
+
|
61
|
+
sage: q = F([(1, 1)]) * F([(1, 2, 'a'), (2, 3, 'b')]) * F([(3, 3)])
|
62
|
+
sage: p is q
|
63
|
+
False
|
64
|
+
sage: p == q
|
65
|
+
True
|
66
|
+
|
67
|
+
The ``*`` operator is concatenation of paths. If the two paths do not
|
68
|
+
compose, its result is ``None``::
|
69
|
+
|
70
|
+
sage: print(p*q)
|
71
|
+
None
|
72
|
+
sage: p*F([(3, 4, 'c')])
|
73
|
+
a*b*c
|
74
|
+
sage: F([(2,3,'b'), (3,1,'f')])*p
|
75
|
+
b*f*a*b
|
76
|
+
|
77
|
+
The length of a path is the number of edges in that path. Trivial paths
|
78
|
+
are therefore length-`0`::
|
79
|
+
|
80
|
+
sage: len(p)
|
81
|
+
2
|
82
|
+
sage: triv = F([(1, 1)])
|
83
|
+
sage: len(triv)
|
84
|
+
0
|
85
|
+
|
86
|
+
List index and slice notation can be used to access the edges in a path.
|
87
|
+
QuiverPaths can also be iterated over. Trivial paths have no elements::
|
88
|
+
|
89
|
+
sage: for x in p: print(x)
|
90
|
+
(1, 2, 'a')
|
91
|
+
(2, 3, 'b')
|
92
|
+
sage: list(triv)
|
93
|
+
[]
|
94
|
+
|
95
|
+
There are methods giving the initial and terminal vertex of a path::
|
96
|
+
|
97
|
+
sage: p.initial_vertex()
|
98
|
+
1
|
99
|
+
sage: p.terminal_vertex()
|
100
|
+
3
|
101
|
+
"""
|
102
|
+
def __dealloc__(self):
|
103
|
+
"""
|
104
|
+
TESTS::
|
105
|
+
|
106
|
+
sage: from sage.quivers.paths import QuiverPath
|
107
|
+
sage: Q = DiGraph({1:{2:['a']}, 2:{3:['b']}}).path_semigroup()
|
108
|
+
sage: p = Q([(1, 1)]) * Q([(1, 1)])
|
109
|
+
sage: del p # indirect doctest
|
110
|
+
"""
|
111
|
+
biseq_dealloc(self._path)
|
112
|
+
|
113
|
+
cdef QuiverPath _new_(self, int start, int end):
|
114
|
+
"""
|
115
|
+
TESTS::
|
116
|
+
|
117
|
+
sage: from sage.quivers.paths import QuiverPath
|
118
|
+
sage: Q = DiGraph({1:{2:['a']}, 2:{3:['b']}}).path_semigroup()
|
119
|
+
sage: p = Q(['a']) * Q(['b']) # indirect doctest
|
120
|
+
"""
|
121
|
+
cdef QuiverPath out = QuiverPath.__new__(self._parent.element_class)
|
122
|
+
out._parent = self._parent
|
123
|
+
out._start = start
|
124
|
+
out._end = end
|
125
|
+
return out
|
126
|
+
|
127
|
+
def __init__(self, parent, start, end, path):
|
128
|
+
"""
|
129
|
+
Create a path object. Type ``QuiverPath?`` for more information.
|
130
|
+
|
131
|
+
INPUT:
|
132
|
+
|
133
|
+
- ``parent`` -- a path semigroup
|
134
|
+
- ``start`` -- integer; the label of the initial vertex
|
135
|
+
- ``end`` -- integer; the label of the terminal vertex
|
136
|
+
- ``path`` -- list of integers, providing the list of arrows
|
137
|
+
occurring in the path, labelled according to the position in
|
138
|
+
the list of all arrows (resp. the list of outgoing arrows at
|
139
|
+
each vertex)
|
140
|
+
|
141
|
+
TESTS::
|
142
|
+
|
143
|
+
sage: from sage.quivers.paths import QuiverPath
|
144
|
+
sage: Q = DiGraph({1:{2:['a']}, 2:{3:['b']}}).path_semigroup()
|
145
|
+
sage: p = Q([(1, 1)]) * Q([(1, 1)])
|
146
|
+
sage: Q([(1,3,'x')])
|
147
|
+
Traceback (most recent call last):
|
148
|
+
...
|
149
|
+
ValueError: (1, 3, 'x') is not an edge
|
150
|
+
|
151
|
+
Note that QuiverPath should not be called directly, because
|
152
|
+
the elements of the path semigroup associated with a quiver
|
153
|
+
may use a sub-class of QuiverPath. Nonetheless, just for test, we
|
154
|
+
show that it *is* possible to create a path in a deprecated way::
|
155
|
+
|
156
|
+
sage: p == QuiverPath(Q, 1, 1, [])
|
157
|
+
True
|
158
|
+
sage: list(Q([(1, 1)])*Q([(1, 2, 'a')])*Q([(2, 2)])*Q([(2, 3, 'b')])*Q([(3, 3)]))
|
159
|
+
[(1, 2, 'a'), (2, 3, 'b')]
|
160
|
+
"""
|
161
|
+
MonoidElement.__init__(self, parent=parent)
|
162
|
+
self._start = start
|
163
|
+
self._end = end
|
164
|
+
biseq_init_list(self._path, path, parent._nb_arrows)
|
165
|
+
|
166
|
+
def __reduce__(self):
|
167
|
+
"""
|
168
|
+
TESTS::
|
169
|
+
|
170
|
+
sage: from sage.quivers.paths import QuiverPath
|
171
|
+
sage: Q = DiGraph({1:{2:['a']}, 2:{3:['b']}}).path_semigroup()
|
172
|
+
sage: p = Q(['a']) * Q(['b'])
|
173
|
+
sage: loads(dumps(p)) == p # indirect doctest
|
174
|
+
True
|
175
|
+
sage: loads(dumps(p)) is p
|
176
|
+
False
|
177
|
+
"""
|
178
|
+
return NewQuiverPath, (self._parent, self._start, self._end,
|
179
|
+
biseq_pickle(self._path))
|
180
|
+
|
181
|
+
def __hash__(self):
|
182
|
+
"""
|
183
|
+
TESTS::
|
184
|
+
|
185
|
+
sage: from sage.quivers.paths import QuiverPath
|
186
|
+
sage: Q = DiGraph({1:{2:['a']}, 2:{3:['b']}}).path_semigroup()
|
187
|
+
sage: p = Q(['a']) * Q(['b'])
|
188
|
+
sage: q = Q([(1, 1)])
|
189
|
+
sage: {p:1, q:2}[Q(['a','b'])] # indirect doctest
|
190
|
+
1
|
191
|
+
"""
|
192
|
+
if self._path.length == 0:
|
193
|
+
return hash(self._start)
|
194
|
+
cdef Py_hash_t h = self._start*(<Py_hash_t>1073807360) + biseq_hash(self._path)
|
195
|
+
if h == -1:
|
196
|
+
return -2
|
197
|
+
return h
|
198
|
+
# bitset_hash is not a good hash either
|
199
|
+
# We should consider using FNV-1a hash, see http://www.isthe.com/chongo/tech/comp/fnv/,
|
200
|
+
# Or the hash defined in http://burtleburtle.net/bob/hash/doobs.html
|
201
|
+
# Or http://www.azillionmonkeys.com/qed/hash.html
|
202
|
+
|
203
|
+
def _repr_(self):
|
204
|
+
r"""
|
205
|
+
Default representation of a path.
|
206
|
+
|
207
|
+
TESTS::
|
208
|
+
|
209
|
+
sage: Q = DiGraph({1:{2:['a']}, 2:{3:['b']}}).path_semigroup()
|
210
|
+
sage: Q([(1, 2, 'a'), (2, 3, 'b')]) # indirect doctest
|
211
|
+
a*b
|
212
|
+
sage: Q([(1, 1)]) # indirect doctest
|
213
|
+
e_1
|
214
|
+
"""
|
215
|
+
cdef mp_size_t i
|
216
|
+
if not self._path.length:
|
217
|
+
return 'e_{0}'.format(self._start)
|
218
|
+
L = self._parent._labels
|
219
|
+
return '*'.join(L[biseq_getitem(self._path, i)]
|
220
|
+
for i in range(self._path.length))
|
221
|
+
|
222
|
+
def __len__(self):
|
223
|
+
"""
|
224
|
+
Return the length of the path.
|
225
|
+
|
226
|
+
``length()`` and ``degree()`` are aliases
|
227
|
+
|
228
|
+
TESTS::
|
229
|
+
|
230
|
+
sage: Q = DiGraph({1:{2:['a']}, 2:{3:['b']}}).path_semigroup()
|
231
|
+
sage: len(Q([(1, 2, 'a'), (2, 3, 'b')]))
|
232
|
+
2
|
233
|
+
sage: Q([(1, 1)]).degree()
|
234
|
+
0
|
235
|
+
sage: Q([(1, 2, 'a')]).length()
|
236
|
+
1
|
237
|
+
"""
|
238
|
+
return self._path.length
|
239
|
+
|
240
|
+
degree = __len__
|
241
|
+
length = __len__
|
242
|
+
|
243
|
+
def __bool__(self):
|
244
|
+
"""
|
245
|
+
Implement boolean values for paths.
|
246
|
+
|
247
|
+
.. NOTE::
|
248
|
+
|
249
|
+
The boolean value is ``True`` if and only if this path is of
|
250
|
+
positive length.
|
251
|
+
|
252
|
+
TESTS::
|
253
|
+
|
254
|
+
sage: Q = DiGraph({1:{2:['a']}, 2:{3:['b']}}).path_semigroup()
|
255
|
+
sage: a = Q([(1, 2, 'a')])
|
256
|
+
sage: b = Q([(2, 3, 'b')])
|
257
|
+
sage: bool(a*b)
|
258
|
+
True
|
259
|
+
sage: bool(Q.idempotents()[0])
|
260
|
+
False
|
261
|
+
"""
|
262
|
+
return self._path.length != 0
|
263
|
+
|
264
|
+
cpdef _richcmp_(left, right, int op):
|
265
|
+
"""
|
266
|
+
Comparison for :class:`QuiverPaths`.
|
267
|
+
|
268
|
+
The following data (listed in order of preference) is used for
|
269
|
+
comparison:
|
270
|
+
|
271
|
+
- **Negative** length of the paths
|
272
|
+
- initial and terminal vertices of the paths
|
273
|
+
- Edge sequence of the paths, by reverse lexicographical ordering.
|
274
|
+
|
275
|
+
.. NOTE::
|
276
|
+
|
277
|
+
This code is used by :class:`CombinatorialFreeModule` to order
|
278
|
+
the monomials when printing elements of path algebras.
|
279
|
+
|
280
|
+
EXAMPLES:
|
281
|
+
|
282
|
+
A path semigroup of a quiver with a single vertex has a multiplicative
|
283
|
+
unit::
|
284
|
+
|
285
|
+
sage: D = DiGraph({0:{0:['x','y','z']}}).path_semigroup()
|
286
|
+
sage: D(1)
|
287
|
+
e_0
|
288
|
+
sage: D in Monoids()
|
289
|
+
True
|
290
|
+
|
291
|
+
However, there is no coercion from the ring of integers and hence the
|
292
|
+
generic comparison code finds that the multiplicative units in `D` and
|
293
|
+
in the ring of integers evaluate unequal::
|
294
|
+
|
295
|
+
sage: D.has_coerce_map_from(ZZ)
|
296
|
+
False
|
297
|
+
sage: D(1) == 1
|
298
|
+
False
|
299
|
+
|
300
|
+
TESTS::
|
301
|
+
|
302
|
+
sage: Q = DiGraph({1:{2:['a', 'b']}, 2:{3:['c'], 4:['d']}}).path_semigroup()
|
303
|
+
sage: a = Q([(1, 2, 'a')])
|
304
|
+
sage: b = Q([(1, 2, 'b')])
|
305
|
+
sage: c = Q([(2, 3, 'c')])
|
306
|
+
sage: d = Q([(2, 4, 'd')])
|
307
|
+
sage: e = Q.idempotents()[3]
|
308
|
+
sage: e < a # e is shorter than a
|
309
|
+
False
|
310
|
+
sage: a < e
|
311
|
+
True
|
312
|
+
sage: d < a*c
|
313
|
+
False
|
314
|
+
sage: a*c < d
|
315
|
+
True
|
316
|
+
sage: a < b
|
317
|
+
True
|
318
|
+
sage: b < a
|
319
|
+
False
|
320
|
+
sage: a*c < a*d
|
321
|
+
True
|
322
|
+
sage: a*d < a*c
|
323
|
+
False
|
324
|
+
sage: a < a
|
325
|
+
False
|
326
|
+
"""
|
327
|
+
# Since QuiverPath inherits from Element, it is guaranteed that
|
328
|
+
# both arguments are elements of the same path semigroup
|
329
|
+
cdef QuiverPath cself, other
|
330
|
+
cself = left
|
331
|
+
other = right
|
332
|
+
# we want *negative* degree reverse lexicographical order
|
333
|
+
if other._path.length < cself._path.length:
|
334
|
+
return rich_to_bool(op, -1)
|
335
|
+
if other._path.length > cself._path.length:
|
336
|
+
return rich_to_bool(op, 1)
|
337
|
+
if cself._start < other._start:
|
338
|
+
return rich_to_bool(op, -1)
|
339
|
+
if cself._start > other._start:
|
340
|
+
return rich_to_bool(op, 1)
|
341
|
+
if cself._end < other._end:
|
342
|
+
return rich_to_bool(op, -1)
|
343
|
+
if cself._end > other._end:
|
344
|
+
return rich_to_bool(op, 1)
|
345
|
+
if cself._path.length == 0:
|
346
|
+
return rich_to_bool(op, 0)
|
347
|
+
return biseq_richcmp(cself._path, other._path, op)
|
348
|
+
|
349
|
+
def __getitem__(self, index):
|
350
|
+
"""
|
351
|
+
Implement index notation.
|
352
|
+
|
353
|
+
TESTS::
|
354
|
+
|
355
|
+
sage: Q = DiGraph({1:{2:['a']}, 2:{3:['b']}, 3:{4:['c'], 1:['d']}}).path_semigroup()
|
356
|
+
sage: p = Q([(1, 2, 'a'), (2, 3, 'b'), (3, 1, 'd'), (1, 2, 'a'), (2, 3, 'b'), (3, 4, 'c')])
|
357
|
+
sage: p
|
358
|
+
a*b*d*a*b*c
|
359
|
+
|
360
|
+
A single index returns the arrow that appears in the path at this index::
|
361
|
+
|
362
|
+
sage: p[0]
|
363
|
+
a
|
364
|
+
sage: p[-1]
|
365
|
+
c
|
366
|
+
|
367
|
+
A slice with step 1 returns a sub-path of this path::
|
368
|
+
|
369
|
+
sage: p[1:5]
|
370
|
+
b*d*a*b
|
371
|
+
|
372
|
+
A slice with step -1 return a sub-path of the reversed path::
|
373
|
+
|
374
|
+
sage: p[4:1:-1]
|
375
|
+
b*a*d
|
376
|
+
|
377
|
+
If the start index is greater than the terminal index and the step
|
378
|
+
-1 is not explicitly given, then a path of length zero is returned,
|
379
|
+
which is compatible with Python lists::
|
380
|
+
|
381
|
+
sage: list(range(6))[4:1]
|
382
|
+
[]
|
383
|
+
|
384
|
+
The following was fixed in :issue:`22278`. A path slice of length
|
385
|
+
zero of course has a specific start- and endpoint. It is always
|
386
|
+
the startpoint of the arrow corresponding to the first item of
|
387
|
+
the range::
|
388
|
+
|
389
|
+
sage: p[4:1]
|
390
|
+
e_2
|
391
|
+
sage: p[4:1].initial_vertex() == p[4].initial_vertex()
|
392
|
+
True
|
393
|
+
|
394
|
+
If the slice boundaries are out of bound, then no error is raised,
|
395
|
+
which is compatible with Python lists::
|
396
|
+
|
397
|
+
sage: list(range(6))[20:40]
|
398
|
+
[]
|
399
|
+
|
400
|
+
In that case, the startpoint of the slice of length zero is the
|
401
|
+
endpoint of the path::
|
402
|
+
|
403
|
+
sage: p[20:40]
|
404
|
+
e_4
|
405
|
+
sage: p[20:40].initial_vertex() == p.terminal_vertex()
|
406
|
+
True
|
407
|
+
"""
|
408
|
+
cdef tuple E
|
409
|
+
cdef Py_ssize_t start, stop, step, slicelength
|
410
|
+
cdef int init, end
|
411
|
+
cdef QuiverPath OUT
|
412
|
+
if isinstance(index, slice):
|
413
|
+
PySlice_GetIndicesEx(index, self._path.length,
|
414
|
+
&start, &stop, &step,
|
415
|
+
&slicelength)
|
416
|
+
if step != 1 and step != -1:
|
417
|
+
raise ValueError("slicing only possible for step +/-1")
|
418
|
+
if step == -1:
|
419
|
+
return self.reversal()[self._path.length-1-start:self._path.length-1-stop]
|
420
|
+
if start == 0 and stop == self._path.length:
|
421
|
+
return self
|
422
|
+
if start > stop:
|
423
|
+
stop=start
|
424
|
+
E = self._parent._sorted_edges
|
425
|
+
if start < self._path.length:
|
426
|
+
init = E[biseq_getitem(self._path, start)][0]
|
427
|
+
else:
|
428
|
+
init = self._end
|
429
|
+
if start < stop:
|
430
|
+
end = E[biseq_getitem(self._path, stop-1)][1]
|
431
|
+
else: # the result will be a path of length 0
|
432
|
+
end = init
|
433
|
+
OUT = self._new_(init, end)
|
434
|
+
biseq_init_slice(OUT._path, self._path, start, stop, step)
|
435
|
+
return OUT
|
436
|
+
if index < 0:
|
437
|
+
index = self._path.length+index
|
438
|
+
if index < 0 or index >= self._path.length:
|
439
|
+
raise IndexError("list index out of range")
|
440
|
+
E = self._parent._sorted_edges
|
441
|
+
init = E[biseq_getitem(self._path, index)][0]
|
442
|
+
end = E[biseq_getitem(self._path, index)][1]
|
443
|
+
OUT = self._new_(init, end)
|
444
|
+
biseq_init_slice(OUT._path, self._path, index, index+1, 1)
|
445
|
+
return OUT
|
446
|
+
|
447
|
+
def __iter__(self):
|
448
|
+
"""
|
449
|
+
Iteration over the path.
|
450
|
+
|
451
|
+
TESTS::
|
452
|
+
|
453
|
+
sage: Q = DiGraph({1:{2:['a']}, 2:{3:['b']}, 3:{4:['c']}}).path_semigroup()
|
454
|
+
sage: p = Q([(1, 2, 'a'), (2, 3, 'b'), (3, 4, 'c')])
|
455
|
+
sage: for e in p: print(e)
|
456
|
+
(1, 2, 'a')
|
457
|
+
(2, 3, 'b')
|
458
|
+
(3, 4, 'c')
|
459
|
+
"""
|
460
|
+
# Return an iterator over an empty tuple for trivial paths, otherwise
|
461
|
+
# return an iterator for _path as a list
|
462
|
+
cdef mp_size_t i
|
463
|
+
cdef tuple E = self._parent._sorted_edges
|
464
|
+
for i in range(self._path.length):
|
465
|
+
yield E[biseq_getitem(self._path, i)]
|
466
|
+
|
467
|
+
cpdef _mul_(self, other):
|
468
|
+
"""
|
469
|
+
Compose two paths.
|
470
|
+
|
471
|
+
.. NOTE::
|
472
|
+
|
473
|
+
``None`` is returned if the terminal vertex of the first path
|
474
|
+
does not coincide with the initial vertex of the second path.
|
475
|
+
|
476
|
+
TESTS::
|
477
|
+
|
478
|
+
sage: Q = DiGraph({1:{2:['a']}, 2:{3:['b']}, 3:{4:['c']}, 4:{5:['d']}}).path_semigroup()
|
479
|
+
sage: x = Q([(1, 2, 'a'), (2, 3, 'b')])
|
480
|
+
sage: y = Q([(3, 4, 'c'), (4, 5, 'd')])
|
481
|
+
sage: print(y*x)
|
482
|
+
None
|
483
|
+
sage: x*y
|
484
|
+
a*b*c*d
|
485
|
+
sage: x*Q([(3, 4, 'c')])
|
486
|
+
a*b*c
|
487
|
+
sage: x*Q([(3, 4, 'c'), (4, 5, 'd')])
|
488
|
+
a*b*c*d
|
489
|
+
sage: x*6
|
490
|
+
Traceback (most recent call last):
|
491
|
+
...
|
492
|
+
TypeError: unsupported operand parent(s) for *:
|
493
|
+
'Partial semigroup formed by the directed paths of Multi-digraph on 5 vertices'
|
494
|
+
and 'Integer Ring'
|
495
|
+
"""
|
496
|
+
# By Sage's coercion model, both paths belong to the same quiver
|
497
|
+
# In particular, both are QuiverPath
|
498
|
+
cdef QuiverPath right = other
|
499
|
+
if self._end != right._start:
|
500
|
+
return None
|
501
|
+
cdef QuiverPath OUT = self._new_(self._start, right._end)
|
502
|
+
biseq_init_concat(OUT._path, self._path, right._path)
|
503
|
+
return OUT
|
504
|
+
|
505
|
+
cpdef _mod_(self, other):
|
506
|
+
"""
|
507
|
+
Return what remains of this path after removing the initial segment ``other``.
|
508
|
+
|
509
|
+
If ``other`` is not an initial segment of this path then ``None`` is
|
510
|
+
returned. Deleting the trivial path at vertex `v` from a path that
|
511
|
+
begins at `v` does not change the path.
|
512
|
+
|
513
|
+
TESTS::
|
514
|
+
|
515
|
+
sage: Q = DiGraph({1:{2:['a']}, 2:{3:['b']}}).path_semigroup()
|
516
|
+
sage: p = Q([(1, 2, 'a'), (2, 3, 'b')])
|
517
|
+
sage: a = Q([(1, 2, 'a')])
|
518
|
+
sage: b = Q([(2, 3, 'b')])
|
519
|
+
sage: e1 = Q([(1, 1)])
|
520
|
+
sage: e2 = Q([(2, 2)])
|
521
|
+
sage: p % a
|
522
|
+
b
|
523
|
+
sage: print(p % b)
|
524
|
+
None
|
525
|
+
sage: p % e1
|
526
|
+
a*b
|
527
|
+
sage: print(p % e2)
|
528
|
+
None
|
529
|
+
"""
|
530
|
+
cdef QuiverPath right = <QuiverPath>other
|
531
|
+
# Handle trivial case
|
532
|
+
if self._start != right._start:
|
533
|
+
return None
|
534
|
+
if right._path.length == 0:
|
535
|
+
return self
|
536
|
+
|
537
|
+
# If other is the beginning, return the rest
|
538
|
+
cdef QuiverPath OUT
|
539
|
+
if (self._start == right._start) and biseq_startswith(self._path, right._path):
|
540
|
+
OUT = self._new_(right._end, self._end)
|
541
|
+
biseq_init_slice(OUT._path, self._path, right._path.length, self._path.length, 1)
|
542
|
+
return OUT
|
543
|
+
else:
|
544
|
+
return None
|
545
|
+
|
546
|
+
def gcd(self, QuiverPath P):
|
547
|
+
"""
|
548
|
+
Greatest common divisor of two quiver paths, with co-factors.
|
549
|
+
|
550
|
+
For paths, by "greatest common divisor", we mean the largest terminal
|
551
|
+
segment of the first path that is an initial segment of the second
|
552
|
+
path.
|
553
|
+
|
554
|
+
INPUT:
|
555
|
+
|
556
|
+
- ``P`` -- a :class:`QuiverPath`
|
557
|
+
|
558
|
+
OUTPUT:
|
559
|
+
|
560
|
+
- :class:`QuiverPath`s ``(C1,G,C2)`` such that ``self = C1*G`` and ``P = G*C2``, or
|
561
|
+
- ``(None, None, None)``, if the paths do not overlap (or belong to different quivers).
|
562
|
+
|
563
|
+
EXAMPLES::
|
564
|
+
|
565
|
+
sage: Q = DiGraph({1:{2:['a']}, 2:{1:['b'], 3:['c']}, 3:{1:['d']}}).path_semigroup()
|
566
|
+
sage: p1 = Q(['c','d','a','b','a','c','d'])
|
567
|
+
sage: p1
|
568
|
+
c*d*a*b*a*c*d
|
569
|
+
sage: p2 = Q(['a','b','a','c','d','a','c','d','a','b'])
|
570
|
+
sage: p2
|
571
|
+
a*b*a*c*d*a*c*d*a*b
|
572
|
+
sage: S1, G, S2 = p1.gcd(p2)
|
573
|
+
sage: S1, G, S2
|
574
|
+
(c*d, a*b*a*c*d, a*c*d*a*b)
|
575
|
+
sage: S1*G == p1
|
576
|
+
True
|
577
|
+
sage: G*S2 == p2
|
578
|
+
True
|
579
|
+
sage: p2.gcd(p1)
|
580
|
+
(a*b*a*c*d*a, c*d*a*b, a*c*d)
|
581
|
+
|
582
|
+
We test that a full overlap is detected::
|
583
|
+
|
584
|
+
sage: p2.gcd(p2)
|
585
|
+
(e_1, a*b*a*c*d*a*c*d*a*b, e_1)
|
586
|
+
|
587
|
+
The absence of an overlap is detected::
|
588
|
+
|
589
|
+
sage: p2[2:-1]
|
590
|
+
a*c*d*a*c*d*a
|
591
|
+
sage: p2[1:]
|
592
|
+
b*a*c*d*a*c*d*a*b
|
593
|
+
sage: print(p2[2:-1].gcd(p2[1:]))
|
594
|
+
(None, None, None)
|
595
|
+
"""
|
596
|
+
if self._parent is not P._parent:
|
597
|
+
return (None, None, None)
|
598
|
+
cdef size_t i
|
599
|
+
sig_on()
|
600
|
+
i = biseq_startswith_tail(P._path, self._path, 0)
|
601
|
+
sig_off()
|
602
|
+
if i == <size_t>-1:
|
603
|
+
return (None, None, None)
|
604
|
+
return (self[:i], self[i:], P[self._path.length-i:])
|
605
|
+
|
606
|
+
cpdef tuple complement(self, QuiverPath subpath):
|
607
|
+
"""
|
608
|
+
Return a pair ``(a,b)`` of paths s.t. ``self = a*subpath*b``,
|
609
|
+
or ``(None, None)`` if ``subpath`` is not a subpath of this path.
|
610
|
+
|
611
|
+
.. NOTE::
|
612
|
+
|
613
|
+
``a`` is chosen of minimal length.
|
614
|
+
|
615
|
+
EXAMPLES::
|
616
|
+
|
617
|
+
sage: S = DiGraph({1:{1:['a','b','c','d']}}).path_semigroup()
|
618
|
+
sage: S.inject_variables()
|
619
|
+
Defining e_1, a, b, c, d
|
620
|
+
sage: (b*c*a*d*b*a*d*d).complement(a*d)
|
621
|
+
(b*c, b*a*d*d)
|
622
|
+
sage: (b*c*a*d*b).complement(a*c)
|
623
|
+
(None, None)
|
624
|
+
"""
|
625
|
+
cdef mp_size_t i = biseq_contains(self._path, subpath._path, 0)
|
626
|
+
if i == -1:
|
627
|
+
return (None, None)
|
628
|
+
return self[:i], self[i+len(subpath):]
|
629
|
+
|
630
|
+
cpdef bint has_subpath(self, QuiverPath subpath) except -1:
|
631
|
+
"""
|
632
|
+
Tells whether this path contains a given sub-path.
|
633
|
+
|
634
|
+
INPUT:
|
635
|
+
|
636
|
+
- ``subpath`` -- a path of positive length in the same path semigroup
|
637
|
+
as this path
|
638
|
+
|
639
|
+
EXAMPLES::
|
640
|
+
|
641
|
+
sage: S = DiGraph({0:{1:['a'], 2:['b']}, 1:{0:['c'], 1:['d']}, 2:{0:['e'],2:['f']}}).path_semigroup()
|
642
|
+
sage: S.inject_variables()
|
643
|
+
Defining e_0, e_1, e_2, a, b, c, d, e, f
|
644
|
+
sage: (c*b*e*a).has_subpath(b*e)
|
645
|
+
1
|
646
|
+
sage: (c*b*e*a).has_subpath(b*f)
|
647
|
+
0
|
648
|
+
sage: (c*b*e*a).has_subpath(e_1)
|
649
|
+
Traceback (most recent call last):
|
650
|
+
...
|
651
|
+
ValueError: we only consider sub-paths of positive length
|
652
|
+
sage: (c*b*e*a).has_subpath(None)
|
653
|
+
Traceback (most recent call last):
|
654
|
+
...
|
655
|
+
ValueError: the given sub-path is empty
|
656
|
+
"""
|
657
|
+
if subpath is None:
|
658
|
+
raise ValueError("the given sub-path is empty")
|
659
|
+
if subpath._parent is not self._parent:
|
660
|
+
raise ValueError("the two paths belong to different quivers")
|
661
|
+
if subpath._path.length == 0:
|
662
|
+
raise ValueError("we only consider sub-paths of positive length")
|
663
|
+
if self._path.length < subpath._path.length:
|
664
|
+
return 0
|
665
|
+
if biseq_contains(self._path, subpath._path, 0) == -1:
|
666
|
+
return 0
|
667
|
+
return 1
|
668
|
+
|
669
|
+
cpdef bint has_prefix(self, QuiverPath subpath) except -1:
|
670
|
+
"""
|
671
|
+
Tells whether this path starts with a given sub-path.
|
672
|
+
|
673
|
+
INPUT:
|
674
|
+
|
675
|
+
- ``subpath`` -- a path in the same path semigroup as this path
|
676
|
+
|
677
|
+
OUTPUT: ``0`` or ``1``, which stands for ``False`` resp. ``True``
|
678
|
+
|
679
|
+
EXAMPLES::
|
680
|
+
|
681
|
+
sage: S = DiGraph({0:{1:['a'], 2:['b']}, 1:{0:['c'], 1:['d']}, 2:{0:['e'],2:['f']}}).path_semigroup()
|
682
|
+
sage: S.inject_variables()
|
683
|
+
Defining e_0, e_1, e_2, a, b, c, d, e, f
|
684
|
+
sage: (c*b*e*a).has_prefix(b*e)
|
685
|
+
0
|
686
|
+
sage: (c*b*e*a).has_prefix(c*b)
|
687
|
+
1
|
688
|
+
sage: (c*b*e*a).has_prefix(e_1)
|
689
|
+
1
|
690
|
+
sage: (c*b*e*a).has_prefix(e_2)
|
691
|
+
0
|
692
|
+
"""
|
693
|
+
if subpath._parent is not self._parent:
|
694
|
+
raise ValueError("the two paths belong to different quivers")
|
695
|
+
if self._start != subpath._start:
|
696
|
+
return 0
|
697
|
+
if subpath._path.length == 0:
|
698
|
+
return 1
|
699
|
+
if biseq_startswith(self._path, subpath._path):
|
700
|
+
return 1
|
701
|
+
return 0
|
702
|
+
|
703
|
+
def initial_vertex(self):
|
704
|
+
"""
|
705
|
+
Return the initial vertex of the path.
|
706
|
+
|
707
|
+
OUTPUT: integer; the label of the initial vertex
|
708
|
+
|
709
|
+
EXAMPLES::
|
710
|
+
|
711
|
+
sage: Q = DiGraph({1:{2:['a']}, 2:{3:['b']}}).path_semigroup()
|
712
|
+
sage: y = Q([(1, 2, 'a'), (2, 3, 'b')])
|
713
|
+
sage: y.initial_vertex()
|
714
|
+
1
|
715
|
+
"""
|
716
|
+
return self._start
|
717
|
+
|
718
|
+
def terminal_vertex(self):
|
719
|
+
"""
|
720
|
+
Return the terminal vertex of the path.
|
721
|
+
|
722
|
+
OUTPUT: integer; the label of the terminal vertex
|
723
|
+
|
724
|
+
EXAMPLES::
|
725
|
+
|
726
|
+
sage: Q = DiGraph({1:{2:['a']}, 2:{3:['b']}}).path_semigroup()
|
727
|
+
sage: y = Q([(1, 2, 'a'), (2, 3, 'b')])
|
728
|
+
sage: y.terminal_vertex()
|
729
|
+
3
|
730
|
+
"""
|
731
|
+
return self._end
|
732
|
+
|
733
|
+
def reversal(self):
|
734
|
+
"""
|
735
|
+
Return the path along the same edges in reverse order in the
|
736
|
+
opposite quiver.
|
737
|
+
|
738
|
+
EXAMPLES::
|
739
|
+
|
740
|
+
sage: Q = DiGraph({1:{2:['a']}, 2:{3:['b']}, 3:{4:['c'], 1:['d']}}).path_semigroup()
|
741
|
+
sage: p = Q([(1, 2, 'a'), (2, 3, 'b'), (3, 1, 'd'), (1, 2, 'a'), (2, 3, 'b'), (3, 4, 'c')])
|
742
|
+
sage: p
|
743
|
+
a*b*d*a*b*c
|
744
|
+
sage: p.reversal()
|
745
|
+
c*b*a*d*b*a
|
746
|
+
sage: e = Q.idempotents()[0]
|
747
|
+
sage: e
|
748
|
+
e_1
|
749
|
+
sage: e.reversal()
|
750
|
+
e_1
|
751
|
+
"""
|
752
|
+
Q = self._parent.reverse()
|
753
|
+
# Handle trivial paths
|
754
|
+
if self._path.length == 0:
|
755
|
+
return Q.element_class(Q, self._end, self._start, [])
|
756
|
+
|
757
|
+
# Reverse all the edges in the path, then reverse the path
|
758
|
+
cdef mp_size_t i
|
759
|
+
cdef QuiverPath out = QuiverPath.__new__(Q.element_class)
|
760
|
+
out._parent = Q
|
761
|
+
out._start = self._end
|
762
|
+
out._end = self._start
|
763
|
+
sig_check()
|
764
|
+
biseq_init(out._path, self._path.length, self._path.itembitsize)
|
765
|
+
cdef mp_size_t ell = self._path.length - 1
|
766
|
+
for i in range(self._path.length):
|
767
|
+
sig_check()
|
768
|
+
biseq_inititem(out._path, i, biseq_getitem(self._path, ell - i))
|
769
|
+
return out
|
770
|
+
|
771
|
+
|
772
|
+
@cython.binding(True)
|
773
|
+
def NewQuiverPath(Q, start, end, biseq_data):
|
774
|
+
"""
|
775
|
+
Return a new quiver path for given defining data.
|
776
|
+
|
777
|
+
INPUT:
|
778
|
+
|
779
|
+
- ``Q`` -- the path semigroup of a quiver
|
780
|
+
- ``start`` -- integer; the label of the startpoint
|
781
|
+
- ``end`` -- integer; the label of the endpoint
|
782
|
+
- ``biseq_data`` -- tuple formed by
|
783
|
+
|
784
|
+
- a string, encoding a bitmap representing the path as integer
|
785
|
+
at base `32`
|
786
|
+
- the number of bits used to store the path
|
787
|
+
- the number of bits used to store a single item
|
788
|
+
- the number of items in the path
|
789
|
+
|
790
|
+
TESTS::
|
791
|
+
|
792
|
+
sage: from sage.quivers.paths import QuiverPath
|
793
|
+
sage: Q = DiGraph({1:{2:['a']}, 2:{3:['b']}}).path_semigroup()
|
794
|
+
sage: p = Q(['a']) * Q(['b'])
|
795
|
+
sage: loads(dumps(p)) == p # indirect doctest
|
796
|
+
True
|
797
|
+
sage: p.__reduce__()
|
798
|
+
(<cyfunction NewQuiverPath at ...>,
|
799
|
+
(Partial semigroup formed by the directed paths of Multi-digraph on 3 vertices,
|
800
|
+
1,
|
801
|
+
3,
|
802
|
+
((0, 4, 1, ..., (4,)), 2, 2)))
|
803
|
+
"""
|
804
|
+
cdef QuiverPath out = QuiverPath.__new__(Q.element_class)
|
805
|
+
out._parent = Q
|
806
|
+
out._start = start
|
807
|
+
out._end = end
|
808
|
+
biseq_unpickle(out._path, biseq_data[0], biseq_data[1], biseq_data[2])
|
809
|
+
return out
|