|
2 | 2 | r"""
|
3 | 3 | Drinfeld modules over rings of characteristic zero
|
4 | 4 |
|
5 |
| -This module provides the class |
6 |
| -:class:`sage.rings.function_fields.drinfeld_module.charzero_drinfeld_module.DrinfeldModule_charzero`, |
7 |
| -which inherits |
| 5 | +This module provides the classes |
| 6 | +:class:`sage.rings.function_fields.drinfeld_module.charzero_drinfeld_module.DrinfeldModule_charzero` and |
| 7 | +:class:`sage.rings.function_fields.drinfeld_module.charzero_drinfeld_module.DrinfeldModule_rational`, |
| 8 | +which both inherit |
8 | 9 | :class:`sage.rings.function_fields.drinfeld_module.drinfeld_module.DrinfeldModule`.
|
9 | 10 |
|
10 | 11 | AUTHORS:
|
11 | 12 |
|
12 | 13 | - David Ayotte (2023-09)
|
| 14 | +- Xavier Caruso (2024-12) - computation of class polynomials |
13 | 15 | """
|
14 | 16 |
|
15 | 17 | # *****************************************************************************
|
|
27 | 29 | from sage.rings.integer_ring import ZZ
|
28 | 30 | from sage.rings.infinity import Infinity
|
29 | 31 |
|
| 32 | +from sage.matrix.constructor import matrix |
| 33 | +from sage.modules.free_module_element import vector |
| 34 | + |
30 | 35 | from sage.misc.cachefunc import cached_method
|
31 | 36 | from sage.misc.lazy_import import lazy_import
|
32 | 37 |
|
@@ -443,3 +448,225 @@ def goss_polynomial(self, n, var='X'):
|
443 | 448 | X = poly_ring.gen()
|
444 | 449 | q = self._Fq.cardinality()
|
445 | 450 | return self._compute_goss_polynomial(n, q, poly_ring, X)
|
| 451 | + |
| 452 | + |
| 453 | +class DrinfeldModule_rational(DrinfeldModule_charzero): |
| 454 | + """ |
| 455 | + A class for Drinfeld modules defined over the fraction |
| 456 | + field of the underlying function field. |
| 457 | +
|
| 458 | + TESTS:: |
| 459 | +
|
| 460 | + sage: q = 9 |
| 461 | + sage: Fq = GF(q) |
| 462 | + sage: A = Fq['T'] |
| 463 | + sage: K.<T> = Frac(A) |
| 464 | + sage: C = DrinfeldModule(A, [T, 1]); C |
| 465 | + Drinfeld module defined by T |--> t + T |
| 466 | + sage: type(C) |
| 467 | + <class 'sage.rings.function_field.drinfeld_modules.charzero_drinfeld_module.DrinfeldModule_rational_with_category'> |
| 468 | + """ |
| 469 | + def coefficient_in_function_ring(self, n): |
| 470 | + r""" |
| 471 | + Return the `n`-th coefficient of this Drinfeld module as |
| 472 | + an element of the underlying function ring. |
| 473 | +
|
| 474 | + INPUT: |
| 475 | +
|
| 476 | + - ``n`` -- an integer |
| 477 | +
|
| 478 | + EXAMPLES:: |
| 479 | +
|
| 480 | + sage: q = 5 |
| 481 | + sage: Fq = GF(q) |
| 482 | + sage: A = Fq['T'] |
| 483 | + sage: R = Fq['U'] |
| 484 | + sage: K.<U> = Frac(R) |
| 485 | + sage: phi = DrinfeldModule(A, [U, 0, U^2, U^3]) |
| 486 | + sage: phi.coefficient_in_function_ring(2) |
| 487 | + T^2 |
| 488 | +
|
| 489 | + Compare with the method meth:`coefficient`:: |
| 490 | +
|
| 491 | + sage: phi.coefficient(2) |
| 492 | + U^2 |
| 493 | +
|
| 494 | + If the required coefficient is not a polynomials, |
| 495 | + an error is raised:: |
| 496 | +
|
| 497 | + sage: psi = DrinfeldModule(A, [U, 1/U]) |
| 498 | + sage: psi.coefficient_in_function_ring(0) |
| 499 | + T |
| 500 | + sage: psi.coefficient_in_function_ring(1) |
| 501 | + Traceback (most recent call last): |
| 502 | + ... |
| 503 | + ValueError: coefficient is not polynomial |
| 504 | + """ |
| 505 | + A = self.function_ring() |
| 506 | + g = self.coefficient(n) |
| 507 | + g = g.backend(force=True) |
| 508 | + if g.denominator().is_one(): |
| 509 | + return A(g.numerator().list()) |
| 510 | + else: |
| 511 | + raise ValueError("coefficient is not polynomial") |
| 512 | + |
| 513 | + def coefficients_in_function_ring(self, sparse=True): |
| 514 | + r""" |
| 515 | + Return the coefficients of this Drinfeld module as elements |
| 516 | + of the underlying function ring. |
| 517 | +
|
| 518 | + INPUT: |
| 519 | +
|
| 520 | + - ``sparse`` -- a boolean (default: ``True``); if ``True``, |
| 521 | + only return the nonzero coefficients; otherwise, return |
| 522 | + all of them. |
| 523 | +
|
| 524 | + EXAMPLES:: |
| 525 | +
|
| 526 | + sage: q = 5 |
| 527 | + sage: Fq = GF(q) |
| 528 | + sage: A = Fq['T'] |
| 529 | + sage: R = Fq['U'] |
| 530 | + sage: K.<U> = Frac(R) |
| 531 | + sage: phi = DrinfeldModule(A, [U, 0, U^2, U^3]) |
| 532 | + sage: phi.coefficients_in_function_ring() |
| 533 | + [T, T^2, T^3] |
| 534 | + sage: phi.coefficients_in_function_ring(sparse=False) |
| 535 | + [T, 0, T^2, T^3] |
| 536 | +
|
| 537 | + Compare with the method meth:`coefficients`:: |
| 538 | +
|
| 539 | + sage: phi.coefficients() |
| 540 | + [U, U^2, U^3] |
| 541 | +
|
| 542 | + If the coefficients are not polynomials, an error is raised:: |
| 543 | +
|
| 544 | + sage: psi = DrinfeldModule(A, [U, 1/U]) |
| 545 | + sage: psi.coefficients_in_function_ring() |
| 546 | + Traceback (most recent call last): |
| 547 | + ... |
| 548 | + ValueError: coefficients are not polynomials |
| 549 | + """ |
| 550 | + A = self.function_ring() |
| 551 | + gs = [] |
| 552 | + for g in self.coefficients(sparse): |
| 553 | + g = g.backend(force=True) |
| 554 | + if g.denominator().is_one(): |
| 555 | + gs.append(A(g.numerator().list())) |
| 556 | + else: |
| 557 | + raise ValueError("coefficients are not polynomials") |
| 558 | + return gs |
| 559 | + |
| 560 | + def class_polynomial(self): |
| 561 | + r""" |
| 562 | + Return the class polynomial, that is the Fitting ideal |
| 563 | + of the class module, of this Drinfeld module. |
| 564 | +
|
| 565 | + We refer to [Tae2012]_ for the definition and basic |
| 566 | + properties of the class module. |
| 567 | +
|
| 568 | + EXAMPLES: |
| 569 | +
|
| 570 | + We check that the class module of the Carlitz module |
| 571 | + is trivial:: |
| 572 | +
|
| 573 | + sage: q = 5 |
| 574 | + sage: Fq = GF(q) |
| 575 | + sage: A = Fq['T'] |
| 576 | + sage: K.<T> = Frac(A) |
| 577 | + sage: C = DrinfeldModule(A, [T, 1]); C |
| 578 | + Drinfeld module defined by T |--> t + T |
| 579 | + sage: C.class_polynomial() |
| 580 | + 1 |
| 581 | +
|
| 582 | + When the coefficients of the Drinfeld module have small |
| 583 | + enough degrees, the class module is always trivial:: |
| 584 | +
|
| 585 | + sage: gs = [T] + [A.random_element(degree = q^i) |
| 586 | + ....: for i in range(1, 5)] |
| 587 | + sage: phi = DrinfeldModule(A, gs) |
| 588 | + sage: phi.class_polynomial() |
| 589 | + 1 |
| 590 | +
|
| 591 | + Here is an example with a nontrivial class module:: |
| 592 | +
|
| 593 | + sage: phi = DrinfeldModule(A, [T, 2*T^14 + 2*T^4]) |
| 594 | + sage: phi.class_polynomial() |
| 595 | + T + 3 |
| 596 | +
|
| 597 | + TESTS: |
| 598 | +
|
| 599 | + The Drinfeld module must have polynomial coefficients:: |
| 600 | +
|
| 601 | + sage: phi = DrinfeldModule(A, [T, 1/T]) |
| 602 | + sage: phi.class_polynomial() |
| 603 | + Traceback (most recent call last): |
| 604 | + ... |
| 605 | + ValueError: coefficients are not polynomials |
| 606 | + """ |
| 607 | + # The algorithm is based on the following remark: |
| 608 | + # writing phi_T = g_0 + g_1*tau + ... + g_r*tau^r, |
| 609 | + # if s > deg(g_i/(q^i - 1)) - 1 for all i, then the |
| 610 | + # class module is equal to |
| 611 | + # H := E(Kinfty/A) / < T^(-s), T^(-s-1), ... > |
| 612 | + # where E(Kinfty/A) is Kinfty/A equipped with the |
| 613 | + # A-module structure coming from phi. |
| 614 | + |
| 615 | + A = self.function_ring() |
| 616 | + Fq = A.base_ring() |
| 617 | + q = Fq.cardinality() |
| 618 | + r = self.rank() |
| 619 | + |
| 620 | + # We compute the bound s |
| 621 | + gs = self.coefficients_in_function_ring(sparse=False) |
| 622 | + s = max(gs[i].degree() // (q**i - 1) for i in range(1, r+1)) |
| 623 | + if s == 0: |
| 624 | + return A.one() |
| 625 | + |
| 626 | + # We compute the matrix of phi_T acting on the quotient |
| 627 | + # M := (Kinfty/A) / < T^(-s), T^(-s-1), ... > |
| 628 | + # (for the standard structure of A-module!) |
| 629 | + M = matrix(Fq, s) |
| 630 | + qk = 1 |
| 631 | + for k in range(r+1): |
| 632 | + for i in range(s): |
| 633 | + e = (i+1)*qk |
| 634 | + for j in range(s): |
| 635 | + e -= 1 |
| 636 | + if e < 0: |
| 637 | + break |
| 638 | + M[i, j] += gs[k][e] |
| 639 | + qk *= q |
| 640 | + |
| 641 | + # We compute the subspace of E(Kinfty/A) (for the twisted |
| 642 | + # structure of A-module!) |
| 643 | + # V = < T^(-s), T^(-s+1), ... > |
| 644 | + # It is also the phi_T-saturation of T^(-s+1) in M, i.e. |
| 645 | + # the Fq-vector space generated by the phi_T^i(T^(-s+1)) |
| 646 | + # for i varying in NN. |
| 647 | + v = vector(Fq, s) |
| 648 | + v[s-1] = 1 |
| 649 | + vs = [v] |
| 650 | + for i in range(s-1): |
| 651 | + v = v*M |
| 652 | + vs.append(v) |
| 653 | + V = matrix(vs) |
| 654 | + V.echelonize() |
| 655 | + |
| 656 | + # We compute the action of phi_T on H = M/V |
| 657 | + # as an Fq-linear map (encoded in the matrix N) |
| 658 | + dim = V.rank() |
| 659 | + pivots = V.pivots() |
| 660 | + j = ip = 0 |
| 661 | + for i in range(dim, s): |
| 662 | + while ip < dim and j == pivots[ip]: |
| 663 | + j += 1 |
| 664 | + ip += 1 |
| 665 | + V[i,j] = 1 |
| 666 | + N = (V * M * ~V).submatrix(dim, dim) |
| 667 | + |
| 668 | + # The class module is now H where the action of T |
| 669 | + # is given by the matrix N |
| 670 | + # The class polynomial is then the characteristic |
| 671 | + # polynomial of N |
| 672 | + return A(N.charpoly()) |
0 commit comments