passagemath-modules 10.5.32__cp310-cp310-macosx_14_0_arm64.whl → 10.6.20__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.
Potentially problematic release.
This version of passagemath-modules might be problematic. Click here for more details.
- {passagemath_modules-10.5.32.dist-info → passagemath_modules-10.6.20.dist-info}/METADATA +51 -46
- {passagemath_modules-10.5.32.dist-info → passagemath_modules-10.6.20.dist-info}/RECORD +333 -323
- {passagemath_modules-10.5.32.dist-info → passagemath_modules-10.6.20.dist-info}/WHEEL +1 -1
- passagemath_modules.dylibs/libgcc_s.1.1.dylib +0 -0
- passagemath_modules.dylibs/libgfortran.5.dylib +0 -0
- passagemath_modules.dylibs/libgsl.28.dylib +0 -0
- passagemath_modules.dylibs/libmpc.3.dylib +0 -0
- passagemath_modules.dylibs/libopenblasp-r0.3.29.dylib +0 -0
- passagemath_modules.dylibs/libquadmath.0.dylib +0 -0
- sage/algebras/clifford_algebra.py +2 -2
- sage/algebras/clifford_algebra_element.cpython-310-darwin.so +0 -0
- sage/algebras/clifford_algebra_element.pyx +4 -2
- sage/algebras/exterior_algebra_groebner.cpython-310-darwin.so +0 -0
- sage/algebras/exterior_algebra_groebner.pyx +2 -0
- sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra.py +83 -5
- sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.cpython-310-darwin.so +0 -0
- sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pxd +2 -0
- sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pyx +28 -3
- sage/algebras/finite_gca.py +1 -1
- sage/algebras/lie_algebras/bgg_dual_module.py +18 -11
- sage/algebras/lie_algebras/classical_lie_algebra.py +3 -3
- sage/algebras/lie_algebras/examples.py +2 -2
- sage/algebras/lie_algebras/free_lie_algebra.py +1 -1
- sage/algebras/lie_algebras/heisenberg.py +4 -4
- sage/algebras/lie_algebras/lie_algebra.py +1 -1
- sage/algebras/lie_algebras/lie_algebra_element.cpython-310-darwin.so +0 -0
- sage/algebras/lie_algebras/lie_algebra_element.pyx +65 -28
- sage/algebras/lie_algebras/quotient.py +40 -29
- sage/algebras/lie_algebras/subalgebra.py +76 -53
- sage/algebras/lie_algebras/verma_module.py +1 -3
- sage/algebras/octonion_algebra.cpython-310-darwin.so +0 -0
- sage/algebras/octonion_algebra.pyx +1 -1
- sage/algebras/orlik_solomon.py +4 -4
- sage/algebras/orlik_terao.py +4 -4
- sage/algebras/steenrod/steenrod_algebra.py +37 -30
- sage/algebras/steenrod/steenrod_algebra_bases.py +2 -2
- sage/algebras/steenrod/steenrod_algebra_misc.py +4 -4
- sage/algebras/steenrod/steenrod_algebra_mult.py +2 -2
- sage/all__sagemath_modules.py +1 -0
- sage/calculus/integration.cpython-310-darwin.so +0 -0
- sage/calculus/integration.pyx +6 -5
- sage/calculus/interpolation.cpython-310-darwin.so +0 -0
- sage/calculus/interpolators.cpython-310-darwin.so +0 -0
- sage/calculus/ode.cpython-310-darwin.so +0 -0
- sage/calculus/ode.pxd +2 -2
- sage/calculus/ode.pyx +6 -4
- sage/calculus/riemann.cpython-310-darwin.so +0 -0
- sage/calculus/riemann.pyx +68 -48
- sage/calculus/transforms/dwt.cpython-310-darwin.so +0 -0
- sage/calculus/transforms/fft.cpython-310-darwin.so +0 -0
- sage/coding/ag_code_decoders.cpython-310-darwin.so +0 -0
- sage/coding/ag_code_decoders.pyx +31 -31
- sage/coding/binary_code.cpython-310-darwin.so +0 -0
- sage/coding/binary_code.pxd +6 -6
- sage/coding/binary_code.pyx +212 -173
- sage/coding/guruswami_sudan/utils.py +3 -5
- sage/coding/kasami_codes.cpython-310-darwin.so +0 -0
- sage/coding/kasami_codes.pyx +20 -24
- sage/coding/linear_code.py +2 -2
- sage/coding/linear_code_no_metric.py +5 -5
- sage/coding/linear_rank_metric.py +81 -19
- sage/combinat/cartesian_product.py +1 -1
- sage/combinat/free_module.py +22 -2
- sage/combinat/root_system/all.py +1 -1
- sage/combinat/root_system/ambient_space.py +1 -1
- sage/combinat/root_system/associahedron.py +4 -4
- sage/combinat/root_system/braid_move_calculator.py +2 -2
- sage/combinat/root_system/braid_orbit.cpython-310-darwin.so +0 -0
- sage/combinat/root_system/braid_orbit.pyx +1 -1
- sage/combinat/root_system/branching_rules.py +3 -3
- sage/combinat/root_system/cartan_type.py +14 -14
- sage/combinat/root_system/coxeter_group.py +3 -3
- sage/combinat/root_system/coxeter_matrix.py +1 -1
- sage/combinat/root_system/coxeter_type.py +12 -1
- sage/combinat/root_system/extended_affine_weyl_group.py +9 -9
- sage/combinat/root_system/fundamental_group.py +3 -5
- sage/combinat/root_system/hecke_algebra_representation.py +1 -1
- sage/combinat/root_system/integrable_representations.py +1 -1
- sage/combinat/root_system/pieri_factors.py +3 -3
- sage/combinat/root_system/root_lattice_realization_algebras.py +1 -1
- sage/combinat/root_system/root_lattice_realizations.py +1 -1
- sage/combinat/root_system/type_folded.py +3 -3
- sage/combinat/root_system/type_reducible.py +8 -7
- sage/combinat/root_system/type_super_A.py +2 -2
- sage/combinat/root_system/weight_lattice_realizations.py +9 -8
- sage/combinat/root_system/weyl_characters.py +2 -2
- sage/crypto/__init__.py +1 -0
- sage/crypto/block_cipher/des.py +1 -1
- sage/crypto/block_cipher/miniaes.py +3 -3
- sage/crypto/block_cipher/present.py +3 -3
- sage/crypto/block_cipher/sdes.py +3 -3
- sage/crypto/boolean_function.cpython-310-darwin.so +0 -0
- sage/crypto/boolean_function.pyx +22 -23
- sage/crypto/key_exchange/diffie_hellman.py +4 -9
- sage/crypto/mq/sr.py +1 -1
- sage/crypto/public_key/blum_goldwasser.py +3 -3
- sage/crypto/sbox.cpython-310-darwin.so +0 -0
- sage/crypto/sbox.pyx +1 -1
- sage/crypto/sboxes.py +22 -0
- sage/crypto/util.py +4 -6
- sage/ext/interpreters/__init__.py +1 -1
- sage/ext/interpreters/all__sagemath_modules.py +1 -1
- sage/ext/interpreters/wrapper_cc.cpython-310-darwin.so +0 -0
- sage/ext/interpreters/wrapper_cc.pxd +5 -5
- sage/ext/interpreters/wrapper_cc.pyx +1 -1
- sage/ext/interpreters/wrapper_cdf.cpython-310-darwin.so +0 -0
- sage/ext/interpreters/wrapper_cdf.pxd +5 -7
- sage/ext/interpreters/wrapper_cdf.pyx +4 -10
- sage/ext/interpreters/wrapper_rdf.cpython-310-darwin.so +0 -0
- sage/ext/interpreters/wrapper_rdf.pxd +1 -1
- sage/ext/interpreters/wrapper_rdf.pyx +1 -1
- sage/ext/interpreters/wrapper_rr.cpython-310-darwin.so +0 -0
- sage/ext/interpreters/wrapper_rr.pxd +5 -5
- sage/ext/interpreters/wrapper_rr.pyx +1 -2
- sage/geometry/toric_lattice.py +3 -3
- sage/geometry/toric_lattice_element.cpython-310-darwin.so +0 -0
- sage/groups/additive_abelian/additive_abelian_group.py +1 -1
- sage/groups/additive_abelian/qmodnz.py +4 -4
- sage/groups/matrix_gps/coxeter_group.py +17 -4
- sage/groups/matrix_gps/group_element.cpython-310-darwin.so +0 -0
- sage/groups/misc_gps/argument_groups.py +2 -2
- sage/groups/misc_gps/imaginary_groups.py +4 -4
- sage/groups/perm_gps/partn_ref/refinement_binary.cpython-310-darwin.so +0 -0
- sage/groups/perm_gps/partn_ref/refinement_matrices.cpython-310-darwin.so +0 -0
- sage/homology/chain_complex.py +0 -2
- sage/homology/hochschild_complex.py +3 -3
- sage/homology/homology_morphism.py +6 -6
- sage/homology/homology_vector_space_with_basis.py +1 -1
- sage/libs/gsl/array.cpython-310-darwin.so +0 -0
- sage/libs/mpmath/utils.cpython-310-darwin.so +0 -0
- sage/matrix/action.cpython-310-darwin.so +0 -0
- sage/matrix/args.cpython-310-darwin.so +0 -0
- sage/matrix/args.pyx +25 -10
- sage/matrix/benchmark.py +8 -4
- sage/matrix/compute_J_ideal.py +2 -2
- sage/matrix/constructor.cpython-310-darwin.so +0 -0
- sage/matrix/echelon_matrix.cpython-310-darwin.so +0 -0
- sage/matrix/echelon_matrix.pyx +1 -1
- sage/matrix/matrix0.cpython-310-darwin.so +0 -0
- sage/matrix/matrix0.pxd +3 -3
- sage/matrix/matrix0.pyx +7 -5
- sage/matrix/matrix1.cpython-310-darwin.so +0 -0
- sage/matrix/matrix1.pyx +87 -48
- sage/matrix/matrix2.cpython-310-darwin.so +0 -0
- sage/matrix/matrix2.pxd +3 -3
- sage/matrix/matrix2.pyx +1261 -63
- sage/matrix/matrix_cdv.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_complex_double_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_complex_double_dense.pyx +1 -1
- sage/matrix/matrix_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_dense.pyx +2 -3
- sage/matrix/matrix_double_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_double_dense.pyx +11 -5
- sage/matrix/matrix_double_sparse.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_generic_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_generic_sparse.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_generic_sparse.pyx +1 -1
- sage/matrix/matrix_laurent_mpolynomial_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_numpy_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_numpy_integer_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_polynomial_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_polynomial_dense.pyx +952 -261
- sage/matrix/matrix_real_double_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_sparse.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_sparse.pyx +6 -7
- sage/matrix/matrix_window.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_window.pyx +2 -2
- sage/matrix/misc_mpfr.cpython-310-darwin.so +0 -0
- sage/matrix/operation_table.py +0 -2
- sage/matrix/special.py +5 -1
- sage/matrix/strassen.cpython-310-darwin.so +0 -0
- sage/matrix/strassen.pyx +1 -1
- sage/matroids/basis_exchange_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/basis_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/chow_ring.py +68 -65
- sage/matroids/chow_ring_ideal.py +41 -38
- sage/matroids/circuit_closures_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/circuits_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/database_matroids.py +16 -5
- sage/matroids/dual_matroid.py +2 -2
- sage/matroids/extension.cpython-310-darwin.so +0 -0
- sage/matroids/flats_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/gammoid.py +1 -1
- sage/matroids/graphic_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/graphic_matroid.pyx +3 -3
- sage/matroids/lean_matrix.cpython-310-darwin.so +0 -0
- sage/matroids/lean_matrix.pyx +22 -22
- sage/matroids/linear_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/linear_matroid.pyx +13 -13
- sage/matroids/matroid.cpython-310-darwin.so +0 -0
- sage/matroids/matroid.pyx +15 -15
- sage/matroids/matroids_plot_helpers.py +48 -46
- sage/matroids/minor_matroid.py +2 -2
- sage/matroids/set_system.cpython-310-darwin.so +0 -0
- sage/matroids/transversal_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/transversal_matroid.pyx +3 -3
- sage/matroids/union_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/union_matroid.pyx +3 -0
- sage/matroids/unpickling.cpython-310-darwin.so +0 -0
- sage/matroids/utilities.py +2 -2
- sage/misc/c3.cpython-310-darwin.so +0 -0
- sage/misc/compat.py +1 -2
- sage/misc/pickle_old.cpython-310-darwin.so +0 -0
- sage/modules/diamond_cutting.py +117 -30
- sage/modules/fg_pid/fgp_module.py +3 -3
- sage/modules/filtered_vector_space.py +4 -4
- sage/modules/finite_submodule_iter.cpython-310-darwin.so +0 -0
- sage/modules/fp_graded/free_module.py +2 -2
- sage/modules/fp_graded/module.py +2 -2
- sage/modules/fp_graded/morphism.py +4 -4
- sage/modules/fp_graded/steenrod/morphism.py +1 -1
- sage/modules/free_module.py +162 -26
- sage/modules/free_module_element.cpython-310-darwin.so +0 -0
- sage/modules/free_module_element.pyx +4 -4
- sage/modules/free_module_integer.py +2 -2
- sage/modules/free_module_morphism.py +3 -3
- sage/modules/free_module_pseudohomspace.py +352 -0
- sage/modules/free_module_pseudomorphism.py +578 -0
- sage/modules/free_quadratic_module_integer_symmetric.py +24 -13
- sage/modules/matrix_morphism.py +9 -9
- sage/modules/multi_filtered_vector_space.py +4 -4
- sage/modules/ore_module.py +2208 -0
- sage/modules/ore_module_element.py +178 -0
- sage/modules/ore_module_homspace.py +147 -0
- sage/modules/ore_module_morphism.py +968 -0
- sage/modules/quotient_module.py +11 -1
- sage/modules/submodule.py +1 -1
- sage/modules/torsion_quadratic_module.py +1 -1
- sage/modules/vector_complex_double_dense.cpython-310-darwin.so +0 -0
- sage/modules/vector_double_dense.cpython-310-darwin.so +0 -0
- sage/modules/vector_integer_dense.cpython-310-darwin.so +0 -0
- sage/modules/vector_integer_sparse.cpython-310-darwin.so +0 -0
- sage/modules/vector_integer_sparse.pyx +4 -4
- sage/modules/vector_modn_dense.cpython-310-darwin.so +0 -0
- sage/modules/vector_modn_sparse.cpython-310-darwin.so +0 -0
- sage/modules/vector_numpy_dense.cpython-310-darwin.so +0 -0
- sage/modules/vector_numpy_integer_dense.cpython-310-darwin.so +0 -0
- sage/modules/vector_rational_dense.cpython-310-darwin.so +0 -0
- sage/modules/vector_rational_dense.pyx +1 -1
- sage/modules/vector_rational_sparse.cpython-310-darwin.so +0 -0
- sage/modules/vector_rational_sparse.pyx +5 -5
- sage/modules/vector_real_double_dense.cpython-310-darwin.so +0 -0
- sage/modules/vector_space_morphism.py +2 -2
- sage/modules/with_basis/cell_module.py +17 -0
- sage/modules/with_basis/indexed_element.cpython-310-darwin.so +0 -0
- sage/modules/with_basis/indexed_element.pyx +1 -1
- sage/modules/with_basis/invariant.py +1 -1
- sage/modules/with_basis/representation.py +0 -1
- sage/modules/with_basis/subquotient.py +2 -2
- sage/numerical/gauss_legendre.cpython-310-darwin.so +0 -0
- sage/probability/probability_distribution.cpython-310-darwin.so +0 -0
- sage/quadratic_forms/binary_qf.py +11 -11
- sage/quadratic_forms/bqf_class_group.py +26 -92
- sage/quadratic_forms/count_local_2.cpython-310-darwin.so +0 -0
- sage/quadratic_forms/extras.py +1 -1
- sage/quadratic_forms/quadratic_form.py +5 -4
- sage/quadratic_forms/quadratic_form__equivalence_testing.py +7 -4
- sage/quadratic_forms/quadratic_form__evaluate.cpython-310-darwin.so +0 -0
- sage/quadratic_forms/quadratic_form__local_field_invariants.py +10 -10
- sage/quadratic_forms/quadratic_form__ternary_Tornaria.py +2 -2
- sage/quadratic_forms/ternary.cpython-310-darwin.so +0 -0
- sage/quadratic_forms/ternary_qf.py +50 -83
- sage/rings/cfinite_sequence.py +16 -17
- sage/rings/complex_conversion.cpython-310-darwin.so +0 -0
- sage/rings/complex_double.cpython-310-darwin.so +0 -0
- sage/rings/complex_double.pxd +1 -0
- sage/rings/complex_double.pyx +37 -32
- sage/rings/complex_mpc.cpython-310-darwin.so +0 -0
- sage/rings/complex_mpc.pyx +27 -23
- sage/rings/complex_mpfr.cpython-310-darwin.so +0 -0
- sage/rings/complex_mpfr.pyx +11 -11
- sage/rings/function_field/drinfeld_modules/charzero_drinfeld_module.py +277 -21
- sage/rings/function_field/drinfeld_modules/drinfeld_module.py +10 -1
- sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +1 -1
- sage/rings/function_field/drinfeld_modules/homset.py +1 -2
- sage/rings/function_field/drinfeld_modules/morphism.py +2 -2
- sage/rings/function_field/hermite_form_polynomial.cpython-310-darwin.so +0 -0
- sage/rings/function_field/khuri_makdisi.cpython-310-darwin.so +0 -0
- sage/rings/function_field/khuri_makdisi.pyx +27 -25
- sage/rings/invariants/invariant_theory.py +61 -60
- sage/rings/invariants/reconstruction.py +8 -8
- sage/rings/polynomial/laurent_polynomial_mpair.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/ore_function_element.py +1 -1
- sage/rings/polynomial/ore_polynomial_element.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/ore_polynomial_element.pyx +8 -8
- sage/rings/polynomial/ore_polynomial_ring.py +134 -17
- sage/rings/polynomial/polynomial_real_mpfr_dense.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/skew_polynomial_element.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/skew_polynomial_finite_field.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/skew_polynomial_finite_field.pyx +3 -4
- sage/rings/polynomial/skew_polynomial_finite_order.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/skew_polynomial_finite_order.pyx +2 -5
- sage/rings/real_double_element_gsl.cpython-310-darwin.so +0 -0
- sage/rings/real_mpfr.cpython-310-darwin.so +0 -0
- sage/rings/real_mpfr.pyx +25 -7
- sage/rings/ring_extension.cpython-310-darwin.so +0 -0
- sage/rings/ring_extension.pyx +4 -2
- sage/rings/ring_extension_conversion.cpython-310-darwin.so +0 -0
- sage/rings/ring_extension_element.cpython-310-darwin.so +0 -0
- sage/rings/ring_extension_element.pyx +42 -0
- sage/rings/ring_extension_morphism.cpython-310-darwin.so +0 -0
- sage/schemes/all__sagemath_modules.py +1 -0
- sage/schemes/projective/all__sagemath_modules.py +1 -0
- sage/schemes/projective/coherent_sheaf.py +300 -0
- sage/schemes/projective/cohomology.py +510 -0
- sage/stats/basic_stats.py +17 -15
- sage/stats/distributions/dgs_misc.h +11 -4
- sage/stats/distributions/discrete_gaussian_integer.cpython-310-darwin.so +0 -0
- sage/stats/distributions/discrete_gaussian_integer.pyx +9 -7
- sage/stats/hmm/chmm.cpython-310-darwin.so +0 -0
- sage/stats/hmm/chmm.pyx +13 -13
- sage/stats/hmm/distributions.cpython-310-darwin.so +0 -0
- sage/stats/hmm/distributions.pxd +3 -3
- sage/stats/hmm/distributions.pyx +3 -3
- sage/stats/hmm/hmm.cpython-310-darwin.so +0 -0
- sage/stats/hmm/hmm.pxd +3 -3
- sage/stats/hmm/hmm.pyx +6 -6
- sage/stats/hmm/util.cpython-310-darwin.so +0 -0
- sage/stats/hmm/util.pyx +6 -6
- sage/stats/intlist.cpython-310-darwin.so +0 -0
- sage/stats/intlist.pxd +3 -3
- sage/stats/time_series.cpython-310-darwin.so +0 -0
- sage/tensor/modules/alternating_contr_tensor.py +3 -3
- sage/tensor/modules/comp.py +3 -3
- sage/tensor/modules/ext_pow_free_module.py +3 -3
- sage/tensor/modules/format_utilities.py +3 -3
- sage/tensor/modules/free_module_linear_group.py +3 -3
- sage/tensor/modules/free_module_morphism.py +0 -1
- sage/tensor/modules/tensor_free_module.py +3 -3
- sage/tensor/modules/tensor_free_submodule.py +1 -1
- sage/tensor/modules/tensor_free_submodule_basis.py +1 -1
- sage/tensor/modules/tensor_with_indices.py +5 -5
- passagemath_modules.dylibs/libopenblas_armv8p-r0.3.28.dylib +0 -0
- {passagemath_modules-10.5.32.dist-info → passagemath_modules-10.6.20.dist-info}/top_level.txt +0 -0
sage/rings/complex_mpc.pyx
CHANGED
|
@@ -347,7 +347,7 @@ cdef class MPComplexField_class(Field):
|
|
|
347
347
|
z.init = 1
|
|
348
348
|
return z
|
|
349
349
|
|
|
350
|
-
def _repr_ (self):
|
|
350
|
+
def _repr_ (self) -> str:
|
|
351
351
|
"""
|
|
352
352
|
Return a string representation of ``self``.
|
|
353
353
|
|
|
@@ -356,12 +356,12 @@ cdef class MPComplexField_class(Field):
|
|
|
356
356
|
sage: MPComplexField(200, 'RNDDU') # indirect doctest
|
|
357
357
|
Complex Field with 200 bits of precision and rounding RNDDU
|
|
358
358
|
"""
|
|
359
|
-
s = "Complex Field with %s bits of precision"%self._prec
|
|
359
|
+
s = "Complex Field with %s bits of precision" % self._prec
|
|
360
360
|
if self.__rnd != MPC_RNDNN:
|
|
361
|
-
s = s + " and rounding %s"%(self.__rnd_str)
|
|
361
|
+
s = s + " and rounding %s" % (self.__rnd_str)
|
|
362
362
|
return s
|
|
363
363
|
|
|
364
|
-
def _latex_(self):
|
|
364
|
+
def _latex_(self) -> str:
|
|
365
365
|
r"""
|
|
366
366
|
Return a latex representation of ``self``.
|
|
367
367
|
|
|
@@ -616,7 +616,7 @@ cdef class MPComplexField_class(Field):
|
|
|
616
616
|
sage: C = MPComplexField(10, 'RNDNZ'); C.name()
|
|
617
617
|
'MPComplexField10_RNDNZ'
|
|
618
618
|
"""
|
|
619
|
-
return "MPComplexField%s_%s"%(self._prec, self.__rnd_str)
|
|
619
|
+
return "MPComplexField%s_%s" % (self._prec, self.__rnd_str)
|
|
620
620
|
|
|
621
621
|
def __hash__(self):
|
|
622
622
|
"""
|
|
@@ -1368,8 +1368,10 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
|
|
|
1368
1368
|
|
|
1369
1369
|
ALGORITHM: Uses the PARI C-library :pari:`algdep` command.
|
|
1370
1370
|
|
|
1371
|
-
INPUT: Type ``
|
|
1372
|
-
|
|
1371
|
+
INPUT: Type ``algebraic_dependency?`` at the top level prompt.
|
|
1372
|
+
|
|
1373
|
+
All additional parameters are passed onto the top-level
|
|
1374
|
+
``algebraic_dependency`` command.
|
|
1373
1375
|
|
|
1374
1376
|
EXAMPLES::
|
|
1375
1377
|
|
|
@@ -1383,8 +1385,10 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
|
|
|
1383
1385
|
sage: p(z)
|
|
1384
1386
|
1.11022302462516e-16
|
|
1385
1387
|
"""
|
|
1386
|
-
from sage.arith.misc import
|
|
1387
|
-
return
|
|
1388
|
+
from sage.arith.misc import algebraic_dependency
|
|
1389
|
+
return algebraic_dependency(self, n, **kwds)
|
|
1390
|
+
|
|
1391
|
+
algdep = algebraic_dependency
|
|
1388
1392
|
|
|
1389
1393
|
################################
|
|
1390
1394
|
# Basic Arithmetic
|
|
@@ -1546,7 +1550,7 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
|
|
|
1546
1550
|
"""
|
|
1547
1551
|
cdef RealNumber x
|
|
1548
1552
|
x = RealNumber(self._parent._real_field())
|
|
1549
|
-
mpc_abs
|
|
1553
|
+
mpc_abs(x.value, self.value, (<RealField_class>x._parent).rnd)
|
|
1550
1554
|
return x
|
|
1551
1555
|
|
|
1552
1556
|
def norm(self):
|
|
@@ -1649,7 +1653,7 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
|
|
|
1649
1653
|
"""
|
|
1650
1654
|
cdef MPComplexNumber z
|
|
1651
1655
|
z = self._new()
|
|
1652
|
-
mpc_cos
|
|
1656
|
+
mpc_cos(z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
|
|
1653
1657
|
return z
|
|
1654
1658
|
|
|
1655
1659
|
def sin(self):
|
|
@@ -1669,7 +1673,7 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
|
|
|
1669
1673
|
"""
|
|
1670
1674
|
cdef MPComplexNumber z
|
|
1671
1675
|
z = self._new()
|
|
1672
|
-
mpc_sin
|
|
1676
|
+
mpc_sin(z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
|
|
1673
1677
|
return z
|
|
1674
1678
|
|
|
1675
1679
|
def tan(self):
|
|
@@ -1689,7 +1693,7 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
|
|
|
1689
1693
|
"""
|
|
1690
1694
|
cdef MPComplexNumber z
|
|
1691
1695
|
z = self._new()
|
|
1692
|
-
mpc_tan
|
|
1696
|
+
mpc_tan(z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
|
|
1693
1697
|
return z
|
|
1694
1698
|
|
|
1695
1699
|
def cosh(self):
|
|
@@ -1709,7 +1713,7 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
|
|
|
1709
1713
|
"""
|
|
1710
1714
|
cdef MPComplexNumber z
|
|
1711
1715
|
z = self._new()
|
|
1712
|
-
mpc_cosh
|
|
1716
|
+
mpc_cosh(z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
|
|
1713
1717
|
return z
|
|
1714
1718
|
|
|
1715
1719
|
def sinh(self):
|
|
@@ -1729,7 +1733,7 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
|
|
|
1729
1733
|
"""
|
|
1730
1734
|
cdef MPComplexNumber z
|
|
1731
1735
|
z = self._new()
|
|
1732
|
-
mpc_sinh
|
|
1736
|
+
mpc_sinh(z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
|
|
1733
1737
|
return z
|
|
1734
1738
|
|
|
1735
1739
|
def tanh(self):
|
|
@@ -1749,7 +1753,7 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
|
|
|
1749
1753
|
"""
|
|
1750
1754
|
cdef MPComplexNumber z
|
|
1751
1755
|
z = self._new()
|
|
1752
|
-
mpc_tanh
|
|
1756
|
+
mpc_tanh(z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
|
|
1753
1757
|
return z
|
|
1754
1758
|
|
|
1755
1759
|
def arccos(self):
|
|
@@ -1765,7 +1769,7 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
|
|
|
1765
1769
|
"""
|
|
1766
1770
|
cdef MPComplexNumber z
|
|
1767
1771
|
z = self._new()
|
|
1768
|
-
mpc_acos
|
|
1772
|
+
mpc_acos(z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
|
|
1769
1773
|
return z
|
|
1770
1774
|
|
|
1771
1775
|
def arcsin(self):
|
|
@@ -1781,7 +1785,7 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
|
|
|
1781
1785
|
"""
|
|
1782
1786
|
cdef MPComplexNumber z
|
|
1783
1787
|
z = self._new()
|
|
1784
|
-
mpc_asin
|
|
1788
|
+
mpc_asin(z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
|
|
1785
1789
|
return z
|
|
1786
1790
|
|
|
1787
1791
|
def arctan(self):
|
|
@@ -1797,7 +1801,7 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
|
|
|
1797
1801
|
"""
|
|
1798
1802
|
cdef MPComplexNumber z
|
|
1799
1803
|
z = self._new()
|
|
1800
|
-
mpc_atan
|
|
1804
|
+
mpc_atan(z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
|
|
1801
1805
|
return z
|
|
1802
1806
|
|
|
1803
1807
|
def arccosh(self):
|
|
@@ -1813,7 +1817,7 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
|
|
|
1813
1817
|
"""
|
|
1814
1818
|
cdef MPComplexNumber z
|
|
1815
1819
|
z = self._new()
|
|
1816
|
-
mpc_acosh
|
|
1820
|
+
mpc_acosh(z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
|
|
1817
1821
|
return z
|
|
1818
1822
|
|
|
1819
1823
|
def arcsinh(self):
|
|
@@ -1829,7 +1833,7 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
|
|
|
1829
1833
|
"""
|
|
1830
1834
|
cdef MPComplexNumber z
|
|
1831
1835
|
z = self._new()
|
|
1832
|
-
mpc_asinh
|
|
1836
|
+
mpc_asinh(z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
|
|
1833
1837
|
return z
|
|
1834
1838
|
|
|
1835
1839
|
def arctanh(self):
|
|
@@ -1845,7 +1849,7 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
|
|
|
1845
1849
|
"""
|
|
1846
1850
|
cdef MPComplexNumber z
|
|
1847
1851
|
z = self._new()
|
|
1848
|
-
mpc_atanh
|
|
1852
|
+
mpc_atanh(z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
|
|
1849
1853
|
return z
|
|
1850
1854
|
|
|
1851
1855
|
def coth(self):
|
|
@@ -2028,7 +2032,7 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
|
|
|
2028
2032
|
"""
|
|
2029
2033
|
cdef MPComplexNumber z
|
|
2030
2034
|
z = self._new()
|
|
2031
|
-
mpc_sqr
|
|
2035
|
+
mpc_sqr(z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
|
|
2032
2036
|
return z
|
|
2033
2037
|
|
|
2034
2038
|
def sqrt(self):
|
|
Binary file
|
sage/rings/complex_mpfr.pyx
CHANGED
|
@@ -33,8 +33,6 @@ AUTHORS:
|
|
|
33
33
|
import re
|
|
34
34
|
import weakref
|
|
35
35
|
|
|
36
|
-
import sage.misc.misc
|
|
37
|
-
|
|
38
36
|
from sage.libs.mpfr cimport *
|
|
39
37
|
|
|
40
38
|
from sage.structure.parent cimport Parent
|
|
@@ -621,7 +619,7 @@ class ComplexField_class(sage.rings.abc.ComplexField):
|
|
|
621
619
|
return self._generic_coerce_map(S)
|
|
622
620
|
return self._coerce_map_via([CLF], S)
|
|
623
621
|
|
|
624
|
-
def _repr_(self):
|
|
622
|
+
def _repr_(self) -> str:
|
|
625
623
|
"""
|
|
626
624
|
Return a string representation of ``self``.
|
|
627
625
|
|
|
@@ -632,9 +630,9 @@ class ComplexField_class(sage.rings.abc.ComplexField):
|
|
|
632
630
|
sage: ComplexField(15) # indirect doctest
|
|
633
631
|
Complex Field with 15 bits of precision
|
|
634
632
|
"""
|
|
635
|
-
return "Complex Field with %s bits of precision"%self._prec
|
|
633
|
+
return "Complex Field with %s bits of precision" % self._prec
|
|
636
634
|
|
|
637
|
-
def _latex_(self):
|
|
635
|
+
def _latex_(self) -> str:
|
|
638
636
|
r"""
|
|
639
637
|
Return a latex representation of ``self``.
|
|
640
638
|
|
|
@@ -1333,7 +1331,7 @@ cdef class ComplexNumber(sage.structure.element.FieldElement):
|
|
|
1333
1331
|
|
|
1334
1332
|
INPUT:
|
|
1335
1333
|
|
|
1336
|
-
- ``format_spec`` -- string; a floating point format
|
|
1334
|
+
- ``format_spec`` -- string; a floating point format specifier as
|
|
1337
1335
|
defined by :python:`the format specification mini-language
|
|
1338
1336
|
<library/string.html#formatspec>` in Python
|
|
1339
1337
|
|
|
@@ -3261,8 +3259,10 @@ cdef class ComplexNumber(sage.structure.element.FieldElement):
|
|
|
3261
3259
|
|
|
3262
3260
|
ALGORITHM: Uses the PARI C-library :pari:`algdep` command.
|
|
3263
3261
|
|
|
3264
|
-
INPUT: Type ``
|
|
3265
|
-
|
|
3262
|
+
INPUT: Type ``algebraic_dependency?`` at the top level prompt.
|
|
3263
|
+
|
|
3264
|
+
All additional parameters are passed onto the top-level
|
|
3265
|
+
:func:`algebraic_dependency` command.
|
|
3266
3266
|
|
|
3267
3267
|
EXAMPLES::
|
|
3268
3268
|
|
|
@@ -3270,13 +3270,13 @@ cdef class ComplexNumber(sage.structure.element.FieldElement):
|
|
|
3270
3270
|
sage: C = ComplexField()
|
|
3271
3271
|
sage: z = (1/2)*(1 + sqrt(3.0) *C.0); z
|
|
3272
3272
|
0.500000000000000 + 0.866025403784439*I
|
|
3273
|
-
sage: p = z.
|
|
3273
|
+
sage: p = z.algebraic_dependency(5); p
|
|
3274
3274
|
x^2 - x + 1
|
|
3275
3275
|
sage: p(z)
|
|
3276
3276
|
1.11022302462516e-16
|
|
3277
3277
|
"""
|
|
3278
|
-
from sage.arith.misc import
|
|
3279
|
-
return
|
|
3278
|
+
from sage.arith.misc import algebraic_dependency
|
|
3279
|
+
return algebraic_dependency(self, n, **kwds)
|
|
3280
3280
|
|
|
3281
3281
|
# Alias
|
|
3282
3282
|
algdep = algebraic_dependency
|
|
@@ -3,14 +3,16 @@
|
|
|
3
3
|
r"""
|
|
4
4
|
Drinfeld modules over rings of characteristic zero
|
|
5
5
|
|
|
6
|
-
This module provides the
|
|
7
|
-
:class:`sage.rings.function_fields.drinfeld_module.charzero_drinfeld_module.DrinfeldModule_charzero
|
|
8
|
-
|
|
6
|
+
This module provides the classes
|
|
7
|
+
:class:`sage.rings.function_fields.drinfeld_module.charzero_drinfeld_module.DrinfeldModule_charzero` and
|
|
8
|
+
:class:`sage.rings.function_fields.drinfeld_module.charzero_drinfeld_module.DrinfeldModule_rational`,
|
|
9
|
+
which both inherit
|
|
9
10
|
:class:`sage.rings.function_fields.drinfeld_module.drinfeld_module.DrinfeldModule`.
|
|
10
11
|
|
|
11
12
|
AUTHORS:
|
|
12
13
|
|
|
13
14
|
- David Ayotte (2023-09)
|
|
15
|
+
- Xavier Caruso (2024-12) - computation of class polynomials
|
|
14
16
|
"""
|
|
15
17
|
|
|
16
18
|
# *****************************************************************************
|
|
@@ -26,11 +28,16 @@ AUTHORS:
|
|
|
26
28
|
from .drinfeld_module import DrinfeldModule
|
|
27
29
|
|
|
28
30
|
from sage.rings.integer_ring import ZZ
|
|
31
|
+
from sage.rings.infinity import Infinity
|
|
32
|
+
|
|
33
|
+
from sage.matrix.constructor import matrix
|
|
34
|
+
from sage.modules.free_module_element import vector
|
|
29
35
|
|
|
30
36
|
from sage.misc.cachefunc import cached_method
|
|
31
37
|
from sage.misc.lazy_import import lazy_import
|
|
32
38
|
|
|
33
39
|
lazy_import('sage.rings.lazy_series_ring', 'LazyPowerSeriesRing')
|
|
40
|
+
lazy_import('sage.rings.power_series_ring', 'PowerSeriesRing')
|
|
34
41
|
|
|
35
42
|
|
|
36
43
|
class DrinfeldModule_charzero(DrinfeldModule):
|
|
@@ -150,7 +157,7 @@ class DrinfeldModule_charzero(DrinfeldModule):
|
|
|
150
157
|
c += self._compute_coefficient_exp(i)*self._compute_coefficient_log(j)**(q**i)
|
|
151
158
|
return -c
|
|
152
159
|
|
|
153
|
-
def exponential(self, name='z'):
|
|
160
|
+
def exponential(self, prec=Infinity, name='z'):
|
|
154
161
|
r"""
|
|
155
162
|
Return the exponential of this Drinfeld module.
|
|
156
163
|
|
|
@@ -159,28 +166,38 @@ class DrinfeldModule_charzero(DrinfeldModule):
|
|
|
159
166
|
|
|
160
167
|
INPUT:
|
|
161
168
|
|
|
169
|
+
- ``prec`` -- an integer or ``Infinity`` (default: ``Infinity``);
|
|
170
|
+
the precision at which the series is returned; if ``Infinity``,
|
|
171
|
+
a lazy power series in returned, else, a classical power series
|
|
172
|
+
is returned.
|
|
173
|
+
|
|
162
174
|
- ``name`` -- string (default: ``'z'``); the name of the
|
|
163
175
|
generator of the lazy power series ring
|
|
164
176
|
|
|
165
|
-
OUTPUT: a lazy power series over the base field
|
|
166
|
-
|
|
167
177
|
EXAMPLES::
|
|
168
178
|
|
|
169
179
|
sage: A = GF(2)['T']
|
|
170
180
|
sage: K.<T> = Frac(A)
|
|
171
181
|
sage: phi = DrinfeldModule(A, [T, 1])
|
|
172
182
|
sage: q = A.base_ring().cardinality()
|
|
173
|
-
sage: exp = phi.exponential(); exp
|
|
174
|
-
z + ((1/(T^2+T))*z^2) + ((1/(T^8+T^6+T^5+T^3))*z^4) + O(z^8)
|
|
175
183
|
|
|
176
|
-
|
|
177
|
-
|
|
184
|
+
When ``prec`` is ``Infinity`` (which is the default),
|
|
185
|
+
the exponential is returned as a lazy power series, meaning
|
|
186
|
+
that any of its coefficients can be computed on demands::
|
|
178
187
|
|
|
188
|
+
sage: exp = phi.exponential(); exp
|
|
189
|
+
z + ((1/(T^2+T))*z^2) + ((1/(T^8+T^6+T^5+T^3))*z^4) + O(z^8)
|
|
179
190
|
sage: exp[2^4]
|
|
180
191
|
1/(T^64 + T^56 + T^52 + ... + T^27 + T^23 + T^15)
|
|
181
192
|
sage: exp[2^5]
|
|
182
193
|
1/(T^160 + T^144 + T^136 + ... + T^55 + T^47 + T^31)
|
|
183
194
|
|
|
195
|
+
On the contrary, when ``prec`` is a finite number, all the
|
|
196
|
+
required coefficients are computed at once::
|
|
197
|
+
|
|
198
|
+
sage: phi.exponential(prec=10)
|
|
199
|
+
z + (1/(T^2 + T))*z^2 + (1/(T^8 + T^6 + T^5 + T^3))*z^4 + (1/(T^24 + T^20 + T^18 + T^17 + T^14 + T^13 + T^11 + T^7))*z^8 + O(z^10)
|
|
200
|
+
|
|
184
201
|
Example in higher rank::
|
|
185
202
|
|
|
186
203
|
sage: A = GF(5)['T']
|
|
@@ -217,7 +234,6 @@ class DrinfeldModule_charzero(DrinfeldModule):
|
|
|
217
234
|
See section 4.6 of [Gos1998]_ for the definition of the
|
|
218
235
|
exponential.
|
|
219
236
|
"""
|
|
220
|
-
L = LazyPowerSeriesRing(self._base, name)
|
|
221
237
|
zero = self._base.zero()
|
|
222
238
|
q = self._Fq.cardinality()
|
|
223
239
|
|
|
@@ -229,7 +245,12 @@ class DrinfeldModule_charzero(DrinfeldModule):
|
|
|
229
245
|
return self._compute_coefficient_exp(v)
|
|
230
246
|
else:
|
|
231
247
|
return zero
|
|
232
|
-
|
|
248
|
+
|
|
249
|
+
if prec is Infinity:
|
|
250
|
+
L = LazyPowerSeriesRing(self._base, name)
|
|
251
|
+
return L(coeff_exp, valuation=1)
|
|
252
|
+
L = PowerSeriesRing(self._base, name, default_prec=prec)
|
|
253
|
+
return L([0] + [coeff_exp(i) for i in range(1,prec)], prec=prec)
|
|
233
254
|
|
|
234
255
|
@cached_method
|
|
235
256
|
def _compute_coefficient_log(self, k):
|
|
@@ -265,7 +286,7 @@ class DrinfeldModule_charzero(DrinfeldModule):
|
|
|
265
286
|
c += self._compute_coefficient_log(i)*self._gen[j]**(q**i)
|
|
266
287
|
return c/(T - T**(q**k))
|
|
267
288
|
|
|
268
|
-
def logarithm(self, name='z'):
|
|
289
|
+
def logarithm(self, prec=Infinity, name='z'):
|
|
269
290
|
r"""
|
|
270
291
|
Return the logarithm of the given Drinfeld module.
|
|
271
292
|
|
|
@@ -276,27 +297,36 @@ class DrinfeldModule_charzero(DrinfeldModule):
|
|
|
276
297
|
|
|
277
298
|
INPUT:
|
|
278
299
|
|
|
300
|
+
- ``prec`` -- an integer or ``Infinity`` (default: ``Infinity``);
|
|
301
|
+
the precision at which the series is returned; if ``Infinity``,
|
|
302
|
+
a lazy power series in returned
|
|
303
|
+
|
|
279
304
|
- ``name`` -- string (default: ``'z'``); the name of the
|
|
280
305
|
generator of the lazy power series ring
|
|
281
306
|
|
|
282
|
-
OUTPUT: a lazy power series over the base field
|
|
283
|
-
|
|
284
307
|
EXAMPLES::
|
|
285
308
|
|
|
286
309
|
sage: A = GF(2)['T']
|
|
287
310
|
sage: K.<T> = Frac(A)
|
|
288
311
|
sage: phi = DrinfeldModule(A, [T, 1])
|
|
289
|
-
sage: log = phi.logarithm(); log
|
|
290
|
-
z + ((1/(T^2+T))*z^2) + ((1/(T^6+T^5+T^3+T^2))*z^4) + O(z^8)
|
|
291
312
|
|
|
292
|
-
|
|
293
|
-
|
|
313
|
+
When ``prec`` is ``Infinity`` (which is the default),
|
|
314
|
+
the logarithm is returned as a lazy power series, meaning
|
|
315
|
+
that any of its coefficients can be computed on demands::
|
|
294
316
|
|
|
317
|
+
sage: log = phi.logarithm(); log
|
|
318
|
+
z + ((1/(T^2+T))*z^2) + ((1/(T^6+T^5+T^3+T^2))*z^4) + O(z^8)
|
|
295
319
|
sage: log[2^4]
|
|
296
320
|
1/(T^30 + T^29 + T^27 + ... + T^7 + T^5 + T^4)
|
|
297
321
|
sage: log[2^5]
|
|
298
322
|
1/(T^62 + T^61 + T^59 + ... + T^8 + T^6 + T^5)
|
|
299
323
|
|
|
324
|
+
If ``prec`` is a finite number, all the
|
|
325
|
+
required coefficients are computed at once::
|
|
326
|
+
|
|
327
|
+
sage: phi.logarithm(prec=10)
|
|
328
|
+
z + (1/(T^2 + T))*z^2 + (1/(T^6 + T^5 + T^3 + T^2))*z^4 + (1/(T^14 + T^13 + T^11 + T^10 + T^7 + T^6 + T^4 + T^3))*z^8 + O(z^10)
|
|
329
|
+
|
|
300
330
|
Example in higher rank::
|
|
301
331
|
|
|
302
332
|
sage: A = GF(5)['T']
|
|
@@ -318,7 +348,6 @@ class DrinfeldModule_charzero(DrinfeldModule):
|
|
|
318
348
|
sage: log[2**3] == -1/((T**q - T)*(T**(q**2) - T)*(T**(q**3) - T)) # expected value
|
|
319
349
|
True
|
|
320
350
|
"""
|
|
321
|
-
L = LazyPowerSeriesRing(self._base, name)
|
|
322
351
|
q = self._Fq.cardinality()
|
|
323
352
|
|
|
324
353
|
def coeff_log(k):
|
|
@@ -329,7 +358,12 @@ class DrinfeldModule_charzero(DrinfeldModule):
|
|
|
329
358
|
return self._compute_coefficient_log(v)
|
|
330
359
|
else:
|
|
331
360
|
return self._base.zero()
|
|
332
|
-
|
|
361
|
+
|
|
362
|
+
if prec is Infinity:
|
|
363
|
+
L = LazyPowerSeriesRing(self._base, name)
|
|
364
|
+
return L(coeff_log, valuation=1)
|
|
365
|
+
L = PowerSeriesRing(self._base, name, default_prec=prec)
|
|
366
|
+
return L([0] + [coeff_log(i) for i in range(1, prec)], prec=prec)
|
|
333
367
|
|
|
334
368
|
@cached_method
|
|
335
369
|
def _compute_goss_polynomial(self, n, q, poly_ring, X):
|
|
@@ -415,3 +449,225 @@ class DrinfeldModule_charzero(DrinfeldModule):
|
|
|
415
449
|
X = poly_ring.gen()
|
|
416
450
|
q = self._Fq.cardinality()
|
|
417
451
|
return self._compute_goss_polynomial(n, q, poly_ring, X)
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
class DrinfeldModule_rational(DrinfeldModule_charzero):
|
|
455
|
+
"""
|
|
456
|
+
A class for Drinfeld modules defined over the fraction
|
|
457
|
+
field of the underlying function field.
|
|
458
|
+
|
|
459
|
+
TESTS::
|
|
460
|
+
|
|
461
|
+
sage: q = 9
|
|
462
|
+
sage: Fq = GF(q)
|
|
463
|
+
sage: A = Fq['T']
|
|
464
|
+
sage: K.<T> = Frac(A)
|
|
465
|
+
sage: C = DrinfeldModule(A, [T, 1]); C
|
|
466
|
+
Drinfeld module defined by T |--> t + T
|
|
467
|
+
sage: type(C)
|
|
468
|
+
<class 'sage.rings.function_field.drinfeld_modules.charzero_drinfeld_module.DrinfeldModule_rational_with_category'>
|
|
469
|
+
"""
|
|
470
|
+
def coefficient_in_function_ring(self, n):
|
|
471
|
+
r"""
|
|
472
|
+
Return the `n`-th coefficient of this Drinfeld module as
|
|
473
|
+
an element of the underlying function ring.
|
|
474
|
+
|
|
475
|
+
INPUT:
|
|
476
|
+
|
|
477
|
+
- ``n`` -- an integer
|
|
478
|
+
|
|
479
|
+
EXAMPLES::
|
|
480
|
+
|
|
481
|
+
sage: q = 5
|
|
482
|
+
sage: Fq = GF(q)
|
|
483
|
+
sage: A = Fq['T']
|
|
484
|
+
sage: R = Fq['U']
|
|
485
|
+
sage: K.<U> = Frac(R)
|
|
486
|
+
sage: phi = DrinfeldModule(A, [U, 0, U^2, U^3])
|
|
487
|
+
sage: phi.coefficient_in_function_ring(2)
|
|
488
|
+
T^2
|
|
489
|
+
|
|
490
|
+
Compare with the method meth:`coefficient`::
|
|
491
|
+
|
|
492
|
+
sage: phi.coefficient(2)
|
|
493
|
+
U^2
|
|
494
|
+
|
|
495
|
+
If the required coefficient is not a polynomials,
|
|
496
|
+
an error is raised::
|
|
497
|
+
|
|
498
|
+
sage: psi = DrinfeldModule(A, [U, 1/U])
|
|
499
|
+
sage: psi.coefficient_in_function_ring(0)
|
|
500
|
+
T
|
|
501
|
+
sage: psi.coefficient_in_function_ring(1)
|
|
502
|
+
Traceback (most recent call last):
|
|
503
|
+
...
|
|
504
|
+
ValueError: coefficient is not polynomial
|
|
505
|
+
"""
|
|
506
|
+
A = self.function_ring()
|
|
507
|
+
g = self.coefficient(n)
|
|
508
|
+
g = g.backend(force=True)
|
|
509
|
+
if g.denominator().is_one():
|
|
510
|
+
return A(g.numerator().list())
|
|
511
|
+
else:
|
|
512
|
+
raise ValueError("coefficient is not polynomial")
|
|
513
|
+
|
|
514
|
+
def coefficients_in_function_ring(self, sparse=True):
|
|
515
|
+
r"""
|
|
516
|
+
Return the coefficients of this Drinfeld module as elements
|
|
517
|
+
of the underlying function ring.
|
|
518
|
+
|
|
519
|
+
INPUT:
|
|
520
|
+
|
|
521
|
+
- ``sparse`` -- a boolean (default: ``True``); if ``True``,
|
|
522
|
+
only return the nonzero coefficients; otherwise, return
|
|
523
|
+
all of them.
|
|
524
|
+
|
|
525
|
+
EXAMPLES::
|
|
526
|
+
|
|
527
|
+
sage: q = 5
|
|
528
|
+
sage: Fq = GF(q)
|
|
529
|
+
sage: A = Fq['T']
|
|
530
|
+
sage: R = Fq['U']
|
|
531
|
+
sage: K.<U> = Frac(R)
|
|
532
|
+
sage: phi = DrinfeldModule(A, [U, 0, U^2, U^3])
|
|
533
|
+
sage: phi.coefficients_in_function_ring()
|
|
534
|
+
[T, T^2, T^3]
|
|
535
|
+
sage: phi.coefficients_in_function_ring(sparse=False)
|
|
536
|
+
[T, 0, T^2, T^3]
|
|
537
|
+
|
|
538
|
+
Compare with the method meth:`coefficients`::
|
|
539
|
+
|
|
540
|
+
sage: phi.coefficients()
|
|
541
|
+
[U, U^2, U^3]
|
|
542
|
+
|
|
543
|
+
If the coefficients are not polynomials, an error is raised::
|
|
544
|
+
|
|
545
|
+
sage: psi = DrinfeldModule(A, [U, 1/U])
|
|
546
|
+
sage: psi.coefficients_in_function_ring()
|
|
547
|
+
Traceback (most recent call last):
|
|
548
|
+
...
|
|
549
|
+
ValueError: coefficients are not polynomials
|
|
550
|
+
"""
|
|
551
|
+
A = self.function_ring()
|
|
552
|
+
gs = []
|
|
553
|
+
for g in self.coefficients(sparse):
|
|
554
|
+
g = g.backend(force=True)
|
|
555
|
+
if g.denominator().is_one():
|
|
556
|
+
gs.append(A(g.numerator().list()))
|
|
557
|
+
else:
|
|
558
|
+
raise ValueError("coefficients are not polynomials")
|
|
559
|
+
return gs
|
|
560
|
+
|
|
561
|
+
def class_polynomial(self):
|
|
562
|
+
r"""
|
|
563
|
+
Return the class polynomial, that is the Fitting ideal
|
|
564
|
+
of the class module, of this Drinfeld module.
|
|
565
|
+
|
|
566
|
+
We refer to [Tae2012]_ for the definition and basic
|
|
567
|
+
properties of the class module.
|
|
568
|
+
|
|
569
|
+
EXAMPLES:
|
|
570
|
+
|
|
571
|
+
We check that the class module of the Carlitz module
|
|
572
|
+
is trivial::
|
|
573
|
+
|
|
574
|
+
sage: q = 5
|
|
575
|
+
sage: Fq = GF(q)
|
|
576
|
+
sage: A = Fq['T']
|
|
577
|
+
sage: K.<T> = Frac(A)
|
|
578
|
+
sage: C = DrinfeldModule(A, [T, 1]); C
|
|
579
|
+
Drinfeld module defined by T |--> t + T
|
|
580
|
+
sage: C.class_polynomial()
|
|
581
|
+
1
|
|
582
|
+
|
|
583
|
+
When the coefficients of the Drinfeld module have small
|
|
584
|
+
enough degrees, the class module is always trivial::
|
|
585
|
+
|
|
586
|
+
sage: gs = [T] + [A.random_element(degree = q^i)
|
|
587
|
+
....: for i in range(1, 5)]
|
|
588
|
+
sage: phi = DrinfeldModule(A, gs)
|
|
589
|
+
sage: phi.class_polynomial()
|
|
590
|
+
1
|
|
591
|
+
|
|
592
|
+
Here is an example with a nontrivial class module::
|
|
593
|
+
|
|
594
|
+
sage: phi = DrinfeldModule(A, [T, 2*T^14 + 2*T^4])
|
|
595
|
+
sage: phi.class_polynomial()
|
|
596
|
+
T + 3
|
|
597
|
+
|
|
598
|
+
TESTS:
|
|
599
|
+
|
|
600
|
+
The Drinfeld module must have polynomial coefficients::
|
|
601
|
+
|
|
602
|
+
sage: phi = DrinfeldModule(A, [T, 1/T])
|
|
603
|
+
sage: phi.class_polynomial()
|
|
604
|
+
Traceback (most recent call last):
|
|
605
|
+
...
|
|
606
|
+
ValueError: coefficients are not polynomials
|
|
607
|
+
"""
|
|
608
|
+
# The algorithm is based on the following remark:
|
|
609
|
+
# writing phi_T = g_0 + g_1*tau + ... + g_r*tau^r,
|
|
610
|
+
# if s > deg(g_i/(q^i - 1)) - 1 for all i, then the
|
|
611
|
+
# class module is equal to
|
|
612
|
+
# H := E(Kinfty/A) / < T^(-s), T^(-s-1), ... >
|
|
613
|
+
# where E(Kinfty/A) is Kinfty/A equipped with the
|
|
614
|
+
# A-module structure coming from phi.
|
|
615
|
+
|
|
616
|
+
A = self.function_ring()
|
|
617
|
+
Fq = A.base_ring()
|
|
618
|
+
q = Fq.cardinality()
|
|
619
|
+
r = self.rank()
|
|
620
|
+
|
|
621
|
+
# We compute the bound s
|
|
622
|
+
gs = self.coefficients_in_function_ring(sparse=False)
|
|
623
|
+
s = max(gs[i].degree() // (q**i - 1) for i in range(1, r+1))
|
|
624
|
+
if s == 0:
|
|
625
|
+
return A.one()
|
|
626
|
+
|
|
627
|
+
# We compute the matrix of phi_T acting on the quotient
|
|
628
|
+
# M := (Kinfty/A) / < T^(-s), T^(-s-1), ... >
|
|
629
|
+
# (for the standard structure of A-module!)
|
|
630
|
+
M = matrix(Fq, s)
|
|
631
|
+
qk = 1
|
|
632
|
+
for k in range(r+1):
|
|
633
|
+
for i in range(s):
|
|
634
|
+
e = (i+1)*qk
|
|
635
|
+
for j in range(s):
|
|
636
|
+
e -= 1
|
|
637
|
+
if e < 0:
|
|
638
|
+
break
|
|
639
|
+
M[i, j] += gs[k][e]
|
|
640
|
+
qk *= q
|
|
641
|
+
|
|
642
|
+
# We compute the subspace of E(Kinfty/A) (for the twisted
|
|
643
|
+
# structure of A-module!)
|
|
644
|
+
# V = < T^(-s), T^(-s+1), ... >
|
|
645
|
+
# It is also the phi_T-saturation of T^(-s+1) in M, i.e.
|
|
646
|
+
# the Fq-vector space generated by the phi_T^i(T^(-s+1))
|
|
647
|
+
# for i varying in NN.
|
|
648
|
+
v = vector(Fq, s)
|
|
649
|
+
v[s-1] = 1
|
|
650
|
+
vs = [v]
|
|
651
|
+
for i in range(s-1):
|
|
652
|
+
v = v*M
|
|
653
|
+
vs.append(v)
|
|
654
|
+
V = matrix(vs)
|
|
655
|
+
V.echelonize()
|
|
656
|
+
|
|
657
|
+
# We compute the action of phi_T on H = M/V
|
|
658
|
+
# as an Fq-linear map (encoded in the matrix N)
|
|
659
|
+
dim = V.rank()
|
|
660
|
+
pivots = V.pivots()
|
|
661
|
+
j = ip = 0
|
|
662
|
+
for i in range(dim, s):
|
|
663
|
+
while ip < dim and j == pivots[ip]:
|
|
664
|
+
j += 1
|
|
665
|
+
ip += 1
|
|
666
|
+
V[i,j] = 1
|
|
667
|
+
N = (V * M * ~V).submatrix(dim, dim)
|
|
668
|
+
|
|
669
|
+
# The class module is now H where the action of T
|
|
670
|
+
# is given by the matrix N
|
|
671
|
+
# The class polynomial is then the characteristic
|
|
672
|
+
# polynomial of N
|
|
673
|
+
return A(N.charpoly())
|
|
@@ -37,6 +37,7 @@ from sage.misc.lazy_string import _LazyString
|
|
|
37
37
|
from sage.misc.misc_c import prod
|
|
38
38
|
from sage.rings.integer import Integer
|
|
39
39
|
from sage.rings.integer_ring import ZZ
|
|
40
|
+
from sage.rings.fraction_field import FractionField_generic
|
|
40
41
|
from sage.rings.polynomial.ore_polynomial_element import OrePolynomial
|
|
41
42
|
from sage.rings.polynomial.polynomial_ring import PolynomialRing_generic
|
|
42
43
|
from sage.structure.parent import Parent
|
|
@@ -622,9 +623,17 @@ class DrinfeldModule(Parent, UniqueRepresentation):
|
|
|
622
623
|
raise ValueError('generator must have positive degree')
|
|
623
624
|
|
|
624
625
|
# Instantiate the appropriate class:
|
|
625
|
-
|
|
626
|
+
backend = base_field.backend(force=True)
|
|
627
|
+
if backend.is_finite():
|
|
626
628
|
from sage.rings.function_field.drinfeld_modules.finite_drinfeld_module import DrinfeldModule_finite
|
|
627
629
|
return DrinfeldModule_finite(gen, category)
|
|
630
|
+
if isinstance(backend, FractionField_generic):
|
|
631
|
+
ring = backend.ring()
|
|
632
|
+
if (isinstance(ring, PolynomialRing_generic)
|
|
633
|
+
and ring.base_ring() is function_ring_base
|
|
634
|
+
and base_morphism(T) == ring.gen()):
|
|
635
|
+
from .charzero_drinfeld_module import DrinfeldModule_rational
|
|
636
|
+
return DrinfeldModule_rational(gen, category)
|
|
628
637
|
if not category._characteristic:
|
|
629
638
|
from .charzero_drinfeld_module import DrinfeldModule_charzero
|
|
630
639
|
return DrinfeldModule_charzero(gen, category)
|