Ticket #11319: trac_11319_number_field_example.patch

File trac_11319_number_field_example.patch, 1.1 KB (added by johanbosman, 10 years ago)

To be used on top of the first patch

  • sage/rings/finite_rings/finite_field_prime_modn.py

    # HG changeset patch
    # User Johan Bosman <johan.g.bosman@gmail.com>
    # Date 1312300741 -3600
    # Node ID 0c8ca666d44a55b63ba98dc29a7b0b3461113c7d
    # Parent  2eb514b38954896790881cf4ab1d632332c8e938
    Trac 11319: extra example involving a number field
    
    diff -r 2eb514b38954 -r 0c8ca666d44a sage/rings/finite_rings/finite_field_prime_modn.py
    a b  
    138138            5
    139139            sage: ZZ.residue_field(7).hom(GF(7))(1)  # See trac 11319
    140140            1
     141            sage: K.<w> = QuadraticField(337)  # See trac 11319
     142            sage: pp = K.ideal(13).factor()[0][0]
     143            sage: RF13 = K.residue_field(pp)
     144            sage: RF13.hom([GF(13)(1)])
     145            Ring morphism:
     146             From: Residue field of Fractional ideal (w - 18)
     147             To:   Finite Field of size 13
     148             Defn: 1 |--> 1
    141149        """
    142150        from sage.rings.integer_ring import ZZ
    143151        from sage.rings.finite_rings.integer_mod_ring import IntegerModRing_generic